<?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.panzhihua.service_community.dao.ComActSocialWorkerServiceDao">
|
|
<resultMap type="com.panzhihua.service_community.entity.ComActSocialWorkerService"
|
id="ComActSocialWorkerServiceBaseResultMap">
|
<result property="id" column="id"/>
|
<result property="workerId" column="worker_id"/>
|
<result property="senderId" column="sender_id"/>
|
<result property="status" column="status"/>
|
<result property="serviceId" column="service_id"/>
|
<result property="serviceType" column="service_type"/>
|
<result property="createTime" column="create_time"/>
|
<result property="resultContent" column="result_content"/>
|
<result property="resultUrl" column="result_url"/>
|
<result property="score" column="score"/>
|
</resultMap>
|
|
<select id="pageList" resultType="com.panzhihua.common.model.vos.community.social.ComActSocialWorkerServiceVO">
|
select t.*,t1.name as senderName from com_act_social_worker_service t
|
left join sys_user t1 on t.sender_id = t1.user_id
|
left join com_act_social_worker t2 on t.worker_id = t2.id
|
LEFT JOIN sys_user t3 on t2.telephone = t3.phone
|
where 1=1
|
<if test="commonPage.userId!=null">
|
and t3.user_id = #{commonPage.userId}
|
</if>
|
<if test="commonPage.status!=null">
|
and t.status = #{commonPage.status}
|
</if>
|
order by t.create_time desc
|
</select>
|
|
<select id="getById" resultType="com.panzhihua.common.model.vos.community.social.ComActSocialWorkerServiceVO">
|
select t.*,t1.name as senderName from com_act_social_worker_service t left join sys_user t1 on t.sender_id = t1.user_id where t.id = #{id}
|
</select>
|
|
</mapper>
|