|
@@ -55,7 +55,7 @@ public class SellerEnterApplyService { |
|
@@ -55,7 +55,7 @@ public class SellerEnterApplyService { |
55
|
logger.info("in applySuperEntry uid {} orderCode {} targetEST {}", uid, orderCode, targetEST);
|
55
|
logger.info("in applySuperEntry uid {} orderCode {} targetEST {}", uid, orderCode, targetEST);
|
56
|
if (Objects.isNull(orderCode)){
|
56
|
if (Objects.isNull(orderCode)){
|
57
|
logger.warn("in applySuperEntry uid {} orderCode is null targetEST {}", uid, targetEST);
|
57
|
logger.warn("in applySuperEntry uid {} orderCode is null targetEST {}", uid, targetEST);
|
58
|
- throw new UfoServiceException(400, "orderCode is null");
|
58
|
+ //throw new UfoServiceException(400, "orderCode is null");
|
59
|
}
|
59
|
}
|
60
|
if (Objects.isNull(targetEST)){
|
60
|
if (Objects.isNull(targetEST)){
|
61
|
logger.warn("in applySuperEntry uid {} orderCode {} targetEST is null", uid, orderCode);
|
61
|
logger.warn("in applySuperEntry uid {} orderCode {} targetEST is null", uid, orderCode);
|
|
@@ -160,16 +160,27 @@ public class SellerEnterApplyService { |
|
@@ -160,16 +160,27 @@ public class SellerEnterApplyService { |
160
|
seac.setUid(uid);
|
160
|
seac.setUid(uid);
|
161
|
seac.setOrderCode(orderCode);
|
161
|
seac.setOrderCode(orderCode);
|
162
|
List<SellerEnterApply> seaList = sellerEnterApplyMapper.selectByUOCET(seac);
|
162
|
List<SellerEnterApply> seaList = sellerEnterApplyMapper.selectByUOCET(seac);
|
|
|
163
|
+ upgradeLevel(uid, orderCode, left, seaList);
|
|
|
164
|
+ }
|
|
|
165
|
+
|
|
|
166
|
+
|
|
|
167
|
+ public void upgradeLevel(int uid, Long orderCode, BigDecimal left, List<SellerEnterApply> seaList){
|
163
|
if (CollectionUtils.isEmpty(seaList)){
|
168
|
if (CollectionUtils.isEmpty(seaList)){
|
164
|
- logger.warn("in audit SellerEnterApply no record so that it's only charge order, uid {} orderCode {}",
|
169
|
+ logger.warn("in upgradeLevel no record so that it's only charge order, uid {} orderCode {}",
|
165
|
uid, orderCode);
|
170
|
uid, orderCode);
|
166
|
return;
|
171
|
return;
|
167
|
}
|
172
|
}
|
168
|
if (seaList.size()>1){
|
173
|
if (seaList.size()>1){
|
169
|
- logger.warn("in audit SellerEnterApply one orderCode mapped multiple apply,uid {} orderCode {}", uid, orderCode);
|
174
|
+ logger.warn("in upgradeLevel one orderCode mapped multiple apply,uid {} orderCode {}", uid, orderCode);
|
170
|
}
|
175
|
}
|
171
|
//卖家包装类
|
176
|
//卖家包装类
|
172
|
SellerService.SellerWrapper sellerWrapper = new SellerService().new SellerWrapper(uid).buildBase();
|
177
|
SellerService.SellerWrapper sellerWrapper = new SellerService().new SellerWrapper(uid).buildBase();
|
|
|
178
|
+ upgradeLevel(sellerWrapper, orderCode, left, seaList);
|
|
|
179
|
+ }
|
|
|
180
|
+
|
|
|
181
|
+ public void upgradeLevel(SellerService.SellerWrapper sellerWrapper,
|
|
|
182
|
+ Long orderCode, BigDecimal left, List<SellerEnterApply> seaList){
|
|
|
183
|
+ int uid = sellerWrapper.getUid();
|
173
|
//持久化的入驻信息
|
184
|
//持久化的入驻信息
|
174
|
StoredSeller pss = sellerWrapper.getStoredSeller();
|
185
|
StoredSeller pss = sellerWrapper.getStoredSeller();
|
175
|
SellerBo sellerBo = sellerWrapper.build();
|
186
|
SellerBo sellerBo = sellerWrapper.build();
|
|
@@ -191,7 +202,7 @@ public class SellerEnterApplyService { |
|
@@ -191,7 +202,7 @@ public class SellerEnterApplyService { |
191
|
boolean isMatchedET = Objects.equals(preEnterType=msea.getPreEnterType(), currentEnterType);
|
202
|
boolean isMatchedET = Objects.equals(preEnterType=msea.getPreEnterType(), currentEnterType);
|
192
|
boolean noStoredSeller = Objects.isNull(pss);
|
203
|
boolean noStoredSeller = Objects.isNull(pss);
|
193
|
|
204
|
|
194
|
- logger.info("in audit SellerEnterApply ready pass apply and add StoredSeller, uid {} orderCode {} currentEnterType {} PreEnterType {} noStoredSeller {} target Level {} isMatchedET {}",
|
205
|
+ logger.info("in upgradeLevel ready pass apply and add StoredSeller, uid {} orderCode {} currentEnterType {} PreEnterType {} noStoredSeller {} target Level {} isMatchedET {}",
|
195
|
uid, orderCode, currentEnterType,preEnterType, noStoredSeller, level, isMatchedET);
|
206
|
uid, orderCode, currentEnterType,preEnterType, noStoredSeller, level, isMatchedET);
|
196
|
if(Objects.equals(currentEnterType, EntrySellerType.NOT_ENTRY.getCode())){
|
207
|
if(Objects.equals(currentEnterType, EntrySellerType.NOT_ENTRY.getCode())){
|
197
|
//普通卖家 -> 普通入驻 ,1. apply 状态 ,2. enter_seller 从无到有
|
208
|
//普通卖家 -> 普通入驻 ,1. apply 状态 ,2. enter_seller 从无到有
|
|
@@ -204,7 +215,7 @@ public class SellerEnterApplyService { |
|
@@ -204,7 +215,7 @@ public class SellerEnterApplyService { |
204
|
SellerLevelFuncBo slfb = sellerFuncService.getSellerLevelFunc(targetEst.getCode(), level);
|
215
|
SellerLevelFuncBo slfb = sellerFuncService.getSellerLevelFunc(targetEst.getCode(), level);
|
205
|
storedSellerService.addUserAsStoredSeller(uid, targetEst, slfb);
|
216
|
storedSellerService.addUserAsStoredSeller(uid, targetEst, slfb);
|
206
|
}else{
|
217
|
}else{
|
207
|
- logger.warn("in audit SellerEnterApply add StoredSeller fail, uid {} orderCode {}",
|
218
|
+ logger.warn("in upgradeLevel add StoredSeller fail, uid {} orderCode {}",
|
208
|
uid, orderCode);
|
219
|
uid, orderCode);
|
209
|
}
|
220
|
}
|
210
|
|
221
|
|
|
@@ -216,13 +227,13 @@ public class SellerEnterApplyService { |
|
@@ -216,13 +227,13 @@ public class SellerEnterApplyService { |
216
|
SellerLevelFuncBo slfb = sellerFuncService.getSellerLevelFunc(targetEst.getCode(), level);
|
227
|
SellerLevelFuncBo slfb = sellerFuncService.getSellerLevelFunc(targetEst.getCode(), level);
|
217
|
storedSellerService.addUserAsStoredSeller(uid, targetEst, slfb);
|
228
|
storedSellerService.addUserAsStoredSeller(uid, targetEst, slfb);
|
218
|
}else{
|
229
|
}else{
|
219
|
- logger.warn("in audit SellerEnterApply add StoredSeller fail, uid {} orderCode {}",
|
230
|
+ logger.warn("in upgradeLevel add StoredSeller fail, uid {} orderCode {}",
|
220
|
uid, orderCode);
|
231
|
uid, orderCode);
|
221
|
}
|
232
|
}
|
222
|
|
233
|
|
223
|
}else if (Objects.equals(currentEnterType, EntrySellerType.SPECIAL_SUPER.getCode())){
|
234
|
}else if (Objects.equals(currentEnterType, EntrySellerType.SPECIAL_SUPER.getCode())){
|
224
|
//白名单超级卖家
|
235
|
//白名单超级卖家
|
225
|
- logger.warn("in audit SellerEnterApply SPECIAL_SUPER no need any action, uid {} orderCode {}",
|
236
|
+ logger.warn("in upgradeLevel SPECIAL_SUPER no need any action, uid {} orderCode {}",
|
226
|
uid, orderCode);
|
237
|
uid, orderCode);
|
227
|
}else if (Objects.equals(currentEnterType, EntrySellerType.SUPER_ENTRY.getCode())){
|
238
|
}else if (Objects.equals(currentEnterType, EntrySellerType.SUPER_ENTRY.getCode())){
|
228
|
//超级卖家
|
239
|
//超级卖家
|
|
@@ -232,15 +243,13 @@ public class SellerEnterApplyService { |
|
@@ -232,15 +243,13 @@ public class SellerEnterApplyService { |
232
|
boolean levelNeedUpgrade = Objects.nonNull(sesl)
|
243
|
boolean levelNeedUpgrade = Objects.nonNull(sesl)
|
233
|
&& Objects.nonNull(currentLevel = sesl.getCode())
|
244
|
&& Objects.nonNull(currentLevel = sesl.getCode())
|
234
|
&& !currentLevel.equals(level);
|
245
|
&& !currentLevel.equals(level);
|
235
|
- logger.warn("in audit SellerEnterApply update StoredSeller, uid {} orderCode {} currentLevel {} target level {}",
|
246
|
+ logger.warn("in upgradeLevel update StoredSeller, uid {} orderCode {} currentLevel {} target level {}",
|
236
|
uid, orderCode, currentLevel, level);
|
247
|
uid, orderCode, currentLevel, level);
|
237
|
if (!noStoredSeller && isMatchedET && levelNeedUpgrade) {
|
248
|
if (!noStoredSeller && isMatchedET && levelNeedUpgrade) {
|
238
|
SellerLevelFuncBo slfb = sellerFuncService.getSellerLevelFunc(targetEst.getCode(), level);
|
249
|
SellerLevelFuncBo slfb = sellerFuncService.getSellerLevelFunc(targetEst.getCode(), level);
|
239
|
storedSellerService.updateEnterSeller(uid, targetEst, slfb);
|
250
|
storedSellerService.updateEnterSeller(uid, targetEst, slfb);
|
240
|
}
|
251
|
}
|
241
|
}
|
252
|
}
|
242
|
-
|
|
|
243
|
-
|
|
|
244
|
}
|
253
|
}
|
245
|
|
254
|
|
246
|
/**
|
255
|
/**
|