| | |
| | | } |
| | | |
| | | public Long insureOrder(InsureOrderDto model) { |
| | | long id = model.getId(); |
| | | ScoreOrder scoreOrderBefore = scoreOrderMapper.selectByPrimaryKey(id); |
| | | ScoreOrder scoreOrder = new ScoreOrder(); |
| | | scoreOrder.setId(model.getId()); |
| | | if(ScoreOrder.STATUS_DOING == scoreOrderBefore.getStatus()){ |
| | | scoreOrder.setStatus(ScoreOrder.STATUS_DONE); |
| | | } |
| | | // scoreOrder.setStatus(ScoreOrder.STATUS_DONE); |
| | | scoreOrder.setIsFinish(ScoreOrder.ISFINISH_YES); |
| | | scoreOrder.setVoucherImg(CollUtil.join(model.getVoucherImgs(),",")); |
| | |
| | | throw new RestException(-3, "暂不能确认收货"); |
| | | } |
| | | |
| | | scoreOrderMapper.updateOrderStatus(id, ScoreOrder.STATUS_DOING, userId); |
| | | if (ScoreOrder.ISFINISH_YES.equals(order.getIsFinish())) { |
| | | scoreOrderMapper.updateOrderStatus(id, ScoreOrder.STATUS_DONE, userId); |
| | | } else { |
| | | scoreOrderMapper.updateOrderStatus(id, ScoreOrder.STATUS_DOING, userId); |
| | | } |
| | | |
| | | } |
| | | |
| | | public void cancelOrder(Long id, String userId) { |