|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="com.research.system.persist.dao.KtsGroupDao">
|
|
|
|
|
|
|
|
|
|
<select id="queryGroupList" resultType="com.research.system.domain.vo.GroupVO$Result">
|
|
|
|
|
select
|
|
|
|
|
g.id,
|
|
|
|
|
g.proj_id as projId,
|
|
|
|
|
g.proj_org_id as projOrgId,
|
|
|
|
|
g.parent_kt_id as parentKtId,
|
|
|
|
|
g.kt_group_name as ktGroupName,
|
|
|
|
|
g.sort,
|
|
|
|
|
g.intro,
|
|
|
|
|
g.kt_group_status as ktGroupStatus,
|
|
|
|
|
g.create_by as createBy,
|
|
|
|
|
g.create_time as createTime,
|
|
|
|
|
o.org_name as projOrgName,
|
|
|
|
|
pg.kt_group_name as parentKtName,
|
|
|
|
|
g.name as name,
|
|
|
|
|
g.phone as phone
|
|
|
|
|
from kts_kt_group g
|
|
|
|
|
left join
|
|
|
|
|
prj_proj_org o on g.proj_org_id = o.id
|
|
|
|
|
left join
|
|
|
|
|
kts_kt_group pg on g.parent_kt_id = pg.id
|
|
|
|
|
where 1=1
|
|
|
|
|
and g.del_flag = 0
|
|
|
|
|
<if test="dto.projOrgId != null">
|
|
|
|
|
and g.proj_org_id = #{dto.projOrgId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="dto.ktGroupStatus != null">
|
|
|
|
|
and g.kt_group_status = #{dto.ktGroupStatus}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="dto.ktGroupName != null and dto.ktGroupName != ''">
|
|
|
|
|
and g.kt_group_name like concat('%',#{dto.ktGroupName},'%')
|
|
|
|
|
</if>
|
|
|
|
|
group by g.id
|
|
|
|
|
order by g.parent_kt_id,g.id desc
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="queryMemberList" resultType="com.research.system.domain.vo.GroupVO$MemberResult">
|
|
|
|
|
select
|
|
|
|
|
m.id,
|
|
|
|
|
m.user_id as userId,
|
|
|
|
|
m.kt_group_id as ktGroupId,
|
|
|
|
|
m.parent_member_id as parentMemberId,
|
|
|
|
|
m.member_name as memberName,
|
|
|
|
|
m.member_phone as memberPhone,
|
|
|
|
|
m.member_email as memberEmail,
|
|
|
|
|
m.member_gender as memberGender,
|
|
|
|
|
m.member_birth as memberBirth,
|
|
|
|
|
m.type,
|
|
|
|
|
m.category,
|
|
|
|
|
m.qualification,
|
|
|
|
|
m.title,
|
|
|
|
|
m.sort,
|
|
|
|
|
m.intro,
|
|
|
|
|
m.audit_status as auditStatus,
|
|
|
|
|
m.member_status as memberStatus,
|
|
|
|
|
m.create_by as createBy,
|
|
|
|
|
m.create_time as createTime,
|
|
|
|
|
g.kt_group_name as ktGroupName,
|
|
|
|
|
d1.dict_label as qualificationName,
|
|
|
|
|
d2.dict_label as titleName,
|
|
|
|
|
o.org_name as projOrgName,
|
|
|
|
|
u.user_name as userName
|
|
|
|
|
from
|
|
|
|
|
kts_kt_group_member m
|
|
|
|
|
left join
|
|
|
|
|
kts_kt_group g on m.kt_group_id = g.id
|
|
|
|
|
left join sys_dict_data d1 on d1.dict_value = m.qualification and d1.dict_type = 'qualification'
|
|
|
|
|
left join sys_dict_data d2 on d2.dict_value = m.title and d2.dict_type = 'sys_title'
|
|
|
|
|
left join prj_proj_org o on o.id = g.proj_org_id
|
|
|
|
|
left join sys_user u on u.user_id = m.user_id
|
|
|
|
|
where 1=1
|
|
|
|
|
and m.del_flag = 0
|
|
|
|
|
<if test="dto.ktGroupId != null">
|
|
|
|
|
and m.kt_group_id = #{dto.ktGroupId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="dto.memberName != null and dto.memberName != ''">
|
|
|
|
|
and m.member_name like concat('%',#{dto.memberName},'%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="dto.memberPhone != null and dto.memberPhone != ''">
|
|
|
|
|
and m.member_phone like concat('%',#{dto.memberPhone},'%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="dto.type != null">
|
|
|
|
|
and m.type = #{dto.type}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="dto.auditStatus != null">
|
|
|
|
|
and m.audit_status = #{dto.auditStatus}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="dto.memberStatus != null">
|
|
|
|
|
and m.member_status = #{dto.memberStatus}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="dto.category != null">
|
|
|
|
|
and m.category = #{dto.category}
|
|
|
|
|
</if>
|
|
|
|
|
order by m.kt_group_id,m.id desc
|
|
|
|
|
</select>
|
|
|
|
|
</mapper>
|