优惠券+异常全局处理
This commit is contained in:
96
src/main/resources/mapper/TbYhqParamsMapper.xml
Normal file
96
src/main/resources/mapper/TbYhqParamsMapper.xml
Normal file
@@ -0,0 +1,96 @@
|
||||
<?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.TbYhqParamsMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbYhqParams">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="min_price" jdbcType="DECIMAL" property="minPrice" />
|
||||
<result column="max_price" jdbcType="DECIMAL" property="maxPrice" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, name, min_price, max_price, status
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tb_yhq_params
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<select id="selectAll" resultType="com.chaozhanggui.system.cashierservice.entity.TbYhqParams">
|
||||
select * from tb_yhq_params where status = '1' order by id asc
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from tb_yhq_params
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbYhqParams">
|
||||
insert into tb_yhq_params (id, name, min_price,
|
||||
max_price, status)
|
||||
values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{minPrice,jdbcType=DECIMAL},
|
||||
#{maxPrice,jdbcType=DECIMAL}, #{status,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbYhqParams">
|
||||
insert into tb_yhq_params
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="minPrice != null">
|
||||
min_price,
|
||||
</if>
|
||||
<if test="maxPrice != null">
|
||||
max_price,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</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="minPrice != null">
|
||||
#{minPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="maxPrice != null">
|
||||
#{maxPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbYhqParams">
|
||||
update tb_yhq_params
|
||||
<set>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="minPrice != null">
|
||||
min_price = #{minPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="maxPrice != null">
|
||||
max_price = #{maxPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbYhqParams">
|
||||
update tb_yhq_params
|
||||
set name = #{name,jdbcType=VARCHAR},
|
||||
min_price = #{minPrice,jdbcType=DECIMAL},
|
||||
max_price = #{maxPrice,jdbcType=DECIMAL},
|
||||
status = #{status,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user