| | |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.xzx.gc.common.utils.StringUtils; |
| | | import com.xzx.gc.common.constant.Constants; |
| | | import com.xzx.gc.common.exception.RestException; |
| | | import com.xzx.gc.common.utils.IdUtils; |
| | |
| | | Date createdTimeEnd = model.getCreatedTimeEnd(); |
| | | PageHelper.startPage(model.getPage(), model.getLimit()); |
| | | List<QueryOrderListVo> maps = scoreOrderMapper.queryOrderList(name,orderNo,status,createdTimeStart,createdTimeEnd); |
| | | if(CollUtil.isNotEmpty(maps)){ |
| | | for(QueryOrderListVo queryOrderListVo : maps){ |
| | | String decode = StringUtils.decode(queryOrderListVo.getName()); |
| | | queryOrderListVo.setName(decode); |
| | | } |
| | | } |
| | | PageInfo pageInfo = new PageInfo(maps); |
| | | int count = Convert.toInt(pageInfo.getTotal()); |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | viewOrderVo.setVoucherImgs(lists); |
| | | //2-待收货3-已收货4-已完成5-已评价,获取物流信息 |
| | | Integer status = scoreOrder.getStatus() == null ? 0:scoreOrder.getStatus(); |
| | | if(ScoreOrder.STATUS_DOING == status |
| | | || ScoreOrder.STATUS_DONE == status |
| | | || ScoreOrder.STATUS_ON == status |
| | | || ScoreOrder.STATUS_EVALUATE == status){ |
| | | // if(ScoreOrder.STATUS_DOING == status |
| | | // || ScoreOrder.STATUS_DONE == status |
| | | // || ScoreOrder.STATUS_ON == status |
| | | // || ScoreOrder.STATUS_EVALUATE == status){ |
| | | Example exampleExpress = new Example(ScoreExpressInfo.class); |
| | | Example.Criteria criteriaExpress = exampleExpress.createCriteria(); |
| | | criteriaExpress.andEqualTo("orderId",id); |
| | | ScoreExpressInfo scoreExpressInfo = scoreExpressInfoMapper.selectOneByExample(exampleExpress); |
| | | ExpressInfoVo expressInfoVo = objectMapper.convertValue(scoreExpressInfo, ExpressInfoVo.class); |
| | | viewOrderVo.setExpressInfoVo(expressInfoVo); |
| | | } |
| | | // } |
| | | //订单详情 |
| | | Example exampleDetails = new Example(ScoreOrderDetails.class); |
| | | Example.Criteria criteriaDetails = exampleDetails.createCriteria(); |
| | |
| | | expressInfo.setCreatedTime(new Date()); |
| | | scoreExpressInfoMapper.insert(expressInfo); |
| | | |
| | | AccountInfo update = new AccountInfo(); |
| | | update.setAccountId(accountInfo.getAccountId()); |
| | | BigDecimal remianScore = score.subtract(totalPrice); |
| | | update.setCollectScore(remianScore.toString()); |
| | | accountInfoMapper.updateByPrimaryKey(update); |
| | | BigDecimal remianScore = score.subtract(totalPrice).setScale(0, BigDecimal.ROUND_DOWN); |
| | | accountInfo.setCollectScore(remianScore.toString()); |
| | | accountInfoMapper.updateByPrimaryKey(accountInfo); |
| | | |
| | | ScoreDetails scoreDetails = new ScoreDetails(); |
| | | scoreDetails.setOrderNo(order.getOrderNo()); |