添加各个接口
parent
5ff98a94f9
commit
efc9b30509
6
pom.xml
6
pom.xml
|
@ -48,6 +48,12 @@
|
||||||
<version>${swagger.fox.version}</version>
|
<version>${swagger.fox.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.aliyun</groupId>
|
||||||
|
<artifactId>facebody20191230</artifactId>
|
||||||
|
<version>4.0.0</version>
|
||||||
|
</dependency>
|
||||||
<!-- Mysql Connector -->
|
<!-- Mysql Connector -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.mysql</groupId>
|
<groupId>com.mysql</groupId>
|
||||||
|
|
|
@ -126,6 +126,11 @@ public class SysUserController extends BaseController
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
*邮箱密码登录
|
||||||
|
* @param email
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@InnerAuth
|
@InnerAuth
|
||||||
@GetMapping("infoByEmail/{email}")
|
@GetMapping("infoByEmail/{email}")
|
||||||
public R<LoginUser> getUserInfoByEmail(@PathVariable("email") String email){
|
public R<LoginUser> getUserInfoByEmail(@PathVariable("email") String email){
|
||||||
|
@ -143,6 +148,24 @@ public class SysUserController extends BaseController
|
||||||
return R.ok(loginUser);
|
return R.ok(loginUser);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@InnerAuth
|
||||||
|
@GetMapping("/infoByUserEmail/{email}")
|
||||||
|
public R<LoginUser> infoByUserEmail(@PathVariable("email") String email){
|
||||||
|
SysUser sysUser = userService.infoByUserEmail(email);
|
||||||
|
if(StringUtils.isNull(sysUser)){
|
||||||
|
return R.fail("邮箱错误");
|
||||||
|
}
|
||||||
|
Set<String> roles = permissionService.getRolePermission(sysUser);
|
||||||
|
Set<String> permission = permissionService.getMenuPermission(sysUser);
|
||||||
|
LoginUser loginUser = new LoginUser();
|
||||||
|
loginUser.setSysUser(sysUser);
|
||||||
|
loginUser.setRoles(roles);
|
||||||
|
loginUser.setPermissions(permission);
|
||||||
|
return R.ok(loginUser,"登录成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 注册用户信息
|
* 注册用户信息
|
||||||
*/
|
*/
|
||||||
|
@ -316,8 +339,6 @@ public class SysUserController extends BaseController
|
||||||
return toAjax(userService.deleteUserByIds(userIds));
|
return toAjax(userService.deleteUserByIds(userIds));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重置密码
|
* 重置密码
|
||||||
*/
|
*/
|
||||||
|
@ -369,13 +390,9 @@ public class SysUserController extends BaseController
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("findByUserId/{userId}")
|
@GetMapping("findByUserId/{userId}")
|
||||||
public AjaxResult findByUserId(@PathVariable("userId") Long userId){
|
public R<SysUser> findByUserId(@PathVariable("userId") Long userId){
|
||||||
AjaxResult ajax = AjaxResult.success();
|
|
||||||
SysUser sysUser = userService.selectUserById(userId);
|
SysUser sysUser = userService.selectUserById(userId);
|
||||||
List<Long> roles = roleService.selectRoleListByUserId(userId);
|
return R.ok(sysUser,"查询成功");
|
||||||
ajax.put("user",sysUser);
|
|
||||||
ajax.put("roles",roles);
|
|
||||||
return ajax;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -384,13 +401,13 @@ public class SysUserController extends BaseController
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* 查询价格倒序的医生信息
|
* 查询价格倒序的医生信息
|
||||||
* @param registrationInformationId
|
* @param medicalDepartmentId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("findDoctorInformation/{registrationInformationId}")
|
@PostMapping("findDoctorInformation/{medicalDepartmentId}")
|
||||||
public AjaxResult findDoctorInformation(@PathVariable Long registrationInformationId){
|
public AjaxResult findDoctorInformation(@PathVariable("medicalDepartmentId") Long medicalDepartmentId){
|
||||||
AjaxResult ajax= AjaxResult.success();
|
AjaxResult ajax= AjaxResult.success();
|
||||||
List<SysDoctor> SysDoctor = userService.findDoctorInformation(registrationInformationId);
|
List<SysDoctor> SysDoctor = userService.findDoctorInformation(medicalDepartmentId);
|
||||||
ajax.put("sysRedis",SysDoctor);
|
ajax.put("sysRedis",SysDoctor);
|
||||||
return ajax;
|
return ajax;
|
||||||
}
|
}
|
||||||
|
@ -402,7 +419,7 @@ public class SysUserController extends BaseController
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("findDoctorNumber/{medicalDepartmentId}")
|
@PostMapping("findDoctorNumber/{medicalDepartmentId}")
|
||||||
public AjaxResult findDoctorNumber(@PathVariable Long medicalDepartmentId){
|
public AjaxResult findDoctorNumber(@PathVariable("medicalDepartmentId") Long medicalDepartmentId){
|
||||||
AjaxResult ajax = AjaxResult.success();
|
AjaxResult ajax = AjaxResult.success();
|
||||||
List<SysUser> sysUsers = userService.findDoctorNumber(medicalDepartmentId);
|
List<SysUser> sysUsers = userService.findDoctorNumber(medicalDepartmentId);
|
||||||
ajax.put("sysUsers",sysUsers);
|
ajax.put("sysUsers",sysUsers);
|
||||||
|
@ -415,7 +432,7 @@ public class SysUserController extends BaseController
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("findDoctorPraise/{medicalDepartmentId}")
|
@PostMapping("findDoctorPraise/{medicalDepartmentId}")
|
||||||
public AjaxResult findDoctorPraise(@PathVariable Long medicalDepartmentId){
|
public AjaxResult findDoctorPraise(@PathVariable("medicalDepartmentId") Long medicalDepartmentId){
|
||||||
AjaxResult ajax = AjaxResult.success();
|
AjaxResult ajax = AjaxResult.success();
|
||||||
List<SysDoctor> sysDoctorList = userService.findDoctorPraise(medicalDepartmentId);
|
List<SysDoctor> sysDoctorList = userService.findDoctorPraise(medicalDepartmentId);
|
||||||
ajax.put("sysDoctorList",sysDoctorList);
|
ajax.put("sysDoctorList",sysDoctorList);
|
||||||
|
@ -429,7 +446,7 @@ public class SysUserController extends BaseController
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("findDoctorComprehensive/{medicalDepartmentId}")
|
@PostMapping("findDoctorComprehensive/{medicalDepartmentId}")
|
||||||
public AjaxResult findDoctorComprehensive(@PathVariable Long medicalDepartmentId){
|
public AjaxResult findDoctorComprehensive(@PathVariable("medicalDepartmentId") Long medicalDepartmentId){
|
||||||
AjaxResult ajax = AjaxResult.success();
|
AjaxResult ajax = AjaxResult.success();
|
||||||
List<SysDoctor> sysDoctorList = userService.findDoctorComprehensive(medicalDepartmentId);
|
List<SysDoctor> sysDoctorList = userService.findDoctorComprehensive(medicalDepartmentId);
|
||||||
ajax.put("sysDoctorList",sysDoctorList);
|
ajax.put("sysDoctorList",sysDoctorList);
|
||||||
|
@ -443,7 +460,7 @@ public class SysUserController extends BaseController
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("updateSysUserMoney/{userId}/{userMoney}")
|
@PostMapping("updateSysUserMoney/{userId}/{userMoney}")
|
||||||
public AjaxResult updateSysUserMoney(@PathVariable Long userId,@PathVariable BigDecimal userMoney){
|
public AjaxResult updateSysUserMoney(@PathVariable("userId") Long userId,@PathVariable("userMoney") BigDecimal userMoney){
|
||||||
userService.updateSysUserMoney(userId,userMoney);
|
userService.updateSysUserMoney(userId,userMoney);
|
||||||
return success();
|
return success();
|
||||||
|
|
||||||
|
@ -456,13 +473,25 @@ public class SysUserController extends BaseController
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@GetMapping("findRegistrationInformation/{registrationInformationId}")
|
@GetMapping("findRegistrationInformation/{registrationInformationId}")
|
||||||
public AjaxResult findRegistrationInformation(@PathVariable Long registrationInformationId){
|
public AjaxResult findRegistrationInformation(@PathVariable("registrationInformationId") Long registrationInformationId){
|
||||||
AjaxResult ajax = AjaxResult.success();
|
AjaxResult ajax = AjaxResult.success();
|
||||||
SysRegistrationInformation registrationInformation = userService.selectregistrationinformation(registrationInformationId);
|
SysRegistrationInformation registrationInformation = userService.selectregistrationinformation(registrationInformationId);
|
||||||
ajax.put("registrationInformation",registrationInformation);
|
ajax.put("registrationInformation",registrationInformation);
|
||||||
return ajax;
|
return ajax;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据注册信息编号查询医生信息
|
||||||
|
* @param registrationInformationId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("findRegistrationInfoUserId/{registrationInformationId}")
|
||||||
|
public AjaxResult findRegistrationInfoUserId(@PathVariable("registrationInformationId") Long registrationInformationId){
|
||||||
|
AjaxResult ajax = AjaxResult.success();
|
||||||
|
List<SysRegistrationInformation> sysRegistrationInformation = userService.findRegistrationInfoUserId(registrationInformationId);
|
||||||
|
ajax.put("sysRegistrationInformation",sysRegistrationInformation);
|
||||||
|
return ajax;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户授权角色
|
* 用户授权角色
|
||||||
|
|
|
@ -167,11 +167,17 @@ public interface SysUserMapper
|
||||||
SysRegistrationInformation selectregistrationinformation(Long registrationInformationId);
|
SysRegistrationInformation selectregistrationinformation(Long registrationInformationId);
|
||||||
|
|
||||||
|
|
||||||
List<SysDoctor> findDoctorInformation(Long registrationInformationId);
|
List<SysDoctor> findDoctorInformation(Long medicalDepartmentId);
|
||||||
|
|
||||||
List<SysUser> findDoctorNumber(Long medicalDepartmentId);
|
List<SysUser> findDoctorNumber(Long medicalDepartmentId);
|
||||||
|
|
||||||
List<SysDoctor> findDoctorPraise(Long medicalDepartmentId);
|
List<SysDoctor> findDoctorPraise(Long medicalDepartmentId);
|
||||||
|
|
||||||
List<SysDoctor> findDoctorComprehensive(Long medicalDepartmentId);
|
List<SysDoctor> findDoctorComprehensive(Long medicalDepartmentId);
|
||||||
|
|
||||||
|
SysUser infoEmail(String email);
|
||||||
|
|
||||||
|
SysUser infoByUserEmail(String email);
|
||||||
|
|
||||||
|
List<SysRegistrationInformation> findRegistrationInfoUserId(Long registrationInformationId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -210,6 +210,11 @@ public interface ISysUserService
|
||||||
|
|
||||||
SysUser selectUserByUserName(String userName);
|
SysUser selectUserByUserName(String userName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮箱
|
||||||
|
* @param email
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
SysUser selectByEmail(String email);
|
SysUser selectByEmail(String email);
|
||||||
|
|
||||||
|
|
||||||
|
@ -228,11 +233,17 @@ public interface ISysUserService
|
||||||
SysRegistrationInformation selectregistrationinformation(Long registrationInformationId);
|
SysRegistrationInformation selectregistrationinformation(Long registrationInformationId);
|
||||||
|
|
||||||
|
|
||||||
List<SysDoctor> findDoctorInformation(Long registrationInformationId);
|
List<SysDoctor> findDoctorInformation(Long medicalDepartmentId);
|
||||||
|
|
||||||
List<SysUser> findDoctorNumber(Long medicalDepartmentId);
|
List<SysUser> findDoctorNumber(Long medicalDepartmentId);
|
||||||
|
|
||||||
List<SysDoctor> findDoctorPraise(Long medicalDepartmentId);
|
List<SysDoctor> findDoctorPraise(Long medicalDepartmentId);
|
||||||
|
|
||||||
List<SysDoctor> findDoctorComprehensive(Long medicalDepartmentId);
|
List<SysDoctor> findDoctorComprehensive(Long medicalDepartmentId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
SysUser infoByUserEmail(String email);
|
||||||
|
|
||||||
|
List<SysRegistrationInformation> findRegistrationInfoUserId(Long registrationInformationId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -613,8 +613,8 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SysDoctor> findDoctorInformation(Long registrationInformationId) {
|
public List<SysDoctor> findDoctorInformation(Long medicalDepartmentId) {
|
||||||
return userMapper.findDoctorInformation(registrationInformationId);
|
return userMapper.findDoctorInformation(medicalDepartmentId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -632,5 +632,15 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
return userMapper.findDoctorComprehensive(medicalDepartmentId);
|
return userMapper.findDoctorComprehensive(medicalDepartmentId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SysUser infoByUserEmail(String email) {
|
||||||
|
return userMapper.infoByUserEmail(email);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SysRegistrationInformation> findRegistrationInfoUserId(Long registrationInformationId) {
|
||||||
|
return userMapper.findRegistrationInfoUserId(registrationInformationId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,6 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<resultMap id="deptResult" type="SysDept">
|
<resultMap id="deptResult" type="SysDept">
|
||||||
<id property="deptId" column="dept_id" />
|
<id property="deptId" column="dept_id" />
|
||||||
<result property="parentId" column="parent_id" />
|
<result property="parentId" column="parent_id" />
|
||||||
|
@ -203,26 +204,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
LEFT JOIN sys_user su ON ri.user_id = su.user_id
|
LEFT JOIN sys_user su ON ri.user_id = su.user_id
|
||||||
LEFT JOIN professional_title_doctor pd ON ri.professional_title_doctor_id = pd.professional_title_doctor_id
|
LEFT JOIN professional_title_doctor pd ON ri.professional_title_doctor_id = pd.professional_title_doctor_id
|
||||||
</select>
|
</select>
|
||||||
<select id="findDoctorInformation" resultMap="SysDoctorResult">
|
|
||||||
SELECT
|
|
||||||
r.registration_information_id,
|
|
||||||
r.user_id,
|
|
||||||
r.affiliated_hospital,
|
|
||||||
r.medical_department_id,
|
|
||||||
r.professional_title_doctor_id,
|
|
||||||
r.personal_resume,
|
|
||||||
r.area_expertise,
|
|
||||||
r.number_patients_served,
|
|
||||||
r.consulting_price,
|
|
||||||
r.praise,
|
|
||||||
r.registration_information_examine_status,
|
|
||||||
r.registration_information_medic_status
|
|
||||||
FROM
|
|
||||||
registration_information r
|
|
||||||
LEFT JOIN professional_title_doctor p ON r.professional_title_doctor_id = p.professional_title_doctor_id where registration_information_id = #{registrationInformationId}
|
|
||||||
ORDER BY
|
|
||||||
r.consulting_price DESC
|
|
||||||
</select>
|
|
||||||
<select id="findDoctorNumber" resultMap="SysDoctorResult">
|
<select id="findDoctorNumber" resultMap="SysDoctorResult">
|
||||||
SELECT
|
SELECT
|
||||||
r.registration_information_id,
|
r.registration_information_id,
|
||||||
|
@ -293,6 +275,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where u.user_id = #{userId}
|
where u.user_id = #{userId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="findDoctorInformation" resultMap="SysDoctorResult">
|
||||||
|
SELECT
|
||||||
|
r.registration_information_id,
|
||||||
|
r.user_id,
|
||||||
|
r.affiliated_hospital,
|
||||||
|
r.medical_department_id,
|
||||||
|
r.professional_title_doctor_id,
|
||||||
|
r.personal_resume,
|
||||||
|
r.area_expertise,
|
||||||
|
r.number_patients_served,
|
||||||
|
r.consulting_price,
|
||||||
|
r.praise,
|
||||||
|
r.registration_information_examine_status,
|
||||||
|
r.registration_information_medic_status
|
||||||
|
FROM
|
||||||
|
registration_information r
|
||||||
|
LEFT JOIN professional_title_doctor p ON r.professional_title_doctor_id = p.professional_title_doctor_id where registration_information_id = #{registrationInformationId}
|
||||||
|
ORDER BY
|
||||||
|
r.consulting_price DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="infoByUserEmail" resultType="com.four.system.api.domain.SysUser">
|
||||||
|
<include refid="selectUserVo"/>
|
||||||
|
where u.email = #{email}
|
||||||
|
</select>
|
||||||
|
<select id="findRegistrationInfoUserId" resultMap="SysDoctorResult">
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
|
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
|
||||||
insert into sys_user(
|
insert into sys_user(
|
||||||
|
|
Loading…
Reference in New Issue