2023-12-13 19:29:50 +08:00
|
|
|
<?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.sgzb.app.mapper.LeaseApplyDetailsMapper">
|
2024-01-16 20:06:21 +08:00
|
|
|
<resultMap id="BaseResultMap" type="com.bonus.sgzb.app.domain.LeaseApplyDetails">
|
2023-12-13 19:29:50 +08:00
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
<!--@Table lease_apply_details-->
|
|
|
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
|
|
|
<result column="parennt_id" jdbcType="INTEGER" property="parenntId" />
|
|
|
|
|
<result column="type_id" jdbcType="INTEGER" property="typeId" />
|
|
|
|
|
<result column="pre_num" jdbcType="FLOAT" property="preNum" />
|
|
|
|
|
<result column="al_num" jdbcType="FLOAT" property="alNum" />
|
|
|
|
|
<result column="status" jdbcType="VARCHAR" property="status" />
|
|
|
|
|
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
|
|
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
|
|
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
|
|
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
|
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
|
|
|
|
<result column="company_id" jdbcType="INTEGER" property="companyId" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
id, parennt_id, type_id, pre_num, al_num, `status`, create_by, create_time, update_by,
|
|
|
|
|
update_time, remark, company_id
|
|
|
|
|
</sql>
|
|
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
select
|
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
|
from lease_apply_details
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
</select>
|
2024-01-16 20:06:21 +08:00
|
|
|
<select id="getByParentId" resultType="com.bonus.sgzb.app.domain.LeaseApplyDetails">
|
2024-01-12 17:11:47 +08:00
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
select
|
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
|
from lease_apply_details
|
|
|
|
|
where parennt_id = #{parentId}
|
|
|
|
|
</select>
|
2024-03-07 16:30:39 +08:00
|
|
|
<select id="selectByTaskId" resultType="com.bonus.sgzb.app.domain.LeaseApplyDetails">
|
2024-03-07 17:43:34 +08:00
|
|
|
select lad.id from lease_apply_details lad left join lease_apply_info lai on lad.parennt_id = lai.id
|
2024-03-07 16:30:39 +08:00
|
|
|
where lai.task_id = #{taskId}
|
|
|
|
|
</select>
|
2024-03-28 18:11:48 +08:00
|
|
|
<select id="getDetailsByApplyId" resultType="com.bonus.sgzb.app.domain.TmTask">
|
|
|
|
|
SELECT
|
|
|
|
|
mt2.type_name AS typeName,
|
|
|
|
|
mt.type_name AS typeModelName,
|
|
|
|
|
mt.type_id AS typeId,
|
|
|
|
|
mm.ma_code AS maCode,
|
|
|
|
|
mm.ma_id AS maId,
|
|
|
|
|
sd.NAME AS maStatus
|
|
|
|
|
FROM
|
|
|
|
|
ma_type mt
|
|
|
|
|
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
|
|
|
|
|
LEFT JOIN ma_machine mm ON mt.type_id = mm.type_id
|
|
|
|
|
LEFT JOIN sys_dic sd ON sd.id = mm.ma_status
|
|
|
|
|
WHERE
|
|
|
|
|
mm.ma_status = 15
|
|
|
|
|
AND mt.type_id = #{typeId}
|
|
|
|
|
<if test="maCode != null and maCode !=''">
|
|
|
|
|
AND mm.ma_code like concat('%', #{maCode}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
2023-12-22 16:24:25 +08:00
|
|
|
|
2024-02-23 11:13:41 +08:00
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
2023-12-13 19:29:50 +08:00
|
|
|
delete from lease_apply_details
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
</delete>
|
2023-12-22 16:24:25 +08:00
|
|
|
|
|
|
|
|
<delete id="deleteByParentId" parameterType="java.lang.Integer">
|
|
|
|
|
delete from lease_apply_details
|
|
|
|
|
where parennt_id = #{parentId,jdbcType=INTEGER}
|
|
|
|
|
</delete>
|
|
|
|
|
|
2024-01-16 20:06:21 +08:00
|
|
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.bonus.sgzb.app.domain.LeaseApplyDetails" useGeneratedKeys="true">
|
2023-12-13 19:29:50 +08:00
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
insert into lease_apply_details (parennt_id, type_id, pre_num,
|
|
|
|
|
al_num, `status`, create_by,
|
|
|
|
|
create_time, update_by, update_time,
|
|
|
|
|
remark, company_id)
|
|
|
|
|
values (#{parenntId,jdbcType=INTEGER}, #{typeId,jdbcType=INTEGER}, #{preNum,jdbcType=FLOAT},
|
|
|
|
|
#{alNum,jdbcType=FLOAT}, #{status,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR},
|
2023-12-24 00:47:55 +08:00
|
|
|
NOW(), #{updateBy,jdbcType=VARCHAR}, NOW(),
|
2023-12-13 19:29:50 +08:00
|
|
|
#{remark,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER})
|
|
|
|
|
</insert>
|
2024-01-16 20:06:21 +08:00
|
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.bonus.sgzb.app.domain.LeaseApplyDetails" useGeneratedKeys="true">
|
2023-12-13 19:29:50 +08:00
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
insert into lease_apply_details
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="parenntId != null">
|
|
|
|
|
parennt_id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="typeId != null">
|
|
|
|
|
type_id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="preNum != null">
|
|
|
|
|
pre_num,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="alNum != null">
|
|
|
|
|
al_num,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="status != null and status != ''">
|
|
|
|
|
`status`,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''">
|
|
|
|
|
create_by,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createTime != null">
|
|
|
|
|
create_time,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateBy != null and updateBy != ''">
|
|
|
|
|
update_by,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateTime != null">
|
|
|
|
|
update_time,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="remark != null and remark != ''">
|
|
|
|
|
remark,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="companyId != null">
|
|
|
|
|
company_id,
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="parenntId != null">
|
|
|
|
|
#{parenntId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="typeId != null">
|
|
|
|
|
#{typeId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="preNum != null">
|
|
|
|
|
#{preNum,jdbcType=FLOAT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="alNum != null">
|
|
|
|
|
#{alNum,jdbcType=FLOAT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="status != null and status != ''">
|
|
|
|
|
#{status,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''">
|
|
|
|
|
#{createBy,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createTime != null">
|
|
|
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateBy != null and updateBy != ''">
|
|
|
|
|
#{updateBy,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateTime != null">
|
|
|
|
|
#{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="remark != null and remark != ''">
|
|
|
|
|
#{remark,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="companyId != null">
|
|
|
|
|
#{companyId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
2023-12-22 14:52:51 +08:00
|
|
|
|
2024-01-16 20:06:21 +08:00
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.bonus.sgzb.app.domain.LeaseApplyDetails">
|
2023-12-13 19:29:50 +08:00
|
|
|
update lease_apply_details
|
|
|
|
|
<set>
|
|
|
|
|
<if test="preNum != null">
|
|
|
|
|
pre_num = #{preNum,jdbcType=FLOAT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="alNum != null">
|
|
|
|
|
al_num = #{alNum,jdbcType=FLOAT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="status != null and status != ''">
|
|
|
|
|
`status` = #{status,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateBy != null and updateBy != ''">
|
|
|
|
|
update_by = #{updateBy,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateTime != null">
|
|
|
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="remark != null and remark != ''">
|
|
|
|
|
remark = #{remark,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="companyId != null">
|
|
|
|
|
company_id = #{companyId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
</set>
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
</update>
|
2024-01-16 20:06:21 +08:00
|
|
|
<update id="updateByPrimaryKey" parameterType="com.bonus.sgzb.app.domain.LeaseApplyDetails">
|
2023-12-13 19:29:50 +08:00
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
update lease_apply_details
|
|
|
|
|
set parennt_id = #{parenntId,jdbcType=INTEGER},
|
|
|
|
|
type_id = #{typeId,jdbcType=INTEGER},
|
|
|
|
|
pre_num = #{preNum,jdbcType=FLOAT},
|
|
|
|
|
al_num = #{alNum,jdbcType=FLOAT},
|
|
|
|
|
`status` = #{status,jdbcType=VARCHAR},
|
|
|
|
|
create_by = #{createBy,jdbcType=VARCHAR},
|
|
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
update_by = #{updateBy,jdbcType=VARCHAR},
|
|
|
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
remark = #{remark,jdbcType=VARCHAR},
|
|
|
|
|
company_id = #{companyId,jdbcType=INTEGER}
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
</update>
|
|
|
|
|
<update id="updateBatch" parameterType="java.util.List">
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
update lease_apply_details
|
|
|
|
|
<trim prefix="set" suffixOverrides=",">
|
|
|
|
|
<trim prefix="parennt_id = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.parenntId,jdbcType=INTEGER}
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="type_id = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.typeId,jdbcType=INTEGER}
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="pre_num = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.preNum,jdbcType=FLOAT}
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="al_num = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.alNum,jdbcType=FLOAT}
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="`status` = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.status,jdbcType=VARCHAR}
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="create_by = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.createBy,jdbcType=VARCHAR}
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="create_time = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.createTime,jdbcType=TIMESTAMP}
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="update_by = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.updateBy,jdbcType=VARCHAR}
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="update_time = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="remark = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.remark,jdbcType=VARCHAR}
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="company_id = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.companyId,jdbcType=INTEGER}
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
</trim>
|
|
|
|
|
where id in
|
|
|
|
|
<foreach close=")" collection="list" item="item" open="(" separator=", ">
|
|
|
|
|
#{item.id,jdbcType=INTEGER}
|
|
|
|
|
</foreach>
|
|
|
|
|
</update>
|
|
|
|
|
<update id="updateBatchSelective" parameterType="java.util.List">
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
update lease_apply_details
|
|
|
|
|
<trim prefix="set" suffixOverrides=",">
|
|
|
|
|
<trim prefix="parennt_id = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
<if test="item.parenntId != null">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.parenntId,jdbcType=INTEGER}
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="type_id = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
<if test="item.typeId != null">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.typeId,jdbcType=INTEGER}
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="pre_num = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
<if test="item.preNum != null">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.preNum,jdbcType=FLOAT}
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="al_num = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
<if test="item.alNum != null">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.alNum,jdbcType=FLOAT}
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="`status` = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
<if test="item.status != null">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.status,jdbcType=VARCHAR}
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="create_by = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
<if test="item.createBy != null">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.createBy,jdbcType=VARCHAR}
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="create_time = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
<if test="item.createTime != null">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.createTime,jdbcType=TIMESTAMP}
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="update_by = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
<if test="item.updateBy != null">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.updateBy,jdbcType=VARCHAR}
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="update_time = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
<if test="item.updateTime != null">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="remark = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
<if test="item.remark != null">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.remark,jdbcType=VARCHAR}
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="company_id = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
<if test="item.companyId != null">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.companyId,jdbcType=INTEGER}
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
</trim>
|
|
|
|
|
where id in
|
|
|
|
|
<foreach close=")" collection="list" item="item" open="(" separator=", ">
|
|
|
|
|
#{item.id,jdbcType=INTEGER}
|
|
|
|
|
</foreach>
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
insert into lease_apply_details
|
|
|
|
|
(parennt_id, type_id, pre_num, al_num, `status`, create_by, create_time, update_by,
|
|
|
|
|
update_time, remark, company_id)
|
|
|
|
|
values
|
|
|
|
|
<foreach collection="list" item="item" separator=",">
|
|
|
|
|
(#{item.parenntId,jdbcType=INTEGER}, #{item.typeId,jdbcType=INTEGER}, #{item.preNum,jdbcType=FLOAT},
|
|
|
|
|
#{item.alNum,jdbcType=FLOAT}, #{item.status,jdbcType=VARCHAR}, #{item.createBy,jdbcType=VARCHAR},
|
2023-12-24 00:47:55 +08:00
|
|
|
NOW(), #{item.updateBy,jdbcType=VARCHAR}, NOW(),
|
2023-12-13 19:29:50 +08:00
|
|
|
#{item.remark,jdbcType=VARCHAR}, #{item.companyId,jdbcType=INTEGER})
|
|
|
|
|
</foreach>
|
|
|
|
|
</insert>
|
|
|
|
|
|
2024-01-16 20:06:21 +08:00
|
|
|
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.bonus.sgzb.app.domain.LeaseApplyDetails" useGeneratedKeys="true">
|
2023-12-13 19:29:50 +08:00
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
insert into lease_apply_details
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
id,
|
|
|
|
|
</if>
|
|
|
|
|
parennt_id,
|
|
|
|
|
type_id,
|
|
|
|
|
pre_num,
|
|
|
|
|
al_num,
|
|
|
|
|
`status`,
|
|
|
|
|
create_by,
|
|
|
|
|
create_time,
|
|
|
|
|
update_by,
|
|
|
|
|
update_time,
|
|
|
|
|
remark,
|
|
|
|
|
company_id,
|
|
|
|
|
</trim>
|
|
|
|
|
values
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
#{id,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
#{parenntId,jdbcType=INTEGER},
|
|
|
|
|
#{typeId,jdbcType=INTEGER},
|
|
|
|
|
#{preNum,jdbcType=FLOAT},
|
|
|
|
|
#{alNum,jdbcType=FLOAT},
|
|
|
|
|
#{status,jdbcType=VARCHAR},
|
|
|
|
|
#{createBy,jdbcType=VARCHAR},
|
|
|
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
#{updateBy,jdbcType=VARCHAR},
|
|
|
|
|
#{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
#{remark,jdbcType=VARCHAR},
|
|
|
|
|
#{companyId,jdbcType=INTEGER},
|
|
|
|
|
</trim>
|
|
|
|
|
on duplicate key update
|
|
|
|
|
<trim suffixOverrides=",">
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
id = #{id,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
parennt_id = #{parenntId,jdbcType=INTEGER},
|
|
|
|
|
type_id = #{typeId,jdbcType=INTEGER},
|
|
|
|
|
pre_num = #{preNum,jdbcType=FLOAT},
|
|
|
|
|
al_num = #{alNum,jdbcType=FLOAT},
|
|
|
|
|
`status` = #{status,jdbcType=VARCHAR},
|
|
|
|
|
create_by = #{createBy,jdbcType=VARCHAR},
|
|
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
update_by = #{updateBy,jdbcType=VARCHAR},
|
|
|
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
remark = #{remark,jdbcType=VARCHAR},
|
|
|
|
|
company_id = #{companyId,jdbcType=INTEGER},
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
2024-01-16 20:06:21 +08:00
|
|
|
<insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id" parameterType="com.bonus.sgzb.app.domain.LeaseApplyDetails" useGeneratedKeys="true">
|
2023-12-13 19:29:50 +08:00
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
insert into lease_apply_details
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="parenntId != null">
|
|
|
|
|
parennt_id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="typeId != null">
|
|
|
|
|
type_id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="preNum != null">
|
|
|
|
|
pre_num,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="alNum != null">
|
|
|
|
|
al_num,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="status != null and status != ''">
|
|
|
|
|
`status`,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''">
|
|
|
|
|
create_by,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createTime != null">
|
|
|
|
|
create_time,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateBy != null and updateBy != ''">
|
|
|
|
|
update_by,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateTime != null">
|
|
|
|
|
update_time,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="remark != null and remark != ''">
|
|
|
|
|
remark,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="companyId != null">
|
|
|
|
|
company_id,
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
values
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
#{id,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="parenntId != null">
|
|
|
|
|
#{parenntId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="typeId != null">
|
|
|
|
|
#{typeId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="preNum != null">
|
|
|
|
|
#{preNum,jdbcType=FLOAT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="alNum != null">
|
|
|
|
|
#{alNum,jdbcType=FLOAT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="status != null and status != ''">
|
|
|
|
|
#{status,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''">
|
|
|
|
|
#{createBy,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createTime != null">
|
|
|
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateBy != null and updateBy != ''">
|
|
|
|
|
#{updateBy,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateTime != null">
|
|
|
|
|
#{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="remark != null and remark != ''">
|
|
|
|
|
#{remark,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="parenntId != null">
|
|
|
|
|
parennt_id = #{parenntId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="typeId != null">
|
|
|
|
|
type_id = #{typeId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="preNum != null">
|
|
|
|
|
pre_num = #{preNum,jdbcType=FLOAT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="alNum != null">
|
|
|
|
|
al_num = #{alNum,jdbcType=FLOAT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="status != null and status != ''">
|
|
|
|
|
`status` = #{status,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''">
|
|
|
|
|
create_by = #{createBy,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createTime != null">
|
|
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateBy != null and updateBy != ''">
|
|
|
|
|
update_by = #{updateBy,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateTime != null">
|
|
|
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="remark != null and remark != ''">
|
|
|
|
|
remark = #{remark,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="companyId != null">
|
|
|
|
|
company_id = #{companyId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
</mapper>
|