Authored by caoyan

寄存转现货

@@ -142,5 +142,13 @@ public interface DepositService { @@ -142,5 +142,13 @@ public interface DepositService {
142 * @return 142 * @return
143 */ 143 */
144 int updateSellLock(Integer uid, String depositCode, Integer sellLock); 144 int updateSellLock(Integer uid, String depositCode, Integer sellLock);
  145 +
  146 + /**
  147 + * 把记录置为无效
  148 + * @param uid
  149 + * @param depositCode
  150 + * @return
  151 + */
  152 + int updateDelStatus(Integer uid, String depositCode);
145 153
146 } 154 }
@@ -856,6 +856,17 @@ public class DepositServiceImpl implements DepositService { @@ -856,6 +856,17 @@ public class DepositServiceImpl implements DepositService {
856 } 856 }
857 857
858 @Override 858 @Override
  859 + public int updateDelStatus(Integer uid, String depositCode) {
  860 + StorageDeposit deposit = storageDepositMapper.queryByDepositCode(uid, depositCode);
  861 + if(null == deposit) {
  862 + throw new UfoServiceException(400, "寄存商品不存在");
  863 + }
  864 + LOGGER.info("updateDelStatus, uid is {}, depositCode is {}, old depositInfo is {}", uid, depositCode, deposit);
  865 + //当前记录置为无效
  866 + return storageDepositMapper.updateDelStatusByCode(uid, depositCode, deposit.getStatus());
  867 + }
  868 +
  869 + @Override
859 public boolean updateDepositAfterCancelBuy(Integer uid, String depositCode) { 870 public boolean updateDepositAfterCancelBuy(Integer uid, String depositCode) {
860 StorageDeposit deposit = storageDepositMapper.queryByDepositCode(uid, depositCode); 871 StorageDeposit deposit = storageDepositMapper.queryByDepositCode(uid, depositCode);
861 if(null == deposit) { 872 if(null == deposit) {