添加各个接口
parent
5ff98a94f9
commit
efc9b30509
32
pom.xml
32
pom.xml
|
@ -14,64 +14,70 @@
|
|||
<description>
|
||||
four-modules-system系统服务
|
||||
</description>
|
||||
|
||||
|
||||
<dependencies>
|
||||
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos Config -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- SpringCloud Alibaba Sentinel -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- SpringBoot Actuator -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- Swagger UI -->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger-ui</artifactId>
|
||||
<version>${swagger.fox.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>com.aliyun</groupId>
|
||||
<artifactId>facebody20191230</artifactId>
|
||||
<version>4.0.0</version>
|
||||
</dependency>
|
||||
<!-- Mysql Connector -->
|
||||
<dependency>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- RuoYi Common DataSource -->
|
||||
<dependency>
|
||||
<groupId>com.four</groupId>
|
||||
<artifactId>four-common-datasource</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- RuoYi Common DataScope -->
|
||||
<dependency>
|
||||
<groupId>com.four</groupId>
|
||||
<artifactId>four-common-datascope</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- RuoYi Common Log -->
|
||||
<dependency>
|
||||
<groupId>com.four</groupId>
|
||||
<artifactId>four-common-log</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- RuoYi Common Swagger -->
|
||||
<dependency>
|
||||
<groupId>com.four</groupId>
|
||||
|
@ -96,5 +102,5 @@
|
|||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -126,6 +126,11 @@ public class SysUserController extends BaseController
|
|||
|
||||
}
|
||||
|
||||
/***
|
||||
*邮箱密码登录
|
||||
* @param email
|
||||
* @return
|
||||
*/
|
||||
@InnerAuth
|
||||
@GetMapping("infoByEmail/{email}")
|
||||
public R<LoginUser> getUserInfoByEmail(@PathVariable("email") String email){
|
||||
|
@ -143,6 +148,24 @@ public class SysUserController extends BaseController
|
|||
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));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 重置密码
|
||||
*/
|
||||
|
@ -369,13 +390,9 @@ public class SysUserController extends BaseController
|
|||
* @return
|
||||
*/
|
||||
@GetMapping("findByUserId/{userId}")
|
||||
public AjaxResult findByUserId(@PathVariable("userId") Long userId){
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
public R<SysUser> findByUserId(@PathVariable("userId") Long userId){
|
||||
SysUser sysUser = userService.selectUserById(userId);
|
||||
List<Long> roles = roleService.selectRoleListByUserId(userId);
|
||||
ajax.put("user",sysUser);
|
||||
ajax.put("roles",roles);
|
||||
return ajax;
|
||||
return R.ok(sysUser,"查询成功");
|
||||
}
|
||||
|
||||
|
||||
|
@ -384,13 +401,13 @@ public class SysUserController extends BaseController
|
|||
|
||||
/***
|
||||
* 查询价格倒序的医生信息
|
||||
* @param registrationInformationId
|
||||
* @param medicalDepartmentId
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("findDoctorInformation/{registrationInformationId}")
|
||||
public AjaxResult findDoctorInformation(@PathVariable Long registrationInformationId){
|
||||
@PostMapping("findDoctorInformation/{medicalDepartmentId}")
|
||||
public AjaxResult findDoctorInformation(@PathVariable("medicalDepartmentId") Long medicalDepartmentId){
|
||||
AjaxResult ajax= AjaxResult.success();
|
||||
List<SysDoctor> SysDoctor = userService.findDoctorInformation(registrationInformationId);
|
||||
List<SysDoctor> SysDoctor = userService.findDoctorInformation(medicalDepartmentId);
|
||||
ajax.put("sysRedis",SysDoctor);
|
||||
return ajax;
|
||||
}
|
||||
|
@ -402,7 +419,7 @@ public class SysUserController extends BaseController
|
|||
* @return
|
||||
*/
|
||||
@PostMapping("findDoctorNumber/{medicalDepartmentId}")
|
||||
public AjaxResult findDoctorNumber(@PathVariable Long medicalDepartmentId){
|
||||
public AjaxResult findDoctorNumber(@PathVariable("medicalDepartmentId") Long medicalDepartmentId){
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
List<SysUser> sysUsers = userService.findDoctorNumber(medicalDepartmentId);
|
||||
ajax.put("sysUsers",sysUsers);
|
||||
|
@ -415,7 +432,7 @@ public class SysUserController extends BaseController
|
|||
* @return
|
||||
*/
|
||||
@PostMapping("findDoctorPraise/{medicalDepartmentId}")
|
||||
public AjaxResult findDoctorPraise(@PathVariable Long medicalDepartmentId){
|
||||
public AjaxResult findDoctorPraise(@PathVariable("medicalDepartmentId") Long medicalDepartmentId){
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
List<SysDoctor> sysDoctorList = userService.findDoctorPraise(medicalDepartmentId);
|
||||
ajax.put("sysDoctorList",sysDoctorList);
|
||||
|
@ -429,7 +446,7 @@ public class SysUserController extends BaseController
|
|||
* @return
|
||||
*/
|
||||
@PostMapping("findDoctorComprehensive/{medicalDepartmentId}")
|
||||
public AjaxResult findDoctorComprehensive(@PathVariable Long medicalDepartmentId){
|
||||
public AjaxResult findDoctorComprehensive(@PathVariable("medicalDepartmentId") Long medicalDepartmentId){
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
List<SysDoctor> sysDoctorList = userService.findDoctorComprehensive(medicalDepartmentId);
|
||||
ajax.put("sysDoctorList",sysDoctorList);
|
||||
|
@ -443,7 +460,7 @@ public class SysUserController extends BaseController
|
|||
* @return
|
||||
*/
|
||||
@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);
|
||||
return success();
|
||||
|
||||
|
@ -456,13 +473,25 @@ public class SysUserController extends BaseController
|
|||
*/
|
||||
|
||||
@GetMapping("findRegistrationInformation/{registrationInformationId}")
|
||||
public AjaxResult findRegistrationInformation(@PathVariable Long registrationInformationId){
|
||||
public AjaxResult findRegistrationInformation(@PathVariable("registrationInformationId") Long registrationInformationId){
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
SysRegistrationInformation registrationInformation = userService.selectregistrationinformation(registrationInformationId);
|
||||
ajax.put("registrationInformation",registrationInformation);
|
||||
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);
|
||||
|
||||
|
||||
List<SysDoctor> findDoctorInformation(Long registrationInformationId);
|
||||
List<SysDoctor> findDoctorInformation(Long medicalDepartmentId);
|
||||
|
||||
List<SysUser> findDoctorNumber(Long medicalDepartmentId);
|
||||
|
||||
List<SysDoctor> findDoctorPraise(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);
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
* @param email
|
||||
* @return
|
||||
*/
|
||||
SysUser selectByEmail(String email);
|
||||
|
||||
|
||||
|
@ -228,11 +233,17 @@ public interface ISysUserService
|
|||
SysRegistrationInformation selectregistrationinformation(Long registrationInformationId);
|
||||
|
||||
|
||||
List<SysDoctor> findDoctorInformation(Long registrationInformationId);
|
||||
List<SysDoctor> findDoctorInformation(Long medicalDepartmentId);
|
||||
|
||||
List<SysUser> findDoctorNumber(Long medicalDepartmentId);
|
||||
|
||||
List<SysDoctor> findDoctorPraise(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
|
||||
public List<SysDoctor> findDoctorInformation(Long registrationInformationId) {
|
||||
return userMapper.findDoctorInformation(registrationInformationId);
|
||||
public List<SysDoctor> findDoctorInformation(Long medicalDepartmentId) {
|
||||
return userMapper.findDoctorInformation(medicalDepartmentId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -632,5 +632,15 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
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 id="deptResult" type="SysDept">
|
||||
<id property="deptId" column="dept_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 professional_title_doctor pd ON ri.professional_title_doctor_id = pd.professional_title_doctor_id
|
||||
</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
|
||||
r.registration_information_id,
|
||||
|
@ -293,6 +275,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where u.user_id = #{userId}
|
||||
</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 into sys_user(
|
||||
|
|
Loading…
Reference in New Issue