...
|
...
|
@@ -2,6 +2,7 @@ package com.yohoufo.user.service.impl; |
|
|
|
|
|
import com.yoho.error.exception.ServiceException;
|
|
|
import com.yohobuy.ufo.model.enums.StoredSellerStatusEnum;
|
|
|
import com.yohoufo.common.caller.UfoServiceCaller;
|
|
|
import com.yohoufo.dal.user.IStoredSellerDao;
|
|
|
import com.yohoufo.dal.user.model.StoredSeller;
|
|
|
import com.yohoufo.dal.user.model.ZhiMaCert;
|
...
|
...
|
@@ -31,6 +32,9 @@ public class StoredSellerServiceImpl implements IStoredSellerService { |
|
|
@Autowired
|
|
|
private IStoredSellerDao storedSellerDao;
|
|
|
|
|
|
@Autowired
|
|
|
private UfoServiceCaller ufoServiceCaller;
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 退出入驻
|
...
|
...
|
@@ -46,16 +50,19 @@ public class StoredSellerServiceImpl implements IStoredSellerService { |
|
|
throw new ServiceException(400,"未找到入驻信息");
|
|
|
}
|
|
|
|
|
|
Integer expectStatus=StoredSellerStatusEnum.apply_quit.getId();
|
|
|
Integer expectStatus=StoredSellerStatusEnum.entered.getId();
|
|
|
if(!expectStatus.equals(storedSeller.getValidStatus())){
|
|
|
throw new ServiceException(400,"商户入驻状态变化,不允许申请退出!");
|
|
|
throw new ServiceException(400,"商户入驻状态变化,不允许退驻!");
|
|
|
}
|
|
|
|
|
|
//TODO 检查商户是否有出售中的商品,或者有订单未完成的 ,都不可以提交
|
|
|
|
|
|
|
|
|
LocalDateTime now=LocalDateTime.now();
|
|
|
long ts=now.toEpochSecond(ZoneOffset.of("+8"));
|
|
|
|
|
|
//更新为退驻
|
|
|
int num = storedSellerDao.updateToQuitByPrimaryKey(storedSeller.getId(),StoredSellerStatusEnum.quit.getId(),StoredSellerStatusEnum.apply_quit.getId(),
|
|
|
int num = storedSellerDao.updateToQuitByPrimaryKey(storedSeller.getId(),StoredSellerStatusEnum.quit.getId(),expectStatus,
|
|
|
reqVO.getOperatorUid(),reqVO.getOperatorName(),
|
|
|
ts,ts);
|
|
|
//清掉缓存
|
...
|
...
|
@@ -64,7 +71,7 @@ public class StoredSellerServiceImpl implements IStoredSellerService { |
|
|
logger.info("StoredSellerServiceImpl quitStoredSeller end ,uid is {} ,update num ",uid,num);
|
|
|
|
|
|
if(num > 0){
|
|
|
//@TODO 执行退保证金的操作
|
|
|
//TODO 执行退保证金的操作
|
|
|
|
|
|
}else{
|
|
|
logger.error("StoredSellerServiceImpl quitStoredSeller update row is 0,reqVo {}",reqVO);
|
...
|
...
|
@@ -72,7 +79,7 @@ public class StoredSellerServiceImpl implements IStoredSellerService { |
|
|
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
/*@Override
|
|
|
public void applyQuitStoredSeller(Integer uid){
|
|
|
logger.info("StoredSellerServiceImpl applyQuitStoredSeller uid is {} ",uid);
|
|
|
StoredSeller storedSeller = getValidStoredSeller(uid);
|
...
|
...
|
@@ -96,7 +103,7 @@ public class StoredSellerServiceImpl implements IStoredSellerService { |
|
|
cacheService.removeStoredSeller(uid);
|
|
|
|
|
|
logger.info("StoredSellerServiceImpl applyQuitStoredSeller end ,uid is {} ,update num ",uid,num);
|
|
|
}
|
|
|
}*/
|
|
|
|
|
|
@Override
|
|
|
public boolean isStoredSeller(Integer uid){
|
...
|
...
|
|