Authored by chenchao

fix include status query count

... ... @@ -25,7 +25,7 @@ public interface AppraiseOrderMapper {
@Param("limit")int limit);
int selectSubOrderCntNotDefinedStatus(@Param("parentOrderCode") long parentOrderCode, @Param("statusList")Collection<Integer> statusList);
int selectSubOrderCntIncludeStatus(@Param("parentOrderCode") long parentOrderCode, @Param("statusList")Collection<Integer> statusList);
AppraiseOrder selectByOrderCode(long orderCode);
... ...
... ... @@ -33,16 +33,13 @@
</select>
<select id="selectSubOrderCntNotDefinedStatus" resultType="java.lang.Integer">
select
count(1)
from appraise_order
<select id="selectSubOrderCntIncludeStatus" resultType="java.lang.Integer">
select count(*) from appraise_order
where parent_order_code = #{parentOrderCode,jdbcType=INTEGER}
and status not in
and status in
<foreach collection="statusList" item="status" open="(" close=")" separator=",">
#{status,jdbcType=TINYINT}
</foreach>
and is_del=1
</select>
... ...
... ... @@ -434,4 +434,16 @@ public class AppraiseOrderService extends AbsGoodsServiceOrderService implements
inBoxFacade.paidAppraiseOrderNotice(orderInfo.getUid(), orderInfo.getOrderCode(), targetStatus);
}
public int platformFinishReceiveGoods(long orderCode, long parentCode){
return 0;
}
public int detectAppraiseFinish(long orderCode){
return 0;
}
}
... ...
... ... @@ -721,7 +721,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
}
// 上一个状态是[卖家已发货] 该父订单下状态为[卖家已发货]的子订单数量为0,代表父订单状态应该为 [已收货]
List<Integer> status = Lists.newArrayList(AppraiseOrderStatus.SELLER_SEND_OUT.getCode());
int cnt = serviceOrderProcessor.getSubOrderCntNotDefinedStatus(parentOrderCode, status);
int cnt = serviceOrderProcessor.getSubOrderCntIncludeStatus(parentOrderCode, status);
logger.info("no confirm delivery sub order cnt is {}, parentOrderCode {}", cnt, parentOrderCode);
int cdt = DateUtil.getCurrentTimeSecond();
//
... ...
... ... @@ -107,8 +107,8 @@ public class ServiceOrderProcessor {
* @param status
* @return
*/
public int getSubOrderCntNotDefinedStatus(long parentOrderCoe, List<Integer> status){
return appraiseOrderMapper.selectSubOrderCntNotDefinedStatus(parentOrderCoe, status);
public int getSubOrderCntIncludeStatus(long parentOrderCoe, List<Integer> status){
return appraiseOrderMapper.selectSubOrderCntIncludeStatus(parentOrderCoe, status);
}
... ...