|
@@ -1075,6 +1075,18 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
|
|
|
userSubscribeImports.add(userSubscribeImport);
|
|
|
continue;
|
|
|
}
|
|
|
+ List<UserSubscribe> userSubscribes = this.list(new LambdaQueryWrapper<UserSubscribe>().eq(UserSubscribe::getUserId, userId).eq(UserSubscribe::getSubscribeStatus, 1).last("limit 1"));
|
|
|
+ if (!userSubscribes.isEmpty()){
|
|
|
+ UserSubscribe userSubscribe = userSubscribes.get(0);
|
|
|
+ if (Validator.isNotEmpty(userSubscribeImport.getStudentType())){
|
|
|
+ Long type = getName(userSubscribeImport.getStudentType());
|
|
|
+ if (!userSubscribe.getStudentType().equals(type)){
|
|
|
+ userSubscribeImport.setCause("学员类型错误");
|
|
|
+ userSubscribeImports.add(userSubscribeImport);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
userSubscribeAddBo.setUserId(userId);
|
|
|
//预约状态
|
|
|
userSubscribeAddBo.setSubscribeStatus(1);
|
|
@@ -1329,6 +1341,15 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
|
|
|
resultMap.put("successList",successImports);
|
|
|
return resultMap;
|
|
|
}
|
|
|
+ public Long getName(String type){
|
|
|
+ if (type.equals("是")){
|
|
|
+ return 1L;
|
|
|
+ }
|
|
|
+ if (type.equals("否")){
|
|
|
+ return 2L;
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
|
|
|
@Override
|
|
|
public Map<String, Object> importTrainData(List<UserSubscribeImport> userSubscribeImportList){
|