Authored by chenchao

fix change level

... ... @@ -84,9 +84,24 @@ public class SellerFuncService {
}
private SellerLevelFuncBo getDefaultSLFB(){
private SellerLevelFuncBo getDefaultSLFB(Integer estc){
SellerLevelFuncBo defaultSLFB = new SellerLevelFuncBo();
defaultSLFB.setLevel(SellerConfig.ENTER_TYPE_DEFAULT_LEVEL);
Integer level ;
if (estc == null){
level = SellerConfig.ENTER_TYPE_DEFAULT_LEVEL;
}else{
EntrySellerType est = EntrySellerType.getEntrySellerType(estc);
switch(est){
case SUPER_ENTRY:
level = SuperEnterStageLevel.DISABLE.getCode();
break;
default:
level = SellerConfig.ENTER_TYPE_DEFAULT_LEVEL;
break;
}
}
defaultSLFB.setLevel(level);
defaultSLFB.setFuncList(SellerConfig.ENTER_TYPE_DEFAULT_FUNCS);
defaultSLFB.setFuncIdList(new ArrayList<>(1));
return defaultSLFB;
... ... @@ -120,7 +135,7 @@ public class SellerFuncService {
logger.info("in getSellerLevelFuncWithWallet SellerLevelFuncBo {} uid {}", slfb, uid);
}else{
slfb = getDefaultSLFB();
slfb = getDefaultSLFB(currentEST.getCode());
logger.warn("in getSellerLevelFuncWithWallet getDefault uid {} SLFB {}", uid, slfb);
}
return slfb;
... ... @@ -158,14 +173,14 @@ public class SellerFuncService {
return slfb;
}else{
logger.warn("in getSellerLevelFuncWithSetting getDefaultSLFB uid {}", uid);
return getDefaultSLFB();
return getDefaultSLFB(currentEST.getCode());
}
}
public SellerLevelFuncBo getSellerLevelFunc(Integer enterType,Integer level){
if (level==null || level == SellerConfig.ENTER_TYPE_DEFAULT_LEVEL){
return getDefaultSLFB();
return getDefaultSLFB(enterType);
}
Map<Integer, Map<Integer,SellerLevelFuncBo>> map = getETLVLELFMap();
logger.info("in getSellerLevelFunc enterType {} level {} map {}", enterType, level, map);
... ... @@ -176,7 +191,7 @@ public class SellerFuncService {
&& Objects.nonNull(slfb = levelFuncBoMap.get(level))){
return slfb;
}
slfb = getDefaultSLFB();
slfb = getDefaultSLFB(enterType);
return slfb;
}
... ...
... ... @@ -45,8 +45,8 @@ public class SellerEnterApplyServiceTest extends BaseWebTest {
@Test
public void testAuditCommonOrder(){
int uid = 500031424;
long order = 12345L;
sellerEnterApplyService.audit(uid, order, new BigDecimal(100));
long order = 12345333L;
sellerEnterApplyService.audit(uid, order, new BigDecimal(3));
}
@Test
... ...