Authored by caoyan

Merge branch 'hotfix_现货寄存订单发货变更' into test6.9.13

@@ -109,4 +109,14 @@ public interface StorageDepositMapper { @@ -109,4 +109,14 @@ public interface StorageDepositMapper {
109 109
110 int updateToNotBindShelfCode(@Param("id")Integer id, @Param("status") Integer status, @Param("preStatus")Integer preStatus); 110 int updateToNotBindShelfCode(@Param("id")Integer id, @Param("status") Integer status, @Param("preStatus")Integer preStatus);
111 111
  112 + /**
  113 + * 作废寄存转现货再寄存
  114 + * @param uid
  115 + * @param depositCode
  116 + * @param status
  117 + * @return
  118 + */
  119 + int updateDepositAgainDelStatus(@Param("uid")Integer uid, @Param("depositCode")String depositCode, @Param("status")Integer status, @Param("orderCode") Long orderCode);
  120 +
  121 +
112 } 122 }
@@ -307,4 +307,12 @@ @@ -307,4 +307,12 @@
307 where id=#{id} and del_status=1 and status=#{preStatus} 307 where id=#{id} and del_status=1 and status=#{preStatus}
308 </update> 308 </update>
309 309
  310 + <update id="updateDepositAgainDelStatus">
  311 + update storage_deposit
  312 + set del_status = 1, order_code=#{orderCode}, update_time = unix_timestamp(now())
  313 + where deposit_code = #{depositCode,jdbcType=VARCHAR}
  314 + AND del_status = 0 AND owner_uid = #{uid,jdbcType=INTEGER}
  315 + AND status = #{status,jdbcType=INTEGER}
  316 + </update>
  317 +
310 </mapper> 318 </mapper>
@@ -880,7 +880,7 @@ public class DepositServiceImpl implements DepositService { @@ -880,7 +880,7 @@ public class DepositServiceImpl implements DepositService {
880 LOGGER.info("updateDelStatus, uid is {}, depositCode is {}, old depositInfo is {}", uid, depositCode, deposit); 880 LOGGER.info("updateDelStatus, uid is {}, depositCode is {}, old depositInfo is {}", uid, depositCode, deposit);
881 //当前记录置为无效 881 //当前记录置为无效
882 882
883 - int num = storageDepositMapper.updateDelStatusByCode(uid, depositCode, deposit.getStatus()); 883 + int num = storageDepositMapper.updateDepositAgainDelStatus(uid, depositCode, deposit.getStatus(), deposit.getOrderCode() * 10);
884 884
885 //清缓存 885 //清缓存
886 clearCache(uid, deposit.getProductId(), deposit.getStorageId()); 886 clearCache(uid, deposit.getProductId(), deposit.getStorageId());