Authored by caoyan

寄存转现货

... ... @@ -142,5 +142,13 @@ public interface DepositService {
* @return
*/
int updateSellLock(Integer uid, String depositCode, Integer sellLock);
/**
* 把记录置为无效
* @param uid
* @param depositCode
* @return
*/
int updateDelStatus(Integer uid, String depositCode);
}
... ...
... ... @@ -856,6 +856,17 @@ public class DepositServiceImpl implements DepositService {
}
@Override
public int updateDelStatus(Integer uid, String depositCode) {
StorageDeposit deposit = storageDepositMapper.queryByDepositCode(uid, depositCode);
if(null == deposit) {
throw new UfoServiceException(400, "寄存商品不存在");
}
LOGGER.info("updateDelStatus, uid is {}, depositCode is {}, old depositInfo is {}", uid, depositCode, deposit);
//当前记录置为无效
return storageDepositMapper.updateDelStatusByCode(uid, depositCode, deposit.getStatus());
}
@Override
public boolean updateDepositAfterCancelBuy(Integer uid, String depositCode) {
StorageDeposit deposit = storageDepositMapper.queryByDepositCode(uid, depositCode);
if(null == deposit) {
... ...