...
|
...
|
@@ -10,10 +10,12 @@ import com.yohobuy.ufo.model.order.resp.EntryThreshold; |
|
|
import com.yohoufo.common.exception.UfoServiceException;
|
|
|
import com.yohoufo.common.utils.DateUtil;
|
|
|
import com.yohoufo.dal.order.SellerEnterApplyMapper;
|
|
|
import com.yohoufo.dal.order.StoredSellerMapper;
|
|
|
import com.yohoufo.dal.order.model.SellerEnterApply;
|
|
|
import com.yohoufo.dal.order.model.StoredSeller;
|
|
|
import com.yohoufo.order.constants.SellerConfig;
|
|
|
import com.yohoufo.order.service.IStoredSellerService;
|
|
|
import com.yohoufo.order.service.proxy.ProductProxyService;
|
|
|
import com.yohoufo.order.utils.LoggerUtils;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.slf4j.Logger;
|
...
|
...
|
@@ -45,6 +47,9 @@ public class SellerEnterApplyService { |
|
|
@Autowired
|
|
|
private SellerFuncService sellerFuncService;
|
|
|
|
|
|
@Autowired
|
|
|
private StoredSellerMapper storedSellerMapper;
|
|
|
|
|
|
/**
|
|
|
* 申请成为超级卖家
|
|
|
* 对于未支付的某一种身份申请做订单号替换
|
...
|
...
|
@@ -61,7 +66,7 @@ public class SellerEnterApplyService { |
|
|
logger.warn("in applySuperEntry uid {} orderCode {} targetEST is null", uid, orderCode);
|
|
|
throw new UfoServiceException(400, "EntrySellerType is null");
|
|
|
}
|
|
|
SellerService.SellerWrapper sellerWrapper = new SellerService().new SellerWrapper(uid).buildBase();
|
|
|
SellerService.SellerWrapper sellerWrapper = new SellerService().new SellerWrapper(uid).storedSellerDataSource(storedSellerMapper::selectByUid).buildBase();
|
|
|
SellerBo sellerBo = sellerWrapper.build();
|
|
|
|
|
|
EntrySellerType currentEST = sellerBo.getEntrySellerType();
|
...
|
...
|
@@ -174,7 +179,8 @@ public class SellerEnterApplyService { |
|
|
logger.warn("in upgradeLevel one orderCode mapped multiple apply,uid {} orderCode {}", uid, orderCode);
|
|
|
}
|
|
|
//卖家包装类
|
|
|
SellerService.SellerWrapper sellerWrapper = new SellerService().new SellerWrapper(uid).buildBase();
|
|
|
SellerService.SellerWrapper sellerWrapper = new SellerService().new SellerWrapper(uid)
|
|
|
.storedSellerDataSource(storedSellerMapper::selectByUid).buildBase();
|
|
|
upgradeLevel(sellerWrapper, orderCode, left, seaList);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -248,6 +254,27 @@ public class SellerEnterApplyService { |
|
|
if (!noStoredSeller && isMatchedET && levelNeedUpgrade) {
|
|
|
SellerLevelFuncBo slfb = sellerFuncService.getSellerLevelFunc(targetEst.getCode(), level);
|
|
|
storedSellerService.updateEnterSeller(uid, targetEst, slfb);
|
|
|
processWithLevel(currentLevel, level, uid);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@Autowired
|
|
|
private ProductProxyService productProxyService;
|
|
|
|
|
|
public void processWithLevel(Integer currentLevel, Integer targetLevel, Integer uid){
|
|
|
logger.info("processWithLevel currentLevel {} targetLevel {} uid {}",currentLevel, targetLevel, uid);
|
|
|
if (SellerConfig.ENTER_TYPE_DEFAULT_LEVEL == currentLevel){
|
|
|
if(targetLevel == SuperEnterStageLevel.FULL.getCode()
|
|
|
||targetLevel == SuperEnterStageLevel.PARTITION.getCode()){
|
|
|
productProxyService.cancelHiddenGoods(uid);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (SellerConfig.ENTER_TYPE_DEFAULT_LEVEL == targetLevel) {
|
|
|
if (currentLevel == SuperEnterStageLevel.FULL.getCode()
|
|
|
|| currentLevel == SuperEnterStageLevel.PARTITION.getCode()) {
|
|
|
productProxyService.hiddenGoods(uid);
|
|
|
}
|
|
|
}
|
|
|
}
|
...
|
...
|
|