|
@@ -50,9 +50,15 @@ public class UserController extends BaseController {
|
|
|
if(StringUtils.isEmpty(phone) || clazzId == null){
|
|
|
return failed(Constants.PARAM_VERIFY_ERROR_MSG);
|
|
|
}
|
|
|
- ApplyInfo userByPhone = applyInfoService.findUserByPhone(phone, clazzId);
|
|
|
+ ApplyInfo userByPhone = applyInfoService.findUserByPhone(phone, null);
|
|
|
+ if(userByPhone != null & userByPhone.getClassId()!=clazzId){//如果改用户存在其他团中
|
|
|
+ return failed(Constants.PARAM_EXIST_ERROR_MSG);
|
|
|
+ }
|
|
|
+ userByPhone = applyInfoService.findUserByPhone(phone, clazzId);
|
|
|
School school = schoolService.get(clazzId);
|
|
|
- userByPhone.setPushStatus(school.getStatus());
|
|
|
+ if(userByPhone != null){
|
|
|
+ userByPhone.setPushStatus(school.getStatus());
|
|
|
+ }
|
|
|
return succeed(userByPhone);
|
|
|
}
|
|
|
|