重构单点-2
This commit is contained in:
1 parent
4251d4960b
commit
887512c5fe
15 files changed
+204
-75
No files matched your search
+10
@@ -1,5 +1,6 @@
|
||||
package com.bsd.pjcloud.admin.api.dto;
|
||||
|
||||
import com.bsd.pjcloud.admin.api.entity.SysUser;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -16,4 +17,13 @@ public class UserTokenDTO {
|
||||
* 权限列表
|
||||
*/
|
||||
private List<String> authorities = new ArrayList<>();
|
||||
|
||||
|
||||
/**
|
||||
* 基础的用户信息
|
||||
*/
|
||||
private SysUser sysUser;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+10
@@ -216,4 +216,14 @@ public class SysUser extends Model<SysUser> implements Serializable {
|
||||
@Schema(description = "邮箱")
|
||||
private String email;
|
||||
|
||||
|
||||
/**
|
||||
* 员工浙政钉编码
|
||||
*/
|
||||
@Schema(description="员工浙政钉编码")
|
||||
private String dingtalkEmployeeCode;
|
||||
|
||||
|
||||
@Schema(description="员工所属系统类型")
|
||||
private String systemType;
|
||||
}
|
||||
+14
@@ -113,4 +113,18 @@ public interface RemoteUserService {
|
||||
@PostMapping("/register/user")
|
||||
R<Boolean> registerUser(@RequestBody UserDTO userDTO);
|
||||
|
||||
/**
|
||||
* 根据钉钉号和手机号查询用户信息
|
||||
* @param employeeCode 钉钉号
|
||||
*
|
||||
* @return 用户信息
|
||||
*/
|
||||
@NoToken
|
||||
@GetMapping("/user/getUserByMobileOrEmployeeCode")
|
||||
R<List<SysUser>> getUserByMobileOrEmployeeCode(@RequestParam("employeeCode")String employeeCode,
|
||||
@RequestParam("mobile") String mobile);
|
||||
|
||||
@NoToken
|
||||
@GetMapping("/user/getUserByMobile")
|
||||
R<List<SysUser>> getUserByMobile(@RequestParam("mobile") String mobile);
|
||||
}
|
||||
@@ -198,4 +198,8 @@ public class UserVO implements Serializable {
|
||||
private String email;
|
||||
|
||||
|
||||
@Schema(description = "员工浙政钉编码")
|
||||
private String dingtalkEmployeeCode;
|
||||
|
||||
|
||||
}
|
||||
+2
@@ -39,6 +39,8 @@ public class RegisterController {
|
||||
return userService.registerUser(userDto);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 重置用户密码
|
||||
*
|
||||
|
||||
+19
@@ -310,4 +310,23 @@ public class SysUserController {
|
||||
return R.ok(userService.list(Wrappers.<SysUser>lambdaQuery().in(SysUser::getUserId, userIds)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据浙政钉号和手机号查询
|
||||
* @param employeeCode
|
||||
* @param mobile
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getUserByMobileOrEmployeeCode")
|
||||
@Inner
|
||||
public R<List<SysUser>> getUserByMobileOrEmployeeCode(@RequestParam("employeeCode") String employeeCode,
|
||||
@RequestParam("mobile") String mobile) {
|
||||
return R.ok(userService.list(Wrappers.<SysUser>lambdaQuery().eq(SysUser::getDingtalkEmployeeCode, employeeCode).or().eq(SysUser::getPhone, mobile)));
|
||||
}
|
||||
|
||||
@GetMapping("/getUserByMobile")
|
||||
@Inner
|
||||
public R<List<SysUser>> getUserByMobile(@RequestParam("mobile") String mobile) {
|
||||
return R.ok(userService.list(Wrappers.<SysUser>lambdaQuery().eq(SysUser::getPhone, mobile)));
|
||||
}
|
||||
}
|
||||
@@ -46,6 +46,7 @@
|
||||
<result column="nickname" property="nickname"/>
|
||||
<result column="name" property="name"/>
|
||||
<result column="email" property="email"/>
|
||||
<result column="dingtalk_employee_code" property="dingtalkEmployeeCode"/>
|
||||
<collection property="roleList" ofType="com.bsd.pjcloud.admin.api.entity.SysRole"
|
||||
select="com.bsd.pjcloud.admin.mapper.SysRoleMapper.listRolesByUserId" column="user_id">
|
||||
</collection>
|
||||
|
||||
Reference in new issue
Block a user