master
parent
3e377f220a
commit
fbf1e21fc5
@ -0,0 +1,42 @@
|
|||||||
|
<?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.zh.project0512.mapper.CustomerActionNoteMapper">
|
||||||
|
<resultMap id="pageList" type="java.util.Map" autoMapping="false">
|
||||||
|
<id property="id" column="id"/>
|
||||||
|
<result column="customerName" property="customerName"/>
|
||||||
|
<result column="tel" property="tel"/>
|
||||||
|
<result column="area" property="area"/>
|
||||||
|
<result column="brandList" property="brandList"/>
|
||||||
|
<result column="remarks" property="remarks"/>
|
||||||
|
<result column="provideId" property="provideId"/>
|
||||||
|
<result column="taskId" property="taskId"/>
|
||||||
|
<result column="creatAt" property="creatAt"/>
|
||||||
|
<result column="provideName" property="provideName"/>
|
||||||
|
<result column="taskTitle" property="taskTitle"/>
|
||||||
|
<result column="departmentId" property="departmentId"/>
|
||||||
|
<result column="departmentName" property="departmentName"/>
|
||||||
|
<collection property="departmentList" ofType="java.util.Map" javaType="java.util.List" autoMapping="false">
|
||||||
|
<id column="dpId" property="id"/>
|
||||||
|
<result column="department" property="departmentName"/>
|
||||||
|
</collection>
|
||||||
|
</resultMap>
|
||||||
|
<select id="pageList" resultMap="pageList">
|
||||||
|
select t1.*,t2.name as provideName,t3.title as taskTitle,t4.departmentId,t4.name as departmentName,t5.departmentId as dpId,t5.department
|
||||||
|
from customerActionNote as t1
|
||||||
|
LEFT JOIN user as t2 on t1.provideId = t2.id
|
||||||
|
LEFT JOIN qywxDepartment as t4 on t4.departmentId = t2.main_department
|
||||||
|
LEFT JOIN (SELECT t.*,d.name as department from qywxDepartmentUserLink t left join qywxDepartment d on t.departmentId = d.departmentId) as t5 on t5.openid = t2.openid
|
||||||
|
LEFT JOIN task as t3 on t1.taskId = t3.id
|
||||||
|
where 1=1
|
||||||
|
<if test='openid!=null'>and t2.openid =#{openid} </if>
|
||||||
|
|
||||||
|
<if test='ew != null'>
|
||||||
|
<if test='ew.nonEmptyOfWhere'>
|
||||||
|
AND
|
||||||
|
</if>
|
||||||
|
${ew.SqlSegment}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
order by t1.creatAt desc
|
||||||
|
</select>
|
||||||
|
</mapper>
|
Loading…
Reference in new issue