diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/SystemUserController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/SystemUserController.java index fca49a8c6..cc12159a3 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/SystemUserController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/SystemUserController.java @@ -142,6 +142,7 @@ public class SystemUserController { @ApiOperation(value = "根据企业或项目SN查找账号列表", notes = "根据企业或项目SN查找账号列表", httpMethod = "POST") @ApiImplicitParams({ @ApiImplicitParam(name = "sn", required = true, value = "企业或项目SN", paramType = "body"), + @ApiImplicitParam(name = "type", required = true, value = "1=默认,2查询项目账号和新用户", paramType = "body"), }) @PostMapping(value = "/getSystemUserBySn") public Result> getSystemUserBySn(@RequestBody Map map) { diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/SystemUserMapper.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/SystemUserMapper.java index f2b242a82..76069e9b1 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/SystemUserMapper.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/SystemUserMapper.java @@ -30,7 +30,7 @@ import java.util.Set; @Mapper public interface SystemUserMapper extends BaseMapper { - List getSystemUserBySn(@Param("p") Map map); + List getSystemUserBySn(@Param("param") Map map); SystemUser findByUsername(@Param("account") String account); diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/xml/SystemUserMapper.xml b/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/xml/SystemUserMapper.xml index eba78eb64..22a57e889 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/xml/SystemUserMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/xml/SystemUserMapper.xml @@ -5,8 +5,17 @@ SELECT a.*, jb.job_name from system_user a LEFT JOIN organization_job jb ON a.job_id = jb.id - WHERE a.sn = #{p.sn} - and a.account_type in (1, 2, 3, 4, 5, 7) + WHERE a.sn = #{param.sn} + + and a.account_type in (1, 2, 3, 4, 5, 7) + + + and a.account_type in (5) + + + and ( a.account_type = 5 or ( a.account_type = 10 and a.user_id in (select distinct t.user_id from + xz_system_user_to_company_project t where a.user_id = t.user_id and t.type = 2 and t.sn = #{param.sn}))) +