2024-09-04 22:01:52 +08:00

70 lines
3.9 KiB
XML

<?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.ics.admin.mapper.RepairHisMapper">
<resultMap type="com.ics.admin.domain.RepairHis" id="RepairHisResult">
<result property="bxid" column="bxid" />
<result property="uid" column="uid" />
<result property="name" column="name" />
<result property="tel" column="tel" />
<result property="bxorder" column="bxorder" />
<result property="nickname" column="nickname" />
<result property="headimgurl" column="headimgurl" />
<result property="openid" column="openid" />
<result property="bxsj" column="bxsj" />
<result property="jdsj" column="jdsj" />
<result property="gzid" column="gzid" />
<result property="gztype" column="gztype" />
<result property="gzzid" column="gzzid" />
<result property="gzname" column="gzname" />
<result property="ddid" column="ddid" />
<result property="addr" column="addr" />
<result property="ddzid" column="ddzid" />
<result property="floor" column="floor" />
<result property="fjh" column="fjh" />
<result property="pic" column="pic" />
<result property="thumb" column="thumb" />
<result property="desc" column="desc" />
<result property="wxry" column="wxry" />
<result property="wxrname" column="wxrname" />
<result property="wxrtel" column="wxrtel" />
<result property="bz" column="bz" />
<result property="pf" column="pf" />
<result property="pj" column="pj" />
<result property="wxpic" column="wxpic" />
<result property="bhbz" column="bhbz" />
<result property="status" column="status" />
</resultMap>
<sql id="selectRepairHisVo">
SELECT bxid, uid, name, tel, bxorder, nickname, headimgurl, openid, bxsj, jdsj, gzid, gztype, gzzid, gzname, ddid, addr, ddzid, floor, fjh, pic, thumb, `desc`, wxry, wxrname, wxrtel, bz, pf, pj, wxpic, bhbz, status FROM ics_repair_his
</sql>
<select id="getRepairHisList" parameterType="RepairHis" resultMap="RepairHisResult">
<include refid="selectRepairHisVo"/>
<where>
<if test="name != null and name != ''"> AND name LIKE CONCAT('%', #{name}, '%')</if>
<if test="tel != null and tel != ''"> AND tel LIKE CONCAT('%', #{tel}, '%')</if>
<if test="bxorder != null and bxorder != ''"> AND bxorder LIKE CONCAT('%', #{bxorder}, '%')</if>
<if test="gztype != null and gztype != ''"> AND gztype LIKE CONCAT('%', #{gztype}, '%')</if>
<if test="gzname != null and gzname != ''"> AND gzname LIKE CONCAT('%', #{gzname}, '%')</if>
<if test="addr != null and addr != ''"> AND addr LIKE CONCAT('%', #{addr}, '%')</if>
<if test="floor != null and floor != ''"> AND floor LIKE CONCAT('%', #{floor}, '%')</if>
<if test="fjh != null and fjh != ''"> AND fjh LIKE CONCAT('%', #{fjh}, '%')</if>
<if test="wxrname != null and wxrname != ''"> AND wxrname LIKE CONCAT('%', #{wxrname}, '%')</if>
<if test="wxrtel != null and wxrtel != ''"> AND wxrtel LIKE CONCAT('%', #{wxrtel}, '%')</if>
<if test="desc != null and desc != ''"> AND `desc` LIKE CONCAT('%', #{desc}, '%')</if>
<if test="params.beginTime != null and params.endTime != null"> and bxsj between #{params.beginTime} and #{params.endTime}</if>
</where>
order by bxid
</select>
<select id="selectRepairHisById" parameterType="Long" resultMap="RepairHisResult">
<include refid="selectRepairHisVo"/>
WHERE bxid = #{bxid}
</select>
</mapper>