master
parent
d990128eed
commit
a5f55f01a3
@ -0,0 +1,38 @@
|
|||||||
|
<?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.UserAccountMapper">
|
||||||
|
<resultMap id="listAllMap" type="java.util.Map" autoMapping="false">
|
||||||
|
<id property="id" column="id"/>
|
||||||
|
<result column="userId" property="userId"/>
|
||||||
|
<result column="name" property="name"/>
|
||||||
|
<result column="account" property="account"/>
|
||||||
|
<result column="tel" property="tel"/>
|
||||||
|
<result column="platform" property="platform"/>
|
||||||
|
<result column="validImg" property="validImg"/>
|
||||||
|
<result column="status" property="status"/>
|
||||||
|
<result column="reason" property="reason"/>
|
||||||
|
<result column="creatAt" property="creatAt"/>
|
||||||
|
<result column="updateAt" property="updateAt"/>
|
||||||
|
<result column="userName" property="userName"/>
|
||||||
|
<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="listAll" resultMap="listAllMap">
|
||||||
|
select t1.*,t2.name as userName,t3.departmentId,t3.name as departmentName,t4.dpId,t4.department
|
||||||
|
from userAccount as t1
|
||||||
|
left join user as t2 on t1.userId = t2.id
|
||||||
|
left join qywxDepartment as t3 on t2.main_department = t3.departmentId
|
||||||
|
left join (SELECT t.*,d.name as department from qywxDepartmentUserLink t left join qywxDepartment d on t.departmentId = d.departmentId) as t4 on t2.openid = t4.openid
|
||||||
|
where 1=1
|
||||||
|
<if test='ew != null'>
|
||||||
|
<if test='ew.nonEmptyOfWhere'>
|
||||||
|
AND
|
||||||
|
</if>
|
||||||
|
${ew.sqlSegment}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
Loading…
Reference in new issue