增加查询还有哪些订单 整单是售后完成,但订单状态不是[退款/退货成功]状态的:判断是否全额退款逻辑修改
正在显示
3 个修改的文件
包含
9 行增加
和
3 行删除
... | @@ -351,7 +351,7 @@ refund_id, | ... | @@ -351,7 +351,7 @@ refund_id, |
351 | </select> | 351 | </select> |
352 | 352 | ||
353 | <select id="countRefundOrderListByOrderCode" parameterType="java.lang.String" resultType="java.lang.Integer"> | 353 | <select id="countRefundOrderListByOrderCode" parameterType="java.lang.String" resultType="java.lang.Integer"> |
354 | SELECT COUNT(*) FROM im_refund_order_item r1,im_order_refund r WHERE r1.refund_id = r.refund_id | 354 | SELECT sum(r1.quantity) FROM im_refund_order_item r1,im_order_refund r WHERE r1.refund_id = r.refund_id |
355 | AND r.refund_status = 7 AND r.order_code = #{orderCode} | 355 | AND r.refund_status = 7 AND r.order_code = #{orderCode} |
356 | </select> | 356 | </select> |
357 | </mapper> | 357 | </mapper> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -12,6 +12,8 @@ public class RefundUnsuccessfulBean { | ... | @@ -12,6 +12,8 @@ public class RefundUnsuccessfulBean { |
12 | 12 | ||
13 | private Integer orderStatus; | 13 | private Integer orderStatus; |
14 | 14 | ||
15 | private String status; | ||
16 | |||
15 | private Integer refundNum; | 17 | private Integer refundNum; |
16 | 18 | ||
17 | private Integer order1Num; | 19 | private Integer order1Num; | ... | ... |
... | @@ -803,11 +803,15 @@ public class IMRefundOrderService extends BaseServiceImpl implements IIMRefundOr | ... | @@ -803,11 +803,15 @@ public class IMRefundOrderService extends BaseServiceImpl implements IIMRefundOr |
803 | || doingOrderDetailResponse.getOrderStatus() == PayOrderStatus.RefundFail.getCode() | 803 | || doingOrderDetailResponse.getOrderStatus() == PayOrderStatus.RefundFail.getCode() |
804 | || doingOrderDetailResponse.getOrderStatus() == PayOrderStatus.Finished.getCode())){ | 804 | || doingOrderDetailResponse.getOrderStatus() == PayOrderStatus.Finished.getCode())){ |
805 | Integer refundNum = imRefundOrderDao.countRefundOrderListByOrderCode(doingOrderDetailResponse.getOrderCode()); | 805 | Integer refundNum = imRefundOrderDao.countRefundOrderListByOrderCode(doingOrderDetailResponse.getOrderCode()); |
806 | if(refundNum.intValue() == doingOrderDetailResponse.getOrder1s().size()){ | 806 | Integer order1Num = doingOrderDetailResponse.getOrder1s().stream().map(p -> p.getPurchaseQuantity()).reduce(0,(a,b) ->{ |
807 | return a+b; | ||
808 | }); | ||
809 | if(refundNum.intValue() == order1Num){ | ||
807 | RefundUnsuccessfulBean entity = new RefundUnsuccessfulBean(); | 810 | RefundUnsuccessfulBean entity = new RefundUnsuccessfulBean(); |
808 | entity.setOrder1Num(doingOrderDetailResponse.getOrder1s().size()); | 811 | entity.setOrder1Num(order1Num); |
809 | entity.setOrderCode(doingOrderDetailResponse.getOrderCode()); | 812 | entity.setOrderCode(doingOrderDetailResponse.getOrderCode()); |
810 | entity.setOrderStatus(doingOrderDetailResponse.getOrderStatus()); | 813 | entity.setOrderStatus(doingOrderDetailResponse.getOrderStatus()); |
814 | entity.setStatus(doingOrderDetailResponse.getStatus()); | ||
811 | entity.setRefundNum(refundNum.intValue()); | 815 | entity.setRefundNum(refundNum.intValue()); |
812 | refundUnsuccessfulBeanList.add(entity); | 816 | refundUnsuccessfulBeanList.add(entity); |
813 | } | 817 | } | ... | ... |
-
请 注册 或 登录 后发表评论