0302-海宁管户报表优化+客群代码初稿
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
<?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.ruoyi.group.mapper.CustGroupMapper">
|
||||
|
||||
<select id="selectCustGroupList" resultType="CustGroupVO">
|
||||
SELECT
|
||||
cg.id,
|
||||
cg.group_name,
|
||||
cg.group_mode,
|
||||
cg.create_mode,
|
||||
cg.user_name,
|
||||
cg.nick_name,
|
||||
cg.dept_id,
|
||||
cg.share_enabled,
|
||||
cg.share_dept_ids,
|
||||
cg.group_status,
|
||||
cg.create_by,
|
||||
cg.create_time,
|
||||
cg.update_by,
|
||||
cg.update_time,
|
||||
cg.remark,
|
||||
cg.del_flag,
|
||||
(SELECT COUNT(*) FROM ibs_cust_group_member cgm WHERE cgm.group_id = cg.id AND cgm.del_flag = '0') AS cust_count
|
||||
FROM ibs_cust_group cg
|
||||
<where>
|
||||
cg.del_flag = '0'
|
||||
and create_status = '1'
|
||||
<if test="dto.groupName != null and dto.groupName != ''">
|
||||
AND cg.group_name LIKE CONCAT('%', #{dto.groupName}, '%')
|
||||
</if>
|
||||
<if test="dto.groupMode != null and dto.groupMode != ''">
|
||||
AND cg.group_mode = #{dto.groupMode}
|
||||
</if>
|
||||
<if test="dto.createMode != null and dto.createMode != ''">
|
||||
AND cg.create_mode = #{dto.createMode}
|
||||
</if>
|
||||
<if test="dto.groupStatus != null and dto.groupStatus != ''">
|
||||
AND cg.group_status = #{dto.groupStatus}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY cg.create_time DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user