• 基于Springboot+Vue的校园二手交易市场


    基于Springboot+Vue的校园二手交易市场

    技术架构

    后端: Springboot

    前端:Vue

    数据库:Mysql

    功能模块

    • 用户登录注册,忘记密码(基于邮箱验证码)

    • 发布二手商品

    • 收藏商品

    • 商品详情

    • 商品留言

    • 商品下架

    • 简单交易

    1. @PostMapping(value = "/messageList", produces = "application/json")
    2.    @ApiOperation("分页查询留言列表,入参是page:第几页,number:每页几条,pId:属于哪个商品的id")
    3.    public JSONObject messageList(@RequestBody JSONObject jsonObject) {
    4.        JSONObject ret = new JSONObject();
    5.        try {
    6.            Long page = jsonObject.getLong("page");
    7.            Long number = jsonObject.getLong("number");
    8.            String pId = jsonObject.getString("pId");
    9.            Map<String, Object> map = new HashMap<>();
    10.            map.put("page", page);
    11.            map.put("number", number);
    12.            map.put("pId", pId);
    13.            if (page != null && number != null) {
    14.                Page<Message> messagePage = messageService.selectListPage(map);
    15.                List<Message> messagesList = messagePage.getRecords();
    16.                ret.put("code", 0);
    17.                ret.put("data", StringTool.ListToJsonArray(messagesList));
    18.                ret.put("total", messagePage.getTotal());//总数
    19.                ret.put("next", messagePage.hasNext());//下一页
    20.                ret.put("previous", messagePage.hasPrevious());//上一页
    21.                ret.put("msg", "查询成功");
    22.           }
    23.       } catch (Exception e) {
    24.            e.printStackTrace();
    25.            ret.put("code", -1);
    26.            ret.put("data", null);
    27.            ret.put("msg", "查询失败");
    28.       }
    29.        return ret;
    30.   }

     源码获取链接https://gitee.com/wuyanzua/blog-applet

  • 相关阅读:
    为了学明白中断机制,我努力了
    471-82(647、5、92、143、148、19)
    项目实战——创建菜单与游戏页面(下)
    1012 The Best Rank
    flex布局与float布局
    containerd的安装和使用
    Azure DevOps Server 入门实践与安装部署
    用Python操作Word文档,看这一篇就对了!
    K8S基础服务(apiserver、controller、scheduler、etcd)时区设置
    MySQL的锁
  • 原文地址:https://blog.csdn.net/weixin_46228112/article/details/125507387