| | |
| | | orderStatus2.add("7"); |
| | | for (UserModel mx : map) { |
| | | |
| | | //推广人数(暂时没有推广关系为空),订单数,环保金,积分 |
| | | if (userModel.getExportFlag() == 0) { |
| | | //订单数 |
| | | Integer orderNum = 0; |
| | | Example exampleOrder = new Example(OrderInfo.class); |
| | | Example.Criteria criteriaOrder = exampleOrder.createCriteria(); |
| | | criteriaOrder.andEqualTo("userId",mx.getUserId()); |
| | | criteriaOrder.andNotEqualTo("orderStatus",6); |
| | | List<OrderInfo> orderInfos = orderMapper.selectByExample(exampleOrder); |
| | | if(CollUtil.isNotEmpty(orderInfos)){ |
| | | orderNum = orderNum + orderInfos.size(); |
| | | } |
| | | |
| | | List<JhyOrder> jhyOrders = orderMapper.selectJhyOrderByUserId(mx.getUserId()); |
| | | if(CollUtil.isNotEmpty(jhyOrders)){ |
| | | orderNum = orderNum + jhyOrders.size(); |
| | | } |
| | | mx.setAllOrderNum(orderNum); |
| | | //环保金,积分 |
| | | AccountInfo accountInfo = accountService.findByUserId(mx.getUserId()); |
| | | if(ObjectUtil.isNotEmpty(accountInfo)){ |
| | | String money = accountInfo.getMoney(); |
| | | mx.setMoney(new BigDecimal(StrUtil.isEmpty(money) ? "0" : money).setScale( 2, BigDecimal.ROUND_DOWN )); |
| | | |
| | | String collectScore = StrUtil.isEmpty(accountInfo.getCollectScore()) ? "0":accountInfo.getCollectScore(); |
| | | mx.setCollectScore(new BigDecimal(collectScore).setScale( 2, BigDecimal.ROUND_DOWN )); |
| | | } |
| | | |
| | | } |
| | | // //推广人数(暂时没有推广关系为空),订单数,环保金,积分 |
| | | // if (userModel.getExportFlag() == 0) { |
| | | // //订单数 |
| | | // Integer orderNum = 0; |
| | | // Example exampleOrder = new Example(OrderInfo.class); |
| | | // Example.Criteria criteriaOrder = exampleOrder.createCriteria(); |
| | | // criteriaOrder.andEqualTo("userId",mx.getUserId()); |
| | | // criteriaOrder.andNotEqualTo("orderStatus",6); |
| | | // List<OrderInfo> orderInfos = orderMapper.selectByExample(exampleOrder); |
| | | // if(CollUtil.isNotEmpty(orderInfos)){ |
| | | // orderNum = orderNum + orderInfos.size(); |
| | | // } |
| | | // |
| | | // List<JhyOrder> jhyOrders = orderMapper.selectJhyOrderByUserId(mx.getUserId()); |
| | | // if(CollUtil.isNotEmpty(jhyOrders)){ |
| | | // orderNum = orderNum + jhyOrders.size(); |
| | | // } |
| | | // mx.setAllOrderNum(orderNum); |
| | | // //环保金,积分 |
| | | // AccountInfo accountInfo = accountService.findByUserId(mx.getUserId()); |
| | | // if(ObjectUtil.isNotEmpty(accountInfo)){ |
| | | // String money = accountInfo.getMoney(); |
| | | // mx.setMoney(new BigDecimal(StrUtil.isEmpty(money) ? "0" : money).setScale( 2, BigDecimal.ROUND_DOWN )); |
| | | // |
| | | // String collectScore = StrUtil.isEmpty(accountInfo.getCollectScore()) ? "0":accountInfo.getCollectScore(); |
| | | // mx.setCollectScore(new BigDecimal(collectScore).setScale( 2, BigDecimal.ROUND_DOWN )); |
| | | // } |
| | | // |
| | | // } |
| | | |
| | | //设置登录时间 |
| | | if (userModel.getExportFlag() == 0) { |
| | |
| | | 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()); |