Merge branch 'lyf'

This commit is contained in:
2024-06-26 09:35:50 +08:00
235 changed files with 13604 additions and 4510 deletions

View File

@@ -1,8 +1,11 @@
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
# 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
url: jdbc:mysql://101.37.12.135:3306/fycashier?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useJDBCCompliantTimezoneShift=true&serverTimezone=Asia/Shanghai&useSSL=false&allowMultiQueries=true
username: fycashier
password: Twc6MrzzjBiWSsjh
driver-class-name: com.mysql.cj.jdbc.Driver
initialSize: 5
minIdle: 5
@@ -13,7 +16,7 @@ spring:
com.chaozhanggui.system.openness: info
redis:
# redis数据库索引默认为0我们使用索引为3的数据库避免和其他数据库冲突
database: 5
database: 0
# redis服务器地址默认为localhost
host: 101.37.12.135
# redis端口默认为6379
@@ -52,8 +55,16 @@ mybatis:
ysk:
url: https://gatewaytestapi.sxczgkj.cn/gate-service/
callBackurl: https://p40312246f.goho.co/cashierService/notify/notifyCallBack
callBackGroupurl: https://wxcashiertest.sxczgkj.cn/cashierService/notify/notifyCallBackGroup
callBackIn: https://p40312246f.goho.co/cashierService/notify/memberInCallBack
default: 18710449883
thirdPay:
callInBack: https://wxcashiertest.sxczgkj.cn/cashierService/notify/fstmemberInCallBack
callFSTBack: https://wxcashiertest.sxczgkj.cn/cashierService/notify/notifyfstCallBack
server:
port: 9888
prod: dev1
queue: cart_queue_putdev1

View File

@@ -0,0 +1,67 @@
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: 0
# 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
callBackGroupurl: https://wxcashiertest.sxczgkj.cn/cashierService/notify/notifyCallBackGroup
callBackIn: https://p40312246f.goho.co/cashierService/notify/memberInCallBack
default: 18710449883
thirdPay:
callInBack: https://wxcashiertest.sxczgkj.cn/cashierService/notify/fstmemberInCallBack
callFSTBack: https://wxcashiertest.sxczgkj.cn/cashierService/notify/notifyfstCallBack
server:
port: 9889
prod: devyhq
queue: cart_queue_putdevyhq

View File

@@ -1,3 +1,5 @@
server:
port: 9888
spring:
datasource:
url: jdbc:mysql://rm-bp1b572nblln4jho2po.mysql.rds.aliyuncs.com/fycashier?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useJDBCCompliantTimezoneShift=true&serverTimezone=Asia/Shanghai&useSSL=false
@@ -13,7 +15,7 @@ spring:
com.chaozhanggui.system.openness: info
redis:
# redis数据库索引默认为0我们使用索引为3的数据库避免和其他数据库冲突
database: 5
database: 0
# redis服务器地址默认为localhost
host: 101.37.12.135
# redis端口默认为6379
@@ -52,6 +54,7 @@ mybatis:
ysk:
url: https://gatewaytestapi.sxczgkj.cn/gate-service/
callBackurl: https://p40312246f.goho.co/cashierService/notify/notifyCallBack
callBackGroupurl: https://p40312246f.goho.co/cashierService/notify/notifyCallBackGroup
callBackIn: https://p40312246f.goho.co/cashierService/notify/memberInCallBack
default: 18710449883

View File

@@ -54,8 +54,14 @@ mybatis:
ysk:
url: https://gateway.api.sxczgkj.cn/gate-service/
callBackurl: https://cashier.sxczgkj.cn/cashierService/notify/notifyCallBack
callBackGroupurl: https://cashier.sxczgkj.cn/cashierService/notify/notifyCallBackGroup
callBackIn: https://cashier.sxczgkj.cn/cashierService/notify/memberInCallBack
default: 19191703856
thirdPay:
callInBack: https://cashier.sxczgkj.cn${server.servlet.context-path}notify/fstmemberInCallBack
callFSTBack: https://cashier.sxczgkj.cn${server.servlet.context-path}notify/notifyfstCallBack
prod: prod1
queue: cart_queue_putprod1

View File

@@ -1,5 +1,5 @@
server:
port: 9888
port: 9889
spring:
datasource:
url: jdbc:mysql://rm-bp1b572nblln4jho2.mysql.rds.aliyuncs.com/fycashier?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useJDBCCompliantTimezoneShift=true&serverTimezone=Asia/Shanghai&useSSL=false
@@ -54,8 +54,14 @@ mybatis:
ysk:
url: https://gatewaytestapi.sxczgkj.cn/gate-service/
callBackurl: https://cashier.sxczgkj.cn/cashierService/notify/notifyCallBack
callBackGroupurl: https://cashier.sxczgkj.cn/cashierService/notify/notifyCallBackGroup
callBackIn: https://cashier.sxczgkj.cn/cashierService/notify/memberInCallBack
default: 19191703856
thirdPay:
callInBack: https://cashier.sxczgkj.cn${server.servlet.context-path}notify/fstmemberInCallBack
callFSTBack: https://cashier.sxczgkj.cn${server.servlet.context-path}notify/notifyfstCallBack
prod: prod2
queue: cart_queue_putprod2

View File

@@ -13,7 +13,7 @@ spring:
com.chaozhanggui.system.openness: info
redis:
# redis数据库索引默认为0我们使用索引为3的数据库避免和其他数据库冲突
database: 5
database: 0
# redis服务器地址默认为localhost
host: 101.37.12.135
# redis端口默认为6379
@@ -52,6 +52,7 @@ mybatis:
ysk:
url: https://gatewaytestapi.sxczgkj.cn/gate-service/
callBackurl: https://cashierapplet.sxczgkj.cn/cashierService/notify/notifyCallBack
callBackGroupurl: https://cashierapplet.sxczgkj.cn/cashierService/notify/notifyCallBackGroup
callBackIn: https://cashierapplet.sxczgkj.cn/cashierService/notify/memberInCallBack
default: 18710449883

View File

@@ -1,5 +1,5 @@
server:
port: 9889
# port: 9889
servlet:
context-path: /cashierService/
wx:
@@ -10,6 +10,11 @@ wx:
custom:
appId: wxd88fffa983758a30
secrete: a34a61adc0602118b49400baa8812454
# appId: wxc2bb94c0ddda1032
# secrete: 5fe6b30f688ae461561250ed3e3db35b
# 卓尔
# appId: wx0dcea6001b0a8fb4
# secrete: ba42423cce61f93f02519ff3030ceb1c
#
spring:
profiles:
@@ -20,6 +25,16 @@ websocket:
thread:
boss: 12
work: 12
netty:
server:
port: 9999
client-port: 9998
# 接收者的线程数
parent-group-threads: 10
# 客户端的线程数
child-group-threads: 10
logging:
level:
# web日志
@@ -50,4 +65,11 @@ logging:
#阿里云相关配置
aliyun:
keyid: LTAI5tPdEfYSZcqHbjCrtPRD
keysecret: DZjyHBq3nTujF0NMLxnZgsecU8ZCvy
keysecret: DZjyHBq3nTujF0NMLxnZgsecU8ZCvy
oss:
bucketname: cashier-oss
endpoint: oss-cn-beijing.aliyuncs.com
thirdPay:
payType: fushangtong
url: https://paymentapi.sxczgkj.cn

View File

@@ -19,8 +19,8 @@
<!-- 数据库链接URL、用户名、密码 -->
<jdbcConnection connectionURL="jdbc:mysql://121.40.128.145:3306/fycashier?useUnicode=true&amp;characterEncoding=utf-8&amp;useSSL=false&amp;serverTimezone=GMT%2B8"
driverClass="com.mysql.cj.jdbc.Driver" password="mysqlroot@123" userId="root" >
<jdbcConnection connectionURL="jdbc:mysql://101.37.12.135:3306/fycashier?useUnicode=true&amp;characterEncoding=utf-8&amp;useSSL=false&amp;serverTimezone=GMT%2B8"
driverClass="com.mysql.cj.jdbc.Driver" password="Twc6MrzzjBiWSsjh" userId="fycashier" >
<property name="nullCatalogMeansCurrent" value="true"/>
</jdbcConnection>
@@ -52,13 +52,11 @@
<!-- 要生成的表tableName是数据库中的表名或视图名 domainObjectName是实体类名-->
<!-- <table tableName="%" schema="fycashier" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" ></table>-->
<table tableName="tb_token" domainObjectName="TbToken"
<table tableName="tb_shop_user_flow" domainObjectName="TbShopUserFlow"
enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"
enableSelectByExample="false" selectByExampleQueryId="false" >
</table>
</context>
</generatorConfiguration>

View File

@@ -1,155 +0,0 @@
<?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.SysDictDetailMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.SysDictDetail">
<id column="detail_id" jdbcType="BIGINT" property="detailId" />
<result column="dict_id" jdbcType="BIGINT" property="dictId" />
<result column="label" jdbcType="VARCHAR" property="label" />
<result column="value" jdbcType="VARCHAR" property="value" />
<result column="dict_sort" jdbcType="INTEGER" property="dictSort" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
detail_id, dict_id, label, value, dict_sort, create_by, update_by, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from sys_dict_detail
where detail_id = #{detailId,jdbcType=BIGINT}
</select>
<select id="selectByAll" resultType="com.chaozhanggui.system.cashierservice.entity.SysDict">
select * from sys_dict
</select>
<select id="selectByAllDetail" resultType="com.chaozhanggui.system.cashierservice.entity.SysDictDetail">
select * from sys_dict_detail
where dict_id IN
<foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</select>
<select id="selectByDictId" resultType="com.chaozhanggui.system.cashierservice.entity.SysDictDetail">
select * from sys_dict_detail
where dict_id = #{dictId}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from sys_dict_detail
where detail_id = #{detailId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.SysDictDetail">
insert into sys_dict_detail (detail_id, dict_id, label,
value, dict_sort, create_by,
update_by, create_time, update_time
)
values (#{detailId,jdbcType=BIGINT}, #{dictId,jdbcType=BIGINT}, #{label,jdbcType=VARCHAR},
#{value,jdbcType=VARCHAR}, #{dictSort,jdbcType=INTEGER}, #{createBy,jdbcType=VARCHAR},
#{updateBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.SysDictDetail">
insert into sys_dict_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="detailId != null">
detail_id,
</if>
<if test="dictId != null">
dict_id,
</if>
<if test="label != null">
label,
</if>
<if test="value != null">
value,
</if>
<if test="dictSort != null">
dict_sort,
</if>
<if test="createBy != null">
create_by,
</if>
<if test="updateBy != null">
update_by,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="detailId != null">
#{detailId,jdbcType=BIGINT},
</if>
<if test="dictId != null">
#{dictId,jdbcType=BIGINT},
</if>
<if test="label != null">
#{label,jdbcType=VARCHAR},
</if>
<if test="value != null">
#{value,jdbcType=VARCHAR},
</if>
<if test="dictSort != null">
#{dictSort,jdbcType=INTEGER},
</if>
<if test="createBy != null">
#{createBy,jdbcType=VARCHAR},
</if>
<if test="updateBy != null">
#{updateBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.SysDictDetail">
update sys_dict_detail
<set>
<if test="dictId != null">
dict_id = #{dictId,jdbcType=BIGINT},
</if>
<if test="label != null">
label = #{label,jdbcType=VARCHAR},
</if>
<if test="value != null">
value = #{value,jdbcType=VARCHAR},
</if>
<if test="dictSort != null">
dict_sort = #{dictSort,jdbcType=INTEGER},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="updateBy != null">
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where detail_id = #{detailId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.SysDictDetail">
update sys_dict_detail
set dict_id = #{dictId,jdbcType=BIGINT},
label = #{label,jdbcType=VARCHAR},
value = #{value,jdbcType=VARCHAR},
dict_sort = #{dictSort,jdbcType=INTEGER},
create_by = #{createBy,jdbcType=VARCHAR},
update_by = #{updateBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where detail_id = #{detailId,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -1,117 +1,48 @@
<?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.SysDictMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.SysDict">
<id column="dict_id" jdbcType="BIGINT" property="dictId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
dict_id, name, description, create_by, update_by, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from sys_dict
where dict_id = #{dictId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from sys_dict
where dict_id = #{dictId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.SysDict">
insert into sys_dict (dict_id, name, description,
create_by, update_by, create_time,
update_time)
values (#{dictId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
#{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.SysDict">
insert into sys_dict
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="dictId != null">
dict_id,
</if>
<if test="name != null">
name,
</if>
<if test="description != null">
description,
</if>
<if test="createBy != null">
create_by,
</if>
<if test="updateBy != null">
update_by,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="dictId != null">
#{dictId,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="createBy != null">
#{createBy,jdbcType=VARCHAR},
</if>
<if test="updateBy != null">
#{updateBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.SysDict">
update sys_dict
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="updateBy != null">
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where dict_id = #{dictId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.SysDict">
update sys_dict
set name = #{name,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
create_by = #{createBy,jdbcType=VARCHAR},
update_by = #{updateBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where dict_id = #{dictId,jdbcType=BIGINT}
</update>
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.SysDict">
<id column="dict_id" jdbcType="BIGINT" property="dictId"/>
<result column="dict_name" jdbcType="VARCHAR" property="dictName"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
<result column="value" jdbcType="VARCHAR" property="value"/>
<result column="is_child" jdbcType="INTEGER" property="isChild"/>
</resultMap>
<sql id="Base_Column_List">
dict_id
, dict_name , name, value, is_child
</sql>
<sql id="Child_Column_List">
dict_id
, dict_name , name, value
</sql>
<select id="selectHot" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_dict
where type = 'hot'
and status =1
order by sort
</select>
<select id="selectByType" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_dict
where type = 'common'
<if test="type != null and type !=''">
or type = #{type}
</if>
and status =1
order by sort
</select>
<select id="selectByDictId" resultMap="BaseResultMap">
select
<include refid="Child_Column_List"/>
from sys_dict
where rele_id = #{dictId} and status =1
order by sort
</select>
</mapper>

View File

@@ -0,0 +1,40 @@
<?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.TagProductDeptsMapper">
<select id="queryTagAndProduct" resultType="com.chaozhanggui.system.cashierservice.entity.vo.TagProductVO">
SELECT
depts.product_id AS productId,
dict.share_img AS shareImg,
dict.name AS name,
dict.font_color AS fontColor,
dict.back_color AS backColor
FROM
tag_product_depts AS depts
LEFT JOIN tb_platform_dict AS dict ON dict.id = depts.tag_id
WHERE
dict.type='proTag' AND
depts.product_id IN
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
order by dict.sort
</select>
<select id="queryTagByProductId" resultType="com.chaozhanggui.system.cashierservice.entity.vo.TagProductVO">
SELECT
depts.product_id AS productId,
dict.share_img AS shareImg,
dict.name AS name,
dict.font_color AS fontColor,
dict.back_color AS backColor
FROM
tag_product_depts AS depts
LEFT JOIN tb_platform_dict AS dict ON dict.id = depts.tag_id
WHERE
depts.product_id=#{productId}
ORDER BY dict.sort
</select>
</mapper>

View File

@@ -0,0 +1,125 @@
<?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.TbActivateMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbActivate">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="shop_id" jdbcType="INTEGER" property="shopId" />
<result column="min_num" jdbcType="INTEGER" property="minNum" />
<result column="max_num" jdbcType="INTEGER" property="maxNum" />
<result column="handsel_num" jdbcType="DECIMAL" property="handselNum" />
<result column="handsel_type" jdbcType="VARCHAR" property="handselType" />
<result column="is_del" jdbcType="VARCHAR" property="isDel" />
</resultMap>
<sql id="Base_Column_List">
id, shop_id, min_num, max_num, handsel_num, handsel_type, is_del
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_activate
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_activate
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbActivate">
insert into tb_activate (id, shop_id, min_num,
max_num, handsel_num, handsel_type,
is_del)
values (#{id,jdbcType=INTEGER}, #{shopId,jdbcType=INTEGER}, #{minNum,jdbcType=INTEGER},
#{maxNum,jdbcType=INTEGER}, #{handselNum,jdbcType=DECIMAL}, #{handselType,jdbcType=VARCHAR},
#{isDel,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbActivate">
insert into tb_activate
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="minNum != null">
min_num,
</if>
<if test="maxNum != null">
max_num,
</if>
<if test="handselNum != null">
handsel_num,
</if>
<if test="handselType != null">
handsel_type,
</if>
<if test="isDel != null">
is_del,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="shopId != null">
#{shopId,jdbcType=INTEGER},
</if>
<if test="minNum != null">
#{minNum,jdbcType=INTEGER},
</if>
<if test="maxNum != null">
#{maxNum,jdbcType=INTEGER},
</if>
<if test="handselNum != null">
#{handselNum,jdbcType=DECIMAL},
</if>
<if test="handselType != null">
#{handselType,jdbcType=VARCHAR},
</if>
<if test="isDel != null">
#{isDel,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbActivate">
update tb_activate
<set>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=INTEGER},
</if>
<if test="minNum != null">
min_num = #{minNum,jdbcType=INTEGER},
</if>
<if test="maxNum != null">
max_num = #{maxNum,jdbcType=INTEGER},
</if>
<if test="handselNum != null">
handsel_num = #{handselNum,jdbcType=DECIMAL},
</if>
<if test="handselType != null">
handsel_type = #{handselType,jdbcType=VARCHAR},
</if>
<if test="isDel != null">
is_del = #{isDel,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbActivate">
update tb_activate
set shop_id = #{shopId,jdbcType=INTEGER},
min_num = #{minNum,jdbcType=INTEGER},
max_num = #{maxNum,jdbcType=INTEGER},
handsel_num = #{handselNum,jdbcType=DECIMAL},
handsel_type = #{handselType,jdbcType=VARCHAR},
is_del = #{isDel,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByAmount" resultMap="BaseResultMap">
select * from tb_activate where shop_id=#{shopId} and is_del=0 and min_num &lt;= #{amount} and max_num &gt;= #{amount}
</select>
<select id="selectByShpopId" resultMap="BaseResultMap">
select * from tb_activate where shop_id=#{shopId}
</select>
</mapper>

View File

@@ -32,12 +32,12 @@
<result column="is_gift" jdbcType="VARCHAR" property="isGift"/>
<result column="pending_at" jdbcType="BIGINT" property="pendingAt"/>
<result column="uuid" jdbcType="VARCHAR" property="uuid"/>
<result column="sku_id" jdbcType="VARCHAR" property="skuName"/>
<result column="sku_name" jdbcType="VARCHAR" property="skuName"/>
</resultMap>
<sql id="Base_Column_List">
id, master_id, order_id, ref_order_id, total_amount, product_id, cover_img, is_sku,pack_fee,is_pack,is_gift,pending_at,
sku_id, name, sale_price, number, total_number, refund_number, category_id, status,
type, merchant_id, shop_id, created_at, updated_at, user_id, table_id,pack_fee,trade_day,uuid,,sku_name
type, merchant_id, shop_id, created_at, updated_at, user_id, table_id,pack_fee,trade_day,uuid,sku_name
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
@@ -46,6 +46,11 @@
from tb_cashier_cart
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByShopIdAndTableId" resultType="com.chaozhanggui.system.cashierservice.entity.TbCashierCart">
select
<include refid="Base_Column_List"/>
from tb_cashier_cart where shop_id = #{shopId} and table_id = #{tableId} and status='create'
</select>
<select id="selectALlByMasterId" resultType="com.chaozhanggui.system.cashierservice.entity.TbCashierCart">
select
<include refid="Base_Column_List"/>
@@ -98,7 +103,7 @@
name, sale_price, number,
total_number, refund_number, category_id,
status, type, merchant_id,
shop_id, created_at, updated_at, pack_fee,trade_day,is_pack,is_gift,table_id,user_id
shop_id, created_at, updated_at, pack_fee,trade_day,is_pack,is_gift,table_id,user_id,sku_name
)
values (#{id,jdbcType=INTEGER}, #{masterId,jdbcType=VARCHAR}, #{orderId,jdbcType=VARCHAR},
#{refOrderId,jdbcType=VARCHAR}, #{totalAmount,jdbcType=DECIMAL}, #{productId,jdbcType=VARCHAR},
@@ -107,7 +112,7 @@
#{totalNumber,jdbcType=REAL}, #{refundNumber,jdbcType=REAL}, #{categoryId,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR}, #{type,jdbcType=TINYINT}, #{merchantId,jdbcType=VARCHAR},
#{shopId,jdbcType=VARCHAR}, #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{packFee,jdbcType=DECIMAL}
, #{tradeDay,jdbcType=VARCHAR}, #{isPack,jdbcType=VARCHAR}, #{isGift,jdbcType=VARCHAR}, #{tableId,jdbcType=VARCHAR}, #{userId,jdbcType=INTEGER}
, #{tradeDay,jdbcType=VARCHAR}, #{isPack,jdbcType=VARCHAR}, #{isGift,jdbcType=VARCHAR}, #{tableId,jdbcType=VARCHAR}, #{userId,jdbcType=INTEGER},#{skuName,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbCashierCart">
@@ -310,6 +315,9 @@
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
<if test="userId != null">
user_id=#{userId,jdbcType=INTEGER},
</if>
<if test="pendingAt != null">
pending_at = #{pendingAt,jdbcType=BIGINT},
</if>
@@ -322,30 +330,7 @@
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbCashierCart">
update tb_cashier_cart
set master_id = #{masterId,jdbcType=VARCHAR},
order_id = #{orderId,jdbcType=VARCHAR},
ref_order_id = #{refOrderId,jdbcType=VARCHAR},
total_amount = #{totalAmount,jdbcType=DECIMAL},
product_id = #{productId,jdbcType=VARCHAR},
cover_img = #{coverImg,jdbcType=VARCHAR},
is_sku = #{isSku,jdbcType=TINYINT},
sku_id = #{skuId,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
sale_price = #{salePrice,jdbcType=DECIMAL},
number = #{number,jdbcType=REAL},
total_number = #{totalNumber,jdbcType=REAL},
refund_number = #{refundNumber,jdbcType=REAL},
category_id = #{categoryId,jdbcType=VARCHAR},
status = #{status,jdbcType=VARCHAR},
type = #{type,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>
<update id="updateStatus">
update tb_cashier_cart set status = #{status} where id = #{id}
</update>
@@ -371,7 +356,17 @@
update tb_cashier_cart set status = #{status} where table_id = #{tableId} and status = 'create'
</update>
<update id="updateStatusById">
update tb_cashier_cart set status = #{status} where id = #{id}
</update>
<select id="selectByOrderId" resultMap="BaseResultMap">
select * from tb_cashier_cart where order_id=#{orderId} and `status`=#{status}
select * from tb_cashier_cart where order_id=#{orderId}
<if test="status != null">
and `status`=#{status}
</if>
</select>
</mapper>

View File

@@ -0,0 +1,26 @@
<?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.TbCouponCategoryMapper">
<resultMap type="com.chaozhanggui.system.cashierservice.entity.TbCouponCategory" id="TbCouponCategoryMap">
<result property="id" column="id" jdbcType="INTEGER"/>
<result property="name" column="name" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
<result property="status" column="status" jdbcType="INTEGER"/>
</resultMap>
<sql id="Base_Column_List">
id
, name, create_time, update_time, status </sql>
<!--查询单个-->
<select id="queryById" resultMap="TbCouponCategoryMap">
select
<include refid="Base_Column_List"/>
from tb_coupon_category
where id = #{id}
</select>
</mapper>

View File

@@ -0,0 +1,128 @@
<?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.TbGroupOrderCouponMapper">
<resultMap type="com.chaozhanggui.system.cashierservice.entity.TbGroupOrderCoupon" id="TbGroupOrderCouponMap">
<result property="id" column="id" jdbcType="INTEGER"/>
<result property="orderId" column="order_id" jdbcType="INTEGER"/>
<result property="couponNo" column="coupon_no" jdbcType="VARCHAR"/>
<result property="isRefund" column="is_refund" jdbcType="INTEGER"/>
<result property="refundAmount" column="refund_amount" jdbcType="NUMERIC"/>
<result property="refundReason" column="refund_reason" jdbcType="VARCHAR"/>
<result property="refundDesc" column="refund_desc" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
id
, order_id, coupon_no, is_refund, refund_amount, refund_reason, refund_desc </sql>
<!--查询单个-->
<select id="queryById" resultMap="TbGroupOrderCouponMap">
select
<include refid="Base_Column_List"/>
from tb_group_order_coupon
where id = #{id}
</select>
<!--查询单个-->
<select id="queryByOrderId" resultMap="TbGroupOrderCouponMap">
select
<include refid="Base_Column_List"/>
from tb_group_order_coupon
where order_id = #{orderId}
order by is_refund
</select>
<select id="queryNoRefundByOrderId" resultMap="TbGroupOrderCouponMap">
select
<include refid="Base_Column_List"/>
from tb_group_order_coupon
where order_id = #{orderId}
AND is_refund = 0
</select>
<!--查询指定行数据-->
<select id="queryAll" resultMap="TbGroupOrderCouponMap">
select
<include refid="Base_Column_List"/>
from tb_group_order_coupon
<where>
<if test="id != null">
and id = #{id}
</if>
<if test="orderId != null">
and order_id = #{orderId}
</if>
<if test="couponNo != null and couponNo != ''">
and coupon_no = #{couponNo}
</if>
<if test="isRefund != null">
and is_refund = #{isRefund}
</if>
<if test="refundAmount != null">
and refund_amount = #{refundAmount}
</if>
<if test="refundReason != null and refundReason != ''">
and refund_reason = #{refundReason}
</if>
<if test="refundDesc != null and refundDesc != ''">
and refund_desc = #{refundDesc}
</if>
</where>
</select>
<!--新增所有列-->
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
insert into tb_group_order_coupon(order_id, coupon_no, is_refund, refund_amount, refund_reason, refund_desc)
values (#{orderId}, #{couponNo}, #{isRefund}, #{refundAmount}, #{refundReason}, #{refundDesc})
</insert>
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
insert into tb_group_order_coupon(order_id, coupon_no, is_refund, refund_amount, refund_reason, refund_desc)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.orderId}, #{entity.couponNo}, #{entity.isRefund}, #{entity.refundAmount}, #{entity.refundReason},
#{entity.refundDesc})
</foreach>
</insert>
<!--通过主键修改数据-->
<update id="update">
update tb_group_order_coupon
<set>
<if test="orderId != null">
order_id = #{orderId},
</if>
<if test="couponNo != null and couponNo != ''">
coupon_no = #{couponNo},
</if>
<if test="isRefund != null">
is_refund = #{isRefund},
</if>
<if test="refundAmount != null">
refund_amount = #{refundAmount},
</if>
<if test="refundReason != null and refundReason != ''">
refund_reason = #{refundReason},
</if>
<if test="refundDesc != null and refundDesc != ''">
refund_desc = #{refundDesc},
</if>
</set>
where id = #{id}
</update>
<!--通过主键删除-->
<delete id="deleteById">
delete
from tb_group_order_coupon
where id = #{id}
</delete>
</mapper>

View File

@@ -0,0 +1,191 @@
<?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.TbGroupOrderInfoMapper">
<resultMap type="com.chaozhanggui.system.cashierservice.entity.TbGroupOrderInfo" id="TbGroupOrderInfoMap">
<result property="id" column="id" jdbcType="INTEGER"/>
<result property="orderNo" column="order_no" jdbcType="VARCHAR"/>
<result property="merchantId" column="merchant_id" jdbcType="INTEGER"/>
<result property="shopId" column="shop_id" jdbcType="INTEGER"/>
<result property="userId" column="user_id" jdbcType="INTEGER"/>
<result property="proId" column="pro_id" jdbcType="INTEGER"/>
<result property="proImg" column="pro_img" jdbcType="VARCHAR"/>
<result property="proName" column="pro_name" jdbcType="VARCHAR"/>
<result property="expDate" column="exp_date" jdbcType="TIMESTAMP"/>
<result property="orderType" column="order_type" jdbcType="VARCHAR"/>
<result property="payType" column="pay_type" jdbcType="VARCHAR"/>
<result property="orderAmount" column="order_amount" jdbcType="NUMERIC"/>
<result property="saveAmount" column="save_amount" jdbcType="NUMERIC"/>
<result property="payAmount" column="pay_amount" jdbcType="NUMERIC"/>
<result property="refundAmount" column="refund_amount" jdbcType="NUMERIC"/>
<result property="refundNumber" column="refund_number" jdbcType="INTEGER"/>
<result property="number" column="number" jdbcType="INTEGER"/>
<result property="status" column="status" jdbcType="VARCHAR"/>
<result property="remark" column="remark" jdbcType="VARCHAR"/>
<result property="phone" column="phone" jdbcType="VARCHAR"/>
<result property="payTime" column="pay_time" jdbcType="TIMESTAMP"/>
<result property="refundAble" column="refund_able" jdbcType="INTEGER"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="verifier" column="verifier" jdbcType="VARCHAR"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
<result property="payOrderNo" column="pay_order_no" jdbcType="VARCHAR"/>
<result property="tradeDay" column="trade_day" jdbcType="TIMESTAMP"/>
<result property="source" column="source" jdbcType="INTEGER"/>
</resultMap>
<sql id="Base_Column_List">
id
, order_no, merchant_id, shop_id, user_id, pro_id, pro_img, pro_name, exp_date, order_type, pay_type, order_amount, save_amount, pay_amount, refund_amount, refund_number, number, status, remark, phone, pay_time, refund_able, create_time, verifier, update_time, pay_order_no, trade_day, source </sql>
<sql id="List_Column">
id
, order_no, pro_name,pro_img,order_amount, pay_amount, number, status </sql>
<!--查询单个-->
<select id="queryById" resultMap="TbGroupOrderInfoMap">
select
<include refid="Base_Column_List"/>
from tb_group_order_info
where id = #{id}
</select>
<select id="selectByPayOrderNo" resultMap="TbGroupOrderInfoMap">
select
<include refid="Base_Column_List"/>
from tb_group_order_info
where pay_order_no = #{payOrderNO}
</select>
<!--查询指定行数据-->
<select id="queryAll" resultType="com.chaozhanggui.system.cashierservice.entity.vo.GroupOrderListVo">
select
<include refid="List_Column"/>
from tb_group_order_info
<where>
<if test="userId != null">
and user_id = #{userId}
</if>
<if test="proName != null and proName != ''">
and pro_name = #{proName}
</if>
<if test="status != null and status != ''">
and status = #{status}
</if>
</where>
order by create_time desc
</select>
<!--新增所有列-->
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
insert into tb_group_order_info(order_no, merchant_id, shop_id, user_id, pro_id, pro_name, pro_img,
exp_date, order_type, pay_type, order_amount, save_amount, pay_amount, number,
refund_number, status,
remark, phone, pay_time, refund_able, create_time, update_time, pay_order_no,
trade_day, source)
values (#{orderNo}, #{merchantId}, #{shopId}, #{userId}, #{proId}, #{proName}, #{proImg},
#{expDate}, #{orderType}, #{payType}, #{orderAmount}, #{saveAmount}, #{payAmount}, #{number},
#{refundNumber}, #{status}, #{remark},
#{phone}, #{payTime}, #{refundAble}, #{createTime}, #{updateTime}, #{payOrderNo}, #{tradeDay},
#{source})
</insert>
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
insert into tb_group_order_info(order_no,merchant_id, shop_id, user_id, pro_id, pro_name, pro_img,
exp_date, order_type, pay_type, order_amount, save_amount, pay_amount, number, status, remark, phone, pay_time,
refund_able, create_time, update_time, pay_order_no, trade_day, source)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.orderNo},#{entity.merchantId} #{entity.shopId}, #{entity.userId}, #{entity.proId},
#{entity.proName},#{entity.proImg},
#{entity.expDate}, #{entity.orderType},
#{entity.payType}, #{entity.orderAmount}, #{entity.saveAmount}, #{entity.payAmount}, #{entity.number},
#{entity.status},
#{entity.remark}, #{entity.phone}, #{entity.payTime}, #{entity.refundAble}, #{entity.createTime},
#{entity.updateTime}, #{entity.payOrderNo}, #{entity.tradeDay}, #{entity.source})
</foreach>
</insert>
<!--通过主键修改数据-->
<update id="update">
update tb_group_order_info
<set>
<if test="orderNo != null and orderNo != ''">
order_no = #{orderNo},
</if>
<if test="merchantId != null">
merchant_id = #{merchantId},
</if>
<if test="shopId != null">
shop_id = #{shopId},
</if>
<if test="userId != null">
user_id = #{userId},
</if>
<if test="proId != null">
pro_id = #{proId},
</if>
<if test="proName != null and proName != ''">
pro_name = #{proName},
</if>
<if test="proImg != null and proImg != ''">
pro_img = #{proImg},
</if>
<if test="expDate != null">
exp_date = #{expDate},
</if>
<if test="orderType != null and orderType != ''">
order_type = #{orderType},
</if>
<if test="payType != null and payType != ''">
pay_type = #{payType},
</if>
<if test="orderAmount != null">
order_amount = #{orderAmount},
</if>
<if test="saveAmount != null">
save_amount = #{saveAmount},
</if>
<if test="payAmount != null">
pay_amount = #{payAmount},
</if>
<if test="number != null">
number = #{number},
</if>
<if test="status != null and status != ''">
status = #{status},
</if>
<if test="remark != null and remark != ''">
remark = #{remark},
</if>
<if test="phone != null and phone != ''">
phone = #{phone},
</if>
<if test="payTime != null">
pay_time = #{payTime},
</if>
<if test="refundAble != null">
refund_able = #{refundAble},
</if>
<if test="createTime != null">
create_time = #{createTime},
</if>
<if test="updateTime != null">
update_time = #{updateTime},
</if>
<if test="payOrderNo != null and payOrderNo != ''">
pay_order_no = #{payOrderNo},
</if>
<if test="tradeDay != null">
trade_day = #{tradeDay},
</if>
<if test="source != null">
source = #{source},
</if>
</set>
where id = #{id}
</update>
</mapper>

View File

@@ -0,0 +1,93 @@
<?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.TbIntegralFlowMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbIntegralFlow">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="user_id" jdbcType="VARCHAR" property="userId" />
<result column="num" jdbcType="DECIMAL" property="num" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
id, user_id, num, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_integral_flow
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_integral_flow
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbIntegralFlow">
insert into tb_integral_flow (id, user_id, num,
create_time, update_time)
values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=VARCHAR}, #{num,jdbcType=DECIMAL},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbIntegralFlow">
insert into tb_integral_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="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_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="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbIntegralFlow">
update tb_integral_flow
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=VARCHAR},
</if>
<if test="num != null">
num = #{num,jdbcType=DECIMAL},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbIntegralFlow">
update tb_integral_flow
set user_id = #{userId,jdbcType=VARCHAR},
num = #{num,jdbcType=DECIMAL},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,109 @@
<?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.TbIntegralMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbIntegral">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="user_id" jdbcType="VARCHAR" property="userId" />
<result column="num" jdbcType="DECIMAL" property="num" />
<result column="status" jdbcType="VARCHAR" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
id, user_id, num, status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_integral
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectAllByUserId" resultType="com.chaozhanggui.system.cashierservice.entity.TbIntegral">
select * from tb_integral where user_id = #{userId} and status = 'CREATE'
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_integral
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbIntegral">
insert into tb_integral (id, user_id, num,
status, create_time, update_time
)
values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=VARCHAR}, #{num,jdbcType=DECIMAL},
#{status,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbIntegral">
insert into tb_integral
<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="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_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="status != null">
#{status,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbIntegral">
update tb_integral
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=VARCHAR},
</if>
<if test="num != null">
num = #{num,jdbcType=DECIMAL},
</if>
<if test="status != null">
status = #{status,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbIntegral">
update tb_integral
set user_id = #{userId,jdbcType=VARCHAR},
num = #{num,jdbcType=DECIMAL},
status = #{status,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -12,6 +12,7 @@
<result property="fromTime" column="from_time" jdbcType="TIMESTAMP"/>
<result property="toTime" column="to_time" jdbcType="TIMESTAMP"/>
<result property="limitNumber" column="limit_number" jdbcType="VARCHAR"/>
<result property="useNumber" column="use_number" jdbcType="VARCHAR"/>
<result property="number" column="number" jdbcType="INTEGER"/>
<result property="leftNumber" column="left_number" jdbcType="VARCHAR"/>
<result property="amount" column="amount" jdbcType="NUMERIC"/>
@@ -42,408 +43,12 @@
<!--查询单个-->
<select id="queryById" resultMap="TbMerchantCouponMap">
select
id, status, title, template_id, shop_id, shop_snap, from_time, to_time, limit_number, number, left_number, amount, limit_amount, is_show, pic, type, ratio, max_ratio_amount, track, class_type, effect_type, effect_days, relation_ids, relation_list, editor, note, created_at, updated_at, furnish_meal, furnish_express, furnish_draw, furnish_vir, disable_distribute, merchant_id
id, status, title, template_id, shop_id, shop_snap, from_time, to_time, limit_number,use_number, number, left_number, amount, limit_amount, is_show, pic, type, ratio, max_ratio_amount, track, class_type, effect_type, effect_days, relation_ids, relation_list, editor, note, created_at, updated_at, furnish_meal, furnish_express, furnish_draw, furnish_vir, disable_distribute, merchant_id
from tb_merchant_coupon
where id = #{id}
</select>
<!--查询指定行数据-->
<select id="queryAllByLimit" resultMap="TbMerchantCouponMap">
select
id, status, title, template_id, shop_id, shop_snap, from_time, to_time, limit_number, number, left_number, amount, limit_amount, is_show, pic, type, ratio, max_ratio_amount, track, class_type, effect_type, effect_days, relation_ids, relation_list, editor, note, created_at, updated_at, furnish_meal, furnish_express, furnish_draw, furnish_vir, disable_distribute, merchant_id
from tb_merchant_coupon
<where>
<if test="id != null">
and id = #{id}
</if>
<if test="status != null">
and status = #{status}
</if>
<if test="title != null and title != ''">
and title = #{title}
</if>
<if test="templateId != null and templateId != ''">
and template_id = #{templateId}
</if>
<if test="shopId != null and shopId != ''">
and shop_id = #{shopId}
</if>
<if test="shopSnap != null and shopSnap != ''">
and shop_snap = #{shopSnap}
</if>
<if test="fromTime != null">
and from_time = #{fromTime}
</if>
<if test="toTime != null">
and to_time = #{toTime}
</if>
<if test="limitNumber != null and limitNumber != ''">
and limit_number = #{limitNumber}
</if>
<if test="number != null">
and number = #{number}
</if>
<if test="leftNumber != null and leftNumber != ''">
and left_number = #{leftNumber}
</if>
<if test="amount != null">
and amount = #{amount}
</if>
<if test="limitAmount != null">
and limit_amount = #{limitAmount}
</if>
<if test="isShow != null">
and is_show = #{isShow}
</if>
<if test="pic != null and pic != ''">
and pic = #{pic}
</if>
<if test="type != null">
and type = #{type}
</if>
<if test="ratio != null">
and ratio = #{ratio}
</if>
<if test="maxRatioAmount != null">
and max_ratio_amount = #{maxRatioAmount}
</if>
<if test="track != null and track != ''">
and track = #{track}
</if>
<if test="classType != null and classType != ''">
and class_type = #{classType}
</if>
<if test="effectType != null">
and effect_type = #{effectType}
</if>
<if test="effectDays != null">
and effect_days = #{effectDays}
</if>
<if test="relationIds != null and relationIds != ''">
and relation_ids = #{relationIds}
</if>
<if test="relationList != null and relationList != ''">
and relation_list = #{relationList}
</if>
<if test="editor != null and editor != ''">
and editor = #{editor}
</if>
<if test="note != null and note != ''">
and note = #{note}
</if>
<if test="createdAt != null">
and created_at = #{createdAt}
</if>
<if test="updatedAt != null">
and updated_at = #{updatedAt}
</if>
<if test="furnishMeal != null">
and furnish_meal = #{furnishMeal}
</if>
<if test="furnishExpress != null">
and furnish_express = #{furnishExpress}
</if>
<if test="furnishDraw != null">
and furnish_draw = #{furnishDraw}
</if>
<if test="furnishVir != null">
and furnish_vir = #{furnishVir}
</if>
<if test="disableDistribute != null">
and disable_distribute = #{disableDistribute}
</if>
<if test="merchantId != null and merchantId != ''">
and merchant_id = #{merchantId}
</if>
</where>
limit #{pageable.offset}, #{pageable.pageSize}
</select>
<!--统计总行数-->
<select id="count" resultType="java.lang.Long">
select count(1)
from tb_merchant_coupon
<where>
<if test="id != null">
and id = #{id}
</if>
<if test="status != null">
and status = #{status}
</if>
<if test="title != null and title != ''">
and title = #{title}
</if>
<if test="templateId != null and templateId != ''">
and template_id = #{templateId}
</if>
<if test="shopId != null and shopId != ''">
and shop_id = #{shopId}
</if>
<if test="shopSnap != null and shopSnap != ''">
and shop_snap = #{shopSnap}
</if>
<if test="fromTime != null">
and from_time = #{fromTime}
</if>
<if test="toTime != null">
and to_time = #{toTime}
</if>
<if test="limitNumber != null and limitNumber != ''">
and limit_number = #{limitNumber}
</if>
<if test="number != null">
and number = #{number}
</if>
<if test="leftNumber != null and leftNumber != ''">
and left_number = #{leftNumber}
</if>
<if test="amount != null">
and amount = #{amount}
</if>
<if test="limitAmount != null">
and limit_amount = #{limitAmount}
</if>
<if test="isShow != null">
and is_show = #{isShow}
</if>
<if test="pic != null and pic != ''">
and pic = #{pic}
</if>
<if test="type != null">
and type = #{type}
</if>
<if test="ratio != null">
and ratio = #{ratio}
</if>
<if test="maxRatioAmount != null">
and max_ratio_amount = #{maxRatioAmount}
</if>
<if test="track != null and track != ''">
and track = #{track}
</if>
<if test="classType != null and classType != ''">
and class_type = #{classType}
</if>
<if test="effectType != null">
and effect_type = #{effectType}
</if>
<if test="effectDays != null">
and effect_days = #{effectDays}
</if>
<if test="relationIds != null and relationIds != ''">
and relation_ids = #{relationIds}
</if>
<if test="relationList != null and relationList != ''">
and relation_list = #{relationList}
</if>
<if test="editor != null and editor != ''">
and editor = #{editor}
</if>
<if test="note != null and note != ''">
and note = #{note}
</if>
<if test="createdAt != null">
and created_at = #{createdAt}
</if>
<if test="updatedAt != null">
and updated_at = #{updatedAt}
</if>
<if test="furnishMeal != null">
and furnish_meal = #{furnishMeal}
</if>
<if test="furnishExpress != null">
and furnish_express = #{furnishExpress}
</if>
<if test="furnishDraw != null">
and furnish_draw = #{furnishDraw}
</if>
<if test="furnishVir != null">
and furnish_vir = #{furnishVir}
</if>
<if test="disableDistribute != null">
and disable_distribute = #{disableDistribute}
</if>
<if test="merchantId != null and merchantId != ''">
and merchant_id = #{merchantId}
</if>
</where>
</select>
<select id="queryAllByPage" resultType="com.chaozhanggui.system.cashierservice.entity.TbMerchantCoupon">
select
id, status, title, template_id, shop_id, shop_snap, from_time, to_time, limit_number, number, left_number, amount, limit_amount, is_show, pic, type, ratio, max_ratio_amount, track, class_type, effect_type, effect_days, relation_ids, relation_list, editor, note, created_at, updated_at, furnish_meal, furnish_express, furnish_draw, furnish_vir, disable_distribute, merchant_id
from tb_merchant_coupon
where class_type ='product'
AND ratio IS NOT NULL
limit #{page}, #{size}
</select>
<!--新增所有列-->
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
insert into tb_merchant_coupon(status, title, template_id, shop_id, shop_snap, from_time, to_time, limit_number, number, left_number, amount, limit_amount, is_show, pic, type, ratio, max_ratio_amount, track, class_type, effect_type, effect_days, relation_ids, relation_list, editor, note, created_at, updated_at, furnish_meal, furnish_express, furnish_draw, furnish_vir, disable_distribute, merchant_id)
values (#{status}, #{title}, #{templateId}, #{shopId}, #{shopSnap}, #{fromTime}, #{toTime}, #{limitNumber}, #{number}, #{leftNumber}, #{amount}, #{limitAmount}, #{isShow}, #{pic}, #{type}, #{ratio}, #{maxRatioAmount}, #{track}, #{classType}, #{effectType}, #{effectDays}, #{relationIds}, #{relationList}, #{editor}, #{note}, #{createdAt}, #{updatedAt}, #{furnishMeal}, #{furnishExpress}, #{furnishDraw}, #{furnishVir}, #{disableDistribute}, #{merchantId})
</insert>
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
insert into tb_merchant_coupon(status, title, template_id, shop_id, shop_snap, from_time, to_time, limit_number, number, left_number, amount, limit_amount, is_show, pic, type, ratio, max_ratio_amount, track, class_type, effect_type, effect_days, relation_ids, relation_list, editor, note, created_at, updated_at, furnish_meal, furnish_express, furnish_draw, furnish_vir, disable_distribute, merchant_id)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.status}, #{entity.title}, #{entity.templateId}, #{entity.shopId}, #{entity.shopSnap}, #{entity.fromTime}, #{entity.toTime}, #{entity.limitNumber}, #{entity.number}, #{entity.leftNumber}, #{entity.amount}, #{entity.limitAmount}, #{entity.isShow}, #{entity.pic}, #{entity.type}, #{entity.ratio}, #{entity.maxRatioAmount}, #{entity.track}, #{entity.classType}, #{entity.effectType}, #{entity.effectDays}, #{entity.relationIds}, #{entity.relationList}, #{entity.editor}, #{entity.note}, #{entity.createdAt}, #{entity.updatedAt}, #{entity.furnishMeal}, #{entity.furnishExpress}, #{entity.furnishDraw}, #{entity.furnishVir}, #{entity.disableDistribute}, #{entity.merchantId})
</foreach>
</insert>
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into tb_merchant_coupon(status, title, template_id, shop_id, shop_snap, from_time, to_time, limit_number, number, left_number, amount, limit_amount, is_show, pic, type, ratio, max_ratio_amount, track, class_type, effect_type, effect_days, relation_ids, relation_list, editor, note, created_at, updated_at, furnish_meal, furnish_express, furnish_draw, furnish_vir, disable_distribute, merchant_id)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.status}, #{entity.title}, #{entity.templateId}, #{entity.shopId}, #{entity.shopSnap}, #{entity.fromTime}, #{entity.toTime}, #{entity.limitNumber}, #{entity.number}, #{entity.leftNumber}, #{entity.amount}, #{entity.limitAmount}, #{entity.isShow}, #{entity.pic}, #{entity.type}, #{entity.ratio}, #{entity.maxRatioAmount}, #{entity.track}, #{entity.classType}, #{entity.effectType}, #{entity.effectDays}, #{entity.relationIds}, #{entity.relationList}, #{entity.editor}, #{entity.note}, #{entity.createdAt}, #{entity.updatedAt}, #{entity.furnishMeal}, #{entity.furnishExpress}, #{entity.furnishDraw}, #{entity.furnishVir}, #{entity.disableDistribute}, #{entity.merchantId})
</foreach>
on duplicate key update
status = values(status),
title = values(title),
template_id = values(template_id),
shop_id = values(shop_id),
shop_snap = values(shop_snap),
from_time = values(from_time),
to_time = values(to_time),
limit_number = values(limit_number),
number = values(number),
left_number = values(left_number),
amount = values(amount),
limit_amount = values(limit_amount),
is_show = values(is_show),
pic = values(pic),
type = values(type),
ratio = values(ratio),
max_ratio_amount = values(max_ratio_amount),
track = values(track),
class_type = values(class_type),
effect_type = values(effect_type),
effect_days = values(effect_days),
relation_ids = values(relation_ids),
relation_list = values(relation_list),
editor = values(editor),
note = values(note),
created_at = values(created_at),
updated_at = values(updated_at),
furnish_meal = values(furnish_meal),
furnish_express = values(furnish_express),
furnish_draw = values(furnish_draw),
furnish_vir = values(furnish_vir),
disable_distribute = values(disable_distribute),
merchant_id = values(merchant_id)
</insert>
<!--通过主键修改数据-->
<update id="update">
update tb_merchant_coupon
<set>
<if test="status != null">
status = #{status},
</if>
<if test="title != null and title != ''">
title = #{title},
</if>
<if test="templateId != null and templateId != ''">
template_id = #{templateId},
</if>
<if test="shopId != null and shopId != ''">
shop_id = #{shopId},
</if>
<if test="shopSnap != null and shopSnap != ''">
shop_snap = #{shopSnap},
</if>
<if test="fromTime != null">
from_time = #{fromTime},
</if>
<if test="toTime != null">
to_time = #{toTime},
</if>
<if test="limitNumber != null and limitNumber != ''">
limit_number = #{limitNumber},
</if>
<if test="number != null">
number = #{number},
</if>
<if test="leftNumber != null and leftNumber != ''">
left_number = #{leftNumber},
</if>
<if test="amount != null">
amount = #{amount},
</if>
<if test="limitAmount != null">
limit_amount = #{limitAmount},
</if>
<if test="isShow != null">
is_show = #{isShow},
</if>
<if test="pic != null and pic != ''">
pic = #{pic},
</if>
<if test="type != null">
type = #{type},
</if>
<if test="ratio != null">
ratio = #{ratio},
</if>
<if test="maxRatioAmount != null">
max_ratio_amount = #{maxRatioAmount},
</if>
<if test="track != null and track != ''">
track = #{track},
</if>
<if test="classType != null and classType != ''">
class_type = #{classType},
</if>
<if test="effectType != null">
effect_type = #{effectType},
</if>
<if test="effectDays != null">
effect_days = #{effectDays},
</if>
<if test="relationIds != null and relationIds != ''">
relation_ids = #{relationIds},
</if>
<if test="relationList != null and relationList != ''">
relation_list = #{relationList},
</if>
<if test="editor != null and editor != ''">
editor = #{editor},
</if>
<if test="note != null and note != ''">
note = #{note},
</if>
<if test="createdAt != null">
created_at = #{createdAt},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt},
</if>
<if test="furnishMeal != null">
furnish_meal = #{furnishMeal},
</if>
<if test="furnishExpress != null">
furnish_express = #{furnishExpress},
</if>
<if test="furnishDraw != null">
furnish_draw = #{furnishDraw},
</if>
<if test="furnishVir != null">
furnish_vir = #{furnishVir},
</if>
<if test="disableDistribute != null">
disable_distribute = #{disableDistribute},
</if>
<if test="merchantId != null and merchantId != ''">
merchant_id = #{merchantId},
</if>
</set>
where id = #{id}
</update>
<!--通过主键删除-->
<delete id="deleteById">
delete from tb_merchant_coupon where id = #{id}
</delete>
</mapper>

View File

@@ -10,12 +10,14 @@
<result column="applyment_state" jdbcType="VARCHAR" property="applymentState" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
<result column="small_appid" jdbcType="VARCHAR" property="smallAppid" />
<result column="store_id" jdbcType="VARCHAR" property="storeId" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbMerchantThirdApply">
<result column="app_token" jdbcType="LONGVARCHAR" property="appToken" />
</resultMap>
<sql id="Base_Column_List">
id, type, app_id, status, pay_password, applyment_state, created_at, updated_at
id, type, app_id, status, pay_password, applyment_state, created_at, updated_at,small_appid,store_id
</sql>
<sql id="Blob_Column_List">
app_token

View File

@@ -46,6 +46,9 @@
<result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="master_id" jdbcType="VARCHAR" property="masterId"/>
<result column="table_name" jdbcType="VARCHAR" property="tableName"/>
<result column="is_buy_coupon" jdbcType="VARCHAR" property="isBuyCoupon"/>
<result column="is_use_coupon" jdbcType="VARCHAR" property="isUseCoupon"/>
<result column="out_number" jdbcType="VARCHAR" property="outNumber"/>
</resultMap>
<sql id="Base_Column_List">
id, order_no, settlement_amount, pack_fee, origin_amount, product_amount, amount,
@@ -53,7 +56,8 @@
discount_amount, table_id, small_change, send_type, order_type, product_type, status,
billing_id, merchant_id, shop_id, is_vip, member_id, user_id, product_score, deduct_score,
user_coupon_id, user_coupon_amount, refund_able, paid_time, is_effect, is_group,
updated_at, `system_time`, created_at, is_accepted, pay_order_no,trade_day,`source`,remark,master_id,`table_name`
updated_at, `system_time`, created_at, is_accepted, pay_order_no,trade_day,`source`,
remark,master_id,`table_name`,is_buy_coupon,is_use_coupon,out_number
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
@@ -80,7 +84,7 @@
deduct_score, user_coupon_id, user_coupon_amount,
refund_able, paid_time, is_effect,
is_group, updated_at, system_time,
created_at, is_accepted, pay_order_no,trade_day,source,remark,master_id,table_name
created_at, is_accepted, pay_order_no,trade_day,source,remark,master_id,table_name,is_buy_coupon,is_use_coupon,out_number
)
values (#{id,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{settlementAmount,jdbcType=DECIMAL},
#{packFee,jdbcType=DECIMAL}, #{originAmount,jdbcType=DECIMAL}, #{productAmount,jdbcType=DECIMAL},
@@ -95,7 +99,8 @@
#{refundAble,jdbcType=TINYINT}, #{paidTime,jdbcType=BIGINT}, #{isEffect,jdbcType=TINYINT},
#{isGroup,jdbcType=TINYINT}, #{updatedAt,jdbcType=BIGINT}, #{systemTime,jdbcType=BIGINT},
#{createdAt,jdbcType=BIGINT}, #{isAccepted,jdbcType=TINYINT}, #{payOrderNo,jdbcType=VARCHAR},
#{tradeDay,jdbcType=VARCHAR}, #{source,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR}, #{masterId,jdbcType=VARCHAR}, #{tableName,jdbcType=VARCHAR}
#{tradeDay,jdbcType=VARCHAR}, #{source,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR},
#{masterId,jdbcType=VARCHAR}, #{tableName,jdbcType=VARCHAR}, #{isBuyCoupon,jdbcType=VARCHAR}, #{isUseCoupon,jdbcType=VARCHAR},#{outNumber,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbOrderInfo"
@@ -219,11 +224,22 @@
<if test="payOrderNo != null">
pay_order_no,
</if>
<if test="isBuyCoupon != null">
is_buy_coupon,
</if>
<if test="outNumber != null">
out_number,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="isBuyCoupon != null">
#{isBuyCoupon,jdbcType=INTEGER},
</if>
<if test="orderNo != null">
#{orderNo,jdbcType=VARCHAR},
</if>
@@ -338,6 +354,10 @@
<if test="payOrderNo != null">
#{payOrderNo,jdbcType=VARCHAR},
</if>
<if test="outNumber != null">
#{outNumber,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbOrderInfo">
@@ -463,6 +483,12 @@
<if test="tradeDay != null">
trade_day = #{tradeDay,jdbcType=VARCHAR},
</if>
<if test="isBuyCoupon != null">
is_buy_coupon = #{isBuyCoupon,jdbcType=VARCHAR},
</if>
<if test="isUseCoupon != null">
is_use_coupon = #{isUseCoupon,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
@@ -505,6 +531,7 @@
system_time = #{systemTime,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=BIGINT},
is_accepted = #{isAccepted,jdbcType=TINYINT},
is_buy_coupon = #{isBuyCoupon,jdbcType=TINYINT},
pay_order_no = #{payOrderNo,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
@@ -517,10 +544,11 @@
</select>
<select id="selectByUserId" resultType="com.chaozhanggui.system.cashierservice.entity.TbOrderInfo">
select
*
*
from tb_order_info a
where user_id = #{userId}
and order_type='miniapp'
<if test="status != null and status != ''">
<choose>
<when test="status == 'unpaid'">
@@ -534,10 +562,18 @@
order by a.id desc
Limit #{page}, #{size}
</select>
<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>
<select id="selectWinnerByUserId" resultType="com.chaozhanggui.system.cashierservice.entity.TbOrderInfo">
select toi.*,two.order_no as winnnerNo,tui.nick_name as userName from tb_order_info toi left join tb_wining_user two on two.order_no = toi.order_no
left join tb_user_info tui on tui.id = toi.user_id
where toi.user_id = #{userId}
</select>
</mapper>

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

View File

@@ -4,13 +4,16 @@
<resultMap type="com.chaozhanggui.system.cashierservice.entity.TbPlatformDict" id="TbPlatformDictMap">
<result property="id" column="id" jdbcType="INTEGER"/>
<result property="shareImg" column="share_img" jdbcType="VARCHAR"/>
<result property="name" column="name" jdbcType="VARCHAR"/>
<result property="value" column="value" jdbcType="VARCHAR"/>
<result property="fontColor" column="font_color" jdbcType="VARCHAR"/>
<result property="backColor" column="back_color" jdbcType="VARCHAR"/>
<result property="type" column="type" jdbcType="VARCHAR"/>
<result property="coverImg" column="cover_img" jdbcType="VARCHAR"/>
<result property="shareImg" column="share_img" jdbcType="VARCHAR"/>
<result property="video" column="video" jdbcType="VARCHAR"/>
<result property="videoCoverImg" column="video_cover_img" jdbcType="VARCHAR"/>
<result property="relUrl" column="rel_url" jdbcType="VARCHAR"/>
<result property="jumpType" column="jump_type" jdbcType="VARCHAR"/>
<result property="absUrl" column="abs_url" jdbcType="VARCHAR"/>
<result property="createdAt" column="created_at" jdbcType="INTEGER"/>
<result property="updatedAt" column="updated_at" jdbcType="INTEGER"/>
@@ -23,121 +26,26 @@
<!--查询单个-->
<select id="queryById" resultMap="TbPlatformDictMap">
select
id, name, type, cover_img, share_img, video, video_cover_img, rel_url, abs_url, created_at, updated_at, is_show_cash, is_show_mall, is_show_app, sort
id, name,value, type,font_color,back_color, cover_img, share_img, video, video_cover_img, jump_type, abs_url, created_at, updated_at, is_show_cash, is_show_mall, is_show_app, sort
from tb_platform_dict
where id = #{id}
</select>
<!--查询指定行数据-->
<select id="queryAllByLimit" resultMap="TbPlatformDictMap">
<select id="queryByIdList" resultMap="TbPlatformDictMap">
select
id, name, type, cover_img, share_img, video, video_cover_img, rel_url, abs_url, created_at, updated_at, is_show_cash, is_show_mall, is_show_app, sort
id, name,value, type, font_color, back_color, cover_img, share_img, video, video_cover_img, jump_type, abs_url, created_at, updated_at, is_show_cash, is_show_mall, is_show_app, sort
from tb_platform_dict
<where>
<if test="id != null">
and id = #{id}
</if>
<if test="name != null and name != ''">
and name = #{name}
</if>
<if test="type != null and type != ''">
and type = #{type}
</if>
<if test="coverImg != null and coverImg != ''">
and cover_img = #{coverImg}
</if>
<if test="shareImg != null and shareImg != ''">
and share_img = #{shareImg}
</if>
<if test="video != null and video != ''">
and video = #{video}
</if>
<if test="videoCoverImg != null and videoCoverImg != ''">
and video_cover_img = #{videoCoverImg}
</if>
<if test="relUrl != null and relUrl != ''">
and rel_url = #{relUrl}
</if>
<if test="absUrl != null and absUrl != ''">
and abs_url = #{absUrl}
</if>
<if test="createdAt != null">
and created_at = #{createdAt}
</if>
<if test="updatedAt != null">
and updated_at = #{updatedAt}
</if>
<if test="isShowCash != null">
and is_show_cash = #{isShowCash}
</if>
<if test="isShowMall != null">
and is_show_mall = #{isShowMall}
</if>
<if test="isShowApp != null">
and is_show_app = #{isShowApp}
</if>
<if test="sort != null">
and sort = #{sort}
</if>
</where>
limit #{pageable.offset}, #{pageable.pageSize}
where id IN
<foreach collection="idList" item="id" open="(" separator="," close=")">
#{id}
</foreach>
order by sort
</select>
<!--统计总行数-->
<select id="count" resultType="java.lang.Long">
select count(1)
from tb_platform_dict
<where>
<if test="id != null">
and id = #{id}
</if>
<if test="name != null and name != ''">
and name = #{name}
</if>
<if test="type != null and type != ''">
and type = #{type}
</if>
<if test="coverImg != null and coverImg != ''">
and cover_img = #{coverImg}
</if>
<if test="shareImg != null and shareImg != ''">
and share_img = #{shareImg}
</if>
<if test="video != null and video != ''">
and video = #{video}
</if>
<if test="videoCoverImg != null and videoCoverImg != ''">
and video_cover_img = #{videoCoverImg}
</if>
<if test="relUrl != null and relUrl != ''">
and rel_url = #{relUrl}
</if>
<if test="absUrl != null and absUrl != ''">
and abs_url = #{absUrl}
</if>
<if test="createdAt != null">
and created_at = #{createdAt}
</if>
<if test="updatedAt != null">
and updated_at = #{updatedAt}
</if>
<if test="isShowCash != null">
and is_show_cash = #{isShowCash}
</if>
<if test="isShowMall != null">
and is_show_mall = #{isShowMall}
</if>
<if test="isShowApp != null">
and is_show_app = #{isShowApp}
</if>
<if test="sort != null">
and sort = #{sort}
</if>
</where>
</select>
<select id="queryAllByType" resultType="com.chaozhanggui.system.cashierservice.entity.TbPlatformDict">
select
id, name, type, cover_img, share_img, video, video_cover_img, rel_url, abs_url, created_at, updated_at, is_show_cash, is_show_mall, is_show_app, sort
id, name,value, type,font_color,back_color, cover_img, share_img, video, video_cover_img, jump_type, abs_url, created_at, updated_at, is_show_cash, is_show_mall, is_show_app, sort
from tb_platform_dict
<where>
<if test="type != null and type != ''">
@@ -150,99 +58,25 @@
and is_show_mall = 1
</if>
</where>
order by sort
</select>
<!--新增所有列-->
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
insert into tb_platform_dict(name, type, cover_img, share_img, video, video_cover_img, rel_url, abs_url, created_at, updated_at, is_show_cash, is_show_mall, is_show_app, sort)
values (#{name}, #{type}, #{coverImg}, #{shareImg}, #{video}, #{videoCoverImg}, #{relUrl}, #{absUrl}, #{createdAt}, #{updatedAt}, #{isShowCash}, #{isShowMall}, #{isShowApp}, #{sort})
</insert>
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
insert into tb_platform_dict(name, type, cover_img, share_img, video, video_cover_img, rel_url, abs_url, created_at, updated_at, is_show_cash, is_show_mall, is_show_app, sort)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.name}, #{entity.type}, #{entity.coverImg}, #{entity.shareImg}, #{entity.video}, #{entity.videoCoverImg}, #{entity.relUrl}, #{entity.absUrl}, #{entity.createdAt}, #{entity.updatedAt}, #{entity.isShowCash}, #{entity.isShowMall}, #{entity.isShowApp}, #{entity.sort})
</foreach>
</insert>
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into tb_platform_dict(name, type, cover_img, share_img, video, video_cover_img, rel_url, abs_url, created_at, updated_at, is_show_cash, is_show_mall, is_show_app, sort)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.name}, #{entity.type}, #{entity.coverImg}, #{entity.shareImg}, #{entity.video}, #{entity.videoCoverImg}, #{entity.relUrl}, #{entity.absUrl}, #{entity.createdAt}, #{entity.updatedAt}, #{entity.isShowCash}, #{entity.isShowMall}, #{entity.isShowApp}, #{entity.sort})
</foreach>
on duplicate key update
name = values(name),
type = values(type),
cover_img = values(cover_img),
share_img = values(share_img),
video = values(video),
video_cover_img = values(video_cover_img),
rel_url = values(rel_url),
abs_url = values(abs_url),
created_at = values(created_at),
updated_at = values(updated_at),
is_show_cash = values(is_show_cash),
is_show_mall = values(is_show_mall),
is_show_app = values(is_show_app),
sort = values(sort)
</insert>
<!--通过主键修改数据-->
<update id="update">
update tb_platform_dict
<set>
<if test="name != null and name != ''">
name = #{name},
<select id="queryGroupByValue" resultType="com.chaozhanggui.system.cashierservice.entity.TbPlatformDict">
select
id, name,value, type,font_color,back_color, cover_img, share_img, video, video_cover_img, jump_type, abs_url,
created_at, updated_at, is_show_cash, is_show_mall, is_show_app, sort
from tb_platform_dict
<where>
value = #{value}
and type = 'group'
<if test="environment == 'app'">
and is_show_app = 1
</if>
<if test="type != null and type != ''">
type = #{type},
<if test="environment == 'wx'">
and is_show_mall = 1
</if>
<if test="coverImg != null and coverImg != ''">
cover_img = #{coverImg},
</if>
<if test="shareImg != null and shareImg != ''">
share_img = #{shareImg},
</if>
<if test="video != null and video != ''">
video = #{video},
</if>
<if test="videoCoverImg != null and videoCoverImg != ''">
video_cover_img = #{videoCoverImg},
</if>
<if test="relUrl != null and relUrl != ''">
rel_url = #{relUrl},
</if>
<if test="absUrl != null and absUrl != ''">
abs_url = #{absUrl},
</if>
<if test="createdAt != null">
created_at = #{createdAt},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt},
</if>
<if test="isShowCash != null">
is_show_cash = #{isShowCash},
</if>
<if test="isShowMall != null">
is_show_mall = #{isShowMall},
</if>
<if test="isShowApp != null">
is_show_app = #{isShowApp},
</if>
<if test="sort != null">
sort = #{sort},
</if>
</set>
where id = #{id}
</update>
<!--通过主键删除-->
<delete id="deleteById">
delete from tb_platform_dict where id = #{id}
</delete>
</where>
order by sort
</select>
</mapper>

View File

@@ -222,4 +222,16 @@
</if>
order by g.sort asc
</select>
<select id="selectByShopId" resultMap="BaseResultMap">
SELECT
*
FROM
tb_product_group
where shop_id=#{shopId} and is_show=1
<if test="groupId != null">
and id = #{groupId}
</if>
order by g.sort asc
</select>
</mapper>

View File

@@ -62,6 +62,7 @@
<result column="enable_label" jdbcType="TINYINT" property="enableLabel" />
<result column="tax_config_id" jdbcType="VARCHAR" property="taxConfigId" />
<result column="spec_table_headers" jdbcType="VARCHAR" property="specTableHeaders" />
<result column="group_category_id" jdbcType="VARCHAR" property="groupCategoryId" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
<result column="images" jdbcType="LONGVARCHAR" property="images" />
@@ -73,14 +74,14 @@
</resultMap>
<sql id="Base_Column_List">
id, category_id, spec_id, source_path, brand_id, merchant_id, shop_id, name, short_title,
type, pack_fee, low_price, low_member_price, unit_id, unit_snap, cover_img, share_img,
type, pack_fee, low_price, low_member_price, unit_id, unit_snap, cover_img, share_img, images,
video_cover_img, sort, limit_number, product_score, status, fail_msg, is_recommend,
is_hot, is_new, is_on_sale, is_show, type_enum, is_distribute, is_del, is_stock,
is_pause_sale, is_free_freight, freight_id, strategy_type, strategy_id, is_vip, is_delete,
created_at, updated_at, base_sales_number, real_sales_number, sales_number, thumb_count,
store_count, furnish_meal, furnish_express, furnish_draw, furnish_vir, is_combo,
is_show_cash, is_show_mall, is_need_examine, show_on_mall_status, show_on_mall_time,
show_on_mall_error_msg, enable_label, tax_config_id, spec_table_headers
show_on_mall_error_msg, enable_label, tax_config_id, spec_table_headers,group_category_id
</sql>
<sql id="Blob_Column_List">
images, video, notice, group_snap, spec_info, select_spec
@@ -881,11 +882,16 @@
spec_table_headers = #{specTableHeaders,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="upGroupRealSalesNumber">
update tb_product
set real_sales_number = real_sales_number + #{number,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByIdIn" resultMap="BaseResultMap">
select *
from tb_product
where id in (${ids}) and is_show_mall =1
where id in (${ids}) and is_show_mall =1 order by sort asc
</select>
<select id="selectById" resultType="com.chaozhanggui.system.cashierservice.entity.TbProduct">
select
@@ -918,6 +924,7 @@
AND t.product_id = #{productId}
AND t.`status` = 'create'
AND t.table_id = #{code}
AND user_id IN
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
@@ -933,4 +940,89 @@
#{item}
</foreach>
</select>
<select id="selGroups" resultType="com.chaozhanggui.system.cashierservice.entity.vo.ShopGroupInfoVo">
SELECT
info.id AS shopId,
info.shop_name AS shopName,
info.logo AS shopImg,
info.tag AS shopTag,
info.lat AS lat,
info.lng AS lng,
info.districts as districts,
pro.id AS proId,
pro.`name` AS proName,
pro.cover_img AS proImg,
pro.real_sales_number AS number
FROM
tb_product pro
LEFT JOIN tb_shop_info AS info ON info.id = pro.shop_id
<where>
info.`status`='1'
AND pro.is_combo = '1'
AND pro.type_enum = 'group'
AND (info.cities = #{cities} or info.districts = #{cities})
<if test="proName != null and proName != ''">
AND pro.`name` LIKE concat('%',#{proName,jdbcType=VARCHAR},'%')
</if>
<if test="type != null and type != ''">
AND group_category_id LIKE concat('%',#{type,jdbcType=VARCHAR},'%')
</if>
<if test="rightTopLng != null and rightTopLng != '' and leftBottomLng != null and leftBottomLng != ''">
AND info.lng BETWEEN #{leftBottomLng} AND #{rightTopLng}
AND info.lat BETWEEN #{leftBottomLat} AND #{rightTopLat}
</if>
</where>
<choose>
<when test="orderBy == 1">
ORDER BY (ABS(info.lat - #{lat}) + ABS(info.lng - #{lng})) ASC
</when>
<when test="orderBy == 2">
ORDER BY pro.real_sales_number desc
</when>
<when test="orderBy == 3">
ORDER BY pro.low_price ASC
</when>
<otherwise>
ORDER BY pro.real_sales_number DESC
</otherwise>
</choose>
</select>
<select id="selHotGroups" resultType="com.chaozhanggui.system.cashierservice.entity.vo.ShopGroupInfoVo">
SELECT
info.id AS shopId,
info.shop_name AS shopName,
info.logo AS shopImg,
info.tag AS shopTag,
info.lat AS lat,
info.lng AS lng,
info.districts as districts,
pro.id AS proId,
pro.`name` AS proName,
pro.cover_img AS proImg,
sum(`order`.number) AS number
FROM
tb_group_order_info AS `order`
LEFT JOIN tb_product AS pro ON `order`.pro_id = pro.id
LEFT JOIN tb_shop_info AS info ON info.id = `order`.shop_id
<where>
info.`status`='1'
AND pro.is_combo = '1'
AND pro.type_enum = 'group'
AND (info.cities = #{cities} or info.districts = #{cities})
<if test="proName != null and proName != ''">
AND pro.`name` LIKE concat('%',#{proName,jdbcType=VARCHAR},'%')
</if>
<if test="type != null and type != ''">
AND pro.group_category_id LIKE concat('%',#{type,jdbcType=VARCHAR},'%')
</if>
<if test="startTime != null and startTime != ''">
AND `order`.create_time BETWEEN #{startTime} AND #{endTime}
</if>
</where>
group by `order`.pro_id
ORDER BY number desc
</select>
</mapper>

View File

@@ -381,17 +381,28 @@
GROUP BY
product_id
</select>
<select id="selectSku" resultType="com.chaozhanggui.system.cashierservice.entity.TbProductSku">
SELECT
*
FROM
tb_product_sku
WHERE
product_id = #{productId}
</select>
<select id="selectSale" resultType="com.chaozhanggui.system.cashierservice.entity.vo.HomeVO">
SELECT
pro.id as id,
pro.`name` as productName,
pro.cover_img as image,
sku.origin_price as originPrice,
sku.sale_price as salePrice,
MAX(sku.real_sales_number) AS realSalesNumber
pro.id AS id,
pro.`name` AS productName,
pro.cover_img AS image,
sku.origin_price AS originPrice,
sku.sale_price AS salePrice,
pro.real_sales_number AS realSalesNumber
FROM
tb_product_sku sku
LEFT JOIN tb_product pro ON sku.product_id = pro.id
tb_product pro
LEFT JOIN tb_product_sku sku ON pro.id = sku.product_id
WHERE
pro.type_enum = 'group'
AND pro.is_combo = '1'
GROUP BY
sku.product_id
ORDER BY
@@ -400,15 +411,18 @@
</select>
<select id="selectDay" resultType="com.chaozhanggui.system.cashierservice.entity.vo.HomeVO">
SELECT
pro.id as id,
pro.`name` as productName,
pro.cover_img as image,
sku.origin_price as originPrice,
sku.sale_price as salePrice,
MAX(sku.real_sales_number) AS realSalesNumber
pro.id AS id,
pro.`name` AS productName,
pro.cover_img AS image,
sku.origin_price AS originPrice,
sku.sale_price AS salePrice,
pro.real_sales_number AS realSalesNumber
FROM
tb_product_sku sku
LEFT JOIN tb_product pro ON sku.product_id = pro.id
tb_product pro
LEFT JOIN tb_product_sku sku ON pro.id = sku.product_id
WHERE
pro.type_enum = 'group'
AND pro.is_combo = '1'
GROUP BY
sku.product_id
ORDER BY

View File

@@ -0,0 +1,42 @@
<?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.TbPurchaseNoticeMapper">
<resultMap type="com.chaozhanggui.system.cashierservice.entity.TbPurchaseNotice" id="TbPurchaseNoticeMap">
<result property="id" column="id" jdbcType="INTEGER"/>
<result property="couponId" column="coupon_id" jdbcType="INTEGER"/>
<result property="dateUsed" column="date_used" jdbcType="VARCHAR"/>
<result property="availableTime" column="available_time" jdbcType="VARCHAR"/>
<result property="bookingType" column="booking_type" jdbcType="VARCHAR"/>
<result property="refundPolicy" column="refund_policy" jdbcType="VARCHAR"/>
<result property="usageRules" column="usage_rules" jdbcType="VARCHAR"/>
<result property="invoiceInfo" column="invoice_info" jdbcType="VARCHAR"/>
<result property="groupPurInfo" column="group_pur_info" jdbcType="VARCHAR"/>
<result property="marketPriceInfo" column="market_price_Info" jdbcType="VARCHAR"/>
<result property="discountInfo" column="discount_Info" jdbcType="VARCHAR"/>
<result property="platformTips" column="platform_tips" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
id
, coupon_id, date_used, available_time, booking_type, refund_policy, usage_rules, invoice_info, group_pur_info, market_price_Info, discount_Info, platform_tips </sql>
<select id="queryById" resultMap="TbPurchaseNoticeMap">
select
<include refid="Base_Column_List"/>
from tb_purchase_notice
where id = #{id}
</select>
<!--查询单个-->
<select id="queryByCouponId" resultMap="TbPurchaseNoticeMap">
select
<include refid="Base_Column_List"/>
from tb_purchase_notice
where coupon_id = #{couponId}
</select>
</mapper>

View File

@@ -0,0 +1,125 @@
<?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="operation_type" jdbcType="VARCHAR" property="operationType" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
</resultMap>
<sql id="Base_Column_List">
id, user_id, num, type, remark, from_source, create_time,operation_type
</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>
<select id="selectAll" resultType="com.chaozhanggui.system.cashierservice.entity.TbReleaseFlow">
select trf.*,tui.nick_name as nickName,tui.mini_app_open_id as openId from tb_release_flow trf left join tb_user_info tui on trf.user_id = tui.id
</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,operation_type)
values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=VARCHAR}, #{num,jdbcType=DECIMAL},
#{type,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{fromSource,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{operationType,jdbcType=VARCHAR})
</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>

File diff suppressed because it is too large Load Diff

View File

@@ -185,4 +185,9 @@
updated_at = #{updatedAt,jdbcType=BIGINT}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="countSelectByShopIdAndPayType" resultType="int">
select count(id) from tb_shop_pay_type where shop_id=#{shopId} and is_display=1 and pay_type=#{payType}
</select>
</mapper>

View File

@@ -35,6 +35,15 @@
from tb_shop_table
where qrcode = #{qrcode}
</select>
<select id="queryShopIdByTableCode" resultType="string">
select
shop_id
from tb_shop_table
where qrcode = #{qrcode}
limit 1
</select>
<select id="selectShopTableById" resultType="com.chaozhanggui.system.cashierservice.entity.TbShopTable">
select
a.id, a.name, a.shop_id, a.max_capacity, a.sort, a.area_id, a.is_predate, a.predate_amount, a.status,
@@ -161,6 +170,11 @@
</if>
</trim>
</insert>
<update id="upDateQrcodeNull" parameterType="java.lang.String">
update tb_shop_table
set qrcode = ''
where qrcode = #{qrcode,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopTable">
update tb_shop_table
<set>

View File

@@ -9,9 +9,10 @@
<result column="biz_code" jdbcType="VARCHAR" property="bizCode" />
<result column="biz_name" jdbcType="VARCHAR" property="bizName" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="type" jdbcType="VARCHAR" property="type" />
</resultMap>
<sql id="Base_Column_List">
id, shop_user_id, amount, balance, biz_code, biz_name, create_time
id, shop_user_id, amount, balance, biz_code, biz_name, create_time, type
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
@@ -26,10 +27,10 @@
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUserFlow">
insert into tb_shop_user_flow (id, shop_user_id, amount,
balance, biz_code, biz_name,
create_time)
create_time, type)
values (#{id,jdbcType=INTEGER}, #{shopUserId,jdbcType=INTEGER}, #{amount,jdbcType=DECIMAL},
#{balance,jdbcType=DECIMAL}, #{bizCode,jdbcType=VARCHAR}, #{bizName,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP})
#{createTime,jdbcType=TIMESTAMP}, #{type,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUserFlow">
insert into tb_shop_user_flow
@@ -55,6 +56,9 @@
<if test="createTime != null">
create_time,
</if>
<if test="type != null">
type,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@@ -78,6 +82,9 @@
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUserFlow">
@@ -101,6 +108,9 @@
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
@@ -111,17 +121,23 @@
balance = #{balance,jdbcType=DECIMAL},
biz_code = #{bizCode,jdbcType=VARCHAR},
biz_name = #{bizName,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP}
create_time = #{createTime,jdbcType=TIMESTAMP},
type = #{type,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByMemberAccountFlow" resultType="java.util.Map">
SELECT
f.*,
u.`name`
f.*,
u.`name`
FROM
tb_shop_user_flow f
LEFT JOIN tb_shop_user u ON f.shop_user_id = u.id
tb_shop_user_flow f
LEFT JOIN tb_shop_user u ON f.shop_user_id = u.id
where 1=1
<if test="memberId != null and memberId!=''">
and u.id = #{memberId}
</if>
order by f.id desc
</select>
</mapper>

View File

@@ -21,6 +21,7 @@
<result column="telephone" jdbcType="VARCHAR" property="telephone" />
<result column="is_vip" jdbcType="TINYINT" property="isVip" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="dynamic_code" jdbcType="VARCHAR" property="dynamicCode" />
<result column="is_attention" jdbcType="TINYINT" property="isAttention" />
<result column="attention_at" jdbcType="INTEGER" property="attentionAt" />
<result column="is_shareholder" jdbcType="TINYINT" property="isShareholder" />
@@ -35,7 +36,7 @@
id, amount, credit_amount, consume_amount, consume_number, level_consume, status,
merchant_id, shop_id, user_id, parent_id, parent_level, name, head_img, sex, birth_day,
telephone, is_vip, code, is_attention, attention_at, is_shareholder, level, distribute_type,
sort, created_at, updated_at, mini_open_id
sort, created_at, updated_at, mini_open_id,dynamic_code
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
@@ -43,6 +44,13 @@
from tb_shop_user
where id = #{id,jdbcType=VARCHAR}
</select>
<select id="selectByPhone" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_shop_user
where telephone = #{phone,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from tb_shop_user
where id = #{id,jdbcType=VARCHAR}
@@ -301,6 +309,15 @@
<if test="code != null">
code = #{code,jdbcType=VARCHAR},
</if>
<if test="dynamicCode != null">
dynamic_code = #{dynamicCode,jdbcType=VARCHAR},
</if>
<if test="dynamicCode != null">
dynamic_code = #{dynamicCode,jdbcType=VARCHAR},
</if>
<if test="isAttention != null">
is_attention = #{isAttention,jdbcType=TINYINT},
</if>
@@ -363,11 +380,53 @@
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="upUserBYId" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUser">
update tb_shop_user
set
user_id = #{userId,jdbcType=VARCHAR},
updated_at = #{updatedAt,jdbcType=BIGINT}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectByUserIdAndShopId" resultMap="BaseResultMap">
select * from tb_shop_user where user_id=#{userId} and shop_id=#{shopId}
</select>
<select id="selectByUserId" resultMap="BaseResultMap">
<select id="selectByPhoneAndShopId" resultMap="BaseResultMap">
select * from tb_shop_user where telephone=#{phone} and shop_id=#{shopId}
</select>
<select id="selectAllByUserId" resultMap="BaseResultMap">
select * from tb_shop_user where user_id=#{userId}
</select>
<select id="selectByOpenId" resultType="com.chaozhanggui.system.cashierservice.entity.TbShopUser">
select * from tb_shop_user where mini_open_id = #{openId}
</select>
<select id="selectParams" resultType="com.chaozhanggui.system.cashierservice.entity.TbParams">
select * from tb_params where id = 1
</select>
<select id="selectByUserId" resultType="com.chaozhanggui.system.cashierservice.entity.vo.ShopUserListVo">
SELECT
u.id as memberId,
i.id as shopId,
i.shop_name as shopName,
i.chain_name as chainName,
i.logo,
i.detail,
u.level_consume as levelConsume,
u.amount,
u.`code`,
u.is_vip as isVip
FROM
tb_shop_user u
left join tb_shop_info i on u.shop_id=i.id
WHERE
u.user_id = #{userId}
<if test="shopId != null and shopId !=''">
and shop_id = #{shopId}
</if>
</select>
</mapper>

View File

@@ -0,0 +1,78 @@
<?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.TbShopVideoMapper">
<resultMap type="com.chaozhanggui.system.cashierservice.entity.TbShopVideo" id="TbShopVideoMap">
<result property="id" column="id" jdbcType="INTEGER"/>
<result property="shopId" column="shop_id" jdbcType="INTEGER"/>
<result property="type" column="type" jdbcType="INTEGER"/>
<result property="name" column="name" jdbcType="VARCHAR"/>
<result property="channelId" column="channel_id" jdbcType="INTEGER"/>
<result property="createdTime" column="created_time" jdbcType="TIMESTAMP"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
<result property="sourceId" column="source_id" jdbcType="INTEGER"/>
<result property="sourceUrl" column="source_url" jdbcType="VARCHAR"/>
<result property="status" column="status" jdbcType="INTEGER"/>
</resultMap>
<sql id="Base_Column_List">
id
, shop_id, type, name, channel_id, source_id, source_url, status ,created_time, update_time</sql>
<!--查询单个-->
<select id="queryById" resultMap="TbShopVideoMap">
select
<include refid="Base_Column_List"/>
from tb_shop_video
where id = #{id}
</select>
<!--查询指定行数据-->
<select id="queryAll" resultMap="TbShopVideoMap">
select
<include refid="Base_Column_List"/>
from tb_shop_video
<where>
<if test="id != null">
and id = #{id}
</if>
<if test="shopId != null">
and shop_id = #{shopId}
</if>
<if test="type != null">
and type = #{type}
</if>
<if test="name != null and name != ''">
and name = #{name}
</if>
<if test="channelId != null">
and channel_id = #{channelId}
</if>
<if test="createdTime != null">
and created_time = #{createdTime}
</if>
<if test="updateTime != null">
and update_time = #{updateTime}
</if>
<if test="sourceId != null">
and source_id = #{sourceId}
</if>
<if test="sourceUrl != null and sourceUrl != ''">
and source_url = #{sourceUrl}
</if>
<if test="status != null">
and status = #{status}
</if>
<if test="videoId != null">
and video_id = #{videoId}
</if>
<if test="videoUrl != null and videoUrl != ''">
and video_url = #{videoUrl}
</if>
</where>
</select>
</mapper>

View File

@@ -0,0 +1,154 @@
<?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.TbSplitAccountsMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbSplitAccounts">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="merchant_id" jdbcType="INTEGER" property="merchantId" />
<result column="shop_id" jdbcType="INTEGER" property="shopId" />
<result column="coupons_price" jdbcType="DECIMAL" property="couponsPrice" />
<result column="conpons_amount" jdbcType="DECIMAL" property="conponsAmount" />
<result column="is_split" jdbcType="VARCHAR" property="isSplit" />
<result column="order_amount" jdbcType="DECIMAL" property="orderAmount" />
<result column="origin_amount" jdbcType="DECIMAL" property="originAmount" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="split_time" jdbcType="TIMESTAMP" property="splitTime" />
<result column="trade_day" jdbcType="VARCHAR" property="tradeDay" />
</resultMap>
<sql id="Base_Column_List">
id, merchant_id, shop_id, coupons_price, conpons_amount, is_split, order_amount,
create_time, split_time, trade_day,origin_amount
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_split_accounts
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_split_accounts
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbSplitAccounts">
insert into tb_split_accounts (id, merchant_id, shop_id,
coupons_price, conpons_amount, is_split,
order_amount, create_time, split_time,
trade_day,origin_amount)
values (#{id,jdbcType=INTEGER}, #{merchantId,jdbcType=INTEGER}, #{shopId,jdbcType=INTEGER},
#{couponsPrice,jdbcType=DECIMAL}, #{conponsAmount,jdbcType=DECIMAL}, #{isSplit,jdbcType=VARCHAR},
#{orderAmount,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, #{splitTime,jdbcType=TIMESTAMP},
#{tradeDay,jdbcType=VARCHAR},#{originAmount,jdbcType=DECIMAL})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbSplitAccounts">
insert into tb_split_accounts
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="merchantId != null">
merchant_id,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="couponsPrice != null">
coupons_price,
</if>
<if test="conponsAmount != null">
conpons_amount,
</if>
<if test="isSplit != null">
is_split,
</if>
<if test="orderAmount != null">
order_amount,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="splitTime != null">
split_time,
</if>
<if test="tradeDay != null">
trade_day,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="merchantId != null">
#{merchantId,jdbcType=INTEGER},
</if>
<if test="shopId != null">
#{shopId,jdbcType=INTEGER},
</if>
<if test="couponsPrice != null">
#{couponsPrice,jdbcType=DECIMAL},
</if>
<if test="conponsAmount != null">
#{conponsAmount,jdbcType=DECIMAL},
</if>
<if test="isSplit != null">
#{isSplit,jdbcType=VARCHAR},
</if>
<if test="orderAmount != null">
#{orderAmount,jdbcType=DECIMAL},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="splitTime != null">
#{splitTime,jdbcType=TIMESTAMP},
</if>
<if test="tradeDay != null">
#{tradeDay,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbSplitAccounts">
update tb_split_accounts
<set>
<if test="merchantId != null">
merchant_id = #{merchantId,jdbcType=INTEGER},
</if>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=INTEGER},
</if>
<if test="couponsPrice != null">
coupons_price = #{couponsPrice,jdbcType=DECIMAL},
</if>
<if test="conponsAmount != null">
conpons_amount = #{conponsAmount,jdbcType=DECIMAL},
</if>
<if test="isSplit != null">
is_split = #{isSplit,jdbcType=VARCHAR},
</if>
<if test="orderAmount != null">
order_amount = #{orderAmount,jdbcType=DECIMAL},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="splitTime != null">
split_time = #{splitTime,jdbcType=TIMESTAMP},
</if>
<if test="tradeDay != null">
trade_day = #{tradeDay,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbSplitAccounts">
update tb_split_accounts
set merchant_id = #{merchantId,jdbcType=INTEGER},
shop_id = #{shopId,jdbcType=INTEGER},
coupons_price = #{couponsPrice,jdbcType=DECIMAL},
conpons_amount = #{conponsAmount,jdbcType=DECIMAL},
is_split = #{isSplit,jdbcType=VARCHAR},
order_amount = #{orderAmount,jdbcType=DECIMAL},
create_time = #{createTime,jdbcType=TIMESTAMP},
split_time = #{splitTime,jdbcType=TIMESTAMP},
trade_day = #{tradeDay,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,135 @@
<?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.TbSystemCouponsMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbSystemCoupons">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<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,type_name
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_system_coupons
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectAll" resultType="com.chaozhanggui.system.cashierservice.entity.TbSystemCoupons">
select * from tb_system_coupons where status = '0' and name = #{type}
</select>
<select id="selectByAmount" resultType="java.lang.Integer" parameterType="java.math.BigDecimal">
select ifnull(count(*),0) from tb_system_coupons where status = '0' and coupons_amount >= #{orderNum}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_system_coupons
where id = #{id,jdbcType=INTEGER}
</delete>
<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,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}, #{typeName,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbSystemCoupons">
insert into tb_system_coupons
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
name,
</if>
<if test="couponsPrice != null">
coupons_price,
</if>
<if test="couponsAmount != null">
coupons_amount,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="endTime != null">
end_time,
</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="couponsPrice != null">
#{couponsPrice,jdbcType=DECIMAL},
</if>
<if test="couponsAmount != null">
#{couponsAmount,jdbcType=DECIMAL},
</if>
<if test="status != null">
#{status,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="endTime != null">
#{endTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbSystemCoupons">
update tb_system_coupons
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="couponsPrice != null">
coupons_price = #{couponsPrice,jdbcType=DECIMAL},
</if>
<if test="couponsAmount != null">
coupons_amount = #{couponsAmount,jdbcType=DECIMAL},
</if>
<if test="status != null">
status = #{status,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="endTime != null">
end_time = #{endTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbSystemCoupons">
update tb_system_coupons
set name = #{name,jdbcType=VARCHAR},
coupons_price = #{couponsPrice,jdbcType=DECIMAL},
coupons_amount = #{couponsAmount,jdbcType=DECIMAL},
status = #{status,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
end_time = #{endTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,147 @@
<?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.TbUserCouponsMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbUserCoupons">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="user_id" jdbcType="VARCHAR" property="userId" />
<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="is_double" jdbcType="VARCHAR" property="isDouble" />
<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, user_id, coupons_price, coupons_amount, status, create_time, update_time, end_time,is_double
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_user_coupons
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByUserId" resultType="com.chaozhanggui.system.cashierservice.entity.TbUserCoupons">
select * from tb_user_coupons where user_id = #{userId}
<if test="status != null and status != ''">
and status = #{status}
</if>
<if test="amount != null and amount != ''">
and coupons_amount &lt;= #{amount}
</if>
</select>
<select id="selectByOrderId" resultType="com.chaozhanggui.system.cashierservice.entity.TbUserCoupons">
select * from tb_user_coupons where order_id = #{orderId}
</select>
<select id="selectByUserIdAndAmount" resultType="java.lang.Integer">
select ifnull(count(*),0) from tb_user_coupons where user_id = #{userId} and status = '0' and coupons_amount >= #{orderNum}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_user_coupons
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbUserCoupons" useGeneratedKeys="true" keyProperty="id">
insert into tb_user_coupons (id, user_id, coupons_price,
coupons_amount, status, create_time,
update_time, end_time,is_double)
values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=VARCHAR}, #{couponsPrice,jdbcType=DECIMAL},
#{couponsAmount,jdbcType=DECIMAL}, #{status,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, #{isDouble,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbUserCoupons">
insert into tb_user_coupons
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="couponsPrice != null">
coupons_price,
</if>
<if test="couponsAmount != null">
coupons_amount,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="endTime != null">
end_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="couponsPrice != null">
#{couponsPrice,jdbcType=DECIMAL},
</if>
<if test="couponsAmount != null">
#{couponsAmount,jdbcType=DECIMAL},
</if>
<if test="status != null">
#{status,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="endTime != null">
#{endTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbUserCoupons">
update tb_user_coupons
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=VARCHAR},
</if>
<if test="couponsPrice != null">
coupons_price = #{couponsPrice,jdbcType=DECIMAL},
</if>
<if test="couponsAmount != null">
coupons_amount = #{couponsAmount,jdbcType=DECIMAL},
</if>
<if test="status != null">
status = #{status,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="endTime != null">
end_time = #{endTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbUserCoupons">
update tb_user_coupons
set user_id = #{userId,jdbcType=VARCHAR},
coupons_price = #{couponsPrice,jdbcType=DECIMAL},
coupons_amount = #{couponsAmount,jdbcType=DECIMAL},
status = #{status,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
end_time = #{endTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -3,7 +3,6 @@
<mapper namespace="com.chaozhanggui.system.cashierservice.dao.TbUserInfoMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbUserInfo">
<id column="id" jdbcType="INTEGER" property="id" />
<id column="user_id" jdbcType="INTEGER" property="userId" />
<result column="amount" jdbcType="DECIMAL" property="amount" />
<result column="charge_amount" jdbcType="DECIMAL" property="chargeAmount" />
<result column="line_of_credit" jdbcType="DECIMAL" property="lineOfCredit" />
@@ -49,15 +48,17 @@
<result column="bind_parent_at" jdbcType="BIGINT" property="bindParentAt" />
<result column="grand_parent_id" jdbcType="VARCHAR" property="grandParentId" />
<result column="password" jdbcType="VARCHAR" property="password" />
<result column="is_pwd" jdbcType="VARCHAR" property="isPwd" />
<result column="pwd" jdbcType="VARCHAR" property="pwd" />
</resultMap>
<sql id="Base_Column_List">
id,user_id, amount, charge_amount, line_of_credit, consume_amount, consume_number, total_score,
id, amount, charge_amount, line_of_credit, consume_amount, consume_number, total_score,
lock_score, card_no, card_password, level_id, head_img, nick_name, telephone, wx_ma_app_id,
birth_day, sex, mini_app_open_id, open_id, union_id, code, type, identify, status,
parent_id, parent_level, parent_type, project_id, merchant_id, is_resource, is_online,
is_vip, vip_effect_at, tips, source_path, is_sales_person, is_attention_mp, city,
search_word, last_log_in_at, last_leave_at, created_at, updated_at, bind_parent_at,
grand_parent_id,password
grand_parent_id,password,is_pwd,pwd
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
@@ -71,7 +72,7 @@
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbUserInfo" useGeneratedKeys="true" keyProperty="id">
insert into tb_user_info (id,user_id, amount, charge_amount,
insert into tb_user_info (id, amount, charge_amount,
line_of_credit, consume_amount, consume_number,
total_score, lock_score, card_no,
card_password, level_id, head_img,
@@ -85,9 +86,9 @@
tips, source_path, is_sales_person,
is_attention_mp, city, search_word,
last_log_in_at, last_leave_at, created_at,
updated_at, bind_parent_at, grand_parent_id,password
updated_at, bind_parent_at, grand_parent_id,password,is_pwd,pwd
)
values (#{id,jdbcType=INTEGER},#{userId,jdbcType=INTEGER}, #{amount,jdbcType=DECIMAL}, #{chargeAmount,jdbcType=DECIMAL},
values (#{id,jdbcType=INTEGER}, #{amount,jdbcType=DECIMAL}, #{chargeAmount,jdbcType=DECIMAL},
#{lineOfCredit,jdbcType=DECIMAL}, #{consumeAmount,jdbcType=DECIMAL}, #{consumeNumber,jdbcType=INTEGER},
#{totalScore,jdbcType=INTEGER}, #{lockScore,jdbcType=INTEGER}, #{cardNo,jdbcType=VARCHAR},
#{cardPassword,jdbcType=VARCHAR}, #{levelId,jdbcType=VARCHAR}, #{headImg,jdbcType=VARCHAR},
@@ -101,7 +102,8 @@
#{tips,jdbcType=VARCHAR}, #{sourcePath,jdbcType=VARCHAR}, #{isSalesPerson,jdbcType=TINYINT},
#{isAttentionMp,jdbcType=TINYINT}, #{city,jdbcType=VARCHAR}, #{searchWord,jdbcType=VARCHAR},
#{lastLogInAt,jdbcType=BIGINT}, #{lastLeaveAt,jdbcType=BIGINT}, #{createdAt,jdbcType=BIGINT},
#{updatedAt,jdbcType=BIGINT}, #{bindParentAt,jdbcType=BIGINT}, #{grandParentId,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}
#{updatedAt,jdbcType=BIGINT}, #{bindParentAt,jdbcType=BIGINT}, #{grandParentId,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
#{isPwd,jdbcType=VARCHAR},#{pwd,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbUserInfo">
@@ -110,9 +112,6 @@
<if test="id != null">
id,
</if>
<if test="userId != null and userId != ''">
user_id,
</if>
<if test="amount != null">
amount,
</if>
@@ -253,9 +252,6 @@
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="userId != null and userId != ''">
#{userId,jdbcType=INTEGER},
</if>
<if test="amount != null">
#{amount,jdbcType=DECIMAL},
</if>
@@ -396,9 +392,6 @@
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbUserInfo">
update tb_user_info
<set>
<if test="userId != null and userId != ''">
user_id = #{userId,jdbcType=INTEGER},
</if>
<if test="amount != null">
amount = #{amount,jdbcType=DECIMAL},
</if>
@@ -539,7 +532,7 @@
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbUserInfo">
update tb_user_info
set user_id = #{userId,jdbcType=INTEGER},
set
amount = #{amount,jdbcType=DECIMAL},
charge_amount = #{chargeAmount,jdbcType=DECIMAL},
line_of_credit = #{lineOfCredit,jdbcType=DECIMAL},
@@ -584,7 +577,9 @@
updated_at = #{updatedAt,jdbcType=BIGINT},
bind_parent_at = #{bindParentAt,jdbcType=BIGINT},
grand_parent_id = #{grandParentId,jdbcType=VARCHAR},
password = #{password,jdbcType=VARCHAR}
password = #{password,jdbcType=VARCHAR},
is_pwd=#{isPwd,jdbcType=VARCHAR},
pwd=#{pwd,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
@@ -593,12 +588,11 @@
select * from tb_user_info where mini_app_open_id=#{openId}
</select>
<select id="selectUserByPhone" resultMap="BaseResultMap">
select * from tb_user_info where telephone=#{phone} AND source_path=#{source}
</select>
<select id="selectByPhone" resultMap="BaseResultMap">
select * from tb_user_info where telephone=#{phone} AND source_path='APP' AND user_id is null
select * from tb_user_info where telephone=#{phone}
</select>
<select id="selectAll" resultType="com.chaozhanggui.system.cashierservice.entity.TbUserInfo">
select * from tb_user_info
</select>
</mapper>

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

@@ -0,0 +1,180 @@
<?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.TbWiningUserMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbWiningUser">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="user_name" jdbcType="VARCHAR" property="userName" />
<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="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, is_refund, refund_amount,
refund_no, refund_pay_type, trade_day, refund_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_wining_user
where id = #{id,jdbcType=INTEGER}
</select>
<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,
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},
#{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">
insert into tb_wining_user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="userName != null">
user_name,
</if>
<if test="orderNo != null">
order_no,
</if>
<if test="orderAmount != null">
order_amount,
</if>
<if test="isUser != null">
is_user,
</if>
<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">
#{id,jdbcType=INTEGER},
</if>
<if test="userName != null">
#{userName,jdbcType=VARCHAR},
</if>
<if test="orderNo != null">
#{orderNo,jdbcType=VARCHAR},
</if>
<if test="orderAmount != null">
#{orderAmount,jdbcType=DECIMAL},
</if>
<if test="isUser != null">
#{isUser,jdbcType=VARCHAR},
</if>
<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">
update tb_wining_user
<set>
<if test="userName != null">
user_name = #{userName,jdbcType=VARCHAR},
</if>
<if test="orderNo != null">
order_no = #{orderNo,jdbcType=VARCHAR},
</if>
<if test="orderAmount != null">
order_amount = #{orderAmount,jdbcType=DECIMAL},
</if>
<if test="isUser != null">
is_user = #{isUser,jdbcType=VARCHAR},
</if>
<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>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbWiningUser">
update tb_wining_user
set user_name = #{userName,jdbcType=VARCHAR},
order_no = #{orderNo,jdbcType=VARCHAR},
order_amount = #{orderAmount,jdbcType=DECIMAL},
is_user = #{isUser,jdbcType=VARCHAR},
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>