|
@@ -1,9 +1,11 @@
|
|
package com.ym.mec.collectfee.controller;
|
|
package com.ym.mec.collectfee.controller;
|
|
|
|
|
|
|
|
|
|
-import com.sun.tracing.dtrace.Attributes;
|
|
|
|
import com.ym.mec.collectfee.common.web.BaseController;
|
|
import com.ym.mec.collectfee.common.web.BaseController;
|
|
-import com.ym.mec.collectfee.entity.*;
|
|
|
|
|
|
+import com.ym.mec.collectfee.entity.ApplyInfo;
|
|
|
|
+import com.ym.mec.collectfee.entity.MusicTeamsPageInfo;
|
|
|
|
+import com.ym.mec.collectfee.entity.School;
|
|
|
|
+import com.ym.mec.collectfee.entity.StudentsQueryInfo;
|
|
import com.ym.mec.collectfee.service.ApplyInfoService;
|
|
import com.ym.mec.collectfee.service.ApplyInfoService;
|
|
import com.ym.mec.collectfee.service.CourseGroupInfoService;
|
|
import com.ym.mec.collectfee.service.CourseGroupInfoService;
|
|
import com.ym.mec.collectfee.service.OrderService;
|
|
import com.ym.mec.collectfee.service.OrderService;
|
|
@@ -19,7 +21,6 @@ import org.springframework.dao.DuplicateKeyException;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
-import java.util.List;
|
|
|
|
|
|
|
|
@RestController()
|
|
@RestController()
|
|
@RequestMapping("user")
|
|
@RequestMapping("user")
|
|
@@ -50,6 +51,9 @@ public class UserController extends BaseController {
|
|
if(StringUtils.isEmpty(phone) || clazzId == null){
|
|
if(StringUtils.isEmpty(phone) || clazzId == null){
|
|
return failed(Constants.PARAM_VERIFY_ERROR_MSG);
|
|
return failed(Constants.PARAM_VERIFY_ERROR_MSG);
|
|
}
|
|
}
|
|
|
|
+ if(applyInfoService.mecUserIsExist(phone)){
|
|
|
|
+ return failed(Constants.PARAM_EXIST_ERROR_MSG);
|
|
|
|
+ }
|
|
ApplyInfo userByPhone = applyInfoService.findUserByPhone(phone, null);
|
|
ApplyInfo userByPhone = applyInfoService.findUserByPhone(phone, null);
|
|
if(userByPhone != null && !userByPhone.getClassId().equals(clazzId)){//如果改用户存在其他团中
|
|
if(userByPhone != null && !userByPhone.getClassId().equals(clazzId)){//如果改用户存在其他团中
|
|
return failed(Constants.PARAM_EXIST_ERROR_MSG);
|
|
return failed(Constants.PARAM_EXIST_ERROR_MSG);
|
|
@@ -261,4 +265,9 @@ public class UserController extends BaseController {
|
|
}
|
|
}
|
|
return succeed(applyInfoService.findMecUser(userId));
|
|
return succeed(applyInfoService.findMecUser(userId));
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @PostMapping("/mecUserIsExist")
|
|
|
|
+ public Object mecUserIsExist(String phone){
|
|
|
|
+ return succeed(applyInfoService.mecUserIsExist(phone));
|
|
|
|
+ }
|
|
}
|
|
}
|