|
@@ -2,15 +2,12 @@ package com.ym.mec.student.controller;
|
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
-
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
-
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
-
|
|
|
|
import com.ym.mec.auth.api.client.SysUserFeignService;
|
|
import com.ym.mec.auth.api.client.SysUserFeignService;
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
import com.ym.mec.biz.dal.entity.StudentPreRegistration;
|
|
import com.ym.mec.biz.dal.entity.StudentPreRegistration;
|
|
@@ -24,14 +21,12 @@ public class StudentController extends BaseController {
|
|
|
|
|
|
@Resource
|
|
@Resource
|
|
private SysUserFeignService sysUserFeignService;
|
|
private SysUserFeignService sysUserFeignService;
|
|
-
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private StudentService studentService;
|
|
private StudentService studentService;
|
|
|
|
|
|
@ApiOperation("注册")
|
|
@ApiOperation("注册")
|
|
@PostMapping(value = "/registering")
|
|
@PostMapping(value = "/registering")
|
|
public Object registering(@RequestBody StudentPreRegistration studentPreRegistration) {
|
|
public Object registering(@RequestBody StudentPreRegistration studentPreRegistration) {
|
|
-
|
|
|
|
// 判断用户是否存在
|
|
// 判断用户是否存在
|
|
SysUser user = sysUserFeignService.queryUserByMobile(studentPreRegistration.getPhone());
|
|
SysUser user = sysUserFeignService.queryUserByMobile(studentPreRegistration.getPhone());
|
|
if(user != null && user.getId() != null){
|
|
if(user != null && user.getId() != null){
|
|
@@ -39,7 +34,6 @@ public class StudentController extends BaseController {
|
|
return succeed("您已注册,请直接下载APP!");
|
|
return succeed("您已注册,请直接下载APP!");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
return studentService.register(studentPreRegistration) ? succeed() : failed();
|
|
return studentService.register(studentPreRegistration) ? succeed() : failed();
|
|
}
|
|
}
|
|
|
|
|