| | |
| | | for(QueryOrderListVo queryOrderListVo : maps){ |
| | | String decode = StringUtils.decode(queryOrderListVo.getName()); |
| | | queryOrderListVo.setName(decode); |
| | | BigDecimal totalPrice = new BigDecimal(StrUtil.isEmpty(queryOrderListVo.getTotalPrice()) ? "0" : queryOrderListVo.getTotalPrice()) |
| | | .setScale( 2, BigDecimal.ROUND_DOWN ); |
| | | queryOrderListVo.setTotalPrice(totalPrice.toString()); |
| | | |
| | | Long id = queryOrderListVo.getId(); |
| | | Example example = new Example(ScoreOrderDetails.class); |
| | | Example.Criteria criteria = example.createCriteria(); |
| | | criteria.andEqualTo("orderId",id); |
| | | List<ScoreOrderDetails> scoreOrderDetails = scoreOrderDetailsMapper.selectByExample(example); |
| | | if(CollUtil.isNotEmpty(scoreOrderDetails)){ |
| | | queryOrderListVo.setOrderDetails(scoreOrderDetails); |
| | | // StringBuffer stringBuffer = new StringBuffer(); |
| | | // for(ScoreOrderDetails scoreOrderDetail : scoreOrderDetails){ |
| | | // String goodsName = scoreOrderDetail.getGoodsName(); |
| | | // BigDecimal unitPrice = scoreOrderDetail.getUnitPrice(); |
| | | // String sku = scoreOrderDetail.getSku(); |
| | | // Integer cnt = scoreOrderDetail.getCnt(); |
| | | // BigDecimal totalPriceOrderDetail = scoreOrderDetail.getTotalPrice(); |
| | | // stringBuffer = stringBuffer.append(goodsName+"(") |
| | | // .append("规格:"+sku+","+unitPrice.setScale( 2, BigDecimal.ROUND_DOWN ).toString()+"*"+cnt.toString()+",") |
| | | // .append("总价:"+totalPriceOrderDetail.setScale( 2, BigDecimal.ROUND_DOWN ).toString()+";)"); |
| | | // } |
| | | // queryOrderListVo.setOrderDetails(stringBuffer.toString()); |
| | | } |
| | | } |
| | | } |
| | | PageInfo pageInfo = new PageInfo(maps); |
| | |
| | | public Long insureOrder(InsureOrderDto model) { |
| | | ScoreOrder scoreOrder = new ScoreOrder(); |
| | | scoreOrder.setId(model.getId()); |
| | | scoreOrder.setStatus(ScoreOrder.STATUS_DONE); |
| | | // scoreOrder.setStatus(ScoreOrder.STATUS_DONE); |
| | | scoreOrder.setIsFinish(ScoreOrder.ISFINISH_YES); |
| | | scoreOrder.setVoucherImg(CollUtil.join(model.getVoucherImgs(),",")); |
| | | scoreOrderMapper.updateByPrimaryKeySelective(scoreOrder); |
| | | return scoreOrder.getId(); |