123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288 |
- <?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.chinaitop.depot.intelligent.IntelligentDetection.mapper.TTimingTaskHistoryMapper" >
- <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.IntelligentDetection.model.TTimingTaskHistory" >
- <id column="id" property="id" jdbcType="VARCHAR" />
- <result column="org_id" property="orgId" jdbcType="VARCHAR" />
- <result column="t_id" property="tId" jdbcType="VARCHAR" />
- <result column="v_cf_code" property="vCfCode" jdbcType="VARCHAR" />
- <result column="t_detection_desc" property="tDetectionDesc" jdbcType="VARCHAR" />
- <result column="t_detection_cron" property="tDetectionCron" jdbcType="VARCHAR" />
- <result column="t_category" property="tCategory" jdbcType="VARCHAR" />
- <result column="t_update_time" property="tUpdateTime" jdbcType="TIMESTAMP" />
- <result column="t_remark" property="tRemark" jdbcType="VARCHAR" />
- </resultMap>
- <sql id="Example_Where_Clause" >
- <where >
- <foreach collection="oredCriteria" item="criteria" separator="or" >
- <if test="criteria.valid" >
- <trim prefix="(" suffix=")" prefixOverrides="and" >
- <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 collection="criterion.value" item="listItem" open="(" close=")" 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="(" suffix=")" prefixOverrides="and" >
- <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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
- #{listItem}
- </foreach>
- </when>
- </choose>
- </foreach>
- </trim>
- </if>
- </foreach>
- </where>
- </sql>
- <sql id="Base_Column_List" >
- id, org_id, t_id, v_cf_code, t_detection_desc, t_detection_cron, t_category, t_update_time,
- t_remark
- </sql>
- <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.intelligent.IntelligentDetection.model.TTimingTaskHistoryExample" >
- select
- <if test="distinct" >
- distinct
- </if>
- <include refid="Base_Column_List" />
- from t_timing_task_history
- <if test="_parameter != null" >
- <include refid="Example_Where_Clause" />
- </if>
- <if test="orderByClause != null" >
- order by ${orderByClause}
- </if>
- </select>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
- select
- <include refid="Base_Column_List" />
- from t_timing_task_history
- where id = #{id,jdbcType=VARCHAR}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
- delete from t_timing_task_history
- where id = #{id,jdbcType=VARCHAR}
- </delete>
- <delete id="deleteByExample" parameterType="com.chinaitop.depot.intelligent.IntelligentDetection.model.TTimingTaskHistoryExample" >
- delete from t_timing_task_history
- <if test="_parameter != null" >
- <include refid="Example_Where_Clause" />
- </if>
- </delete>
- <insert id="insert" parameterType="com.chinaitop.depot.intelligent.IntelligentDetection.model.TTimingTaskHistory" >
- insert into t_timing_task_history (id, org_id, t_id,
- v_cf_code, t_detection_desc, t_detection_cron,
- t_category, t_update_time, t_remark
- )
- values (#{id,jdbcType=VARCHAR}, #{orgId,jdbcType=VARCHAR}, #{tId,jdbcType=VARCHAR},
- #{vCfCode,jdbcType=VARCHAR}, #{tDetectionDesc,jdbcType=VARCHAR}, #{tDetectionCron,jdbcType=VARCHAR},
- #{tCategory,jdbcType=VARCHAR}, #{tUpdateTime,jdbcType=TIMESTAMP}, #{tRemark,jdbcType=VARCHAR}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.chinaitop.depot.intelligent.IntelligentDetection.model.TTimingTaskHistory" >
- insert into t_timing_task_history
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="id != null" >
- id,
- </if>
- <if test="orgId != null" >
- org_id,
- </if>
- <if test="tId != null" >
- t_id,
- </if>
- <if test="vCfCode != null" >
- v_cf_code,
- </if>
- <if test="tDetectionDesc != null" >
- t_detection_desc,
- </if>
- <if test="tDetectionCron != null" >
- t_detection_cron,
- </if>
- <if test="tCategory != null" >
- t_category,
- </if>
- <if test="tUpdateTime != null" >
- t_update_time,
- </if>
- <if test="tRemark != null" >
- t_remark,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="id != null" >
- #{id,jdbcType=VARCHAR},
- </if>
- <if test="orgId != null" >
- #{orgId,jdbcType=VARCHAR},
- </if>
- <if test="tId != null" >
- #{tId,jdbcType=VARCHAR},
- </if>
- <if test="vCfCode != null" >
- #{vCfCode,jdbcType=VARCHAR},
- </if>
- <if test="tDetectionDesc != null" >
- #{tDetectionDesc,jdbcType=VARCHAR},
- </if>
- <if test="tDetectionCron != null" >
- #{tDetectionCron,jdbcType=VARCHAR},
- </if>
- <if test="tCategory != null" >
- #{tCategory,jdbcType=VARCHAR},
- </if>
- <if test="tUpdateTime != null" >
- #{tUpdateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="tRemark != null" >
- #{tRemark,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <select id="countByExample" parameterType="com.chinaitop.depot.intelligent.IntelligentDetection.model.TTimingTaskHistoryExample" resultType="java.lang.Integer" >
- select count(*) from t_timing_task_history
- <if test="_parameter != null" >
- <include refid="Example_Where_Clause" />
- </if>
- </select>
- <update id="updateByExampleSelective" parameterType="map" >
- update t_timing_task_history
- <set >
- <if test="record.id != null" >
- id = #{record.id,jdbcType=VARCHAR},
- </if>
- <if test="record.orgId != null" >
- org_id = #{record.orgId,jdbcType=VARCHAR},
- </if>
- <if test="record.tId != null" >
- t_id = #{record.tId,jdbcType=VARCHAR},
- </if>
- <if test="record.vCfCode != null" >
- v_cf_code = #{record.vCfCode,jdbcType=VARCHAR},
- </if>
- <if test="record.tDetectionDesc != null" >
- t_detection_desc = #{record.tDetectionDesc,jdbcType=VARCHAR},
- </if>
- <if test="record.tDetectionCron != null" >
- t_detection_cron = #{record.tDetectionCron,jdbcType=VARCHAR},
- </if>
- <if test="record.tCategory != null" >
- t_category = #{record.tCategory,jdbcType=VARCHAR},
- </if>
- <if test="record.tUpdateTime != null" >
- t_update_time = #{record.tUpdateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="record.tRemark != null" >
- t_remark = #{record.tRemark,jdbcType=VARCHAR},
- </if>
- </set>
- <if test="_parameter != null" >
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByExample" parameterType="map" >
- update t_timing_task_history
- set id = #{record.id,jdbcType=VARCHAR},
- org_id = #{record.orgId,jdbcType=VARCHAR},
- t_id = #{record.tId,jdbcType=VARCHAR},
- v_cf_code = #{record.vCfCode,jdbcType=VARCHAR},
- t_detection_desc = #{record.tDetectionDesc,jdbcType=VARCHAR},
- t_detection_cron = #{record.tDetectionCron,jdbcType=VARCHAR},
- t_category = #{record.tCategory,jdbcType=VARCHAR},
- t_update_time = #{record.tUpdateTime,jdbcType=TIMESTAMP},
- t_remark = #{record.tRemark,jdbcType=VARCHAR}
- <if test="_parameter != null" >
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.intelligent.IntelligentDetection.model.TTimingTaskHistory" >
- update t_timing_task_history
- <set >
- <if test="orgId != null" >
- org_id = #{orgId,jdbcType=VARCHAR},
- </if>
- <if test="tId != null" >
- t_id = #{tId,jdbcType=VARCHAR},
- </if>
- <if test="vCfCode != null" >
- v_cf_code = #{vCfCode,jdbcType=VARCHAR},
- </if>
- <if test="tDetectionDesc != null" >
- t_detection_desc = #{tDetectionDesc,jdbcType=VARCHAR},
- </if>
- <if test="tDetectionCron != null" >
- t_detection_cron = #{tDetectionCron,jdbcType=VARCHAR},
- </if>
- <if test="tCategory != null" >
- t_category = #{tCategory,jdbcType=VARCHAR},
- </if>
- <if test="tUpdateTime != null" >
- t_update_time = #{tUpdateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="tRemark != null" >
- t_remark = #{tRemark,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.intelligent.IntelligentDetection.model.TTimingTaskHistory" >
- update t_timing_task_history
- set org_id = #{orgId,jdbcType=VARCHAR},
- t_id = #{tId,jdbcType=VARCHAR},
- v_cf_code = #{vCfCode,jdbcType=VARCHAR},
- t_detection_desc = #{tDetectionDesc,jdbcType=VARCHAR},
- t_detection_cron = #{tDetectionCron,jdbcType=VARCHAR},
- t_category = #{tCategory,jdbcType=VARCHAR},
- t_update_time = #{tUpdateTime,jdbcType=TIMESTAMP},
- t_remark = #{tRemark,jdbcType=VARCHAR}
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <insert id="insertBatch" parameterType="java.util.List">
- insert into t_timing_task_history (id, org_id, t_id,
- v_cf_code, t_detection_desc, t_detection_cron,
- t_category, t_update_time, t_remark)
- values
- <foreach collection="list" item="task" index="index" separator=",">
- (#{task.id,jdbcType=VARCHAR}, #{task.orgId,jdbcType=VARCHAR}, #{task.tId,jdbcType=VARCHAR},
- #{task.vCfCode,jdbcType=VARCHAR}, #{task.tDetectionDesc,jdbcType=VARCHAR}, #{task.tDetectionCron,jdbcType=VARCHAR},
- #{task.tCategory,jdbcType=VARCHAR}, #{task.tUpdateTime,jdbcType=TIMESTAMP}, #{task.tRemark,jdbcType=VARCHAR})
- </foreach>
- </insert>
- </mapper>
|