|
|
|
@ -13,13 +13,6 @@
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
id, code, `action`, `name`
|
|
|
|
|
</sql>
|
|
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
select
|
|
|
|
|
<include refid="Base_Column_List"/>
|
|
|
|
|
from auth_warehouse_bustype
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
</select>
|
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
delete
|
|
|
|
@ -27,194 +20,6 @@
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id"
|
|
|
|
|
parameterType="com.glxp.api.entity.auth.WarehouseBussinessTypeEntity" useGeneratedKeys="true">
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
insert into auth_warehouse_bustype
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="code != null">
|
|
|
|
|
code,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="action != null">
|
|
|
|
|
`action`,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="name != null">
|
|
|
|
|
`name`,
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="code != null">
|
|
|
|
|
#{code,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="action != null">
|
|
|
|
|
#{action,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="name != null">
|
|
|
|
|
#{name,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
<update id="updateByPrimaryKeySelective"
|
|
|
|
|
parameterType="com.glxp.api.entity.auth.WarehouseBussinessTypeEntity">
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
update auth_warehouse_bustype
|
|
|
|
|
<set>
|
|
|
|
|
<if test="code != null">
|
|
|
|
|
code = #{code,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="action != null">
|
|
|
|
|
`action` = #{action,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="name != null">
|
|
|
|
|
`name` = #{name,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
</set>
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
</update>
|
|
|
|
|
<update id="updateByPrimaryKey" parameterType="com.glxp.api.entity.auth.WarehouseBussinessTypeEntity">
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
update auth_warehouse_bustype
|
|
|
|
|
set code = #{code,jdbcType=VARCHAR},
|
|
|
|
|
`action` = #{action,jdbcType=VARCHAR},
|
|
|
|
|
`name` = #{name,jdbcType=VARCHAR}
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
</update>
|
|
|
|
|
<update id="updateBatch" parameterType="java.util.List">
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
update auth_warehouse_bustype
|
|
|
|
|
<trim prefix="set" suffixOverrides=",">
|
|
|
|
|
<trim prefix="code = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.code,jdbcType=VARCHAR}
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="`action` = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.action,jdbcType=VARCHAR}
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="`name` = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.name,jdbcType=VARCHAR}
|
|
|
|
|
</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 auth_warehouse_bustype
|
|
|
|
|
<trim prefix="set" suffixOverrides=",">
|
|
|
|
|
<trim prefix="code = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
<if test="item.code != null">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.code,jdbcType=VARCHAR}
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="`action` = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
<if test="item.action != null">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.action,jdbcType=VARCHAR}
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="`name` = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
<if test="item.name != null">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.name,jdbcType=VARCHAR}
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
</trim>
|
|
|
|
|
where id in
|
|
|
|
|
<foreach close=")" collection="list" item="item" open="(" separator=", ">
|
|
|
|
|
#{item.id,jdbcType=INTEGER}
|
|
|
|
|
</foreach>
|
|
|
|
|
</update>
|
|
|
|
|
<insert id="insertOrUpdateEntity" keyColumn="id" keyProperty="id"
|
|
|
|
|
parameterType="com.glxp.api.entity.auth.WarehouseBussinessTypeEntity" useGeneratedKeys="true">
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
insert into auth_warehouse_bustype
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
id,
|
|
|
|
|
</if>
|
|
|
|
|
code,
|
|
|
|
|
`action`,
|
|
|
|
|
`name`,
|
|
|
|
|
</trim>
|
|
|
|
|
values
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
#{id,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
#{code,jdbcType=VARCHAR},
|
|
|
|
|
#{action,jdbcType=VARCHAR},
|
|
|
|
|
#{name,jdbcType=VARCHAR},
|
|
|
|
|
</trim>
|
|
|
|
|
on duplicate key update
|
|
|
|
|
<trim suffixOverrides=",">
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
id = #{id,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
code = #{code,jdbcType=VARCHAR},
|
|
|
|
|
`action` = #{action,jdbcType=VARCHAR},
|
|
|
|
|
`name` = #{name,jdbcType=VARCHAR},
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
<insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id"
|
|
|
|
|
parameterType="com.glxp.api.entity.auth.WarehouseBussinessTypeEntity" useGeneratedKeys="true">
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
insert into auth_warehouse_bustype
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="code != null">
|
|
|
|
|
code,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="action != null">
|
|
|
|
|
`action`,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="name != null">
|
|
|
|
|
`name`,
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
values
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
#{id,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="code != null">
|
|
|
|
|
#{code,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="action != null">
|
|
|
|
|
#{action,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="name != null">
|
|
|
|
|
#{name,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
on duplicate key update
|
|
|
|
|
<trim suffixOverrides=",">
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
id = #{id,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="code != null">
|
|
|
|
|
code = #{code,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="action != null">
|
|
|
|
|
`action` = #{action,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="name != null">
|
|
|
|
|
`name` = #{name,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<select id="selectListByCode" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
|
|
select auth_warehouse_bustype.id,
|
|
|
|
@ -263,15 +68,6 @@
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectListByAction" resultMap="BaseResultMap">
|
|
|
|
|
select auth_warehouse_bustype.id,
|
|
|
|
|
auth_warehouse_bustype.code,
|
|
|
|
|
auth_warehouse_bustype.action,
|
|
|
|
|
basic_bussiness_type.name
|
|
|
|
|
from auth_warehouse_bustype
|
|
|
|
|
inner join basic_bussiness_type on auth_warehouse_bustype.action = basic_bussiness_type.action
|
|
|
|
|
where code = #{code}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<delete id="deleteByCode">
|
|
|
|
|