Authored by chenchao

fix include status query count

@@ -25,7 +25,7 @@ public interface AppraiseOrderMapper { @@ -25,7 +25,7 @@ public interface AppraiseOrderMapper {
25 @Param("limit")int limit); 25 @Param("limit")int limit);
26 26
27 27
28 - int selectSubOrderCntNotDefinedStatus(@Param("parentOrderCode") long parentOrderCode, @Param("statusList")Collection<Integer> statusList); 28 + int selectSubOrderCntIncludeStatus(@Param("parentOrderCode") long parentOrderCode, @Param("statusList")Collection<Integer> statusList);
29 29
30 AppraiseOrder selectByOrderCode(long orderCode); 30 AppraiseOrder selectByOrderCode(long orderCode);
31 31
@@ -33,16 +33,13 @@ @@ -33,16 +33,13 @@
33 </select> 33 </select>
34 34
35 35
36 - <select id="selectSubOrderCntNotDefinedStatus" resultType="java.lang.Integer">  
37 - select  
38 - count(1)  
39 - from appraise_order 36 + <select id="selectSubOrderCntIncludeStatus" resultType="java.lang.Integer">
  37 + select count(*) from appraise_order
40 where parent_order_code = #{parentOrderCode,jdbcType=INTEGER} 38 where parent_order_code = #{parentOrderCode,jdbcType=INTEGER}
41 - and status not in 39 + and status in
42 <foreach collection="statusList" item="status" open="(" close=")" separator=","> 40 <foreach collection="statusList" item="status" open="(" close=")" separator=",">
43 #{status,jdbcType=TINYINT} 41 #{status,jdbcType=TINYINT}
44 </foreach> 42 </foreach>
45 - and is_del=1  
46 </select> 43 </select>
47 44
48 45
@@ -434,4 +434,16 @@ public class AppraiseOrderService extends AbsGoodsServiceOrderService implements @@ -434,4 +434,16 @@ public class AppraiseOrderService extends AbsGoodsServiceOrderService implements
434 inBoxFacade.paidAppraiseOrderNotice(orderInfo.getUid(), orderInfo.getOrderCode(), targetStatus); 434 inBoxFacade.paidAppraiseOrderNotice(orderInfo.getUid(), orderInfo.getOrderCode(), targetStatus);
435 } 435 }
436 436
  437 +
  438 + public int platformFinishReceiveGoods(long orderCode, long parentCode){
  439 +
  440 + return 0;
  441 + }
  442 +
  443 +
  444 + public int detectAppraiseFinish(long orderCode){
  445 +
  446 +
  447 + return 0;
  448 + }
437 } 449 }
@@ -721,7 +721,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { @@ -721,7 +721,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
721 } 721 }
722 // 上一个状态是[卖家已发货] 该父订单下状态为[卖家已发货]的子订单数量为0,代表父订单状态应该为 [已收货] 722 // 上一个状态是[卖家已发货] 该父订单下状态为[卖家已发货]的子订单数量为0,代表父订单状态应该为 [已收货]
723 List<Integer> status = Lists.newArrayList(AppraiseOrderStatus.SELLER_SEND_OUT.getCode()); 723 List<Integer> status = Lists.newArrayList(AppraiseOrderStatus.SELLER_SEND_OUT.getCode());
724 - int cnt = serviceOrderProcessor.getSubOrderCntNotDefinedStatus(parentOrderCode, status); 724 + int cnt = serviceOrderProcessor.getSubOrderCntIncludeStatus(parentOrderCode, status);
725 logger.info("no confirm delivery sub order cnt is {}, parentOrderCode {}", cnt, parentOrderCode); 725 logger.info("no confirm delivery sub order cnt is {}, parentOrderCode {}", cnt, parentOrderCode);
726 int cdt = DateUtil.getCurrentTimeSecond(); 726 int cdt = DateUtil.getCurrentTimeSecond();
727 // 727 //
@@ -107,8 +107,8 @@ public class ServiceOrderProcessor { @@ -107,8 +107,8 @@ public class ServiceOrderProcessor {
107 * @param status 107 * @param status
108 * @return 108 * @return
109 */ 109 */
110 - public int getSubOrderCntNotDefinedStatus(long parentOrderCoe, List<Integer> status){  
111 - return appraiseOrderMapper.selectSubOrderCntNotDefinedStatus(parentOrderCoe, status); 110 + public int getSubOrderCntIncludeStatus(long parentOrderCoe, List<Integer> status){
  111 + return appraiseOrderMapper.selectSubOrderCntIncludeStatus(parentOrderCoe, status);
112 } 112 }
113 113
114 114