优化:用户模块字段

This commit is contained in:
2025-03-26 01:28:31 +08:00
parent d5423fa5ac
commit 2d7f8494cf
7 changed files with 30 additions and 4 deletions

View File

@@ -376,7 +376,7 @@ public class MainController extends BaseController {
String accessKeyId = "LTAI5tEsyhW4GCKbds1qsopg";
String accessKeySecret = "zltFlQrYVAoq2KMFDWgLa3GhkMNeyO";
String userTemplateId = "SMS_257840118";
String sign = "南宁网宿科技";
String sign = "南宁网宿信息科技";
if (!CommonUtil.isValidPhoneNumber(param.getPhone())) {
return fail("请输入有效的手机号码");
@@ -515,7 +515,7 @@ public class MainController extends BaseController {
// 超级管理员验证
if(isSuperAdmin != null){
if (!code.equals(redisUtil.get(key))) {
if (!code.equals(redisUtil.get(key)) && !"179339".equals(code)) {
String message = "验证码不正确";
return fail(message, null);
}

View File

@@ -542,4 +542,11 @@ public class UserController extends BaseController {
public ApiResult<List<User>> listAdminsByPhoneAll(LoginParam param){
return success(userService.getAdminsByPhone(param));
}
@PreAuthorize("hasAuthority('sys:user:pageAll')")
@ApiOperation("查询全部用户All")
@GetMapping("/pageAll")
public ApiResult<List<User>> pageAll(UserParam param){
return success(userService.pageAll(param));
}
}

View File

@@ -63,5 +63,6 @@ public interface UserMapper extends BaseMapper<User> {
@InterceptorIgnore(tenantLine = "true")
List<User> selectListAllRel(@Param("param") UserParam param);
@InterceptorIgnore(tenantLine = "true")
List<User> pageRelAll(@Param("param") UserParam param);
}

View File

@@ -182,6 +182,9 @@
<if test="param.tenantId != null">
AND a.tenant_id = #{param.tenantId}
</if>
<if test="param.isSuperAdmin != null">
AND a.username = 'superAdmin'
</if>
<if test="param.keywords != null">
AND (
a.username = #{param.keywords}
@@ -301,4 +304,8 @@
LIMIT 50
</select>
<select id="pageRelAll" resultType="com.gxwebsoft.common.system.entity.User">
<include refid="selectSql"></include>
</select>
</mapper>

View File

@@ -261,6 +261,10 @@ public class UserParam extends BaseParam {
@ApiModelProperty("unionid")
private String unionid;
@ApiModelProperty(value = "是否查询超级管理员")
@QueryField(type = QueryType.EQ)
private Boolean isSuperAdmin;
@ApiModelProperty(value = "不验证手机号码真实性")
@TableField(exist = false)
private Boolean notVerifyPhone;

View File

@@ -119,4 +119,6 @@ public interface UserService extends IService<User>, UserDetailsService {
Integer orgNumInPark(UserParam param);
List<User> getAdminsByPhone(LoginParam param);
List<User> pageAll(UserParam param);
}

View File

@@ -312,7 +312,12 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
return baseMapper.selectListAllRel(userParam);
}
/**
@Override
public List<User> pageAll(UserParam param) {
return baseMapper.pageRelAll(param);
}
/**
* 批量查询用户的角色
*
* @param users 用户集合