master
parent
a5f55f01a3
commit
2af2924f3f
@ -0,0 +1,47 @@
|
||||
<?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.UserMapper">
|
||||
<resultMap id="UserDpListMap" type="java.util.Map" autoMapping="false">
|
||||
<id property="id" column="id"/>
|
||||
<result column="url" property="url"/>
|
||||
<result column="type" property="type"/>
|
||||
<result column="userId" property="userId"/>
|
||||
<result column="taskId" property="taskId"/>
|
||||
<result column="playNum" property="playNum"/>
|
||||
<result column="commendNum" property="commendNum"/>
|
||||
<result column="collectionNum" property="collectionNum"/>
|
||||
<result column="commentNum" property="commentNum"/>
|
||||
<result column="reSendNum" property="reSendNum"/>
|
||||
<result column="recommendNum" property="recommendNum"/>
|
||||
<result column="reason" property="reason"/>
|
||||
<result column="effectResult" property="effectResult"/>
|
||||
<result column="creatAt" property="creatAt"/>
|
||||
<result column="updateAt" property="updateAt"/>
|
||||
<result column="isSettled" property="isSettled"/>
|
||||
<result column="settledAt" property="settledAt"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="providerName" property="providerName"/>
|
||||
<result column="departmentId" property="departmentId"/>
|
||||
<result column="departmentName" property="departmentName"/>
|
||||
<result column="account" property="account"/>
|
||||
<result column="accountName" property="accountName"/>
|
||||
<result column="accountTel" property="accountTel"/>
|
||||
<result column="accountImg" property="accountImg"/>
|
||||
<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="userDpList" resultMap="UserDpListMap">
|
||||
SELECT t1.*,t2.name as providerName,t3.departmentId as departmentId,t3.name as departmentName,t4.title as taskTitle,
|
||||
t5.account,t5.name as accountName,t5.tel as accountTel,t5.validImg as accountImg,t6.departmentId as dpId,t6.department
|
||||
from video as t1
|
||||
LEFT JOIN user as t2 on t2.id = t1.userId
|
||||
LEFT JOIN qywxDepartment as t3 on t3.departmentId = t2.main_department
|
||||
LEFT JOIN task as t4 on t4.id = t1.taskId
|
||||
LEFT JOIN userAccount as t5 on t1.userId = t5.userId and t1.type = t5.platform
|
||||
left join (SELECT t.*,d.name as department from qywxDepartmentUserLink t left join qywxDepartment d on t.departmentId = d.departmentId) as t6 on t1.openid = t6.openid
|
||||
${ew.customSqlSegment}
|
||||
ORDER BY updateAt DESC,creatAt DESC
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in new issue