Authored by chenchao

fix appraise order

... ... @@ -15,7 +15,7 @@ public interface AppraiseOrderGoodsMapper {
List<AppraiseOrderGoods> selectByOrderCode(Long orderCode);
int updateByPrimaryKeySelective(AppraiseOrderGoods record);
int updateDepotNo(AppraiseOrderGoods record);
int updateByPrimaryKey(AppraiseOrderGoods record);
... ...
... ... @@ -52,33 +52,14 @@
<update id="updateByPrimaryKeySelective" parameterType="com.yohoufo.dal.order.model.AppraiseOrderGoods">
<update id="updateDepotNo" parameterType="com.yohoufo.dal.order.model.AppraiseOrderGoods">
update appraise_order_goods
<set>
<if test="orderCode != null">
order_code = #{orderCode,jdbcType=BIGINT},
</if>
<if test="productId != null">
product_id = #{productId,jdbcType=INTEGER},
</if>
<if test="productName != null">
product_name = #{productName,jdbcType=VARCHAR},
</if>
<if test="productCode != null">
product_code = #{productCode,jdbcType=VARCHAR},
</if>
<if test="imageUrl != null">
image_url = #{imageUrl,jdbcType=VARCHAR},
</if>
<if test="depotNo != null">
depot_no = #{depotNo,jdbcType=INTEGER},
</if>
<if test="num != null">
num = #{num,jdbcType=INTEGER},
</if>
depot_no = #{depotNo,jdbcType=INTEGER}
</set>
where id = #{id,jdbcType=INTEGER}
where order_code = #{orderCode,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.yohoufo.dal.order.model.AppraiseOrderGoods">
update appraise_order_goods
set order_code = #{orderCode,jdbcType=BIGINT},
... ...
... ... @@ -3,7 +3,9 @@ package com.yohoufo.order.service.impl;
import com.yohobuy.ufo.model.order.common.AppraiseOrderStatus;
import com.yohobuy.ufo.model.order.req.DeliverToDepotReq;
import com.yohoufo.common.utils.DateUtil;
import com.yohoufo.dal.order.AppraiseOrderGoodsMapper;
import com.yohoufo.dal.order.AppraiseOrderMapper;
import com.yohoufo.dal.order.model.AppraiseOrderGoods;
import com.yohoufo.order.service.IGoodsService;
import com.yohoufo.order.service.proxy.OrderStatusFlowService;
import com.yohoufo.order.utils.LoggerUtils;
... ... @@ -18,6 +20,9 @@ public abstract class AbsGoodsServiceOrderService implements IGoodsService {
@Autowired
private OrderStatusFlowService orderStatusFlowService;
@Autowired
private AppraiseOrderGoodsMapper appraiseOrderGoodsMapper;
@Override
public int deliver2Depot(DeliverToDepotReq req){
Long orderCode = req.getOrderCode();
... ... @@ -25,7 +30,14 @@ public abstract class AbsGoodsServiceOrderService implements IGoodsService {
expectedStatus = AppraiseOrderStatus.HAS_PAYED;
int rows = triggerStatusChange(orderCode, targetStatus, expectedStatus);
logger.info("appraise order deliver2Depot update status, orderCode {} rows {}", orderCode, rows);
logger.info("appraise order deliver2Depot update status, req {} rows {}", req, rows);
if (rows>0){
AppraiseOrderGoods aogc = new AppraiseOrderGoods();
aogc.setOrderCode(orderCode);
aogc.setDepotNo(req.getDepotNum());
int depotPrdCnt = appraiseOrderGoodsMapper.updateDepotNo(aogc);
logger.info("appraise order deliver2Depot update status, req {} depotPrdCnt {}", req, depotPrdCnt);
}
return rows;
}
... ... @@ -54,6 +66,15 @@ public abstract class AbsGoodsServiceOrderService implements IGoodsService {
return rows;
}
public int platformChecking(long orderCode){
AppraiseOrderStatus targetStatus = AppraiseOrderStatus.PLATFORM_CHECKING,
expectedStatus = AppraiseOrderStatus.PLATFORM_RECEIVE;
int rows = triggerStatusChange(orderCode, targetStatus, expectedStatus);
logger.info("appraise order platformChecking update status, orderCode {} rows {}", orderCode, rows);
return rows;
}
/**
* 鉴定通过
* @param orderCode
... ... @@ -61,7 +82,7 @@ public abstract class AbsGoodsServiceOrderService implements IGoodsService {
@Override
public int appraisePass(long orderCode){
AppraiseOrderStatus targetStatus = AppraiseOrderStatus.JUDGE_PASS,
expectedStatus = AppraiseOrderStatus.PLATFORM_RECEIVE;
expectedStatus = AppraiseOrderStatus.PLATFORM_CHECKING;
int rows = triggerStatusChange(orderCode, targetStatus, expectedStatus);
logger.info("appraise order appraisePass update status, orderCode {} rows {}", orderCode, rows);
... ...
... ... @@ -199,7 +199,8 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple
*/
@Override
public int platformReceiveGoods(long orderCode){
return 0;
int rows = super.platformReceiveGoods(orderCode);
return rows;
}
/**
... ... @@ -208,7 +209,8 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple
*/
@Override
public int appraisePass(long orderCode){
return 0;
int rows = super.appraisePass(orderCode);
return rows;
}
/**
... ... @@ -217,7 +219,8 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple
*/
@Override
public int appraiseFake(long orderCode){
return 0;
int rows = super.appraiseFake(orderCode);
return rows;
}
/**
... ... @@ -226,6 +229,7 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple
*/
@Override
public int unsure(long orderCode){
return 0;
int rows = super.unsure(orderCode);
return rows;
}
}
... ...