新建分支
This commit is contained in:
71
src/main/resources/mapper/TbParamsMapper.xml
Normal file
71
src/main/resources/mapper/TbParamsMapper.xml
Normal file
@@ -0,0 +1,71 @@
|
||||
<?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.TbParamsMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbParams">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="integral_ratio" jdbcType="DECIMAL" property="integralRatio" />
|
||||
<result column="trade_ratio" jdbcType="DECIMAL" property="tradeRatio" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, integral_ratio, trade_ratio
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tb_params
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from tb_params
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbParams">
|
||||
insert into tb_params (id, integral_ratio, trade_ratio
|
||||
)
|
||||
values (#{id,jdbcType=INTEGER}, #{integralRatio,jdbcType=DECIMAL}, #{tradeRatio,jdbcType=DECIMAL}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbParams">
|
||||
insert into tb_params
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="integralRatio != null">
|
||||
integral_ratio,
|
||||
</if>
|
||||
<if test="tradeRatio != null">
|
||||
trade_ratio,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="integralRatio != null">
|
||||
#{integralRatio,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="tradeRatio != null">
|
||||
#{tradeRatio,jdbcType=DECIMAL},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbParams">
|
||||
update tb_params
|
||||
<set>
|
||||
<if test="integralRatio != null">
|
||||
integral_ratio = #{integralRatio,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="tradeRatio != null">
|
||||
trade_ratio = #{tradeRatio,jdbcType=DECIMAL},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbParams">
|
||||
update tb_params
|
||||
set integral_ratio = #{integralRatio,jdbcType=DECIMAL},
|
||||
trade_ratio = #{tradeRatio,jdbcType=DECIMAL}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user