fix(组织成员): 修复组织成员搜索报错问题
This commit is contained in:
parent
e57f462e38
commit
db5182f37d
|
@ -101,11 +101,11 @@
|
||||||
<select id="selectListMemberByOrg" resultType="io.metersphere.system.dto.OptionDisabledDTO">
|
<select id="selectListMemberByOrg" resultType="io.metersphere.system.dto.OptionDisabledDTO">
|
||||||
select u.id, u.name
|
select u.id, u.name
|
||||||
from user u
|
from user u
|
||||||
where u.deleted = 0
|
where u.deleted = false
|
||||||
<if test="keyword != null and keyword != ''">
|
<if test="keyword != null and keyword != ''">
|
||||||
and (u.name like CONCAT('%', #{request.keyword},'%')
|
and (u.name like CONCAT('%', #{keyword},'%')
|
||||||
or u.email like CONCAT('%', #{request.keyword},'%')
|
or u.email like CONCAT('%', #{keyword},'%')
|
||||||
or u.phone like CONCAT('%', #{request.keyword},'%'))
|
or u.phone like CONCAT('%', #{keyword},'%'))
|
||||||
</if>
|
</if>
|
||||||
order by u.update_time desc
|
order by u.update_time desc
|
||||||
limit 100
|
limit 100
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
package io.metersphere.system.controller;
|
package io.metersphere.system.controller;
|
||||||
|
|
||||||
import io.metersphere.system.base.BaseTest;
|
|
||||||
import io.metersphere.sdk.constants.InternalUserRole;
|
import io.metersphere.sdk.constants.InternalUserRole;
|
||||||
import io.metersphere.sdk.constants.SessionConstants;
|
import io.metersphere.sdk.constants.SessionConstants;
|
||||||
import io.metersphere.system.controller.handler.ResultHolder;
|
|
||||||
import io.metersphere.system.dto.sdk.OptionDTO;
|
|
||||||
import io.metersphere.sdk.util.JSON;
|
import io.metersphere.sdk.util.JSON;
|
||||||
import io.metersphere.system.utils.Pager;
|
import io.metersphere.system.base.BaseTest;
|
||||||
|
import io.metersphere.system.controller.handler.ResultHolder;
|
||||||
import io.metersphere.system.dto.OrgUserExtend;
|
import io.metersphere.system.dto.OrgUserExtend;
|
||||||
import io.metersphere.system.dto.request.OrgMemberExtendProjectRequest;
|
import io.metersphere.system.dto.request.OrgMemberExtendProjectRequest;
|
||||||
import io.metersphere.system.dto.request.OrganizationMemberExtendRequest;
|
import io.metersphere.system.dto.request.OrganizationMemberExtendRequest;
|
||||||
import io.metersphere.system.dto.request.OrganizationMemberUpdateRequest;
|
import io.metersphere.system.dto.request.OrganizationMemberUpdateRequest;
|
||||||
import io.metersphere.system.dto.request.OrganizationRequest;
|
import io.metersphere.system.dto.request.OrganizationRequest;
|
||||||
|
import io.metersphere.system.dto.sdk.OptionDTO;
|
||||||
|
import io.metersphere.system.utils.Pager;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
@ -432,6 +432,7 @@ public class OrganizationControllerTests extends BaseTest {
|
||||||
MvcResult mvcResult = mockMvc.perform(MockMvcRequestBuilders.get("/organization/not-exist/user/list/sys_default_organization_3")
|
MvcResult mvcResult = mockMvc.perform(MockMvcRequestBuilders.get("/organization/not-exist/user/list/sys_default_organization_3")
|
||||||
.header(SessionConstants.HEADER_TOKEN, sessionId)
|
.header(SessionConstants.HEADER_TOKEN, sessionId)
|
||||||
.header(SessionConstants.CSRF_TOKEN, csrfToken)
|
.header(SessionConstants.CSRF_TOKEN, csrfToken)
|
||||||
|
.param("keyword", "test")
|
||||||
.contentType(MediaType.APPLICATION_JSON))
|
.contentType(MediaType.APPLICATION_JSON))
|
||||||
.andExpect(status().isOk())
|
.andExpect(status().isOk())
|
||||||
.andExpect(content().contentType(MediaType.APPLICATION_JSON)).andReturn();
|
.andExpect(content().contentType(MediaType.APPLICATION_JSON)).andReturn();
|
||||||
|
|
Loading…
Reference in New Issue