Authored by Lixiaodi

转卖代码

@@ -33,7 +33,7 @@ public interface DepositService { @@ -33,7 +33,7 @@ public interface DepositService {
33 33
34 34
35 // 转卖 35 // 转卖
36 - boolean changeOwner(Integer uid, Integer skup, long buyOrderCode, Integer newUid); 36 + boolean changeOwner(Integer uid, Integer skup, long buyOrderCode, Integer newUid, boolean isDeposit);
37 // 可上架数量 37 // 可上架数量
38 int getDepositOffShelvesCount(Integer uid, Integer storageId); 38 int getDepositOffShelvesCount(Integer uid, Integer storageId);
39 // 可上架数量 39 // 可上架数量
@@ -233,8 +233,8 @@ public class DepositServiceImpl implements DepositService { @@ -233,8 +233,8 @@ public class DepositServiceImpl implements DepositService {
233 233
234 // 转卖 234 // 转卖
235 @Override 235 @Override
236 - public boolean changeOwner(Integer uid, Integer skup, long buyOrderCode, Integer newUid) {  
237 - LOGGER.info("changeOwner success! uid {}, skup is {}, buyOrderCode is {}, newUid is {}", uid, skup, buyOrderCode, newUid); 236 + public boolean changeOwner(Integer uid, Integer skup, long buyOrderCode, Integer newUid, boolean isDeposit) {
  237 + LOGGER.info("changeOwner success! uid {}, skup is {}, buyOrderCode is {}, newUid is {}, isDeposit is {}", uid, skup, buyOrderCode, newUid, isDeposit);
238 StorageDeposit sd = storageDepositMapper.queryByOwnerSkup(uid, skup); 238 StorageDeposit sd = storageDepositMapper.queryByOwnerSkup(uid, skup);
239 if (sd == null) { 239 if (sd == null) {
240 return false; 240 return false;
@@ -247,7 +247,8 @@ public class DepositServiceImpl implements DepositService { @@ -247,7 +247,8 @@ public class DepositServiceImpl implements DepositService {
247 sd.setOwnerUid(newUid); 247 sd.setOwnerUid(newUid);
248 sd.setOrderCode(buyOrderCode); 248 sd.setOrderCode(buyOrderCode);
249 sd.setSkup(sd.getNewSkup()); 249 sd.setSkup(sd.getNewSkup());
250 - sd.setStatus(1); 250 + sd.setStatus(isDeposit ? 1 : 2);
  251 + sd.setOutType(isDeposit ? 0 : 2);
251 sd.setOrderStatus(0); 252 sd.setOrderStatus(0);
252 sd.setUpdateTime(0); 253 sd.setUpdateTime(0);
253 int now = (int) (System.currentTimeMillis() / 1000); 254 int now = (int) (System.currentTimeMillis() / 1000);