From 9af27ed8da6b5710025fb080f96a7dd9e80467a4 Mon Sep 17 00:00:00 2001 From: Lius <Lius2225@163.com> Date: 星期一, 28 七月 2025 23:24:10 +0800 Subject: [PATCH] update --- src/main/java/org/jeecg/modules/system/mapper/xml/SysUserMapper.xml | 2 +- src/main/java/org/jeecg/modules/system/controller/SysUserController.java | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/jeecg/modules/system/controller/SysUserController.java b/src/main/java/org/jeecg/modules/system/controller/SysUserController.java index a438754..ee03b35 100644 --- a/src/main/java/org/jeecg/modules/system/controller/SysUserController.java +++ b/src/main/java/org/jeecg/modules/system/controller/SysUserController.java @@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import liquibase.pro.packaged.I; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang.StringUtils; import org.apache.shiro.SecurityUtils; @@ -30,6 +31,8 @@ import org.jeecg.modules.base.service.BaseCommonService; import org.jeecg.modules.base.service.IUserFactoryService; import org.jeecg.modules.base.service.IUserGroupService; +import org.jeecg.modules.mdc.model.ProductionIdModel; +import org.jeecg.modules.mdc.service.IMdcUserProductionService; import org.jeecg.modules.system.entity.*; import org.jeecg.modules.system.model.DepartIdModel; import org.jeecg.modules.base.model.FactoryIdModel; @@ -104,6 +107,9 @@ @Resource private IUserFactoryService userFactoryService; + + @Resource + private IMdcUserProductionService userProductionService; @Resource private IUserGroupService userGroupService; @@ -473,10 +479,10 @@ @AutoLog(value = "鐢ㄦ埛琛�-鏌ヨ鎸囧畾鐢ㄦ埛鍜屼骇绾垮叧鑱旂殑鏁版嵁") @ApiOperation(value = "鐢ㄦ埛琛�-鏌ヨ鎸囧畾鐢ㄦ埛鍜屼骇绾垮叧鑱旂殑鏁版嵁", notes = "鐢ㄦ埛琛�-鏌ヨ鎸囧畾鐢ㄦ埛鍜屼骇绾垮叧鑱旂殑鏁版嵁") @GetMapping(value = "/userProductionList") - public Result<List<FactoryIdModel>> getUserProductionsList(@RequestParam(name = "userId", required = true) String userId) { - Result<List<FactoryIdModel>> result = new Result<>(); + public Result<List<ProductionIdModel>> getUserProductionsList(@RequestParam(name = "userId", required = true) String userId) { + Result<List<ProductionIdModel>> result = new Result<>(); try { - List<FactoryIdModel> proIdModelList = this.userFactoryService.queryFactoryIdsOfUser(userId); + List<ProductionIdModel> proIdModelList = this.userProductionService.queryProductionIdsOfUser(userId); if (proIdModelList != null && !proIdModelList.isEmpty()) { result.setSuccess(true); result.setMessage("鏌ユ壘鎴愬姛"); diff --git a/src/main/java/org/jeecg/modules/system/mapper/xml/SysUserMapper.xml b/src/main/java/org/jeecg/modules/system/mapper/xml/SysUserMapper.xml index 3cd3bec..f698980 100644 --- a/src/main/java/org/jeecg/modules/system/mapper/xml/SysUserMapper.xml +++ b/src/main/java/org/jeecg/modules/system/mapper/xml/SysUserMapper.xml @@ -185,7 +185,7 @@ <!-- 鏌ヨ鐢ㄦ埛鐨勬墍灞炰骇绾垮悕绉颁俊鎭� --> <select id="getProNamesByUserIds" resultType="org.jeecg.modules.system.vo.MdcUserProVo"> - SELECT p.factory_name productionName, up.user_id FROM base_user_factory up, base_factory p WHERE p.id = up.factory_id AND up.user_id IN + SELECT p.production_name, up.user_id FROM mdc_user_production up, mdc_production p WHERE p.id = up.pro_id AND up.user_id IN <foreach collection="userIds" index="index" item="id" open="(" separator="," close=")"> #{id} </foreach> -- Gitblit v1.9.3