Commit 6d4b8777 authored by 高建强's avatar 高建强

item:接口getUserInfo条件修改为IN查询

parent 3b77a1d7
......@@ -74,7 +74,7 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
List<UserUnitDto> getUserUnit(String id, String type, String code);
List<UserDto> getUserInfo(String id, String type, String code, String fieldCode);
List<UserDto> getUserInfo(String id, String type, String code, String[] fieldCode);
/**
* 导出机场单位带过滤 bug2657 by kongfm
......
......@@ -443,8 +443,11 @@ GROUP BY
<if test="code != null and code != ''">
AND u.biz_org_code LIKE CONCAT(#{code}, '%')
</if>
<if test="fieldCode != null and fieldCode != ''">
AND f.field_code IN ( #{fieldCode})
<if test="fieldCode != null and fieldCode.length > 0">
AND fi.field_code IN
<foreach collection="fieldCode" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
</where>
ORDER BY
......
......@@ -1190,14 +1190,14 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
if (StringUtils.isNotBlank(userId)) {
String[] typeArr = TYPE.split(",");
// 业主单位
List<UserDto> list = orgUsrMapper.getUserInfo(userId, typeArr[0], null, FIELD_CODE);
List<UserDto> list = orgUsrMapper.getUserInfo(userId, typeArr[0], null, FIELD_CODE.split(","));
if (!CollectionUtils.isEmpty(list)) {
if (list.size() == 1) {
userDtoList.addAll(list);
UserDto userDto = list.get(0);
String codeVal = userDto.getBizOrgCode().substring(0, 5);
if (StringUtils.isNotBlank(codeVal)) {
List<UserDto> dtoList = orgUsrMapper.getUserInfo(null, typeArr[1], codeVal, COMPANY_FIELD_CODE);
List<UserDto> dtoList = orgUsrMapper.getUserInfo(null, typeArr[1], codeVal, COMPANY_FIELD_CODE.split(","));
if (!CollectionUtils.isEmpty(dtoList)) {
userDtoList.addAll(dtoList);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment