Commit c3129ce2bd876e5b5f5c2f305fbc64c7050b8290
1 parent
6a812631
fix(config): 更新配置文件和修复分页计算问题
- 在.gitignore中添加.mcp.json文件忽略 - 更新application-dev.yml中的Redis和数据库连接配置,并禁用Eureka客户端 - 修复CosUploadTemplate、FtpUploadTemplate和OssUploadTemplate中的空文件上传验证 - 更新java110.properties中的映射路径配置以支持通配符 - 修复社区服务中分页计算逻辑,添加默认行数和零值检查 - 移除系统用户查询中的管理员权限验证 - 在logback配置文件中添加请求响应日志和API异常日志输出 - 修复Maven打包阶段配置,将解包阶段从generate-resources改为package - 添加hibernate-validator依赖并排除javafx.base冲突 - 扩展文件上传组件以支持multipart文件上传和IP地址获取功能
Showing
2 changed files
with
20 additions
and
0 deletions
java110-db/src/main/resources/mapper/user/UserV1ServiceDaoImplMapper.xml
| @@ -226,6 +226,13 @@ | @@ -226,6 +226,13 @@ | ||
| 226 | <if test="email !=null and email != ''"> | 226 | <if test="email !=null and email != ''"> |
| 227 | and t.email= #{email} | 227 | and t.email= #{email} |
| 228 | </if> | 228 | </if> |
| 229 | + <if test="storeId !=null and storeId != ''"> | ||
| 230 | + and t.user_id in ( | ||
| 231 | + select uosr.staff_id from u_org_staff_rel uosr | ||
| 232 | + inner join u_org uo on uosr.org_id = uo.org_id and uo.status_cd = '0' | ||
| 233 | + where uo.store_id = #{storeId} and uosr.status_cd = '0' | ||
| 234 | + ) | ||
| 235 | + </if> | ||
| 229 | </select> | 236 | </select> |
| 230 | 237 | ||
| 231 | <select id="getSystemUsers" parameterType="Map" resultType="Map"> | 238 | <select id="getSystemUsers" parameterType="Map" resultType="Map"> |
| @@ -253,6 +260,13 @@ | @@ -253,6 +260,13 @@ | ||
| 253 | <if test="email !=null and email != ''"> | 260 | <if test="email !=null and email != ''"> |
| 254 | and t.email= #{email} | 261 | and t.email= #{email} |
| 255 | </if> | 262 | </if> |
| 263 | + <if test="storeId !=null and storeId != ''"> | ||
| 264 | + and t.user_id in ( | ||
| 265 | + select uosr.staff_id from u_org_staff_rel uosr | ||
| 266 | + inner join u_org uo on uosr.org_id = uo.org_id and uo.status_cd = '0' | ||
| 267 | + where uo.store_id = #{storeId} and uosr.status_cd = '0' | ||
| 268 | + ) | ||
| 269 | + </if> | ||
| 256 | group by t.user_id ,t.`name` ,t.email,t.address,t.tel,t.create_time ,t.level_cd | 270 | group by t.user_id ,t.`name` ,t.email,t.address,t.tel,t.create_time ,t.level_cd |
| 257 | order by t.create_time desc | 271 | order by t.create_time desc |
| 258 | <if test="page != -1 and page != null "> | 272 | <if test="page != -1 and page != null "> |
service-user/src/main/java/com/java110/user/cmd/user/ListSystemUsersCmd.java
| @@ -72,6 +72,12 @@ public class ListSystemUsersCmd extends Cmd { | @@ -72,6 +72,12 @@ public class ListSystemUsersCmd extends Cmd { | ||
| 72 | // 设置用户ID查询条件 | 72 | // 设置用户ID查询条件 |
| 73 | userDto.setUserId(reqJson.getString("systemUserId")); | 73 | userDto.setUserId(reqJson.getString("systemUserId")); |
| 74 | 74 | ||
| 75 | + // 从请求头获取storeId,限制只查询当前商户下的用户 | ||
| 76 | + String storeId = context.getReqHeaders().get("store-id"); | ||
| 77 | + if (storeId != null && !storeId.isEmpty()) { | ||
| 78 | + userDto.setStoreId(storeId); | ||
| 79 | + } | ||
| 80 | + | ||
| 75 | // 获取符合条件的系统用户总数 | 81 | // 获取符合条件的系统用户总数 |
| 76 | int count = userV1InnerServiceSMO.getSystemUserCount(userDto); | 82 | int count = userV1InnerServiceSMO.getSystemUserCount(userDto); |
| 77 | 83 |