| | |
| | | import com.xzx.gc.entity.ScoreOrder; |
| | | import com.xzx.gc.entity.ScoreOrderDetails; |
| | | import com.xzx.gc.shop.dto.DeliverGoodsDto; |
| | | import com.xzx.gc.shop.dto.InsureOrderDto; |
| | | import com.xzx.gc.shop.dto.QueryOrderListDto; |
| | | import com.xzx.gc.shop.mapper.ScoreExpressInfoMapper; |
| | | import com.xzx.gc.shop.mapper.ScoreOrderDetailsMapper; |
| | |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); |
| | | viewOrderVo = objectMapper.convertValue(scoreOrder, ViewOrderVo.class); |
| | | //2-待收货,3-已完成,获取物流信息 |
| | | //2-待收货3-已收货4-已完成5-已评价,获取物流信息 |
| | | Integer status = scoreOrder.getStatus() == null ? 0:scoreOrder.getStatus(); |
| | | if(ScoreOrder.STATUS_ING == status || ScoreOrder.STATUS_DONE == 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); |
| | |
| | | |
| | | ScoreOrder scoreOrder = new ScoreOrder(); |
| | | scoreOrder.setId(id); |
| | | scoreOrder.setStatus(ScoreOrder.STATUS_ING); |
| | | scoreOrder.setStatus(ScoreOrder.STATUS_ON); |
| | | scoreOrderMapper.updateByPrimaryKeySelective(scoreOrder); |
| | | } |
| | | return scoreExpressInfo.getId(); |
| | | } |
| | | |
| | | public Long insureOrder(InsureOrderDto model) { |
| | | ScoreOrder scoreOrder = new ScoreOrder(); |
| | | scoreOrder.setId(model.getId()); |
| | | scoreOrder.setVoucherImg(model.getVoucherImgs().toString()); |
| | | scoreOrderMapper.updateByPrimaryKeySelective(scoreOrder); |
| | | return scoreOrder.getId(); |
| | | } |
| | | } |