xiaoyong931011
2021-07-07 0ee32743618b87562571f4e3df60fdc9742736b8
20210707
3 files modified
25 ■■■■■ changed files
gc-user/src/main/java/com/xzx/gc/user/controller/UserController.java 1 ●●●● patch | view | raw | blame | history
gc-user/src/main/java/com/xzx/gc/user/service/UserService.java 16 ●●●●● patch | view | raw | blame | history
gc-user/src/main/resources/mapper/user/OrderMapper.xml 8 ●●●● patch | view | raw | blame | history
gc-user/src/main/java/com/xzx/gc/user/controller/UserController.java
@@ -467,7 +467,6 @@
            @ApiImplicitParam(paramType="query", name = "userType", value = "用户类型(1为普通用户,2为回收员,3为代丢员,4入库员,5运营员)", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "mobilePhone", value = "手机号", required = true, dataType = "String")
    })
//    @ApiResponses({@ApiResponse( code = 200, message = "success", response = UserModel.class)})
    public JsonResult<Map<String, Object>> queryUserApiList(@RequestBody UserModel userModel){
        Map<String, Object> map = userService.queryCuserForTimeList(userModel);
        return JsonResult.success(map);
gc-user/src/main/java/com/xzx/gc/user/service/UserService.java
@@ -850,15 +850,19 @@
        List<Map<String, Object>> odlist = orderMapper.queryCuserOrderFinishList(userId, x);
        PageInfo<Map<String, Object>> pageInfo = new PageInfo<>(odlist);
        for (Map<String, Object> map : odlist) {
            map.put("orderid", map.get("orderId").toString());
            map.put("address", map.get("address").toString());
            map.put("status", map.get("status"));
            map.put("type", map.get("type"));
            map.put("money", DoubleUtil.roundTwo(map.get("money").toString()));
            map.put("score", DoubleUtil.roundTwo(map.get("score").toString()));
            map.put("weight", DoubleUtil.roundThree(map.get("weight").toString()));
            map.put("name", map.get("name").toString());
            map.put("orderid", map.get("orderId").toString());
            map.put("createtime", map.get("createTime").toString());
//            map.put("orderid", map.get("orderId").toString());
//            map.put("address", map.get("address").toString());
//            map.put("status", map.get("status"));
//            map.put("type", map.get("type"));
//            map.put("money", DoubleUtil.roundTwo(map.get("money").toString()));
//            map.put("score", DoubleUtil.roundTwo(map.get("score").toString()));
//            map.put("weight", DoubleUtil.roundThree(map.get("weight").toString()));
//            map.put("name", map.get("name").toString());
//            map.put("createtime", map.get("createTime").toString());
        }
        m.put("orderList", odlist);
        m.put("count", pageInfo.getTotal());
gc-user/src/main/resources/mapper/user/OrderMapper.xml
@@ -308,13 +308,7 @@
    </select>
    <select id="queryCuserOrderFinishList" resultType="java.util.HashMap">
        SELECT a.order_id as orderId,
               sum(d.money) as money,
               a.address as address,
               a.order_type as orderType,
               sum(d.weight) as weight,
               a.create_time as createTime
        FROM
        SELECT a.order_id as orderId, sum(d.money) as money,sum(d.weight) as weight,a.create_time as createTime FROM
        xzx_order_info a
        LEFT JOIN xzx_order_item_info d on a.order_id = d.order_id
        WHERE a.create_user_id=#{userId}