<?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.newfiber.api.pc.dao.EventsManage.ComplaintdetailsDao"> <!-- 可根据自己的需求,是否要使用 --> <resultMap type="com.newfiber.api.pc.model.EventsManage.Complaintdetails" id="complaintdetailsMap"> <result property="serial" column="Serial"/> <result property="eventno" column="eventNo"/> <result property="orgno" column="orgNo"/> <result property="disposetype" column="disposeType"/> <result property="endtime" column="endTime"/> <result property="disposecontent" column="disposeContent"/> <result property="satisfaction" column="satisfaction"/> <result property="ispublic" column="isPublic"/> <result property="satisfactionzn" column="satisfactionZn"/> <result property="ispubliczn" column="isPublicZn"/> <result property="take" column="take"/> <result property="disposeTypeZn" column="disposeTypeZn"/> <association property="sysOrganization" javaType="com.newfiber.api.pc.model.UserManager.SysOrganization"> <id property="org_No" column="Org_No"/> <result property="org_Name" column="Org_Name"/> <result property="org_Type" column="Org_Type"/> <result property="org_Type_ZN" column="Org_Type_ZN"/> </association> <collection property="picList" ofType="com.newfiber.api.pc.model.EventsManage.ComplainPic"> <id property="serial" column="Serial"/> <result property="eventsNo" column="Events_No"/> <result property="picType" column="Pic_Type"/> <result property="picTypeName" column="Pic_Type_Name"/> <result property="picName" column="Pic_Name"/> <result property="picPath" column="Pic_Path"/> <result property="createTime" column="Create_Time"/> </collection> </resultMap> <!-- 通用查询结果列 --> <sql id="Base_Column_List"> Serial, eventNo, orgNo, disposeType, endTime, disposeContent, satisfaction, isPublic, satisfactionZn, isPublicZn, take, disposeTypeZn </sql> <!-- 获取投诉处理详情表列表 --> <select id="queryList" resultType="com.newfiber.api.pc.model.EventsManage.Complaintdetails"> select <include refid="Base_Column_List"/> from complaintdetails <choose> <when test="sidx != null and sidx.trim() != ''"> order by ${sidx} ${order} </when> <otherwise> order by Serial desc </otherwise> </choose> </select> <select id="selectInfoByEventNo" parameterType="String" resultMap="complaintdetailsMap"> SELECT eventNo, orgNo, disposeType, endTime, disposeContent, satisfaction, isPublic, satisfactionZn, isPublicZn, take, disposeTypeZn, p.Pic_Name, p.Pic_Path, o.Org_Name FROM complaintdetails c LEFT JOIN complain_pic p ON p.Events_No = c.eventNo JOIN huludao_main.sys_organization o ON c.orgNo = o.Org_No WHERE eventNo = #{eventNo} AND p.Pic_Type = 2 </select> </mapper>