<?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.ComplainProcessDao"> <!-- 可根据自己的需求,是否要使用 --> <resultMap type="com.newfiber.api.pc.model.EventsManage.ComplainProcess" id="complainProcessMap"> <result property="serial" column="Serial"/> <result property="processContent" column="Process_Content"/> <result property="eventNo" column="Event_No"/> <result property="disposeUserNo" column="Dispose_User_No"/> <result property="eventFlowId" column="Event_Flow_Id"/> <result property="nextDisposeUserNo" column="Next_Dispose_User_No"/> <result property="eventFlowName" column="Event_Flow_Name"/> <result property="eventTime" column="Event_Time"/> </resultMap> <!-- 通用查询结果列 --> <sql id="Base_Column_List"> Serial, Process_Content, Event_No, Dispose_User_No, Event_Flow_Id, Next_Dispose_User_No, Event_Flow_Name, Event_Time, </sql> <!-- 获取事件跟踪表列表 --> <select id="queryList" resultType="com.newfiber.api.pc.model.EventsManage.ComplainProcess"> select <include refid="Base_Column_List" /> from complain_process <choose> <when test="sidx != null and sidx.trim() != ''"> order by ${sidx} ${order} </when> <otherwise> order by Serial desc </otherwise> </choose> </select> <select id="selectByEventNo" parameterType="String" resultType="com.newfiber.api.pc.model.EventsManage.ComplainProcess"> SELECT cp.Process_Content, cp.Event_No, cp.Dispose_User_No, cp.Event_Flow_Id, cp.Next_Dispose_User_No, cp.Event_Flow_Name, cp.Event_Time, u.user_name AS disposeUserName FROM complain_process cp INNER JOIN huludao_main.sys_user_info u ON cp.Dispose_User_No = u.User_No WHERE 1=1 <if test="eventNo != null"> AND cp.Event_No = #{eventNo} </if> ORDER BY cp.Event_Time </select> </mapper>