Authored by caoyan

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

... ... @@ -109,4 +109,14 @@ public interface StorageDepositMapper {
int updateToNotBindShelfCode(@Param("id")Integer id, @Param("status") Integer status, @Param("preStatus")Integer preStatus);
/**
* 作废寄存转现货再寄存
* @param uid
* @param depositCode
* @param status
* @return
*/
int updateDepositAgainDelStatus(@Param("uid")Integer uid, @Param("depositCode")String depositCode, @Param("status")Integer status, @Param("orderCode") Long orderCode);
}
\ No newline at end of file
... ...
... ... @@ -307,4 +307,12 @@
where id=#{id} and del_status=1 and status=#{preStatus}
</update>
<update id="updateDepositAgainDelStatus">
update storage_deposit
set del_status = 1, order_code=#{orderCode}, update_time = unix_timestamp(now())
where deposit_code = #{depositCode,jdbcType=VARCHAR}
AND del_status = 0 AND owner_uid = #{uid,jdbcType=INTEGER}
AND status = #{status,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
... ...
... ... @@ -880,7 +880,7 @@ public class DepositServiceImpl implements DepositService {
LOGGER.info("updateDelStatus, uid is {}, depositCode is {}, old depositInfo is {}", uid, depositCode, deposit);
//当前记录置为无效
int num = storageDepositMapper.updateDelStatusByCode(uid, depositCode, deposit.getStatus());
int num = storageDepositMapper.updateDepositAgainDelStatus(uid, depositCode, deposit.getStatus(), deposit.getOrderCode() * 10);
//清缓存
clearCache(uid, deposit.getProductId(), deposit.getStorageId());
... ...