|
|
@ -3,12 +3,15 @@ package com.ruoyi.web.controller.system;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Set;
|
|
|
|
import java.util.Set;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.ruoyi.common.exception.ServiceException;
|
|
|
|
import com.ruoyi.system.domain.req.AppRegisterReq;
|
|
|
|
import com.ruoyi.system.domain.req.AppRegisterReq;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import com.ruoyi.system.domain.TDoctor;
|
|
|
|
import com.ruoyi.system.domain.TDoctor;
|
|
|
|
import com.ruoyi.system.domain.THospital;
|
|
|
|
import com.ruoyi.system.domain.THospital;
|
|
|
|
import com.ruoyi.system.service.ITDoctorService;
|
|
|
|
import com.ruoyi.system.service.ITDoctorService;
|
|
|
|
import com.ruoyi.system.service.ITHospitalService;
|
|
|
|
import com.ruoyi.system.service.ITHospitalService;
|
|
|
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.util.ObjectUtils;
|
|
|
|
import org.springframework.util.ObjectUtils;
|
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
@ -34,6 +37,7 @@ import com.ruoyi.system.service.ISysMenuService;
|
|
|
|
@RestController
|
|
|
|
@RestController
|
|
|
|
public class SysLoginController
|
|
|
|
public class SysLoginController
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
private static final Logger logger = LoggerFactory.getLogger(SysLoginController.class);
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private SysLoginService loginService;
|
|
|
|
private SysLoginService loginService;
|
|
|
|
|
|
|
|
|
|
|
@ -69,12 +73,16 @@ public class SysLoginController
|
|
|
|
@ApiOperation("app医生登录")
|
|
|
|
@ApiOperation("app医生登录")
|
|
|
|
@PostMapping("/login/app")
|
|
|
|
@PostMapping("/login/app")
|
|
|
|
public AjaxResult loginForApp(@RequestBody LoginBody loginBody) {
|
|
|
|
public AjaxResult loginForApp(@RequestBody LoginBody loginBody) {
|
|
|
|
|
|
|
|
if (!"123456".equals(loginBody.getPassword())) {
|
|
|
|
|
|
|
|
throw new ServiceException("密码错误!");
|
|
|
|
|
|
|
|
}
|
|
|
|
return loginService.loginForApp(loginBody.getUsername(), loginBody.getPassword());
|
|
|
|
return loginService.loginForApp(loginBody.getUsername(), loginBody.getPassword());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("app医生完善信息")
|
|
|
|
@ApiOperation("app医生完善信息")
|
|
|
|
@PostMapping("/login/app/fill/info")
|
|
|
|
@PostMapping("/login/app/fill/info")
|
|
|
|
public AjaxResult fillInfoForDoctor(@RequestBody @Validated AppRegisterReq req) {
|
|
|
|
public AjaxResult fillInfoForDoctor(@RequestBody @Validated AppRegisterReq req) {
|
|
|
|
|
|
|
|
logger.info("fillInfoForDoctor:{}", req);
|
|
|
|
return loginService.loginForAppFillInfo(req);
|
|
|
|
return loginService.loginForAppFillInfo(req);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|