提交
This commit is contained in:
153
src/main/resources/mapper/TbShopUnitMapper.xml
Normal file
153
src/main/resources/mapper/TbShopUnitMapper.xml
Normal file
@@ -0,0 +1,153 @@
|
||||
<?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.chaozhanggui.system.cashierservice.dao.TbShopUnitMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbShopUnit">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="decimals_digits" jdbcType="INTEGER" property="decimalsDigits" />
|
||||
<result column="unit_type" jdbcType="VARCHAR" property="unitType" />
|
||||
<result column="is_system" jdbcType="TINYINT" property="isSystem" />
|
||||
<result column="status" jdbcType="TINYINT" property="status" />
|
||||
<result column="merchant_id" jdbcType="VARCHAR" property="merchantId" />
|
||||
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
|
||||
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
|
||||
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, name, decimals_digits, unit_type, is_system, status, merchant_id, shop_id, created_at,
|
||||
updated_at
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tb_shop_unit
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from tb_shop_unit
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUnit">
|
||||
insert into tb_shop_unit (id, name, decimals_digits,
|
||||
unit_type, is_system, status,
|
||||
merchant_id, shop_id, created_at,
|
||||
updated_at)
|
||||
values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{decimalsDigits,jdbcType=INTEGER},
|
||||
#{unitType,jdbcType=VARCHAR}, #{isSystem,jdbcType=TINYINT}, #{status,jdbcType=TINYINT},
|
||||
#{merchantId,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR}, #{createdAt,jdbcType=BIGINT},
|
||||
#{updatedAt,jdbcType=BIGINT})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUnit">
|
||||
insert into tb_shop_unit
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="decimalsDigits != null">
|
||||
decimals_digits,
|
||||
</if>
|
||||
<if test="unitType != null">
|
||||
unit_type,
|
||||
</if>
|
||||
<if test="isSystem != null">
|
||||
is_system,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="merchantId != null">
|
||||
merchant_id,
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
shop_id,
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at,
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="decimalsDigits != null">
|
||||
#{decimalsDigits,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="unitType != null">
|
||||
#{unitType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isSystem != null">
|
||||
#{isSystem,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="merchantId != null">
|
||||
#{merchantId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
#{shopId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
#{createdAt,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
#{updatedAt,jdbcType=BIGINT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUnit">
|
||||
update tb_shop_unit
|
||||
<set>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="decimalsDigits != null">
|
||||
decimals_digits = #{decimalsDigits,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="unitType != null">
|
||||
unit_type = #{unitType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isSystem != null">
|
||||
is_system = #{isSystem,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="merchantId != null">
|
||||
merchant_id = #{merchantId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
shop_id = #{shopId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at = #{createdAt,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at = #{updatedAt,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUnit">
|
||||
update tb_shop_unit
|
||||
set name = #{name,jdbcType=VARCHAR},
|
||||
decimals_digits = #{decimalsDigits,jdbcType=INTEGER},
|
||||
unit_type = #{unitType,jdbcType=VARCHAR},
|
||||
is_system = #{isSystem,jdbcType=TINYINT},
|
||||
status = #{status,jdbcType=TINYINT},
|
||||
merchant_id = #{merchantId,jdbcType=VARCHAR},
|
||||
shop_id = #{shopId,jdbcType=VARCHAR},
|
||||
created_at = #{createdAt,jdbcType=BIGINT},
|
||||
updated_at = #{updatedAt,jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user