123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306 |
- <?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.mvc.dao.TaskReviewPushMapper">
- <resultMap id="BaseResultMap" type="com.mvc.entity.TaskReviewPush">
- <id column="ID" jdbcType="INTEGER" property="id" />
- <result column="TASK_REVIEW_ID" jdbcType="VARCHAR" property="taskReviewId" />
- <result column="DEVICE_SN" jdbcType="VARCHAR" property="deviceSn" />
- <result column="STATION_CODE" jdbcType="VARCHAR" property="stationCode" />
- <result column="SAMPLE_TIME" jdbcType="TIMESTAMP" property="sampleTime" />
- <result column="REVIEW_VALUE" jdbcType="DECIMAL" property="reviewValue" />
- <result column="FINISHED_FLAG" jdbcType="CHAR" property="finishedFlag" />
- <result column="FINISHED_TIME" jdbcType="TIMESTAMP" property="finishedTime" />
- <result column="PUSH_NUM" jdbcType="INTEGER" property="pushNum" />
- <result column="PUSH_RAW_MSG" jdbcType="VARCHAR" property="pushRawMsg" />
- <result column="REPLY_MSG" jdbcType="VARCHAR" property="replyMsg" />
- </resultMap>
- <sql id="Example_Where_Clause">
- <where>
- <foreach collection="oredCriteria" item="criteria" separator="or">
- <if test="criteria.valid">
- <trim prefix="(" prefixOverrides="and" suffix=")">
- <foreach collection="criteria.criteria" item="criterion">
- <choose>
- <when test="criterion.noValue">
- and ${criterion.condition}
- </when>
- <when test="criterion.singleValue">
- and ${criterion.condition} #{criterion.value}
- </when>
- <when test="criterion.betweenValue">
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
- </when>
- <when test="criterion.listValue">
- and ${criterion.condition}
- <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
- #{listItem}
- </foreach>
- </when>
- </choose>
- </foreach>
- </trim>
- </if>
- </foreach>
- </where>
- </sql>
- <sql id="Update_By_Example_Where_Clause">
- <where>
- <foreach collection="example.oredCriteria" item="criteria" separator="or">
- <if test="criteria.valid">
- <trim prefix="(" prefixOverrides="and" suffix=")">
- <foreach collection="criteria.criteria" item="criterion">
- <choose>
- <when test="criterion.noValue">
- and ${criterion.condition}
- </when>
- <when test="criterion.singleValue">
- and ${criterion.condition} #{criterion.value}
- </when>
- <when test="criterion.betweenValue">
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
- </when>
- <when test="criterion.listValue">
- and ${criterion.condition}
- <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
- #{listItem}
- </foreach>
- </when>
- </choose>
- </foreach>
- </trim>
- </if>
- </foreach>
- </where>
- </sql>
- <sql id="Base_Column_List">
- ID, TASK_REVIEW_ID, DEVICE_SN, STATION_CODE, SAMPLE_TIME, REVIEW_VALUE, FINISHED_FLAG,
- FINISHED_TIME, PUSH_NUM, PUSH_RAW_MSG, REPLY_MSG
- </sql>
- <select id="selectByExample" parameterType="com.mvc.entity.TaskReviewPushExample" resultMap="BaseResultMap">
- select
- <if test="distinct">
- distinct
- </if>
- <include refid="Base_Column_List" />
- from task_review_push
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- <if test="orderByClause != null">
- order by ${orderByClause}
- </if>
- </select>
- <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from task_review_push
- where ID = #{id,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
- delete from task_review_push
- where ID = #{id,jdbcType=INTEGER}
- </delete>
- <delete id="deleteByExample" parameterType="com.mvc.entity.TaskReviewPushExample">
- delete from task_review_push
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </delete>
- <insert id="insert" parameterType="com.mvc.entity.TaskReviewPush">
- insert into task_review_push (ID, TASK_REVIEW_ID, DEVICE_SN,
- STATION_CODE, SAMPLE_TIME, REVIEW_VALUE,
- FINISHED_FLAG, FINISHED_TIME, PUSH_NUM,
- PUSH_RAW_MSG, REPLY_MSG)
- values (#{id,jdbcType=INTEGER}, #{taskReviewId,jdbcType=VARCHAR}, #{deviceSn,jdbcType=VARCHAR},
- #{stationCode,jdbcType=VARCHAR}, #{sampleTime,jdbcType=TIMESTAMP}, #{reviewValue,jdbcType=DECIMAL},
- #{finishedFlag,jdbcType=CHAR}, #{finishedTime,jdbcType=TIMESTAMP}, #{pushNum,jdbcType=INTEGER},
- #{pushRawMsg,jdbcType=VARCHAR}, #{replyMsg,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" parameterType="com.mvc.entity.TaskReviewPush">
- insert into task_review_push
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- ID,
- </if>
- <if test="taskReviewId != null">
- TASK_REVIEW_ID,
- </if>
- <if test="deviceSn != null">
- DEVICE_SN,
- </if>
- <if test="stationCode != null">
- STATION_CODE,
- </if>
- <if test="sampleTime != null">
- SAMPLE_TIME,
- </if>
- <if test="reviewValue != null">
- REVIEW_VALUE,
- </if>
- <if test="finishedFlag != null">
- FINISHED_FLAG,
- </if>
- <if test="finishedTime != null">
- FINISHED_TIME,
- </if>
- <if test="pushNum != null">
- PUSH_NUM,
- </if>
- <if test="pushRawMsg != null">
- PUSH_RAW_MSG,
- </if>
- <if test="replyMsg != null">
- REPLY_MSG,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=INTEGER},
- </if>
- <if test="taskReviewId != null">
- #{taskReviewId,jdbcType=VARCHAR},
- </if>
- <if test="deviceSn != null">
- #{deviceSn,jdbcType=VARCHAR},
- </if>
- <if test="stationCode != null">
- #{stationCode,jdbcType=VARCHAR},
- </if>
- <if test="sampleTime != null">
- #{sampleTime,jdbcType=TIMESTAMP},
- </if>
- <if test="reviewValue != null">
- #{reviewValue,jdbcType=DECIMAL},
- </if>
- <if test="finishedFlag != null">
- #{finishedFlag,jdbcType=CHAR},
- </if>
- <if test="finishedTime != null">
- #{finishedTime,jdbcType=TIMESTAMP},
- </if>
- <if test="pushNum != null">
- #{pushNum,jdbcType=INTEGER},
- </if>
- <if test="pushRawMsg != null">
- #{pushRawMsg,jdbcType=VARCHAR},
- </if>
- <if test="replyMsg != null">
- #{replyMsg,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <select id="countByExample" parameterType="com.mvc.entity.TaskReviewPushExample" resultType="java.lang.Long">
- select count(*) from task_review_push
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </select>
- <update id="updateByExampleSelective" parameterType="map">
- update task_review_push
- <set>
- <if test="record.id != null">
- ID = #{record.id,jdbcType=INTEGER},
- </if>
- <if test="record.taskReviewId != null">
- TASK_REVIEW_ID = #{record.taskReviewId,jdbcType=VARCHAR},
- </if>
- <if test="record.deviceSn != null">
- DEVICE_SN = #{record.deviceSn,jdbcType=VARCHAR},
- </if>
- <if test="record.stationCode != null">
- STATION_CODE = #{record.stationCode,jdbcType=VARCHAR},
- </if>
- <if test="record.sampleTime != null">
- SAMPLE_TIME = #{record.sampleTime,jdbcType=TIMESTAMP},
- </if>
- <if test="record.reviewValue != null">
- REVIEW_VALUE = #{record.reviewValue,jdbcType=DECIMAL},
- </if>
- <if test="record.finishedFlag != null">
- FINISHED_FLAG = #{record.finishedFlag,jdbcType=CHAR},
- </if>
- <if test="record.finishedTime != null">
- FINISHED_TIME = #{record.finishedTime,jdbcType=TIMESTAMP},
- </if>
- <if test="record.pushNum != null">
- PUSH_NUM = #{record.pushNum,jdbcType=INTEGER},
- </if>
- <if test="record.pushRawMsg != null">
- PUSH_RAW_MSG = #{record.pushRawMsg,jdbcType=VARCHAR},
- </if>
- <if test="record.replyMsg != null">
- REPLY_MSG = #{record.replyMsg,jdbcType=VARCHAR},
- </if>
- </set>
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByExample" parameterType="map">
- update task_review_push
- set ID = #{record.id,jdbcType=INTEGER},
- TASK_REVIEW_ID = #{record.taskReviewId,jdbcType=VARCHAR},
- DEVICE_SN = #{record.deviceSn,jdbcType=VARCHAR},
- STATION_CODE = #{record.stationCode,jdbcType=VARCHAR},
- SAMPLE_TIME = #{record.sampleTime,jdbcType=TIMESTAMP},
- REVIEW_VALUE = #{record.reviewValue,jdbcType=DECIMAL},
- FINISHED_FLAG = #{record.finishedFlag,jdbcType=CHAR},
- FINISHED_TIME = #{record.finishedTime,jdbcType=TIMESTAMP},
- PUSH_NUM = #{record.pushNum,jdbcType=INTEGER},
- PUSH_RAW_MSG = #{record.pushRawMsg,jdbcType=VARCHAR},
- REPLY_MSG = #{record.replyMsg,jdbcType=VARCHAR}
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.mvc.entity.TaskReviewPush">
- update task_review_push
- <set>
- <if test="taskReviewId != null">
- TASK_REVIEW_ID = #{taskReviewId,jdbcType=VARCHAR},
- </if>
- <if test="deviceSn != null">
- DEVICE_SN = #{deviceSn,jdbcType=VARCHAR},
- </if>
- <if test="stationCode != null">
- STATION_CODE = #{stationCode,jdbcType=VARCHAR},
- </if>
- <if test="sampleTime != null">
- SAMPLE_TIME = #{sampleTime,jdbcType=TIMESTAMP},
- </if>
- <if test="reviewValue != null">
- REVIEW_VALUE = #{reviewValue,jdbcType=DECIMAL},
- </if>
- <if test="finishedFlag != null">
- FINISHED_FLAG = #{finishedFlag,jdbcType=CHAR},
- </if>
- <if test="finishedTime != null">
- FINISHED_TIME = #{finishedTime,jdbcType=TIMESTAMP},
- </if>
- <if test="pushNum != null">
- PUSH_NUM = #{pushNum,jdbcType=INTEGER},
- </if>
- <if test="pushRawMsg != null">
- PUSH_RAW_MSG = #{pushRawMsg,jdbcType=VARCHAR},
- </if>
- <if test="replyMsg != null">
- REPLY_MSG = #{replyMsg,jdbcType=VARCHAR},
- </if>
- </set>
- where ID = #{id,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.mvc.entity.TaskReviewPush">
- update task_review_push
- set TASK_REVIEW_ID = #{taskReviewId,jdbcType=VARCHAR},
- DEVICE_SN = #{deviceSn,jdbcType=VARCHAR},
- STATION_CODE = #{stationCode,jdbcType=VARCHAR},
- SAMPLE_TIME = #{sampleTime,jdbcType=TIMESTAMP},
- REVIEW_VALUE = #{reviewValue,jdbcType=DECIMAL},
- FINISHED_FLAG = #{finishedFlag,jdbcType=CHAR},
- FINISHED_TIME = #{finishedTime,jdbcType=TIMESTAMP},
- PUSH_NUM = #{pushNum,jdbcType=INTEGER},
- PUSH_RAW_MSG = #{pushRawMsg,jdbcType=VARCHAR},
- REPLY_MSG = #{replyMsg,jdbcType=VARCHAR}
- where ID = #{id,jdbcType=INTEGER}
- </update>
- </mapper>
|