Authored by mali

鉴定服务

... ... @@ -7,5 +7,7 @@ public interface AppraiseOrderGoodsMapper {
AppraiseOrderGoods selectByPrimaryKey(Integer id);
AppraiseOrderGoods selectByOrderCode(Long orderCode);
int updateByPrimaryKey(AppraiseOrderGoods record);
}
\ No newline at end of file
... ...
... ... @@ -19,6 +19,12 @@
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByOrderCode" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from appraise_order_goods
where order_code = #{orderCode,jdbcType=BIGINT}
</select>
<update id="updateByPrimaryKeySelective" parameterType="com.yoho.order.model.AppraiseOrderGoods">
update appraise_order_goods
... ...
... ... @@ -5,11 +5,9 @@ import com.yoho.order.dal.BuyerOrderGoodsMapper;
import com.yoho.order.dal.LiveRecordTimeMapper;
import com.yoho.order.dal.QiniuLiveRecordMapper;
import com.yoho.order.dal.SellerOrderGoodsMapper;
import com.yoho.order.model.BuyerOrderGoods;
import com.yoho.order.model.BuyerOrderReq;
import com.yoho.order.model.QiniuLiveRecord;
import com.yoho.order.model.SellerOrderGoods;
import com.yoho.order.model.*;
import com.yoho.ufo.exception.PlatformException;
import com.yoho.ufo.order.service.impl.AppraiseOrderGoodsService;
import com.yoho.ufo.order.service.impl.UfoLiveService;
import com.yoho.ufo.util.DateUtil;
import com.yohobuy.ufo.model.order.req.OrderTypeEnum;
... ... @@ -47,6 +45,9 @@ public class LiveEventsListener implements ApplicationListener<QiniuLiveRecordEv
@Autowired
private LiveRecordHelper liveRecordHelper;
@Autowired
private AppraiseOrderGoodsService appraiseOrderGoodsService;
/**
* seller_order_code = #{sellerOrderCode,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=INTEGER},
... ... @@ -98,7 +99,9 @@ public class LiveEventsListener implements ApplicationListener<QiniuLiveRecordEv
record.setProductId(sellerOrderGoods.getProductId());
} else {
record.setStorageId(0);
//record.setProductId(sellerOrderGoods.getProductId());
AppraiseOrderGoods appraiseOrderGoods = appraiseOrderGoodsService.selectByOrderCode(record.getOrderCode());
record.setProductId(null == appraiseOrderGoods ? 0 : appraiseOrderGoods.getProductId());
}
record.setSellerOrderCode(0L);
... ...
package com.yoho.ufo.order.service.impl;
import com.yoho.order.dal.AppraiseOrderGoodsMapper;
import com.yoho.order.model.AppraiseOrderGoods;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* Created by li.ma on 2019/8/5.
*/
@Service
public class AppraiseOrderGoodsService {
@Autowired
private AppraiseOrderGoodsMapper appraiseOrderGoodsMapper;
public AppraiseOrderGoods selectByOrderCode(Long orderCode) {
return null == orderCode ? null : appraiseOrderGoodsMapper.selectByOrderCode(orderCode);
}
}
... ...