优惠券+异常全局处理

This commit is contained in:
19991905653
2024-04-10 18:16:28 +08:00
parent 342d0d82e1
commit 3a90299b64
43 changed files with 1374 additions and 579 deletions

View File

@@ -55,7 +55,9 @@ ysk:
callBackIn: https://p40312246f.goho.co/cashierService/notify/memberInCallBack
default: 18710449883
server:
port: 9889
port: 9888
prod: dev1
queue: cart_queue_putdev1

View File

@@ -0,0 +1,63 @@
spring:
datasource:
url: jdbc:mysql://121.40.128.145:3306/fycashier?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useJDBCCompliantTimezoneShift=true&serverTimezone=Asia/Shanghai&useSSL=false
username: root
password: mysqlroot@123
driver-class-name: com.mysql.cj.jdbc.Driver
initialSize: 5
minIdle: 5
maxActive: 20
maxWait: 60000
logging:
level:
com.chaozhanggui.system.openness: info
redis:
# redis数据库索引默认为0我们使用索引为3的数据库避免和其他数据库冲突
database: 5
# redis服务器地址默认为localhost
host: 101.37.12.135
# redis端口默认为6379
port: 6379
# redis访问密码默认为空
password: 111111
# redis连接超时时间单位为毫秒
timeout: 1000
block-when-exhausted: true
# redis连接池配置
jedis:
pool:
max-active: 8
max-idle: 1024
min-idle: 0
max-wait: -1
main:
allow-circular-references: true
rabbitmq:
host: 101.37.12.135
port: 5672
username: admin
password: Czg666888
#分页配置
pagehelper:
supportMethodsArguments: true
reasonable: true
helperDialect: mysql
params: count=countSql
mybatis:
configuration:
map-underscore-to-camel-case: true
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
mapper-locations: classpath:mapper/*.xml
ysk:
url: https://gatewaytestapi.sxczgkj.cn/gate-service/
callBackurl: https://p40312246f.goho.co/cashierService/notify/notifyCallBack
callBackIn: https://p40312246f.goho.co/cashierService/notify/memberInCallBack
default: 18710449883
server:
port: 9889
prod: devyhq
queue: cart_queue_putdevyhq

View File

@@ -56,6 +56,8 @@ ysk:
callBackurl: https://cashier.sxczgkj.cn/cashierService/notify/notifyCallBack
callBackIn: https://cashier.sxczgkj.cn/cashierService/notify/memberInCallBack
default: 19191703856
prod: prod1
queue: cart_queue_putprod1

View File

@@ -56,6 +56,8 @@ ysk:
callBackurl: https://cashier.sxczgkj.cn/cashierService/notify/notifyCallBack
callBackIn: https://cashier.sxczgkj.cn/cashierService/notify/memberInCallBack
default: 19191703856
prod: prod2
queue: cart_queue_putprod2

View File

@@ -52,7 +52,7 @@
<!-- 要生成的表tableName是数据库中的表名或视图名 domainObjectName是实体类名-->
<!-- <table tableName="%" schema="fycashier" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" ></table>-->
<table tableName="tb_wining_user" domainObjectName="TbWiningUser"
<table tableName="tb_yhq_params" domainObjectName="TbYhqParams"
enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"
enableSelectByExample="false" selectByExampleQueryId="false" >
</table>

View File

@@ -552,4 +552,8 @@
<select id="selectByPayOrderNo" resultMap="BaseResultMap">
select * from tb_order_info where pay_order_no=#{payOrderNo}
</select>
<select id="selectByTradeDay" resultType="com.chaozhanggui.system.cashierservice.entity.TbOrderInfo">
select tio1.* from tb_order_info tio1 where not EXISTS (SELECT 1 FROM `tb_order_info` toi2 where toi2.order_type = 'return' and toi2.source = tio1.id)
and tio1.trade_day = #{day} and status = 'closed' and tio1.pay_amount &gt;= #{minPrice} and tio1.pay_amount &lt; #{maxPrice} and tio1.order_type = 'miniapp'
</select>
</mapper>

View File

@@ -0,0 +1,121 @@
<?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.TbReleaseFlowMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbReleaseFlow">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="user_id" jdbcType="VARCHAR" property="userId" />
<result column="num" jdbcType="DECIMAL" property="num" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="from_source" jdbcType="VARCHAR" property="fromSource" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
</resultMap>
<sql id="Base_Column_List">
id, user_id, num, type, remark, from_source, create_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_release_flow
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByUserId" resultType="com.chaozhanggui.system.cashierservice.entity.TbReleaseFlow"
parameterType="java.lang.String">
select * from tb_release_flow where user_id = #{userId}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_release_flow
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbReleaseFlow">
insert into tb_release_flow (id, user_id, num,
type, remark, from_source,
create_time)
values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=VARCHAR}, #{num,jdbcType=DECIMAL},
#{type,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{fromSource,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbReleaseFlow">
insert into tb_release_flow
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="num != null">
num,
</if>
<if test="type != null">
type,
</if>
<if test="remark != null">
remark,
</if>
<if test="fromSource != null">
from_source,
</if>
<if test="createTime != null">
create_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="userId != null">
#{userId,jdbcType=VARCHAR},
</if>
<if test="num != null">
#{num,jdbcType=DECIMAL},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="fromSource != null">
#{fromSource,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbReleaseFlow">
update tb_release_flow
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=VARCHAR},
</if>
<if test="num != null">
num = #{num,jdbcType=DECIMAL},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="fromSource != null">
from_source = #{fromSource,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbReleaseFlow">
update tb_release_flow
set user_id = #{userId,jdbcType=VARCHAR},
num = #{num,jdbcType=DECIMAL},
type = #{type,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
from_source = #{fromSource,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -45,6 +45,7 @@
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
<result column="proxy_id" jdbcType="VARCHAR" property="proxyId" />
<result column="is_open_yhq" jdbcType="VARCHAR" property="isOpenYhq" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbShopInfo">
<result column="view" jdbcType="LONGVARCHAR" property="view" />
@@ -55,7 +56,7 @@
detail, lat, lng, mch_id, register_type, is_wx_ma_independent, address, city, type,
industry, industry_name, business_time, post_time, post_amount_line, on_sale, settle_type,
settle_time, enter_at, expire_at, status, average, order_wait_pay_minute, support_device_number,
distribute_level, created_at, updated_at, proxy_id
distribute_level, created_at, updated_at, proxy_id,is_open_yhq
</sql>
<sql id="Blob_Column_List">
view

View File

@@ -7,12 +7,13 @@
<result column="coupons_price" jdbcType="DECIMAL" property="couponsPrice" />
<result column="coupons_amount" jdbcType="DECIMAL" property="couponsAmount" />
<result column="status" jdbcType="VARCHAR" property="status" />
<result column="type_name" jdbcType="VARCHAR" property="typeName" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
</resultMap>
<sql id="Base_Column_List">
id, name, coupons_price, coupons_amount, status, create_time, update_time, end_time
id, name, coupons_price, coupons_amount, status, create_time, update_time, end_time,type_name
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
@@ -21,7 +22,7 @@
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectAll" resultType="com.chaozhanggui.system.cashierservice.entity.TbSystemCoupons">
select * from tb_system_coupons where status = '0'
select * from tb_system_coupons where status = '0' and name = #{type}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_system_coupons
@@ -30,10 +31,10 @@
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbSystemCoupons">
insert into tb_system_coupons (id, name, coupons_price,
coupons_amount, status, create_time,
update_time, end_time)
update_time, end_time,type_name)
values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{couponsPrice,jdbcType=DECIMAL},
#{couponsAmount,jdbcType=DECIMAL}, #{status,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP})
#{updateTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, #{typeName,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbSystemCoupons">
insert into tb_system_coupons

View File

@@ -0,0 +1,97 @@
<?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.TbWiningParamsMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbWiningParams">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="min_price" jdbcType="DECIMAL" property="minPrice" />
<result column="max_price" jdbcType="DECIMAL" property="maxPrice" />
<result column="wining_num" jdbcType="INTEGER" property="winingNum" />
<result column="status" jdbcType="VARCHAR" property="status" />
<result column="wining_user_num" jdbcType="INTEGER" property="winingUserNum" />
</resultMap>
<sql id="Base_Column_List">
id, min_price, max_price, wining_num, wining_user_num,status
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_wining_params
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectAll" resultType="com.chaozhanggui.system.cashierservice.entity.TbWiningParams">
select * from tb_wining_params where status = 'true'
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_wining_params
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbWiningParams">
insert into tb_wining_params (id, min_price, max_price,
wining_num, wining_user_num)
values (#{id,jdbcType=INTEGER}, #{minPrice,jdbcType=DECIMAL}, #{maxPrice,jdbcType=DECIMAL},
#{winingNum,jdbcType=INTEGER}, #{winingUserNum,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbWiningParams">
insert into tb_wining_params
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="minPrice != null">
min_price,
</if>
<if test="maxPrice != null">
max_price,
</if>
<if test="winingNum != null">
wining_num,
</if>
<if test="winingUserNum != null">
wining_user_num,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="minPrice != null">
#{minPrice,jdbcType=DECIMAL},
</if>
<if test="maxPrice != null">
#{maxPrice,jdbcType=DECIMAL},
</if>
<if test="winingNum != null">
#{winingNum,jdbcType=INTEGER},
</if>
<if test="winingUserNum != null">
#{winingUserNum,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbWiningParams">
update tb_wining_params
<set>
<if test="minPrice != null">
min_price = #{minPrice,jdbcType=DECIMAL},
</if>
<if test="maxPrice != null">
max_price = #{maxPrice,jdbcType=DECIMAL},
</if>
<if test="winingNum != null">
wining_num = #{winingNum,jdbcType=INTEGER},
</if>
<if test="winingUserNum != null">
wining_user_num = #{winingUserNum,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbWiningParams">
update tb_wining_params
set min_price = #{minPrice,jdbcType=DECIMAL},
max_price = #{maxPrice,jdbcType=DECIMAL},
wining_num = #{winingNum,jdbcType=INTEGER},
wining_user_num = #{winingUserNum,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -7,11 +7,17 @@
<result column="order_no" jdbcType="VARCHAR" property="orderNo" />
<result column="order_amount" jdbcType="DECIMAL" property="orderAmount" />
<result column="is_user" jdbcType="VARCHAR" property="isUser" />
<result column="trade_day" jdbcType="VARCHAR" property="tradeDay" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="is_refund" jdbcType="VARCHAR" property="isRefund" />
<result column="refund_amount" jdbcType="DECIMAL" property="refundAmount" />
<result column="refund_no" jdbcType="VARCHAR" property="refundNo" />
<result column="refund_pay_type" jdbcType="VARCHAR" property="refundPayType" />
<result column="trade_day" jdbcType="VARCHAR" property="tradeDay" />
<result column="refund_time" jdbcType="TIMESTAMP" property="refundTime" />
</resultMap>
<sql id="Base_Column_List">
id, user_name, order_no, order_amount, is_user, create_time,trade_day
id, user_name, order_no, order_amount, is_user, create_time, is_refund, refund_amount,
refund_no, refund_pay_type, trade_day, refund_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
@@ -19,19 +25,20 @@
from tb_wining_user
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectAllByTrade" resultType="com.chaozhanggui.system.cashierservice.entity.TbWiningUser">
select * from tb_wining_user where trade_day = #{day}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_wining_user
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbWiningUser">
insert into tb_wining_user (id, user_name, order_no,
order_amount, is_user, create_time
order_amount, is_user, create_time,
is_refund, refund_amount, refund_no,
refund_pay_type, trade_day, refund_time
)
values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, #{orderNo,jdbcType=VARCHAR},
#{orderAmount,jdbcType=DECIMAL}, #{isUser,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
#{orderAmount,jdbcType=DECIMAL}, #{isUser,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{isRefund,jdbcType=VARCHAR}, #{refundAmount,jdbcType=DECIMAL}, #{refundNo,jdbcType=VARCHAR},
#{refundPayType,jdbcType=VARCHAR}, #{tradeDay,jdbcType=VARCHAR}, #{refundTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbWiningUser">
@@ -55,6 +62,24 @@
<if test="createTime != null">
create_time,
</if>
<if test="isRefund != null">
is_refund,
</if>
<if test="refundAmount != null">
refund_amount,
</if>
<if test="refundNo != null">
refund_no,
</if>
<if test="refundPayType != null">
refund_pay_type,
</if>
<if test="tradeDay != null">
trade_day,
</if>
<if test="refundTime != null">
refund_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@@ -75,6 +100,24 @@
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="isRefund != null">
#{isRefund,jdbcType=VARCHAR},
</if>
<if test="refundAmount != null">
#{refundAmount,jdbcType=DECIMAL},
</if>
<if test="refundNo != null">
#{refundNo,jdbcType=VARCHAR},
</if>
<if test="refundPayType != null">
#{refundPayType,jdbcType=VARCHAR},
</if>
<if test="tradeDay != null">
#{tradeDay,jdbcType=VARCHAR},
</if>
<if test="refundTime != null">
#{refundTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbWiningUser">
@@ -95,6 +138,24 @@
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="isRefund != null">
is_refund = #{isRefund,jdbcType=VARCHAR},
</if>
<if test="refundAmount != null">
refund_amount = #{refundAmount,jdbcType=DECIMAL},
</if>
<if test="refundNo != null">
refund_no = #{refundNo,jdbcType=VARCHAR},
</if>
<if test="refundPayType != null">
refund_pay_type = #{refundPayType,jdbcType=VARCHAR},
</if>
<if test="tradeDay != null">
trade_day = #{tradeDay,jdbcType=VARCHAR},
</if>
<if test="refundTime != null">
refund_time = #{refundTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
@@ -104,7 +165,16 @@
order_no = #{orderNo,jdbcType=VARCHAR},
order_amount = #{orderAmount,jdbcType=DECIMAL},
is_user = #{isUser,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP}
create_time = #{createTime,jdbcType=TIMESTAMP},
is_refund = #{isRefund,jdbcType=VARCHAR},
refund_amount = #{refundAmount,jdbcType=DECIMAL},
refund_no = #{refundNo,jdbcType=VARCHAR},
refund_pay_type = #{refundPayType,jdbcType=VARCHAR},
trade_day = #{tradeDay,jdbcType=VARCHAR},
refund_time = #{refundTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectAllByTrade" resultType="com.chaozhanggui.system.cashierservice.entity.TbWiningUser">
select * from tb_wining_user where trade_day = #{day}
</select>
</mapper>

View 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>