<?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.huaheng.pc.task.task.mapper.TaskMapperAuto"> <select id="selectListEntityByLike" resultType="com.huaheng.pc.task.task.domain.Task"> SELECT id, warehouseId, warehouseCode, companyId, companyCode, priority, type, station, allocationHeadId, containerId, containerCode, roadway, sourceLocation, destinationLocation, firstStatus, lastStatus, created, createdBy, beginTime, endTime, lastUpdated, lastUpdatedBy, userDef1, userDef2, userDef3, deleted, isEmptyOut, isDoubleIn, secondDestinationLocation FROM task <where> <if test="id != null "> AND id = #{id} </if> <if test="warehouseId != null "> AND warehouseId = #{warehouseId} </if> <if test="warehouseCode != null and warehouseCode != '' "> AND warehouseCode = #{warehouseCode} </if> <if test="companyIdList != null "> AND companyId in <foreach collection="companyIdList" item="companyIdItem" open="(" separator="," close=")"> #{companyIdItem} </foreach> </if> <if test="companyId != null "> AND companyId = #{companyId} </if> <if test="companyCodeList != null "> AND companyCode in <foreach collection="companyCodeList" item="companyCodeItem" open="(" separator="," close=")"> #{companyCodeItem} </foreach> </if> <if test="companyCode != null and companyCode != '' "> AND companyCode = #{companyCode} </if> <if test="priority != null "> AND priority = #{priority} </if> <if test="type != null and type != '' "> AND type = #{type} </if> <if test="station != null "> AND station = #{station} </if> <if test="allocationHeadId != null "> AND allocationHeadId = #{allocationHeadId} </if> <if test="containerId != null "> AND containerId = #{containerId} </if> <if test="containerCode != null and containerCode != '' "> AND containerCode = #{containerCode} </if> <if test="roadway != null "> AND roadway = #{roadway} </if> <if test="sourceLocation != null and sourceLocation != ''"> <bind name="sourceLocationPattern" value="'%' + sourceLocation + '%'" /> AND sourceLocation like #{sourceLocationPattern} </if> <if test="destinationLocation != null and destinationLocation != ''"> <bind name="destinationLocationPattern" value="'%' + destinationLocation + '%'" /> AND destinationLocation like #{destinationLocationPattern} </if> <if test="firstStatus != null "> AND firstStatus = #{firstStatus} </if> <if test="lastStatus != null "> AND lastStatus = #{lastStatus} </if> <if test="params != null and params.createdBegin != null and params.createdBegin != ''"> AND created >= #{params.createdBegin} </if> <if test="params != null and params.createdEnd != null and params.createdEnd != ''"> AND created <= #{params.createdEnd} </if> <if test="createdBy != null and createdBy != ''"> <bind name="createdByPattern" value="'%' + createdBy + '%'" /> AND createdBy like #{createdByPattern} </if> <if test="params != null and params.beginTimeBegin != null and params.beginTimeBegin != ''"> AND beginTime >= #{params.beginTimeBegin} </if> <if test="params != null and params.beginTimeEnd != null and params.beginTimeEnd != ''"> AND beginTime <= #{params.beginTimeEnd} </if> <if test="params != null and params.endTimeBegin != null and params.endTimeBegin != ''"> AND endTime >= #{params.endTimeBegin} </if> <if test="params != null and params.endTimeEnd != null and params.endTimeEnd != ''"> AND endTime <= #{params.endTimeEnd} </if> <if test="params != null and params.lastUpdatedBegin != null and params.lastUpdatedBegin != ''"> AND lastUpdated >= #{params.lastUpdatedBegin} </if> <if test="params != null and params.lastUpdatedEnd != null and params.lastUpdatedEnd != ''"> AND lastUpdated <= #{params.lastUpdatedEnd} </if> <if test="lastUpdatedBy != null and lastUpdatedBy != ''"> <bind name="lastUpdatedByPattern" value="'%' + lastUpdatedBy + '%'" /> AND lastUpdatedBy like #{lastUpdatedByPattern} </if> <if test="userDef1 != null and userDef1 != ''"> <bind name="userDef1Pattern" value="'%' + userDef1 + '%'" /> AND userDef1 like #{userDef1Pattern} </if> <if test="userDef2 != null and userDef2 != ''"> <bind name="userDef2Pattern" value="'%' + userDef2 + '%'" /> AND userDef2 like #{userDef2Pattern} </if> <if test="userDef3 != null and userDef3 != ''"> <bind name="userDef3Pattern" value="'%' + userDef3 + '%'" /> AND userDef3 like #{userDef3Pattern} </if> <if test="deleted != null "> AND deleted = #{deleted} </if> <if test="isEmptyOut != null "> AND isEmptyOut = #{isEmptyOut} </if> <if test="isDoubleIn != null "> AND isDoubleIn = #{isDoubleIn} </if> <if test="secondDestinationLocation != null and secondDestinationLocation != ''"> <bind name="secondDestinationLocationPattern" value="'%' + secondDestinationLocation + '%'" /> AND secondDestinationLocation like #{secondDestinationLocationPattern} </if> </where> </select> <select id="selectListEntityByEqual" resultType="com.huaheng.pc.task.task.domain.Task"> SELECT id, warehouseId, warehouseCode, companyId, companyCode, priority, type, station, allocationHeadId, containerId, containerCode, roadway, sourceLocation, destinationLocation, firstStatus, lastStatus, created, createdBy, beginTime, endTime, lastUpdated, lastUpdatedBy, userDef1, userDef2, userDef3, deleted, isEmptyOut, isDoubleIn, secondDestinationLocation FROM task <where> <if test="id != null"> AND id = #{id} </if> <if test="warehouseId != null"> AND warehouseId = #{warehouseId} </if> <if test="warehouseCode != null"> AND warehouseCode = #{warehouseCode} </if> <if test="companyIdList != null "> AND companyId in <foreach collection="companyIdList" item="companyIdItem" open="(" separator="," close=")"> #{companyIdItem} </foreach> </if> <if test="companyId != null"> AND companyId = #{companyId} </if> <if test="companyCodeList != null "> AND companyCode in <foreach collection="companyCodeList" item="companyCodeItem" open="(" separator="," close=")"> #{companyCodeItem} </foreach> </if> <if test="companyCode != null"> AND companyCode = #{companyCode} </if> <if test="priority != null"> AND priority = #{priority} </if> <if test="type != null"> AND type = #{type} </if> <if test="station != null"> AND station = #{station} </if> <if test="allocationHeadId != null"> AND allocationHeadId = #{allocationHeadId} </if> <if test="containerId != null"> AND containerId = #{containerId} </if> <if test="containerCode != null"> AND containerCode = #{containerCode} </if> <if test="roadway != null"> AND roadway = #{roadway} </if> <if test="sourceLocation != null"> AND sourceLocation = #{sourceLocation} </if> <if test="destinationLocation != null"> AND destinationLocation = #{destinationLocation} </if> <if test="firstStatus != null"> AND firstStatus = #{firstStatus} </if> <if test="lastStatus != null"> AND lastStatus = #{lastStatus} </if> <if test="created != null"> AND created = #{created} </if> <if test="createdBy != null"> AND createdBy = #{createdBy} </if> <if test="beginTime != null"> AND beginTime = #{beginTime} </if> <if test="endTime != null"> AND endTime = #{endTime} </if> <if test="lastUpdated != null"> AND lastUpdated = #{lastUpdated} </if> <if test="lastUpdatedBy != null"> AND lastUpdatedBy = #{lastUpdatedBy} </if> <if test="userDef1 != null"> AND userDef1 = #{userDef1} </if> <if test="userDef2 != null"> AND userDef2 = #{userDef2} </if> <if test="userDef3 != null"> AND userDef3 = #{userDef3} </if> <if test="deleted != null"> AND deleted = #{deleted} </if> <if test="isEmptyOut != null"> AND isEmptyOut = #{isEmptyOut} </if> <if test="isDoubleIn != null"> AND isDoubleIn = #{isDoubleIn} </if> <if test="secondDestinationLocation != null"> AND secondDestinationLocation = #{secondDestinationLocation} </if> </where> </select> <select id="selectListMapByEqual" resultType="java.util.HashMap"> SELECT ${columns} FROM task <where> <if test="condition.id != null"> AND id = #{condition.id} </if> <if test="condition.warehouseId != null"> AND warehouseId = #{condition.warehouseId} </if> <if test="condition.warehouseCode != null"> AND warehouseCode = #{condition.warehouseCode} </if> <if test="condition.companyIdList != null "> AND companyId in <foreach collection="condition.companyIdList" item="companyIdItem" open="(" separator="," close=")"> #{companyIdItem} </foreach> </if> <if test="condition.companyId != null"> AND companyId = #{condition.companyId} </if> <if test="condition.companyCodeList != null "> AND companyCode in <foreach collection="condition.companyCodeList" item="companyCodeItem" open="(" separator="," close=")"> #{companyCodeItem} </foreach> </if> <if test="condition.companyCode != null"> AND companyCode = #{condition.companyCode} </if> <if test="condition.priority != null"> AND priority = #{condition.priority} </if> <if test="condition.type != null"> AND type = #{condition.type} </if> <if test="condition.station != null"> AND station = #{condition.station} </if> <if test="condition.allocationHeadId != null"> AND allocationHeadId = #{condition.allocationHeadId} </if> <if test="condition.containerId != null"> AND containerId = #{condition.containerId} </if> <if test="condition.containerCode != null"> AND containerCode = #{condition.containerCode} </if> <if test="condition.roadway != null"> AND roadway = #{condition.roadway} </if> <if test="condition.sourceLocation != null"> AND sourceLocation = #{condition.sourceLocation} </if> <if test="condition.destinationLocation != null"> AND destinationLocation = #{condition.destinationLocation} </if> <if test="condition.firstStatus != null"> AND firstStatus = #{condition.firstStatus} </if> <if test="condition.lastStatus != null"> AND lastStatus = #{condition.lastStatus} </if> <if test="condition.created != null"> AND created = #{condition.created} </if> <if test="condition.createdBy != null"> AND createdBy = #{condition.createdBy} </if> <if test="condition.beginTime != null"> AND beginTime = #{condition.beginTime} </if> <if test="condition.endTime != null"> AND endTime = #{condition.endTime} </if> <if test="condition.lastUpdated != null"> AND lastUpdated = #{condition.lastUpdated} </if> <if test="condition.lastUpdatedBy != null"> AND lastUpdatedBy = #{condition.lastUpdatedBy} </if> <if test="condition.userDef1 != null"> AND userDef1 = #{condition.userDef1} </if> <if test="condition.userDef2 != null"> AND userDef2 = #{condition.userDef2} </if> <if test="condition.userDef3 != null"> AND userDef3 = #{condition.userDef3} </if> <if test="condition.deleted != null"> AND deleted = #{condition.deleted} </if> <if test="condition.isEmptyOut != null"> AND isEmptyOut = #{condition.isEmptyOut} </if> <if test="condition.isDoubleIn != null"> AND isDoubleIn = #{condition.isDoubleIn} </if> <if test="condition.secondDestinationLocation != null"> AND secondDestinationLocation = #{condition.secondDestinationLocation} </if> </where> </select> <select id="selectEntityById" resultType="com.huaheng.pc.task.task.domain.Task"> SELECT id, warehouseId, warehouseCode, companyId, companyCode, priority, type, station, allocationHeadId, containerId, containerCode, roadway, sourceLocation, destinationLocation, firstStatus, lastStatus, created, createdBy, beginTime, endTime, lastUpdated, lastUpdatedBy, userDef1, userDef2, userDef3, deleted, isEmptyOut, isDoubleIn, secondDestinationLocation FROM task WHERE id = #{id} </select> <select id="selectFirstEntity" resultType="com.huaheng.pc.task.task.domain.Task"> SELECT id, warehouseId, warehouseCode, companyId, companyCode, priority, type, station, allocationHeadId, containerId, containerCode, roadway, sourceLocation, destinationLocation, firstStatus, lastStatus, created, createdBy, beginTime, endTime, lastUpdated, lastUpdatedBy, userDef1, userDef2, userDef3, deleted, isEmptyOut, isDoubleIn, secondDestinationLocation FROM task <where> <if test="id != null"> AND id = #{id} </if> <if test="warehouseId != null"> AND warehouseId = #{warehouseId} </if> <if test="warehouseCode != null"> AND warehouseCode = #{warehouseCode} </if> <if test="companyIdList != null "> AND companyId in <foreach collection="companyIdList" item="companyIdItem" open="(" separator="," close=")"> #{companyIdItem} </foreach> </if> <if test="companyId != null"> AND companyId = #{companyId} </if> <if test="companyCodeList != null "> AND companyCode in <foreach collection="companyCodeList" item="companyCodeItem" open="(" separator="," close=")"> #{companyCodeItem} </foreach> </if> <if test="companyCode != null"> AND companyCode = #{companyCode} </if> <if test="priority != null"> AND priority = #{priority} </if> <if test="type != null"> AND type = #{type} </if> <if test="station != null"> AND station = #{station} </if> <if test="allocationHeadId != null"> AND allocationHeadId = #{allocationHeadId} </if> <if test="containerId != null"> AND containerId = #{containerId} </if> <if test="containerCode != null"> AND containerCode = #{containerCode} </if> <if test="roadway != null"> AND roadway = #{roadway} </if> <if test="sourceLocation != null"> AND sourceLocation = #{sourceLocation} </if> <if test="destinationLocation != null"> AND destinationLocation = #{destinationLocation} </if> <if test="firstStatus != null"> AND firstStatus = #{firstStatus} </if> <if test="lastStatus != null"> AND lastStatus = #{lastStatus} </if> <if test="created != null"> AND created = #{created} </if> <if test="createdBy != null"> AND createdBy = #{createdBy} </if> <if test="beginTime != null"> AND beginTime = #{beginTime} </if> <if test="endTime != null"> AND endTime = #{endTime} </if> <if test="lastUpdated != null"> AND lastUpdated = #{lastUpdated} </if> <if test="lastUpdatedBy != null"> AND lastUpdatedBy = #{lastUpdatedBy} </if> <if test="userDef1 != null"> AND userDef1 = #{userDef1} </if> <if test="userDef2 != null"> AND userDef2 = #{userDef2} </if> <if test="userDef3 != null"> AND userDef3 = #{userDef3} </if> <if test="deleted != null"> AND deleted = #{deleted} </if> <if test="isEmptyOut != null"> AND isEmptyOut = #{isEmptyOut} </if> <if test="isDoubleIn != null"> AND isDoubleIn = #{isDoubleIn} </if> <if test="secondDestinationLocation != null"> AND secondDestinationLocation = #{secondDestinationLocation} </if> </where> LIMIT 1 </select> <select id="selectFirstMap" resultType="java.util.HashMap"> SELECT ${columns} FROM task <where> <if test="condition.id != null"> AND id = #{condition.id} </if> <if test="condition.warehouseId != null"> AND warehouseId = #{condition.warehouseId} </if> <if test="condition.warehouseCode != null"> AND warehouseCode = #{condition.warehouseCode} </if> <if test="condition.companyIdList != null "> AND companyId in <foreach collection="condition.companyIdList" item="companyIdItem" open="(" separator="," close=")"> #{companyIdItem} </foreach> </if> <if test="condition.companyId != null"> AND companyId = #{condition.companyId} </if> <if test="condition.companyCodeList != null "> AND companyCode in <foreach collection="condition.companyCodeList" item="companyCodeItem" open="(" separator="," close=")"> #{companyCodeItem} </foreach> </if> <if test="condition.companyCode != null"> AND companyCode = #{condition.companyCode} </if> <if test="condition.priority != null"> AND priority = #{condition.priority} </if> <if test="condition.type != null"> AND type = #{condition.type} </if> <if test="condition.station != null"> AND station = #{condition.station} </if> <if test="condition.allocationHeadId != null"> AND allocationHeadId = #{condition.allocationHeadId} </if> <if test="condition.containerId != null"> AND containerId = #{condition.containerId} </if> <if test="condition.containerCode != null"> AND containerCode = #{condition.containerCode} </if> <if test="condition.roadway != null"> AND roadway = #{condition.roadway} </if> <if test="condition.sourceLocation != null"> AND sourceLocation = #{condition.sourceLocation} </if> <if test="condition.destinationLocation != null"> AND destinationLocation = #{condition.destinationLocation} </if> <if test="condition.firstStatus != null"> AND firstStatus = #{condition.firstStatus} </if> <if test="condition.lastStatus != null"> AND lastStatus = #{condition.lastStatus} </if> <if test="condition.created != null"> AND created = #{condition.created} </if> <if test="condition.createdBy != null"> AND createdBy = #{condition.createdBy} </if> <if test="condition.beginTime != null"> AND beginTime = #{condition.beginTime} </if> <if test="condition.endTime != null"> AND endTime = #{condition.endTime} </if> <if test="condition.lastUpdated != null"> AND lastUpdated = #{condition.lastUpdated} </if> <if test="condition.lastUpdatedBy != null"> AND lastUpdatedBy = #{condition.lastUpdatedBy} </if> <if test="condition.userDef1 != null"> AND userDef1 = #{condition.userDef1} </if> <if test="condition.userDef2 != null"> AND userDef2 = #{condition.userDef2} </if> <if test="condition.userDef3 != null"> AND userDef3 = #{condition.userDef3} </if> <if test="condition.deleted != null"> AND deleted = #{condition.deleted} </if> <if test="condition.isEmptyOut != null"> AND isEmptyOut = #{condition.isEmptyOut} </if> <if test="condition.isDoubleIn != null"> AND isDoubleIn = #{condition.isDoubleIn} </if> <if test="condition.secondDestinationLocation != null"> AND secondDestinationLocation = #{condition.secondDestinationLocation} </if> </where> LIMIT 1 </select> <insert id="insert" parameterType="com.huaheng.pc.task.task.domain.Task" keyProperty="id" useGeneratedKeys="true" > INSERT INTO task <trim prefix="(" suffix=")" suffixOverrides=","> <if test="warehouseId != null"> warehouseId, </if> <if test="warehouseCode != null"> warehouseCode, </if> <if test="companyId != null"> companyId, </if> <if test="companyCode != null"> companyCode, </if> <if test="priority != null"> priority, </if> <if test="type != null"> type, </if> <if test="station != null"> station, </if> <if test="allocationHeadId != null"> allocationHeadId, </if> <if test="containerId != null"> containerId, </if> <if test="containerCode != null"> containerCode, </if> <if test="roadway != null"> roadway, </if> <if test="sourceLocation != null"> sourceLocation, </if> <if test="destinationLocation != null"> destinationLocation, </if> <if test="firstStatus != null"> firstStatus, </if> <if test="lastStatus != null"> lastStatus, </if> <if test="created != null"> created, </if> <if test="createdBy != null"> createdBy, </if> <if test="beginTime != null"> beginTime, </if> <if test="endTime != null"> endTime, </if> <if test="lastUpdated != null"> lastUpdated, </if> <if test="lastUpdatedBy != null"> lastUpdatedBy, </if> <if test="userDef1 != null"> userDef1, </if> <if test="userDef2 != null"> userDef2, </if> <if test="userDef3 != null"> userDef3, </if> <if test="deleted != null"> deleted, </if> <if test="isEmptyOut != null"> isEmptyOut, </if> <if test="isDoubleIn != null"> isDoubleIn, </if> <if test="secondDestinationLocation != null"> secondDestinationLocation, </if> </trim> <trim prefix=" values (" suffix=")" suffixOverrides=","> <if test="warehouseId != null"> #{warehouseId, jdbcType=INTEGER}, </if> <if test="warehouseCode != null"> #{warehouseCode, jdbcType=VARCHAR}, </if> <if test="companyId != null"> #{companyId, jdbcType=INTEGER}, </if> <if test="companyCode != null"> #{companyCode, jdbcType=VARCHAR}, </if> <if test="priority != null"> #{priority, jdbcType=SMALLINT}, </if> <if test="type != null"> #{type, jdbcType=SMALLINT}, </if> <if test="station != null"> #{station, jdbcType=INTEGER}, </if> <if test="allocationHeadId != null"> #{allocationHeadId, jdbcType=INTEGER}, </if> <if test="containerId != null"> #{containerId, jdbcType=INTEGER}, </if> <if test="containerCode != null"> #{containerCode, jdbcType=VARCHAR}, </if> <if test="roadway != null"> #{roadway, jdbcType=SMALLINT}, </if> <if test="sourceLocation != null"> #{sourceLocation, jdbcType=VARCHAR}, </if> <if test="destinationLocation != null"> #{destinationLocation, jdbcType=VARCHAR}, </if> <if test="firstStatus != null"> #{firstStatus, jdbcType=SMALLINT}, </if> <if test="lastStatus != null"> #{lastStatus, jdbcType=SMALLINT}, </if> <if test="created != null"> #{created, jdbcType=TIMESTAMP}, </if> <if test="createdBy != null"> #{createdBy, jdbcType=VARCHAR}, </if> <if test="beginTime != null"> #{beginTime, jdbcType=TIMESTAMP}, </if> <if test="endTime != null"> #{endTime, jdbcType=TIMESTAMP}, </if> <if test="lastUpdated != null"> #{lastUpdated, jdbcType=TIMESTAMP}, </if> <if test="lastUpdatedBy != null"> #{lastUpdatedBy, jdbcType=VARCHAR}, </if> <if test="userDef1 != null"> #{userDef1, jdbcType=VARCHAR}, </if> <if test="userDef2 != null"> #{userDef2, jdbcType=VARCHAR}, </if> <if test="userDef3 != null"> #{userDef3, jdbcType=VARCHAR}, </if> <if test="deleted != null"> #{deleted, jdbcType=BIT}, </if> <if test="isEmptyOut != null"> #{isEmptyOut, jdbcType=INTEGER}, </if> <if test="isDoubleIn != null"> #{isDoubleIn, jdbcType=INTEGER}, </if> <if test="secondDestinationLocation != null"> #{secondDestinationLocation, jdbcType=VARCHAR}, </if> </trim> </insert> <update id="updateByModel"> UPDATE task <set> <if test="warehouseId != null"> warehouseId = #{warehouseId, jdbcType=INTEGER}, </if> <if test="warehouseCode != null"> warehouseCode = #{warehouseCode, jdbcType=VARCHAR}, </if> <if test="companyId != null"> companyId = #{companyId, jdbcType=INTEGER}, </if> <if test="companyCode != null"> companyCode = #{companyCode, jdbcType=VARCHAR}, </if> <if test="priority != null"> priority = #{priority, jdbcType=SMALLINT}, </if> <if test="type != null"> type = #{type, jdbcType=SMALLINT}, </if> <if test="station != null"> station = #{station, jdbcType=INTEGER}, </if> <if test="allocationHeadId != null"> allocationHeadId = #{allocationHeadId, jdbcType=INTEGER}, </if> <if test="containerId != null"> containerId = #{containerId, jdbcType=INTEGER}, </if> <if test="containerCode != null"> containerCode = #{containerCode, jdbcType=VARCHAR}, </if> <if test="roadway != null"> roadway = #{roadway, jdbcType=SMALLINT}, </if> <if test="sourceLocation != null"> sourceLocation = #{sourceLocation, jdbcType=VARCHAR}, </if> <if test="destinationLocation != null"> destinationLocation = #{destinationLocation, jdbcType=VARCHAR}, </if> <if test="firstStatus != null"> firstStatus = #{firstStatus, jdbcType=SMALLINT}, </if> <if test="lastStatus != null"> lastStatus = #{lastStatus, jdbcType=SMALLINT}, </if> <if test="created != null"> created = #{created, jdbcType=TIMESTAMP}, </if> <if test="createdBy != null"> createdBy = #{createdBy, jdbcType=VARCHAR}, </if> <if test="beginTime != null"> beginTime = #{beginTime, jdbcType=TIMESTAMP}, </if> <if test="endTime != null"> endTime = #{endTime, jdbcType=TIMESTAMP}, </if> <if test="lastUpdated != null"> lastUpdated = #{lastUpdated, jdbcType=TIMESTAMP}, </if> <if test="lastUpdatedBy != null"> lastUpdatedBy = #{lastUpdatedBy, jdbcType=VARCHAR}, </if> <if test="userDef1 != null"> userDef1 = #{userDef1, jdbcType=VARCHAR}, </if> <if test="userDef2 != null"> userDef2 = #{userDef2, jdbcType=VARCHAR}, </if> <if test="userDef3 != null"> userDef3 = #{userDef3, jdbcType=VARCHAR}, </if> <if test="deleted != null"> deleted = #{deleted, jdbcType=BIT}, </if> <if test="isEmptyOut != null"> isEmptyOut = #{isEmptyOut, jdbcType=INTEGER}, </if> <if test="isDoubleIn != null"> isDoubleIn = #{isDoubleIn, jdbcType=INTEGER}, </if> <if test="secondDestinationLocation != null"> secondDestinationLocation = #{secondDestinationLocation, jdbcType=VARCHAR}, </if> </set> WHERE id = #{id,jdbcType=INTEGER} </update> <update id="updateByCondition"> UPDATE task <set> <if test="record.warehouseId != null"> warehouseId = #{record.warehouseId, jdbcType=INTEGER}, </if> <if test="record.warehouseCode != null"> warehouseCode = #{record.warehouseCode, jdbcType=VARCHAR}, </if> <if test="record.companyId != null"> companyId = #{record.companyId, jdbcType=INTEGER}, </if> <if test="record.companyCode != null"> companyCode = #{record.companyCode, jdbcType=VARCHAR}, </if> <if test="record.priority != null"> priority = #{record.priority, jdbcType=SMALLINT}, </if> <if test="record.type != null"> type = #{record.type, jdbcType=SMALLINT}, </if> <if test="record.station != null"> station = #{record.station, jdbcType=INTEGER}, </if> <if test="record.allocationHeadId != null"> allocationHeadId = #{record.allocationHeadId, jdbcType=INTEGER}, </if> <if test="record.containerId != null"> containerId = #{record.containerId, jdbcType=INTEGER}, </if> <if test="record.containerCode != null"> containerCode = #{record.containerCode, jdbcType=VARCHAR}, </if> <if test="record.roadway != null"> roadway = #{record.roadway, jdbcType=SMALLINT}, </if> <if test="record.sourceLocation != null"> sourceLocation = #{record.sourceLocation, jdbcType=VARCHAR}, </if> <if test="record.destinationLocation != null"> destinationLocation = #{record.destinationLocation, jdbcType=VARCHAR}, </if> <if test="record.firstStatus != null"> firstStatus = #{record.firstStatus, jdbcType=SMALLINT}, </if> <if test="record.lastStatus != null"> lastStatus = #{record.lastStatus, jdbcType=SMALLINT}, </if> <if test="record.created != null"> created = #{record.created, jdbcType=TIMESTAMP}, </if> <if test="record.createdBy != null"> createdBy = #{record.createdBy, jdbcType=VARCHAR}, </if> <if test="record.beginTime != null"> beginTime = #{record.beginTime, jdbcType=TIMESTAMP}, </if> <if test="record.endTime != null"> endTime = #{record.endTime, jdbcType=TIMESTAMP}, </if> <if test="record.lastUpdated != null"> lastUpdated = #{record.lastUpdated, jdbcType=TIMESTAMP}, </if> <if test="record.lastUpdatedBy != null"> lastUpdatedBy = #{record.lastUpdatedBy, jdbcType=VARCHAR}, </if> <if test="record.userDef1 != null"> userDef1 = #{record.userDef1, jdbcType=VARCHAR}, </if> <if test="record.userDef2 != null"> userDef2 = #{record.userDef2, jdbcType=VARCHAR}, </if> <if test="record.userDef3 != null"> userDef3 = #{record.userDef3, jdbcType=VARCHAR}, </if> <if test="record.deleted != null"> deleted = #{record.deleted, jdbcType=BIT}, </if> <if test="record.isEmptyOut != null"> isEmptyOut = #{record.isEmptyOut, jdbcType=INTEGER}, </if> <if test="record.isDoubleIn != null"> isDoubleIn = #{record.isDoubleIn, jdbcType=INTEGER}, </if> <if test="record.secondDestinationLocation != null"> secondDestinationLocation = #{record.secondDestinationLocation, jdbcType=VARCHAR}, </if> </set> <where> <if test="condition.id != null"> AND id = #{condition.id} </if> <if test="condition.warehouseId != null"> AND warehouseId = #{condition.warehouseId} </if> <if test="condition.warehouseCode != null"> AND warehouseCode = #{condition.warehouseCode} </if> <if test="condition.companyId != null"> AND companyId = #{condition.companyId} </if> <if test="condition.companyCode != null"> AND companyCode = #{condition.companyCode} </if> <if test="condition.priority != null"> AND priority = #{condition.priority} </if> <if test="condition.type != null"> AND type = #{condition.type} </if> <if test="condition.station != null"> AND station = #{condition.station} </if> <if test="condition.allocationHeadId != null"> AND allocationHeadId = #{condition.allocationHeadId} </if> <if test="condition.containerId != null"> AND containerId = #{condition.containerId} </if> <if test="condition.containerCode != null"> AND containerCode = #{condition.containerCode} </if> <if test="condition.roadway != null"> AND roadway = #{condition.roadway} </if> <if test="condition.sourceLocation != null"> AND sourceLocation = #{condition.sourceLocation} </if> <if test="condition.destinationLocation != null"> AND destinationLocation = #{condition.destinationLocation} </if> <if test="condition.firstStatus != null"> AND firstStatus = #{condition.firstStatus} </if> <if test="condition.lastStatus != null"> AND lastStatus = #{condition.lastStatus} </if> <if test="condition.created != null"> AND created = #{condition.created} </if> <if test="condition.createdBy != null"> AND createdBy = #{condition.createdBy} </if> <if test="condition.beginTime != null"> AND beginTime = #{condition.beginTime} </if> <if test="condition.endTime != null"> AND endTime = #{condition.endTime} </if> <if test="condition.lastUpdated != null"> AND lastUpdated = #{condition.lastUpdated} </if> <if test="condition.lastUpdatedBy != null"> AND lastUpdatedBy = #{condition.lastUpdatedBy} </if> <if test="condition.userDef1 != null"> AND userDef1 = #{condition.userDef1} </if> <if test="condition.userDef2 != null"> AND userDef2 = #{condition.userDef2} </if> <if test="condition.userDef3 != null"> AND userDef3 = #{condition.userDef3} </if> <if test="condition.deleted != null"> AND deleted = #{condition.deleted} </if> <if test="condition.isEmptyOut != null"> AND isEmptyOut = #{condition.isEmptyOut} </if> <if test="condition.isDoubleIn != null"> AND isDoubleIn = #{condition.isDoubleIn} </if> <if test="condition.secondDestinationLocation != null"> AND secondDestinationLocation = #{condition.secondDestinationLocation} </if> </where> </update> <delete id="deleteById"> DELETE FROM task WHERE id = #{id, jdbcType=INTEGER} </delete> <delete id="deleteByCondition"> DELETE FROM task <where> <if test="id != null"> AND id = #{id} </if> <if test="warehouseId != null"> AND warehouseId = #{warehouseId} </if> <if test="warehouseCode != null"> AND warehouseCode = #{warehouseCode} </if> <if test="companyId != null"> AND companyId = #{companyId} </if> <if test="companyCode != null"> AND companyCode = #{companyCode} </if> <if test="priority != null"> AND priority = #{priority} </if> <if test="type != null"> AND type = #{type} </if> <if test="station != null"> AND station = #{station} </if> <if test="allocationHeadId != null"> AND allocationHeadId = #{allocationHeadId} </if> <if test="containerId != null"> AND containerId = #{containerId} </if> <if test="containerCode != null"> AND containerCode = #{containerCode} </if> <if test="roadway != null"> AND roadway = #{roadway} </if> <if test="sourceLocation != null"> AND sourceLocation = #{sourceLocation} </if> <if test="destinationLocation != null"> AND destinationLocation = #{destinationLocation} </if> <if test="firstStatus != null"> AND firstStatus = #{firstStatus} </if> <if test="lastStatus != null"> AND lastStatus = #{lastStatus} </if> <if test="created != null"> AND created = #{created} </if> <if test="createdBy != null"> AND createdBy = #{createdBy} </if> <if test="beginTime != null"> AND beginTime = #{beginTime} </if> <if test="endTime != null"> AND endTime = #{endTime} </if> <if test="lastUpdated != null"> AND lastUpdated = #{lastUpdated} </if> <if test="lastUpdatedBy != null"> AND lastUpdatedBy = #{lastUpdatedBy} </if> <if test="userDef1 != null"> AND userDef1 = #{userDef1} </if> <if test="userDef2 != null"> AND userDef2 = #{userDef2} </if> <if test="userDef3 != null"> AND userDef3 = #{userDef3} </if> <if test="deleted != null"> AND deleted = #{deleted} </if> <if test="isEmptyOut != null"> AND isEmptyOut = #{isEmptyOut} </if> <if test="isDoubleIn != null"> AND isDoubleIn = #{isDoubleIn} </if> <if test="secondDestinationLocation != null"> AND secondDestinationLocation = #{secondDestinationLocation} </if> </where> </delete> </mapper>