Authored by LUOXC

Merge branch 'test6.9.9' of http://git.yoho.cn/ufo/yohoufo-fore into test6.9.9

@@ -17,6 +17,8 @@ public interface QiniuLiveRecordMapper { @@ -17,6 +17,8 @@ public interface QiniuLiveRecordMapper {
17 17
18 QiniuLiveRecord selectByOrderCode(@Param("orderCode") Long orderCode); 18 QiniuLiveRecord selectByOrderCode(@Param("orderCode") Long orderCode);
19 19
  20 + QiniuLiveRecord selectByOrderCode4Copy(@Param("orderCode") Long orderCode);
  21 +
20 // 包含状态为0的,因为有可能是新的鉴定视频链接 22 // 包含状态为0的,因为有可能是新的鉴定视频链接
21 QiniuLiveRecord selectByOrderCodeEx(@Param("orderCode") Long orderCode); 23 QiniuLiveRecord selectByOrderCodeEx(@Param("orderCode") Long orderCode);
22 24
@@ -64,6 +64,14 @@ @@ -64,6 +64,14 @@
64 and show_flag = 1 and status = 1 order by id DESC limit 1 64 and show_flag = 1 and status = 1 order by id DESC limit 1
65 </select> 65 </select>
66 66
  67 + <select id="selectByOrderCode4Copy" resultMap="BaseResultMap" parameterType="java.lang.Long" >
  68 + select
  69 + <include refid="Base_Column_List" />
  70 + from qiniu_live_record
  71 + where order_code = #{orderCode, jdbcType=BIGINT}
  72 + and show_flag = 1 order by id DESC limit 1
  73 + </select>
  74 +
67 <select id="selectByOrderCodeEx" resultMap="BaseResultMap" parameterType="java.lang.Long" > 75 <select id="selectByOrderCodeEx" resultMap="BaseResultMap" parameterType="java.lang.Long" >
68 select 76 select
69 <include refid="Base_Column_List" /> 77 <include refid="Base_Column_List" />
1 package com.yohoufo.order.service.impl; 1 package com.yohoufo.order.service.impl;
2 2
  3 +import com.alibaba.fastjson.JSON;
3 import com.google.common.collect.Lists; 4 import com.google.common.collect.Lists;
4 import com.google.common.collect.Maps; 5 import com.google.common.collect.Maps;
5 import com.yoho.core.config.ConfigReader; 6 import com.yoho.core.config.ConfigReader;
@@ -53,21 +54,25 @@ public class QiniuLiveRecordService { @@ -53,21 +54,25 @@ public class QiniuLiveRecordService {
53 } 54 }
54 55
55 public void copyQiniuLiveRecord(StorageDeposit storageDeposit) { 56 public void copyQiniuLiveRecord(StorageDeposit storageDeposit) {
  57 + LOG.info("copyQiniuLiveRecord storageDeposit is {}", storageDeposit);
56 if (Objects.isNull(storageDeposit)) { 58 if (Objects.isNull(storageDeposit)) {
57 return; 59 return;
58 } 60 }
59 - QiniuLiveRecord qiniuLiveRecords = qiniuLiveRecordMapper.selectByOrderCode(storageDeposit.getOrderCode()); 61 + QiniuLiveRecord qiniuLiveRecords = qiniuLiveRecordMapper.selectByOrderCode4Copy(storageDeposit.getOrderCode());
60 if (Objects.isNull(qiniuLiveRecords)) { 62 if (Objects.isNull(qiniuLiveRecords)) {
  63 + LOG.warn("copyQiniuLiveRecord qiniuLiveRecords is null");
61 return; 64 return;
62 } 65 }
63 SellerOrder sellerOrder = sellerOrderMapper.selectBySkup(storageDeposit.getNewSkup()); 66 SellerOrder sellerOrder = sellerOrderMapper.selectBySkup(storageDeposit.getNewSkup());
64 if (Objects.isNull(sellerOrder)) { 67 if (Objects.isNull(sellerOrder)) {
  68 + LOG.warn("copyQiniuLiveRecord sellerOrder is null");
65 return; 69 return;
66 } 70 }
67 qiniuLiveRecords.setId(null); 71 qiniuLiveRecords.setId(null);
68 qiniuLiveRecords.setOrderCode(storageDeposit.getNewOrderCode()); 72 qiniuLiveRecords.setOrderCode(storageDeposit.getNewOrderCode());
69 qiniuLiveRecords.setSkup(sellerOrder.getSkup()); 73 qiniuLiveRecords.setSkup(sellerOrder.getSkup());
70 qiniuLiveRecords.setSellerOrderCode(sellerOrder.getOrderCode()); 74 qiniuLiveRecords.setSellerOrderCode(sellerOrder.getOrderCode());
  75 + LOG.info("copyQiniuLiveRecord qiniuLiveRecords for insert is {}", JSON.toJSONString(qiniuLiveRecords));
71 qiniuLiveRecordMapper.insert(qiniuLiveRecords); 76 qiniuLiveRecordMapper.insert(qiniuLiveRecords);
72 } 77 }
73 78