新火炬后端单体项目初始化代码
Lius
8 天以前 9af27ed8da6b5710025fb080f96a7dd9e80467a4
update
已修改2个文件
14 ■■■■ 文件已修改
src/main/java/org/jeecg/modules/system/controller/SysUserController.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/org/jeecg/modules/system/mapper/xml/SysUserMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
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("查找成功");
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>