398 lines
14 KiB
XML
398 lines
14 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.bonus.purchase.mapper.BpmTaskMapper">
|
|
<resultMap id="BaseResultMap" type="com.bonus.purchase.domain.BpmTask">
|
|
<!--@mbg.generated-->
|
|
<!--@Table bpm_task-->
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
<result column="definition_id" jdbcType="INTEGER" property="definitionId" />
|
|
<result column="parent_id" jdbcType="INTEGER" property="parentId" />
|
|
<result column="code" jdbcType="VARCHAR" property="code" />
|
|
<result column="status" jdbcType="INTEGER" property="status" />
|
|
<result column="arrival_time" jdbcType="TIMESTAMP" property="arrivalTime" />
|
|
<result column="creator" jdbcType="VARCHAR" property="creator" />
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
<result column="auditor" jdbcType="INTEGER" property="auditor" />
|
|
<result column="audit_time" jdbcType="TIMESTAMP" property="auditTime" />
|
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
|
<result column="agreement_id" jdbcType="INTEGER" property="agreementId" />
|
|
<result column="link_man" jdbcType="VARCHAR" property="linkMan" />
|
|
<result column="phone" jdbcType="VARCHAR" property="phone" />
|
|
<result column="company_id" jdbcType="INTEGER" property="companyId" />
|
|
<result column="is_active" jdbcType="TINYINT" property="isActive" />
|
|
</resultMap>
|
|
<sql id="Base_Column_List">
|
|
<!--@mbg.generated-->
|
|
id, definition_id, parent_id, code, `status`, arrival_time, creator, create_time,
|
|
auditor, audit_time, remark, agreement_id, link_man, phone, company_id
|
|
</sql>
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
<!--@mbg.generated-->
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
from bpm_task
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</select>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
<!--@mbg.generated-->
|
|
delete from bpm_task
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</delete>
|
|
<insert id="insert" parameterType="com.bonus.purchase.domain.BpmTask">
|
|
<!--@mbg.generated-->
|
|
insert into bpm_task (id, definition_id, parent_id,
|
|
code, `status`, arrival_time,
|
|
creator, create_time, auditor,
|
|
audit_time, remark, agreement_id,
|
|
link_man, phone, company_id
|
|
)
|
|
values (#{id,jdbcType=INTEGER}, #{definitionId,jdbcType=INTEGER}, #{parentId,jdbcType=INTEGER},
|
|
#{code,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{arrivalTime,jdbcType=TIMESTAMP},
|
|
#{creator,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{auditor,jdbcType=INTEGER},
|
|
#{auditTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, #{agreementId,jdbcType=INTEGER},
|
|
#{linkMan,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER}
|
|
)
|
|
</insert>
|
|
<insert id="insertSelective" useGeneratedKeys="true" keyProperty="id" parameterType="com.bonus.purchase.domain.BpmTask">
|
|
<!--@mbg.generated-->
|
|
insert into bpm_task
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
id,
|
|
</if>
|
|
<if test="definitionId != null">
|
|
definition_id,
|
|
</if>
|
|
<if test="parentId != null">
|
|
parent_id,
|
|
</if>
|
|
<if test="code != null and code != ''">
|
|
code,
|
|
</if>
|
|
<if test="status != null">
|
|
`status`,
|
|
</if>
|
|
<if test="arrivalTime != null">
|
|
arrival_time,
|
|
</if>
|
|
<if test="creator != null and creator != ''">
|
|
creator,
|
|
</if>
|
|
<if test="createTime != null">
|
|
create_time,
|
|
</if>
|
|
<if test="auditor != null">
|
|
auditor,
|
|
</if>
|
|
<if test="auditTime != null">
|
|
audit_time,
|
|
</if>
|
|
<if test="remark != null and remark != ''">
|
|
remark,
|
|
</if>
|
|
<if test="agreementId != null">
|
|
agreement_id,
|
|
</if>
|
|
<if test="linkMan != null and linkMan != ''">
|
|
link_man,
|
|
</if>
|
|
<if test="phone != null and phone != ''">
|
|
phone,
|
|
</if>
|
|
<if test="companyId != null">
|
|
company_id,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
#{id,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="definitionId != null">
|
|
#{definitionId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="parentId != null">
|
|
#{parentId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="code != null and code != ''">
|
|
#{code,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="status != null">
|
|
#{status,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="arrivalTime != null">
|
|
#{arrivalTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="creator != null and creator != ''">
|
|
#{creator,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="createTime != null">
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="auditor != null">
|
|
#{auditor,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="auditTime != null">
|
|
#{auditTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="remark != null and remark != ''">
|
|
#{remark,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="agreementId != null">
|
|
#{agreementId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="linkMan != null and linkMan != ''">
|
|
#{linkMan,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="phone != null and phone != ''">
|
|
#{phone,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="companyId != null">
|
|
#{companyId,jdbcType=INTEGER},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.bonus.purchase.domain.BpmTask">
|
|
<!--@mbg.generated-->
|
|
update bpm_task
|
|
<set>
|
|
<if test="definitionId != null">
|
|
definition_id = #{definitionId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="parentId != null">
|
|
parent_id = #{parentId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="code != null and code != ''">
|
|
code = #{code,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="status != null">
|
|
`status` = #{status,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="arrivalTime != null">
|
|
arrival_time = #{arrivalTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="creator != null and creator != ''">
|
|
creator = #{creator,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="createTime != null">
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="auditor != null">
|
|
auditor = #{auditor,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="auditTime != null">
|
|
audit_time = #{auditTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="remark != null and remark != ''">
|
|
remark = #{remark,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="agreementId != null">
|
|
agreement_id = #{agreementId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="linkMan != null and linkMan != ''">
|
|
link_man = #{linkMan,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="phone != null and phone != ''">
|
|
phone = #{phone,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="companyId != null">
|
|
company_id = #{companyId,jdbcType=INTEGER},
|
|
</if>
|
|
</set>
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="com.bonus.purchase.domain.BpmTask">
|
|
<!--@mbg.generated-->
|
|
update bpm_task
|
|
set definition_id = #{definitionId,jdbcType=INTEGER},
|
|
parent_id = #{parentId,jdbcType=INTEGER},
|
|
code = #{code,jdbcType=VARCHAR},
|
|
`status` = #{status,jdbcType=INTEGER},
|
|
arrival_time = #{arrivalTime,jdbcType=TIMESTAMP},
|
|
creator = #{creator,jdbcType=VARCHAR},
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
auditor = #{auditor,jdbcType=INTEGER},
|
|
audit_time = #{auditTime,jdbcType=TIMESTAMP},
|
|
remark = #{remark,jdbcType=VARCHAR},
|
|
agreement_id = #{agreementId,jdbcType=INTEGER},
|
|
link_man = #{linkMan,jdbcType=VARCHAR},
|
|
phone = #{phone,jdbcType=VARCHAR},
|
|
company_id = #{companyId,jdbcType=INTEGER}
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</update>
|
|
<insert id="insertOrUpdate" parameterType="com.bonus.purchase.domain.BpmTask">
|
|
<!--@mbg.generated-->
|
|
insert into bpm_task
|
|
(id, definition_id, parent_id, code, `status`, arrival_time, creator, create_time,
|
|
auditor, audit_time, remark, agreement_id, link_man, phone, company_id)
|
|
values
|
|
(#{id,jdbcType=INTEGER}, #{definitionId,jdbcType=INTEGER}, #{parentId,jdbcType=INTEGER},
|
|
#{code,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{arrivalTime,jdbcType=TIMESTAMP},
|
|
#{creator,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{auditor,jdbcType=INTEGER},
|
|
#{auditTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, #{agreementId,jdbcType=INTEGER},
|
|
#{linkMan,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER}
|
|
)
|
|
on duplicate key update
|
|
id = #{id,jdbcType=INTEGER},
|
|
definition_id = #{definitionId,jdbcType=INTEGER},
|
|
parent_id = #{parentId,jdbcType=INTEGER},
|
|
code = #{code,jdbcType=VARCHAR},
|
|
`status` = #{status,jdbcType=INTEGER},
|
|
arrival_time = #{arrivalTime,jdbcType=TIMESTAMP},
|
|
creator = #{creator,jdbcType=VARCHAR},
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
auditor = #{auditor,jdbcType=INTEGER},
|
|
audit_time = #{auditTime,jdbcType=TIMESTAMP},
|
|
remark = #{remark,jdbcType=VARCHAR},
|
|
agreement_id = #{agreementId,jdbcType=INTEGER},
|
|
link_man = #{linkMan,jdbcType=VARCHAR},
|
|
phone = #{phone,jdbcType=VARCHAR},
|
|
company_id = #{companyId,jdbcType=INTEGER}
|
|
</insert>
|
|
<insert id="insertOrUpdateSelective" parameterType="com.bonus.purchase.domain.BpmTask">
|
|
<!--@mbg.generated-->
|
|
insert into bpm_task
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
id,
|
|
</if>
|
|
<if test="definitionId != null">
|
|
definition_id,
|
|
</if>
|
|
<if test="parentId != null">
|
|
parent_id,
|
|
</if>
|
|
<if test="code != null and code != ''">
|
|
code,
|
|
</if>
|
|
<if test="status != null">
|
|
`status`,
|
|
</if>
|
|
<if test="arrivalTime != null">
|
|
arrival_time,
|
|
</if>
|
|
<if test="creator != null and creator != ''">
|
|
creator,
|
|
</if>
|
|
<if test="createTime != null">
|
|
create_time,
|
|
</if>
|
|
<if test="auditor != null">
|
|
auditor,
|
|
</if>
|
|
<if test="auditTime != null">
|
|
audit_time,
|
|
</if>
|
|
<if test="remark != null and remark != ''">
|
|
remark,
|
|
</if>
|
|
<if test="agreementId != null">
|
|
agreement_id,
|
|
</if>
|
|
<if test="linkMan != null and linkMan != ''">
|
|
link_man,
|
|
</if>
|
|
<if test="phone != null and phone != ''">
|
|
phone,
|
|
</if>
|
|
<if test="companyId != null">
|
|
company_id,
|
|
</if>
|
|
</trim>
|
|
values
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
#{id,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="definitionId != null">
|
|
#{definitionId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="parentId != null">
|
|
#{parentId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="code != null and code != ''">
|
|
#{code,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="status != null">
|
|
#{status,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="arrivalTime != null">
|
|
#{arrivalTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="creator != null and creator != ''">
|
|
#{creator,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="createTime != null">
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="auditor != null">
|
|
#{auditor,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="auditTime != null">
|
|
#{auditTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="remark != null and remark != ''">
|
|
#{remark,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="agreementId != null">
|
|
#{agreementId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="linkMan != null and linkMan != ''">
|
|
#{linkMan,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="phone != null and phone != ''">
|
|
#{phone,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="companyId != null">
|
|
#{companyId,jdbcType=INTEGER},
|
|
</if>
|
|
</trim>
|
|
on duplicate key update
|
|
<trim suffixOverrides=",">
|
|
<if test="id != null">
|
|
id = #{id,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="definitionId != null">
|
|
definition_id = #{definitionId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="parentId != null">
|
|
parent_id = #{parentId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="code != null and code != ''">
|
|
code = #{code,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="status != null">
|
|
`status` = #{status,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="arrivalTime != null">
|
|
arrival_time = #{arrivalTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="creator != null and creator != ''">
|
|
creator = #{creator,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="createTime != null">
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="auditor != null">
|
|
auditor = #{auditor,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="auditTime != null">
|
|
audit_time = #{auditTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="remark != null and remark != ''">
|
|
remark = #{remark,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="agreementId != null">
|
|
agreement_id = #{agreementId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="linkMan != null and linkMan != ''">
|
|
link_man = #{linkMan,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="phone != null and phone != ''">
|
|
phone = #{phone,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="companyId != null">
|
|
company_id = #{companyId,jdbcType=INTEGER},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
</mapper> |