This commit is contained in:
韩鹏辉
2024-03-21 10:17:54 +08:00
parent c7e46f3504
commit b96a251fd8
296 changed files with 34548 additions and 0 deletions

View File

@@ -0,0 +1,56 @@
spring:
application:
name: cashierService
datasource:
url: jdbc:mysql://121.40.128.145:3306/fycashier?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useJDBCCompliantTimezoneShift=true&serverTimezone=Asia/Shanghai&useSSL=false&allowMultiQueries=true
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: 1
# 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

View File

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

View File

@@ -0,0 +1,57 @@
spring:
application:
name: cashierService
datasource:
url: jdbc:mysql://rm-bp1b572nblln4jho2.mysql.rds.aliyuncs.com/fycashier?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useJDBCCompliantTimezoneShift=true&serverTimezone=Asia/Shanghai&useSSL=false&allowMultiQueries=true
username: root
password: Czg666888
driver-class-name: com.mysql.cj.jdbc.Driver
initialSize: 5
minIdle: 5
maxActive: 20
maxWait: 60000
logging:
level:
com.chaozhanggui.system.openness: debug
redis:
# redis数据库索引默认为0我们使用索引为3的数据库避免和其他数据库冲突
database: 0
# redis服务器地址默认为localhost
host: 127.0.0.1
# 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: 127.0.0.1
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

View File

@@ -0,0 +1,56 @@
spring:
application:
name: cashierService
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: debug
redis:
# redis数据库索引默认为0我们使用索引为3的数据库避免和其他数据库冲突
database: 2
# 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: 127.0.0.1
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

View File

@@ -0,0 +1,42 @@
spring:
profiles:
active: hph
server:
port: 10587
servlet:
context-path: /cashier-client/
# 日志配置
logging:
level:
# web日志
org.springframework.web: debug
# mybatis日志
org.mybatis: debug
charset:
# 输出控制台编码
console: UTF-8
# 输出文件编码
file: UTF-8
# 输出文件名及路径,不配置则不输出文件
file:
# 切记该文件表示正在产出日志的日志文件。并不会打包当文件大于max-file-size,会根据file-name-pattern格式打包
# 名称为log/cashier-client.log文件夹会在项目根目录下打包后会在启动包同目录下名称为/log/cashier-client.log的文件夹会在项目所在磁盘的跟目录下
name: log/cashier-client.log
logback:
rollingpolicy:
# 单文件的大小默认10M, 超过之后打包成一个日志文件
max-file-size: 1MB
# 日志保存的天数
max-history: 30
# 打包文件格式,默认: ${LOG_FILE}.%d{yyyy-MM-dd}.%i.gz,书写格式为:文件路径/文件名.%i.文件后缀,其中%i不可省去否则无日志显示
# 例如: 日期为2021/11/5 ,则打包文件之后为: log/ota.2021-11-05.0.gz,0表示日志的第一部分后续就是1,2,3...
# 如果是压缩包里面会多一个名log/ota.2021-11-05.0的日志文件
# 如下面的例子,打包之后为: log/2021-11/cashier-client.2020-11-5.0.log这是一个日志文件
file-name-pattern: log/%d{yyyy-MM}/cashier-client.%d{yyyy-MM-dd}.%i.log
gateway:
url: https://gatewaytestapi.sxczgkj.cn/gate-service/
client:
backUrl: https://p40312246f.goho.co/cashier-client/notify/notifyPay

View File

@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration
PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<!-- 第二种mybatis逆向生成xml配置 -->
<generatorConfiguration>
<!-- 需要指明数据库连接器的绝对路径 -->
<!-- <classPathEntry location="C:\Users\admin\.m1\repository\mysql\mysql-connector-java\8.0.20\mysql-connector-java-8.0.20.jar" />-->
<classPathEntry location="E:\app\maven\repository\mysql\mysql-connector-java\8.0.17\mysql-connector-java-8.0.17.jar"/>
<context id="msqlTables" targetRuntime="MyBatis3">
<!-- 生成的pojo将implements Serializable-->
<plugin type="org.mybatis.generator.plugins.SerializablePlugin"></plugin>
<commentGenerator>
<!-- 是否去除自动生成的注释 true false:否 -->
<property name="suppressAllComments" value="true" />
<!-- 是否去除所有自动生成的文件的时间戳默认为false -->
<property name="suppressDate" value="true" />
</commentGenerator>
<!-- 数据库链接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" >
<property name="nullCatalogMeansCurrent" value="true"/>
</jdbcConnection>
<javaTypeResolver>
<property name="forceBigDecimals" value="false" />
</javaTypeResolver>
<!--
默认false把JDBC DECIMAL 和 NUMERIC 类型解析为 Integer
true把JDBC DECIMAL 和 NUMERIC 类型解析为java.math.BigDecimal
-->
<!--
生成model模型对应的包路径以及文件存放路径(targetProject)targetProject可以指定具体的路径,如./src/main/java
也可以使用“MAVEN”来自动生成这样生成的代码会在target/generatord-source目录下
-->
<!--<javaModelGenerator targetPackage="com.forezp.entity" targetProject="MAVEN">-->
<javaModelGenerator targetPackage="com.chaozhanggui.system.cashierservice.entity" targetProject="src\main\java">
<property name="enableSubPackages" value="true"/>
<!-- 从数据库返回的值被清理前后的空格 -->
<property name="trimStrings" value="true" />
</javaModelGenerator>
<sqlMapGenerator targetPackage="mapper" targetProject="src\main\resources">
<property name="enableSubPackages" value="true"/>
</sqlMapGenerator>
<javaClientGenerator type="XMLMAPPER" targetPackage="com.chaozhanggui.system.cashierservice.dao" targetProject="src\main\java">
<property name="enableSubPackages" value="true"/>
</javaClientGenerator>
<!-- 要生成的表tableName是数据库中的表名或视图名 domainObjectName是实体类名-->
<!-- <table tableName="%" schema="fycashier" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" ></table>-->
<table tableName="tb_shop_user_duty_pay" domainObjectName="ShopUserDutyPay"
enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"
enableSelectByExample="false" selectByExampleQueryId="false" >
</table>
</context>
</generatorConfiguration>

View File

@@ -0,0 +1,199 @@
<?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.CodeColumnConfigMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.CodeColumnConfig">
<id column="column_id" jdbcType="BIGINT" property="columnId" />
<result column="table_name" jdbcType="VARCHAR" property="tableName" />
<result column="column_name" jdbcType="VARCHAR" property="columnName" />
<result column="column_type" jdbcType="VARCHAR" property="columnType" />
<result column="dict_name" jdbcType="VARCHAR" property="dictName" />
<result column="extra" jdbcType="VARCHAR" property="extra" />
<result column="form_show" jdbcType="BIT" property="formShow" />
<result column="form_type" jdbcType="VARCHAR" property="formType" />
<result column="key_type" jdbcType="VARCHAR" property="keyType" />
<result column="list_show" jdbcType="BIT" property="listShow" />
<result column="not_null" jdbcType="BIT" property="notNull" />
<result column="query_type" jdbcType="VARCHAR" property="queryType" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="date_annotation" jdbcType="VARCHAR" property="dateAnnotation" />
</resultMap>
<sql id="Base_Column_List">
column_id, table_name, column_name, column_type, dict_name, extra, form_show, form_type,
key_type, list_show, not_null, query_type, remark, date_annotation
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from code_column_config
where column_id = #{columnId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from code_column_config
where column_id = #{columnId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.CodeColumnConfig">
insert into code_column_config (column_id, table_name, column_name,
column_type, dict_name, extra,
form_show, form_type, key_type,
list_show, not_null, query_type,
remark, date_annotation)
values (#{columnId,jdbcType=BIGINT}, #{tableName,jdbcType=VARCHAR}, #{columnName,jdbcType=VARCHAR},
#{columnType,jdbcType=VARCHAR}, #{dictName,jdbcType=VARCHAR}, #{extra,jdbcType=VARCHAR},
#{formShow,jdbcType=BIT}, #{formType,jdbcType=VARCHAR}, #{keyType,jdbcType=VARCHAR},
#{listShow,jdbcType=BIT}, #{notNull,jdbcType=BIT}, #{queryType,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}, #{dateAnnotation,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.CodeColumnConfig">
insert into code_column_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="columnId != null">
column_id,
</if>
<if test="tableName != null">
table_name,
</if>
<if test="columnName != null">
column_name,
</if>
<if test="columnType != null">
column_type,
</if>
<if test="dictName != null">
dict_name,
</if>
<if test="extra != null">
extra,
</if>
<if test="formShow != null">
form_show,
</if>
<if test="formType != null">
form_type,
</if>
<if test="keyType != null">
key_type,
</if>
<if test="listShow != null">
list_show,
</if>
<if test="notNull != null">
not_null,
</if>
<if test="queryType != null">
query_type,
</if>
<if test="remark != null">
remark,
</if>
<if test="dateAnnotation != null">
date_annotation,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="columnId != null">
#{columnId,jdbcType=BIGINT},
</if>
<if test="tableName != null">
#{tableName,jdbcType=VARCHAR},
</if>
<if test="columnName != null">
#{columnName,jdbcType=VARCHAR},
</if>
<if test="columnType != null">
#{columnType,jdbcType=VARCHAR},
</if>
<if test="dictName != null">
#{dictName,jdbcType=VARCHAR},
</if>
<if test="extra != null">
#{extra,jdbcType=VARCHAR},
</if>
<if test="formShow != null">
#{formShow,jdbcType=BIT},
</if>
<if test="formType != null">
#{formType,jdbcType=VARCHAR},
</if>
<if test="keyType != null">
#{keyType,jdbcType=VARCHAR},
</if>
<if test="listShow != null">
#{listShow,jdbcType=BIT},
</if>
<if test="notNull != null">
#{notNull,jdbcType=BIT},
</if>
<if test="queryType != null">
#{queryType,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="dateAnnotation != null">
#{dateAnnotation,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.CodeColumnConfig">
update code_column_config
<set>
<if test="tableName != null">
table_name = #{tableName,jdbcType=VARCHAR},
</if>
<if test="columnName != null">
column_name = #{columnName,jdbcType=VARCHAR},
</if>
<if test="columnType != null">
column_type = #{columnType,jdbcType=VARCHAR},
</if>
<if test="dictName != null">
dict_name = #{dictName,jdbcType=VARCHAR},
</if>
<if test="extra != null">
extra = #{extra,jdbcType=VARCHAR},
</if>
<if test="formShow != null">
form_show = #{formShow,jdbcType=BIT},
</if>
<if test="formType != null">
form_type = #{formType,jdbcType=VARCHAR},
</if>
<if test="keyType != null">
key_type = #{keyType,jdbcType=VARCHAR},
</if>
<if test="listShow != null">
list_show = #{listShow,jdbcType=BIT},
</if>
<if test="notNull != null">
not_null = #{notNull,jdbcType=BIT},
</if>
<if test="queryType != null">
query_type = #{queryType,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="dateAnnotation != null">
date_annotation = #{dateAnnotation,jdbcType=VARCHAR},
</if>
</set>
where column_id = #{columnId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.CodeColumnConfig">
update code_column_config
set table_name = #{tableName,jdbcType=VARCHAR},
column_name = #{columnName,jdbcType=VARCHAR},
column_type = #{columnType,jdbcType=VARCHAR},
dict_name = #{dictName,jdbcType=VARCHAR},
extra = #{extra,jdbcType=VARCHAR},
form_show = #{formShow,jdbcType=BIT},
form_type = #{formType,jdbcType=VARCHAR},
key_type = #{keyType,jdbcType=VARCHAR},
list_show = #{listShow,jdbcType=BIT},
not_null = #{notNull,jdbcType=BIT},
query_type = #{queryType,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
date_annotation = #{dateAnnotation,jdbcType=VARCHAR}
where column_id = #{columnId,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,153 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.chaozhanggui.system.cashierservice.dao.CodeGenConfigMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.CodeGenConfig">
<id column="config_id" jdbcType="BIGINT" property="configId" />
<result column="table_name" jdbcType="VARCHAR" property="tableName" />
<result column="author" jdbcType="VARCHAR" property="author" />
<result column="cover" jdbcType="BIT" property="cover" />
<result column="module_name" jdbcType="VARCHAR" property="moduleName" />
<result column="pack" jdbcType="VARCHAR" property="pack" />
<result column="path" jdbcType="VARCHAR" property="path" />
<result column="api_path" jdbcType="VARCHAR" property="apiPath" />
<result column="prefix" jdbcType="VARCHAR" property="prefix" />
<result column="api_alias" jdbcType="VARCHAR" property="apiAlias" />
</resultMap>
<sql id="Base_Column_List">
config_id, table_name, author, cover, module_name, pack, path, api_path, prefix,
api_alias
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from code_gen_config
where config_id = #{configId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from code_gen_config
where config_id = #{configId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.CodeGenConfig">
insert into code_gen_config (config_id, table_name, author,
cover, module_name, pack,
path, api_path, prefix,
api_alias)
values (#{configId,jdbcType=BIGINT}, #{tableName,jdbcType=VARCHAR}, #{author,jdbcType=VARCHAR},
#{cover,jdbcType=BIT}, #{moduleName,jdbcType=VARCHAR}, #{pack,jdbcType=VARCHAR},
#{path,jdbcType=VARCHAR}, #{apiPath,jdbcType=VARCHAR}, #{prefix,jdbcType=VARCHAR},
#{apiAlias,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.CodeGenConfig">
insert into code_gen_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="configId != null">
config_id,
</if>
<if test="tableName != null">
table_name,
</if>
<if test="author != null">
author,
</if>
<if test="cover != null">
cover,
</if>
<if test="moduleName != null">
module_name,
</if>
<if test="pack != null">
pack,
</if>
<if test="path != null">
path,
</if>
<if test="apiPath != null">
api_path,
</if>
<if test="prefix != null">
prefix,
</if>
<if test="apiAlias != null">
api_alias,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="configId != null">
#{configId,jdbcType=BIGINT},
</if>
<if test="tableName != null">
#{tableName,jdbcType=VARCHAR},
</if>
<if test="author != null">
#{author,jdbcType=VARCHAR},
</if>
<if test="cover != null">
#{cover,jdbcType=BIT},
</if>
<if test="moduleName != null">
#{moduleName,jdbcType=VARCHAR},
</if>
<if test="pack != null">
#{pack,jdbcType=VARCHAR},
</if>
<if test="path != null">
#{path,jdbcType=VARCHAR},
</if>
<if test="apiPath != null">
#{apiPath,jdbcType=VARCHAR},
</if>
<if test="prefix != null">
#{prefix,jdbcType=VARCHAR},
</if>
<if test="apiAlias != null">
#{apiAlias,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.CodeGenConfig">
update code_gen_config
<set>
<if test="tableName != null">
table_name = #{tableName,jdbcType=VARCHAR},
</if>
<if test="author != null">
author = #{author,jdbcType=VARCHAR},
</if>
<if test="cover != null">
cover = #{cover,jdbcType=BIT},
</if>
<if test="moduleName != null">
module_name = #{moduleName,jdbcType=VARCHAR},
</if>
<if test="pack != null">
pack = #{pack,jdbcType=VARCHAR},
</if>
<if test="path != null">
path = #{path,jdbcType=VARCHAR},
</if>
<if test="apiPath != null">
api_path = #{apiPath,jdbcType=VARCHAR},
</if>
<if test="prefix != null">
prefix = #{prefix,jdbcType=VARCHAR},
</if>
<if test="apiAlias != null">
api_alias = #{apiAlias,jdbcType=VARCHAR},
</if>
</set>
where config_id = #{configId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.CodeGenConfig">
update code_gen_config
set table_name = #{tableName,jdbcType=VARCHAR},
author = #{author,jdbcType=VARCHAR},
cover = #{cover,jdbcType=BIT},
module_name = #{moduleName,jdbcType=VARCHAR},
pack = #{pack,jdbcType=VARCHAR},
path = #{path,jdbcType=VARCHAR},
api_path = #{apiPath,jdbcType=VARCHAR},
prefix = #{prefix,jdbcType=VARCHAR},
api_alias = #{apiAlias,jdbcType=VARCHAR}
where config_id = #{configId,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,177 @@
<?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.GUserSetMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.GUserSet">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="app_id" jdbcType="VARCHAR" property="appId" />
<result column="store_id" jdbcType="VARCHAR" property="storeId" />
<result column="store_name" jdbcType="VARCHAR" property="storeName" />
<result column="merchant_name" jdbcType="VARCHAR" property="merchantName" />
<result column="token" jdbcType="VARCHAR" property="token" />
<result column="ip" jdbcType="VARCHAR" property="ip" />
<result column="nofiy_url" jdbcType="VARCHAR" property="nofiyUrl" />
<result column="public_key" jdbcType="VARCHAR" property="publicKey" />
<result column="private_key" jdbcType="VARCHAR" property="privateKey" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
id, app_id, store_id, store_name, merchant_name, token, ip, nofiy_url, public_key,
private_key, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from g_user_set
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from g_user_set
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.GUserSet">
insert into g_user_set (id, app_id, store_id,
store_name, merchant_name, token,
ip, nofiy_url, public_key,
private_key, create_time, update_time
)
values (#{id,jdbcType=INTEGER}, #{appId,jdbcType=VARCHAR}, #{storeId,jdbcType=VARCHAR},
#{storeName,jdbcType=VARCHAR}, #{merchantName,jdbcType=VARCHAR}, #{token,jdbcType=VARCHAR},
#{ip,jdbcType=VARCHAR}, #{nofiyUrl,jdbcType=VARCHAR}, #{publicKey,jdbcType=VARCHAR},
#{privateKey,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.GUserSet">
insert into g_user_set
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="appId != null">
app_id,
</if>
<if test="storeId != null">
store_id,
</if>
<if test="storeName != null">
store_name,
</if>
<if test="merchantName != null">
merchant_name,
</if>
<if test="token != null">
token,
</if>
<if test="ip != null">
ip,
</if>
<if test="nofiyUrl != null">
nofiy_url,
</if>
<if test="publicKey != null">
public_key,
</if>
<if test="privateKey != null">
private_key,
</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="appId != null">
#{appId,jdbcType=VARCHAR},
</if>
<if test="storeId != null">
#{storeId,jdbcType=VARCHAR},
</if>
<if test="storeName != null">
#{storeName,jdbcType=VARCHAR},
</if>
<if test="merchantName != null">
#{merchantName,jdbcType=VARCHAR},
</if>
<if test="token != null">
#{token,jdbcType=VARCHAR},
</if>
<if test="ip != null">
#{ip,jdbcType=VARCHAR},
</if>
<if test="nofiyUrl != null">
#{nofiyUrl,jdbcType=VARCHAR},
</if>
<if test="publicKey != null">
#{publicKey,jdbcType=VARCHAR},
</if>
<if test="privateKey != null">
#{privateKey,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.GUserSet">
update g_user_set
<set>
<if test="appId != null">
app_id = #{appId,jdbcType=VARCHAR},
</if>
<if test="storeId != null">
store_id = #{storeId,jdbcType=VARCHAR},
</if>
<if test="storeName != null">
store_name = #{storeName,jdbcType=VARCHAR},
</if>
<if test="merchantName != null">
merchant_name = #{merchantName,jdbcType=VARCHAR},
</if>
<if test="token != null">
token = #{token,jdbcType=VARCHAR},
</if>
<if test="ip != null">
ip = #{ip,jdbcType=VARCHAR},
</if>
<if test="nofiyUrl != null">
nofiy_url = #{nofiyUrl,jdbcType=VARCHAR},
</if>
<if test="publicKey != null">
public_key = #{publicKey,jdbcType=VARCHAR},
</if>
<if test="privateKey != null">
private_key = #{privateKey,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.GUserSet">
update g_user_set
set app_id = #{appId,jdbcType=VARCHAR},
store_id = #{storeId,jdbcType=VARCHAR},
store_name = #{storeName,jdbcType=VARCHAR},
merchant_name = #{merchantName,jdbcType=VARCHAR},
token = #{token,jdbcType=VARCHAR},
ip = #{ip,jdbcType=VARCHAR},
nofiy_url = #{nofiyUrl,jdbcType=VARCHAR},
public_key = #{publicKey,jdbcType=VARCHAR},
private_key = #{privateKey,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,177 @@
<?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.MntAppMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.MntApp">
<id column="app_id" jdbcType="BIGINT" property="appId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="upload_path" jdbcType="VARCHAR" property="uploadPath" />
<result column="deploy_path" jdbcType="VARCHAR" property="deployPath" />
<result column="backup_path" jdbcType="VARCHAR" property="backupPath" />
<result column="port" jdbcType="INTEGER" property="port" />
<result column="start_script" jdbcType="VARCHAR" property="startScript" />
<result column="deploy_script" jdbcType="VARCHAR" property="deployScript" />
<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">
app_id, name, upload_path, deploy_path, backup_path, port, start_script, deploy_script,
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 mnt_app
where app_id = #{appId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from mnt_app
where app_id = #{appId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.MntApp">
insert into mnt_app (app_id, name, upload_path,
deploy_path, backup_path, port,
start_script, deploy_script, create_by,
update_by, create_time, update_time
)
values (#{appId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{uploadPath,jdbcType=VARCHAR},
#{deployPath,jdbcType=VARCHAR}, #{backupPath,jdbcType=VARCHAR}, #{port,jdbcType=INTEGER},
#{startScript,jdbcType=VARCHAR}, #{deployScript,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR},
#{updateBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.MntApp">
insert into mnt_app
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="appId != null">
app_id,
</if>
<if test="name != null">
name,
</if>
<if test="uploadPath != null">
upload_path,
</if>
<if test="deployPath != null">
deploy_path,
</if>
<if test="backupPath != null">
backup_path,
</if>
<if test="port != null">
port,
</if>
<if test="startScript != null">
start_script,
</if>
<if test="deployScript != null">
deploy_script,
</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="appId != null">
#{appId,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="uploadPath != null">
#{uploadPath,jdbcType=VARCHAR},
</if>
<if test="deployPath != null">
#{deployPath,jdbcType=VARCHAR},
</if>
<if test="backupPath != null">
#{backupPath,jdbcType=VARCHAR},
</if>
<if test="port != null">
#{port,jdbcType=INTEGER},
</if>
<if test="startScript != null">
#{startScript,jdbcType=VARCHAR},
</if>
<if test="deployScript != null">
#{deployScript,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.MntApp">
update mnt_app
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="uploadPath != null">
upload_path = #{uploadPath,jdbcType=VARCHAR},
</if>
<if test="deployPath != null">
deploy_path = #{deployPath,jdbcType=VARCHAR},
</if>
<if test="backupPath != null">
backup_path = #{backupPath,jdbcType=VARCHAR},
</if>
<if test="port != null">
port = #{port,jdbcType=INTEGER},
</if>
<if test="startScript != null">
start_script = #{startScript,jdbcType=VARCHAR},
</if>
<if test="deployScript != null">
deploy_script = #{deployScript,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 app_id = #{appId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.MntApp">
update mnt_app
set name = #{name,jdbcType=VARCHAR},
upload_path = #{uploadPath,jdbcType=VARCHAR},
deploy_path = #{deployPath,jdbcType=VARCHAR},
backup_path = #{backupPath,jdbcType=VARCHAR},
port = #{port,jdbcType=INTEGER},
start_script = #{startScript,jdbcType=VARCHAR},
deploy_script = #{deployScript,jdbcType=VARCHAR},
create_by = #{createBy,jdbcType=VARCHAR},
update_by = #{updateBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where app_id = #{appId,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,141 @@
<?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.MntDatabaseMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.MntDatabase">
<id column="db_id" jdbcType="VARCHAR" property="dbId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="jdbc_url" jdbcType="VARCHAR" property="jdbcUrl" />
<result column="user_name" jdbcType="VARCHAR" property="userName" />
<result column="pwd" jdbcType="VARCHAR" property="pwd" />
<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">
db_id, name, jdbc_url, user_name, pwd, create_by, update_by, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from mnt_database
where db_id = #{dbId,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from mnt_database
where db_id = #{dbId,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.MntDatabase">
insert into mnt_database (db_id, name, jdbc_url,
user_name, pwd, create_by,
update_by, create_time, update_time
)
values (#{dbId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{jdbcUrl,jdbcType=VARCHAR},
#{userName,jdbcType=VARCHAR}, #{pwd,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR},
#{updateBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.MntDatabase">
insert into mnt_database
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="dbId != null">
db_id,
</if>
<if test="name != null">
name,
</if>
<if test="jdbcUrl != null">
jdbc_url,
</if>
<if test="userName != null">
user_name,
</if>
<if test="pwd != null">
pwd,
</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="dbId != null">
#{dbId,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="jdbcUrl != null">
#{jdbcUrl,jdbcType=VARCHAR},
</if>
<if test="userName != null">
#{userName,jdbcType=VARCHAR},
</if>
<if test="pwd != null">
#{pwd,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.MntDatabase">
update mnt_database
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="jdbcUrl != null">
jdbc_url = #{jdbcUrl,jdbcType=VARCHAR},
</if>
<if test="userName != null">
user_name = #{userName,jdbcType=VARCHAR},
</if>
<if test="pwd != null">
pwd = #{pwd,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 db_id = #{dbId,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.MntDatabase">
update mnt_database
set name = #{name,jdbcType=VARCHAR},
jdbc_url = #{jdbcUrl,jdbcType=VARCHAR},
user_name = #{userName,jdbcType=VARCHAR},
pwd = #{pwd,jdbcType=VARCHAR},
create_by = #{createBy,jdbcType=VARCHAR},
update_by = #{updateBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where db_id = #{dbId,jdbcType=VARCHAR}
</update>
</mapper>

View File

@@ -0,0 +1,106 @@
<?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.MntDeployHistoryMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.MntDeployHistory">
<id column="history_id" jdbcType="VARCHAR" property="historyId" />
<result column="app_name" jdbcType="VARCHAR" property="appName" />
<result column="deploy_date" jdbcType="TIMESTAMP" property="deployDate" />
<result column="deploy_user" jdbcType="VARCHAR" property="deployUser" />
<result column="ip" jdbcType="VARCHAR" property="ip" />
<result column="deploy_id" jdbcType="BIGINT" property="deployId" />
</resultMap>
<sql id="Base_Column_List">
history_id, app_name, deploy_date, deploy_user, ip, deploy_id
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from mnt_deploy_history
where history_id = #{historyId,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from mnt_deploy_history
where history_id = #{historyId,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.MntDeployHistory">
insert into mnt_deploy_history (history_id, app_name, deploy_date,
deploy_user, ip, deploy_id
)
values (#{historyId,jdbcType=VARCHAR}, #{appName,jdbcType=VARCHAR}, #{deployDate,jdbcType=TIMESTAMP},
#{deployUser,jdbcType=VARCHAR}, #{ip,jdbcType=VARCHAR}, #{deployId,jdbcType=BIGINT}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.MntDeployHistory">
insert into mnt_deploy_history
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="historyId != null">
history_id,
</if>
<if test="appName != null">
app_name,
</if>
<if test="deployDate != null">
deploy_date,
</if>
<if test="deployUser != null">
deploy_user,
</if>
<if test="ip != null">
ip,
</if>
<if test="deployId != null">
deploy_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="historyId != null">
#{historyId,jdbcType=VARCHAR},
</if>
<if test="appName != null">
#{appName,jdbcType=VARCHAR},
</if>
<if test="deployDate != null">
#{deployDate,jdbcType=TIMESTAMP},
</if>
<if test="deployUser != null">
#{deployUser,jdbcType=VARCHAR},
</if>
<if test="ip != null">
#{ip,jdbcType=VARCHAR},
</if>
<if test="deployId != null">
#{deployId,jdbcType=BIGINT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.MntDeployHistory">
update mnt_deploy_history
<set>
<if test="appName != null">
app_name = #{appName,jdbcType=VARCHAR},
</if>
<if test="deployDate != null">
deploy_date = #{deployDate,jdbcType=TIMESTAMP},
</if>
<if test="deployUser != null">
deploy_user = #{deployUser,jdbcType=VARCHAR},
</if>
<if test="ip != null">
ip = #{ip,jdbcType=VARCHAR},
</if>
<if test="deployId != null">
deploy_id = #{deployId,jdbcType=BIGINT},
</if>
</set>
where history_id = #{historyId,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.MntDeployHistory">
update mnt_deploy_history
set app_name = #{appName,jdbcType=VARCHAR},
deploy_date = #{deployDate,jdbcType=TIMESTAMP},
deploy_user = #{deployUser,jdbcType=VARCHAR},
ip = #{ip,jdbcType=VARCHAR},
deploy_id = #{deployId,jdbcType=BIGINT}
where history_id = #{historyId,jdbcType=VARCHAR}
</update>
</mapper>

View File

@@ -0,0 +1,106 @@
<?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.MntDeployMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.MntDeploy">
<id column="deploy_id" jdbcType="BIGINT" property="deployId" />
<result column="app_id" jdbcType="BIGINT" property="appId" />
<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">
deploy_id, app_id, 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 mnt_deploy
where deploy_id = #{deployId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from mnt_deploy
where deploy_id = #{deployId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.MntDeploy">
insert into mnt_deploy (deploy_id, app_id, create_by,
update_by, create_time, update_time
)
values (#{deployId,jdbcType=BIGINT}, #{appId,jdbcType=BIGINT}, #{createBy,jdbcType=VARCHAR},
#{updateBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.MntDeploy">
insert into mnt_deploy
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="deployId != null">
deploy_id,
</if>
<if test="appId != null">
app_id,
</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="deployId != null">
#{deployId,jdbcType=BIGINT},
</if>
<if test="appId != null">
#{appId,jdbcType=BIGINT},
</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.MntDeploy">
update mnt_deploy
<set>
<if test="appId != null">
app_id = #{appId,jdbcType=BIGINT},
</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 deploy_id = #{deployId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.MntDeploy">
update mnt_deploy
set app_id = #{appId,jdbcType=BIGINT},
create_by = #{createBy,jdbcType=VARCHAR},
update_by = #{updateBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where deploy_id = #{deployId,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,36 @@
<?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.MntDeployServerMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.MntDeployServerKey">
<id column="deploy_id" jdbcType="BIGINT" property="deployId" />
<id column="server_id" jdbcType="BIGINT" property="serverId" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.MntDeployServerKey">
delete from mnt_deploy_server
where deploy_id = #{deployId,jdbcType=BIGINT}
and server_id = #{serverId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.MntDeployServerKey">
insert into mnt_deploy_server (deploy_id, server_id)
values (#{deployId,jdbcType=BIGINT}, #{serverId,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.MntDeployServerKey">
insert into mnt_deploy_server
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="deployId != null">
deploy_id,
</if>
<if test="serverId != null">
server_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deployId != null">
#{deployId,jdbcType=BIGINT},
</if>
<if test="serverId != null">
#{serverId,jdbcType=BIGINT},
</if>
</trim>
</insert>
</mapper>

View File

@@ -0,0 +1,153 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.chaozhanggui.system.cashierservice.dao.MntServerMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.MntServer">
<id column="server_id" jdbcType="BIGINT" property="serverId" />
<result column="account" jdbcType="VARCHAR" property="account" />
<result column="ip" jdbcType="VARCHAR" property="ip" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="password" jdbcType="VARCHAR" property="password" />
<result column="port" jdbcType="INTEGER" property="port" />
<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">
server_id, account, ip, name, password, port, 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 mnt_server
where server_id = #{serverId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from mnt_server
where server_id = #{serverId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.MntServer">
insert into mnt_server (server_id, account, ip,
name, password, port,
create_by, update_by, create_time,
update_time)
values (#{serverId,jdbcType=BIGINT}, #{account,jdbcType=VARCHAR}, #{ip,jdbcType=VARCHAR},
#{name,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{port,jdbcType=INTEGER},
#{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.MntServer">
insert into mnt_server
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="serverId != null">
server_id,
</if>
<if test="account != null">
account,
</if>
<if test="ip != null">
ip,
</if>
<if test="name != null">
name,
</if>
<if test="password != null">
password,
</if>
<if test="port != null">
port,
</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="serverId != null">
#{serverId,jdbcType=BIGINT},
</if>
<if test="account != null">
#{account,jdbcType=VARCHAR},
</if>
<if test="ip != null">
#{ip,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="password != null">
#{password,jdbcType=VARCHAR},
</if>
<if test="port != null">
#{port,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.MntServer">
update mnt_server
<set>
<if test="account != null">
account = #{account,jdbcType=VARCHAR},
</if>
<if test="ip != null">
ip = #{ip,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="password != null">
password = #{password,jdbcType=VARCHAR},
</if>
<if test="port != null">
port = #{port,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 server_id = #{serverId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.MntServer">
update mnt_server
set account = #{account,jdbcType=VARCHAR},
ip = #{ip,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
password = #{password,jdbcType=VARCHAR},
port = #{port,jdbcType=INTEGER},
create_by = #{createBy,jdbcType=VARCHAR},
update_by = #{updateBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where server_id = #{serverId,jdbcType=BIGINT}
</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.ShopUserDutyDetailMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.ShopUserDutyDetail">
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="duty_id" jdbcType="INTEGER" property="dutyId"/>
<result column="product_id" jdbcType="INTEGER" property="productId"/>
<result column="product_name" jdbcType="VARCHAR" property="productName"/>
<result column="sku_id" jdbcType="INTEGER" property="skuId"/>
<result column="sku_name" jdbcType="VARCHAR" property="skuName"/>
<result column="num" jdbcType="INTEGER" property="num"/>
<result column="amount" jdbcType="DECIMAL" property="amount"/>
</resultMap>
<sql id="Base_Column_List">
id, duty_id, product_id, product_name, sku_id, sku_name, num, amount
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from tb_shop_user_duty_detail
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByDuctId" resultType="com.chaozhanggui.system.cashierservice.entity.ShopUserDutyDetail">
select * from tb_shop_user_duty_detail where duty_id = #{id} and sku_id in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<select id="selectAllByDuctId"
resultType="com.chaozhanggui.system.cashierservice.entity.ShopUserDutyDetail">
select * from tb_shop_user_duty_detail where duty_id = #{id}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_shop_user_duty_detail
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.ShopUserDutyDetail">
insert into tb_shop_user_duty_detail (id, duty_id, product_id,
product_name, sku_id, sku_name,
num, amount)
values (#{id,jdbcType=INTEGER}, #{dutyId,jdbcType=INTEGER}, #{productId,jdbcType=INTEGER},
#{productName,jdbcType=VARCHAR}, #{skuId,jdbcType=INTEGER}, #{skuName,jdbcType=VARCHAR},
#{num,jdbcType=INTEGER}, #{amount,jdbcType=DECIMAL})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.ShopUserDutyDetail">
insert into tb_shop_user_duty_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="dutyId != null">
duty_id,
</if>
<if test="productId != null">
product_id,
</if>
<if test="productName != null">
product_name,
</if>
<if test="skuId != null">
sku_id,
</if>
<if test="skuName != null">
sku_name,
</if>
<if test="num != null">
num,
</if>
<if test="amount != null">
amount,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="dutyId != null">
#{dutyId,jdbcType=INTEGER},
</if>
<if test="productId != null">
#{productId,jdbcType=INTEGER},
</if>
<if test="productName != null">
#{productName,jdbcType=VARCHAR},
</if>
<if test="skuId != null">
#{skuId,jdbcType=INTEGER},
</if>
<if test="skuName != null">
#{skuName,jdbcType=VARCHAR},
</if>
<if test="num != null">
#{num,jdbcType=INTEGER},
</if>
<if test="amount != null">
#{amount,jdbcType=DECIMAL},
</if>
</trim>
</insert>
<insert id="batchInsert">
INSERT INTO tb_shop_user_duty_detail (id, duty_id, product_id,
product_name, sku_id, sku_name,
num, amount) VALUES
<foreach collection="list" separator="," item="item">
(#{item.id},#{item.dutyId},#{item.productId},#{item.productName},#{item.skuId},#{item.skuName},#{item.num},#{item.amount})
</foreach>
</insert>
<update id="updateByPrimaryKeySelective"
parameterType="com.chaozhanggui.system.cashierservice.entity.ShopUserDutyDetail">
update tb_shop_user_duty_detail
<set>
<if test="dutyId != null">
duty_id = #{dutyId,jdbcType=INTEGER},
</if>
<if test="productId != null">
product_id = #{productId,jdbcType=INTEGER},
</if>
<if test="productName != null">
product_name = #{productName,jdbcType=VARCHAR},
</if>
<if test="skuId != null">
sku_id = #{skuId,jdbcType=INTEGER},
</if>
<if test="skuName != null">
sku_name = #{skuName,jdbcType=VARCHAR},
</if>
<if test="num != null">
num = #{num,jdbcType=INTEGER},
</if>
<if test="amount != null">
amount = #{amount,jdbcType=DECIMAL},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.ShopUserDutyDetail">
update tb_shop_user_duty_detail
set duty_id = #{dutyId,jdbcType=INTEGER},
product_id = #{productId,jdbcType=INTEGER},
product_name = #{productName,jdbcType=VARCHAR},
sku_id = #{skuId,jdbcType=INTEGER},
sku_name = #{skuName,jdbcType=VARCHAR},
num = #{num,jdbcType=INTEGER},
amount = #{amount,jdbcType=DECIMAL}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,223 @@
<?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.ShopUserDutyMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.ShopUserDuty">
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="user_id" jdbcType="INTEGER" property="userId"/>
<result column="login_time" jdbcType="TIMESTAMP" property="loginTime"/>
<result column="order_num" jdbcType="INTEGER" property="orderNum"/>
<result column="amount" jdbcType="VARCHAR" property="amount"/>
<result column="login_out_time" jdbcType="TIMESTAMP" property="loginOutTime"/>
<result column="user_name" jdbcType="VARCHAR" property="userName"/>
<result column="status" jdbcType="VARCHAR" property="status"/>
<result column="income_amount" jdbcType="DECIMAL" property="incomeAmount"/>
<result column="shop_id" jdbcType="INTEGER" property="shopId"/>
<result column="token_id" jdbcType="INTEGER" property="tokenId"/>
<result column="petty_cash" jdbcType="DECIMAL" property="pettyCash"/>
<result column="cash_amount" jdbcType="DECIMAL" property="cashAmount"/>
<result column="hand_amount" jdbcType="DECIMAL" property="handAmount"/>
<result column="return_amount" jdbcType="DECIMAL" property="returnAmount"/>
<result column="equipment" jdbcType="VARCHAR" property="equipment"/>
<result column="trade_day" jdbcType="VARCHAR" property="tradeDay"/>
<result column="type" jdbcType="VARCHAR" property="type"/>
</resultMap>
<sql id="Base_Column_List">
id, user_id, login_time, order_num, amount, login_out_time, user_name, status, income_amount,
shop_id, petty_cash, cash_amount, hand_amount, equipment,return_amount,token_id,trade_day,type
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from tb_shop_user_duty
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByTokenId" resultType="com.chaozhanggui.system.cashierservice.entity.ShopUserDuty">
select * from tb_shop_user_duty where token_id = #{tokenId}
</select>
<select id="selectByShopId" resultType="com.chaozhanggui.system.cashierservice.entity.ShopUserDuty">
select * from tb_shop_user_duty where shop_id = #{shopId}
</select>
<select id="selectSumAmount" resultType="java.math.BigDecimal">
select ifnull(sum(amount),0) from tb_shop_user_duty where shop_id = #{shopId}
</select>
<select id="selectByTokenIdAndTradeDay"
resultType="com.chaozhanggui.system.cashierservice.entity.ShopUserDuty">
select * from tb_shop_user_duty where shop_id = #{shopId} and trade_day = #{day} and token_id = #{tokenId};
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_shop_user_duty
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.ShopUserDuty"
useGeneratedKeys="true" keyProperty="id">
insert into tb_shop_user_duty (id, user_id, login_time,
order_num, amount, login_out_time,
user_name, status, income_amount,
shop_id, petty_cash, cash_amount,
hand_amount, equipment,return_amount,token_id,trade_day,type)
values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{loginTime,jdbcType=TIMESTAMP},
#{orderNum,jdbcType=INTEGER}, #{amount,jdbcType=VARCHAR}, #{loginOutTime,jdbcType=TIMESTAMP},
#{userName,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{incomeAmount,jdbcType=DECIMAL},
#{shopId,jdbcType=INTEGER}, #{pettyCash,jdbcType=DECIMAL}, #{cashAmount,jdbcType=DECIMAL},
#{handAmount,jdbcType=DECIMAL}, #{equipment,jdbcType=VARCHAR}, #{returnAmount,jdbcType=DECIMAL},#{tokenId,jdbcType=INTEGER},#{tradeDay,jdbcType=VARCHAR},#{type,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.ShopUserDuty">
insert into tb_shop_user_duty
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="loginTime != null">
login_time,
</if>
<if test="orderNum != null">
order_num,
</if>
<if test="amount != null">
amount,
</if>
<if test="loginOutTime != null">
login_out_time,
</if>
<if test="userName != null">
user_name,
</if>
<if test="status != null">
status,
</if>
<if test="incomeAmount != null">
income_amount,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="pettyCash != null">
petty_cash,
</if>
<if test="cashAmount != null">
cash_amount,
</if>
<if test="handAmount != null">
hand_amount,
</if>
<if test="equipment != null">
equipment,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="userId != null">
#{userId,jdbcType=INTEGER},
</if>
<if test="loginTime != null">
#{loginTime,jdbcType=TIMESTAMP},
</if>
<if test="orderNum != null">
#{orderNum,jdbcType=INTEGER},
</if>
<if test="amount != null">
#{amount,jdbcType=VARCHAR},
</if>
<if test="loginOutTime != null">
#{loginOutTime,jdbcType=TIMESTAMP},
</if>
<if test="userName != null">
#{userName,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=VARCHAR},
</if>
<if test="incomeAmount != null">
#{incomeAmount,jdbcType=DECIMAL},
</if>
<if test="shopId != null">
#{shopId,jdbcType=INTEGER},
</if>
<if test="pettyCash != null">
#{pettyCash,jdbcType=DECIMAL},
</if>
<if test="cashAmount != null">
#{cashAmount,jdbcType=DECIMAL},
</if>
<if test="handAmount != null">
#{handAmount,jdbcType=DECIMAL},
</if>
<if test="equipment != null">
#{equipment,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.ShopUserDuty">
update tb_shop_user_duty
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=INTEGER},
</if>
<if test="loginTime != null">
login_time = #{loginTime,jdbcType=TIMESTAMP},
</if>
<if test="orderNum != null">
order_num = #{orderNum,jdbcType=INTEGER},
</if>
<if test="amount != null">
amount = #{amount,jdbcType=VARCHAR},
</if>
<if test="loginOutTime != null">
login_out_time = #{loginOutTime,jdbcType=TIMESTAMP},
</if>
<if test="userName != null">
user_name = #{userName,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=VARCHAR},
</if>
<if test="incomeAmount != null">
income_amount = #{incomeAmount,jdbcType=DECIMAL},
</if>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=INTEGER},
</if>
<if test="pettyCash != null">
petty_cash = #{pettyCash,jdbcType=DECIMAL},
</if>
<if test="cashAmount != null">
cash_amount = #{cashAmount,jdbcType=DECIMAL},
</if>
<if test="handAmount != null">
hand_amount = #{handAmount,jdbcType=DECIMAL},
</if>
<if test="equipment != null">
equipment = #{equipment,jdbcType=VARCHAR},
</if>
<if test="returnAmount != null">
return_amount = #{returnAmount,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.ShopUserDuty">
update tb_shop_user_duty
set user_id = #{userId,jdbcType=INTEGER},
login_time = #{loginTime,jdbcType=TIMESTAMP},
order_num = #{orderNum,jdbcType=INTEGER},
amount = #{amount,jdbcType=VARCHAR},
login_out_time = #{loginOutTime,jdbcType=TIMESTAMP},
user_name = #{userName,jdbcType=VARCHAR},
status = #{status,jdbcType=VARCHAR},
income_amount = #{incomeAmount,jdbcType=DECIMAL},
shop_id = #{shopId,jdbcType=INTEGER},
petty_cash = #{pettyCash,jdbcType=DECIMAL},
cash_amount = #{cashAmount,jdbcType=DECIMAL},
hand_amount = #{handAmount,jdbcType=DECIMAL},
equipment = #{equipment,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateStatusByTokenId">
update tb_shop_user_duty set status = '1' and login_out_time = now() where token_id = #{tokenId}
</update>
</mapper>

View File

@@ -0,0 +1,86 @@
<?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.ShopUserDutyPayMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.ShopUserDutyPay">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="duty_id" jdbcType="INTEGER" property="dutyId" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="amount" jdbcType="DECIMAL" property="amount" />
</resultMap>
<sql id="Base_Column_List">
id, duty_id, type, amount
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_shop_user_duty_pay
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByDuctIdAndType"
resultType="com.chaozhanggui.system.cashierservice.entity.ShopUserDutyPay">
select * from tb_shop_user_duty_pay where duty_id = #{dutyId} and type = #{payType}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_shop_user_duty_pay
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.ShopUserDutyPay">
insert into tb_shop_user_duty_pay (id, duty_id, type,
amount)
values (#{id,jdbcType=INTEGER}, #{dutyId,jdbcType=INTEGER}, #{type,jdbcType=VARCHAR},
#{amount,jdbcType=DECIMAL})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.ShopUserDutyPay">
insert into tb_shop_user_duty_pay
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="dutyId != null">
duty_id,
</if>
<if test="type != null">
type,
</if>
<if test="amount != null">
amount,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="dutyId != null">
#{dutyId,jdbcType=INTEGER},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="amount != null">
#{amount,jdbcType=DECIMAL},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.ShopUserDutyPay">
update tb_shop_user_duty_pay
<set>
<if test="dutyId != null">
duty_id = #{dutyId,jdbcType=INTEGER},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="amount != null">
amount = #{amount,jdbcType=DECIMAL},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.ShopUserDutyPay">
update tb_shop_user_duty_pay
set duty_id = #{dutyId,jdbcType=INTEGER},
type = #{type,jdbcType=VARCHAR},
amount = #{amount,jdbcType=DECIMAL}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,153 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.chaozhanggui.system.cashierservice.dao.SysDeptMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.SysDept">
<id column="dept_id" jdbcType="BIGINT" property="deptId" />
<result column="pid" jdbcType="BIGINT" property="pid" />
<result column="sub_count" jdbcType="INTEGER" property="subCount" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="dept_sort" jdbcType="INTEGER" property="deptSort" />
<result column="enabled" jdbcType="BIT" property="enabled" />
<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">
dept_id, pid, sub_count, name, dept_sort, enabled, 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_dept
where dept_id = #{deptId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from sys_dept
where dept_id = #{deptId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.SysDept">
insert into sys_dept (dept_id, pid, sub_count,
name, dept_sort, enabled,
create_by, update_by, create_time,
update_time)
values (#{deptId,jdbcType=BIGINT}, #{pid,jdbcType=BIGINT}, #{subCount,jdbcType=INTEGER},
#{name,jdbcType=VARCHAR}, #{deptSort,jdbcType=INTEGER}, #{enabled,jdbcType=BIT},
#{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.SysDept">
insert into sys_dept
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="deptId != null">
dept_id,
</if>
<if test="pid != null">
pid,
</if>
<if test="subCount != null">
sub_count,
</if>
<if test="name != null">
name,
</if>
<if test="deptSort != null">
dept_sort,
</if>
<if test="enabled != null">
enabled,
</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="deptId != null">
#{deptId,jdbcType=BIGINT},
</if>
<if test="pid != null">
#{pid,jdbcType=BIGINT},
</if>
<if test="subCount != null">
#{subCount,jdbcType=INTEGER},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="deptSort != null">
#{deptSort,jdbcType=INTEGER},
</if>
<if test="enabled != null">
#{enabled,jdbcType=BIT},
</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.SysDept">
update sys_dept
<set>
<if test="pid != null">
pid = #{pid,jdbcType=BIGINT},
</if>
<if test="subCount != null">
sub_count = #{subCount,jdbcType=INTEGER},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="deptSort != null">
dept_sort = #{deptSort,jdbcType=INTEGER},
</if>
<if test="enabled != null">
enabled = #{enabled,jdbcType=BIT},
</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 dept_id = #{deptId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.SysDept">
update sys_dept
set pid = #{pid,jdbcType=BIGINT},
sub_count = #{subCount,jdbcType=INTEGER},
name = #{name,jdbcType=VARCHAR},
dept_sort = #{deptSort,jdbcType=INTEGER},
enabled = #{enabled,jdbcType=BIT},
create_by = #{createBy,jdbcType=VARCHAR},
update_by = #{updateBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where dept_id = #{deptId,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,141 @@
<?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>
<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

@@ -0,0 +1,117 @@
<?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>
</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.SysJobMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.SysJob">
<id column="job_id" jdbcType="BIGINT" property="jobId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="enabled" jdbcType="BIT" property="enabled" />
<result column="job_sort" jdbcType="INTEGER" property="jobSort" />
<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">
job_id, name, enabled, job_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_job
where job_id = #{jobId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from sys_job
where job_id = #{jobId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.SysJob">
insert into sys_job (job_id, name, enabled,
job_sort, create_by, update_by,
create_time, update_time)
values (#{jobId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{enabled,jdbcType=BIT},
#{jobSort,jdbcType=INTEGER}, #{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.SysJob">
insert into sys_job
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="jobId != null">
job_id,
</if>
<if test="name != null">
name,
</if>
<if test="enabled != null">
enabled,
</if>
<if test="jobSort != null">
job_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="jobId != null">
#{jobId,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
#{enabled,jdbcType=BIT},
</if>
<if test="jobSort != null">
#{jobSort,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.SysJob">
update sys_job
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
enabled = #{enabled,jdbcType=BIT},
</if>
<if test="jobSort != null">
job_sort = #{jobSort,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 job_id = #{jobId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.SysJob">
update sys_job
set name = #{name,jdbcType=VARCHAR},
enabled = #{enabled,jdbcType=BIT},
job_sort = #{jobSort,jdbcType=INTEGER},
create_by = #{createBy,jdbcType=VARCHAR},
update_by = #{updateBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where job_id = #{jobId,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,197 @@
<?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.SysLogMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.SysLog">
<id column="log_id" jdbcType="BIGINT" property="logId" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="log_type" jdbcType="VARCHAR" property="logType" />
<result column="method" jdbcType="VARCHAR" property="method" />
<result column="request_ip" jdbcType="VARCHAR" property="requestIp" />
<result column="time" jdbcType="BIGINT" property="time" />
<result column="username" jdbcType="VARCHAR" property="username" />
<result column="address" jdbcType="VARCHAR" property="address" />
<result column="browser" jdbcType="VARCHAR" property="browser" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.SysLogWithBLOBs">
<result column="params" jdbcType="LONGVARCHAR" property="params" />
<result column="exception_detail" jdbcType="LONGVARCHAR" property="exceptionDetail" />
</resultMap>
<sql id="Base_Column_List">
log_id, description, log_type, method, request_ip, time, username, address, browser,
create_time
</sql>
<sql id="Blob_Column_List">
params, exception_detail
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from sys_log
where log_id = #{logId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from sys_log
where log_id = #{logId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.SysLogWithBLOBs">
insert into sys_log (log_id, description, log_type,
method, request_ip, time,
username, address, browser,
create_time, params, exception_detail
)
values (#{logId,jdbcType=BIGINT}, #{description,jdbcType=VARCHAR}, #{logType,jdbcType=VARCHAR},
#{method,jdbcType=VARCHAR}, #{requestIp,jdbcType=VARCHAR}, #{time,jdbcType=BIGINT},
#{username,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{browser,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{params,jdbcType=LONGVARCHAR}, #{exceptionDetail,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.SysLogWithBLOBs">
insert into sys_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="logId != null">
log_id,
</if>
<if test="description != null">
description,
</if>
<if test="logType != null">
log_type,
</if>
<if test="method != null">
method,
</if>
<if test="requestIp != null">
request_ip,
</if>
<if test="time != null">
time,
</if>
<if test="username != null">
username,
</if>
<if test="address != null">
address,
</if>
<if test="browser != null">
browser,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="params != null">
params,
</if>
<if test="exceptionDetail != null">
exception_detail,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="logId != null">
#{logId,jdbcType=BIGINT},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="logType != null">
#{logType,jdbcType=VARCHAR},
</if>
<if test="method != null">
#{method,jdbcType=VARCHAR},
</if>
<if test="requestIp != null">
#{requestIp,jdbcType=VARCHAR},
</if>
<if test="time != null">
#{time,jdbcType=BIGINT},
</if>
<if test="username != null">
#{username,jdbcType=VARCHAR},
</if>
<if test="address != null">
#{address,jdbcType=VARCHAR},
</if>
<if test="browser != null">
#{browser,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="params != null">
#{params,jdbcType=LONGVARCHAR},
</if>
<if test="exceptionDetail != null">
#{exceptionDetail,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.SysLogWithBLOBs">
update sys_log
<set>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="logType != null">
log_type = #{logType,jdbcType=VARCHAR},
</if>
<if test="method != null">
method = #{method,jdbcType=VARCHAR},
</if>
<if test="requestIp != null">
request_ip = #{requestIp,jdbcType=VARCHAR},
</if>
<if test="time != null">
time = #{time,jdbcType=BIGINT},
</if>
<if test="username != null">
username = #{username,jdbcType=VARCHAR},
</if>
<if test="address != null">
address = #{address,jdbcType=VARCHAR},
</if>
<if test="browser != null">
browser = #{browser,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="params != null">
params = #{params,jdbcType=LONGVARCHAR},
</if>
<if test="exceptionDetail != null">
exception_detail = #{exceptionDetail,jdbcType=LONGVARCHAR},
</if>
</set>
where log_id = #{logId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.system.cashierservice.entity.SysLogWithBLOBs">
update sys_log
set description = #{description,jdbcType=VARCHAR},
log_type = #{logType,jdbcType=VARCHAR},
method = #{method,jdbcType=VARCHAR},
request_ip = #{requestIp,jdbcType=VARCHAR},
time = #{time,jdbcType=BIGINT},
username = #{username,jdbcType=VARCHAR},
address = #{address,jdbcType=VARCHAR},
browser = #{browser,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
params = #{params,jdbcType=LONGVARCHAR},
exception_detail = #{exceptionDetail,jdbcType=LONGVARCHAR}
where log_id = #{logId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.SysLog">
update sys_log
set description = #{description,jdbcType=VARCHAR},
log_type = #{logType,jdbcType=VARCHAR},
method = #{method,jdbcType=VARCHAR},
request_ip = #{requestIp,jdbcType=VARCHAR},
time = #{time,jdbcType=BIGINT},
username = #{username,jdbcType=VARCHAR},
address = #{address,jdbcType=VARCHAR},
browser = #{browser,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP}
where log_id = #{logId,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,258 @@
<?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.SysMenuMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.SysMenu">
<id column="menu_id" jdbcType="BIGINT" property="menuId" />
<result column="pid" jdbcType="BIGINT" property="pid" />
<result column="sub_count" jdbcType="INTEGER" property="subCount" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="component" jdbcType="VARCHAR" property="component" />
<result column="menu_sort" jdbcType="INTEGER" property="menuSort" />
<result column="icon" jdbcType="VARCHAR" property="icon" />
<result column="path" jdbcType="VARCHAR" property="path" />
<result column="i_frame" jdbcType="BIT" property="iFrame" />
<result column="cache" jdbcType="BIT" property="cache" />
<result column="hidden" jdbcType="BIT" property="hidden" />
<result column="permission" jdbcType="VARCHAR" property="permission" />
<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" />
<result column="active_menu" jdbcType="VARCHAR" property="activeMenu" />
</resultMap>
<sql id="Base_Column_List">
menu_id, pid, sub_count, type, title, name, component, menu_sort, icon, path, i_frame,
cache, hidden, permission, create_by, update_by, create_time, update_time, active_menu
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from sys_menu
where menu_id = #{menuId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from sys_menu
where menu_id = #{menuId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.SysMenu">
insert into sys_menu (menu_id, pid, sub_count,
type, title, name,
component, menu_sort, icon,
path, i_frame, cache, hidden,
permission, create_by, update_by,
create_time, update_time, active_menu
)
values (#{menuId,jdbcType=BIGINT}, #{pid,jdbcType=BIGINT}, #{subCount,jdbcType=INTEGER},
#{type,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{component,jdbcType=VARCHAR}, #{menuSort,jdbcType=INTEGER}, #{icon,jdbcType=VARCHAR},
#{path,jdbcType=VARCHAR}, #{iFrame,jdbcType=BIT}, #{cache,jdbcType=BIT}, #{hidden,jdbcType=BIT},
#{permission,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{activeMenu,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.SysMenu">
insert into sys_menu
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="menuId != null">
menu_id,
</if>
<if test="pid != null">
pid,
</if>
<if test="subCount != null">
sub_count,
</if>
<if test="type != null">
type,
</if>
<if test="title != null">
title,
</if>
<if test="name != null">
name,
</if>
<if test="component != null">
component,
</if>
<if test="menuSort != null">
menu_sort,
</if>
<if test="icon != null">
icon,
</if>
<if test="path != null">
path,
</if>
<if test="iFrame != null">
i_frame,
</if>
<if test="cache != null">
cache,
</if>
<if test="hidden != null">
hidden,
</if>
<if test="permission != null">
permission,
</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>
<if test="activeMenu != null">
active_menu,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="menuId != null">
#{menuId,jdbcType=BIGINT},
</if>
<if test="pid != null">
#{pid,jdbcType=BIGINT},
</if>
<if test="subCount != null">
#{subCount,jdbcType=INTEGER},
</if>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
<if test="title != null">
#{title,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="component != null">
#{component,jdbcType=VARCHAR},
</if>
<if test="menuSort != null">
#{menuSort,jdbcType=INTEGER},
</if>
<if test="icon != null">
#{icon,jdbcType=VARCHAR},
</if>
<if test="path != null">
#{path,jdbcType=VARCHAR},
</if>
<if test="iFrame != null">
#{iFrame,jdbcType=BIT},
</if>
<if test="cache != null">
#{cache,jdbcType=BIT},
</if>
<if test="hidden != null">
#{hidden,jdbcType=BIT},
</if>
<if test="permission != null">
#{permission,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>
<if test="activeMenu != null">
#{activeMenu,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.SysMenu">
update sys_menu
<set>
<if test="pid != null">
pid = #{pid,jdbcType=BIGINT},
</if>
<if test="subCount != null">
sub_count = #{subCount,jdbcType=INTEGER},
</if>
<if test="type != null">
type = #{type,jdbcType=INTEGER},
</if>
<if test="title != null">
title = #{title,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="component != null">
component = #{component,jdbcType=VARCHAR},
</if>
<if test="menuSort != null">
menu_sort = #{menuSort,jdbcType=INTEGER},
</if>
<if test="icon != null">
icon = #{icon,jdbcType=VARCHAR},
</if>
<if test="path != null">
path = #{path,jdbcType=VARCHAR},
</if>
<if test="iFrame != null">
i_frame = #{iFrame,jdbcType=BIT},
</if>
<if test="cache != null">
cache = #{cache,jdbcType=BIT},
</if>
<if test="hidden != null">
hidden = #{hidden,jdbcType=BIT},
</if>
<if test="permission != null">
permission = #{permission,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>
<if test="activeMenu != null">
active_menu = #{activeMenu,jdbcType=VARCHAR},
</if>
</set>
where menu_id = #{menuId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.SysMenu">
update sys_menu
set pid = #{pid,jdbcType=BIGINT},
sub_count = #{subCount,jdbcType=INTEGER},
type = #{type,jdbcType=INTEGER},
title = #{title,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
component = #{component,jdbcType=VARCHAR},
menu_sort = #{menuSort,jdbcType=INTEGER},
icon = #{icon,jdbcType=VARCHAR},
path = #{path,jdbcType=VARCHAR},
i_frame = #{iFrame,jdbcType=BIT},
cache = #{cache,jdbcType=BIT},
hidden = #{hidden,jdbcType=BIT},
permission = #{permission,jdbcType=VARCHAR},
create_by = #{createBy,jdbcType=VARCHAR},
update_by = #{updateBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
active_menu = #{activeMenu,jdbcType=VARCHAR}
where menu_id = #{menuId,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,224 @@
<?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.SysQuartzJobMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.SysQuartzJob">
<id column="job_id" jdbcType="BIGINT" property="jobId" />
<result column="bean_name" jdbcType="VARCHAR" property="beanName" />
<result column="cron_expression" jdbcType="VARCHAR" property="cronExpression" />
<result column="is_pause" jdbcType="BIT" property="isPause" />
<result column="job_name" jdbcType="VARCHAR" property="jobName" />
<result column="method_name" jdbcType="VARCHAR" property="methodName" />
<result column="params" jdbcType="VARCHAR" property="params" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="person_in_charge" jdbcType="VARCHAR" property="personInCharge" />
<result column="email" jdbcType="VARCHAR" property="email" />
<result column="sub_task" jdbcType="VARCHAR" property="subTask" />
<result column="pause_after_failure" jdbcType="BIT" property="pauseAfterFailure" />
<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">
job_id, bean_name, cron_expression, is_pause, job_name, method_name, params, description,
person_in_charge, email, sub_task, pause_after_failure, 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_quartz_job
where job_id = #{jobId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from sys_quartz_job
where job_id = #{jobId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.SysQuartzJob">
insert into sys_quartz_job (job_id, bean_name, cron_expression,
is_pause, job_name, method_name,
params, description, person_in_charge,
email, sub_task, pause_after_failure,
create_by, update_by, create_time,
update_time)
values (#{jobId,jdbcType=BIGINT}, #{beanName,jdbcType=VARCHAR}, #{cronExpression,jdbcType=VARCHAR},
#{isPause,jdbcType=BIT}, #{jobName,jdbcType=VARCHAR}, #{methodName,jdbcType=VARCHAR},
#{params,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{personInCharge,jdbcType=VARCHAR},
#{email,jdbcType=VARCHAR}, #{subTask,jdbcType=VARCHAR}, #{pauseAfterFailure,jdbcType=BIT},
#{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.SysQuartzJob">
insert into sys_quartz_job
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="jobId != null">
job_id,
</if>
<if test="beanName != null">
bean_name,
</if>
<if test="cronExpression != null">
cron_expression,
</if>
<if test="isPause != null">
is_pause,
</if>
<if test="jobName != null">
job_name,
</if>
<if test="methodName != null">
method_name,
</if>
<if test="params != null">
params,
</if>
<if test="description != null">
description,
</if>
<if test="personInCharge != null">
person_in_charge,
</if>
<if test="email != null">
email,
</if>
<if test="subTask != null">
sub_task,
</if>
<if test="pauseAfterFailure != null">
pause_after_failure,
</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="jobId != null">
#{jobId,jdbcType=BIGINT},
</if>
<if test="beanName != null">
#{beanName,jdbcType=VARCHAR},
</if>
<if test="cronExpression != null">
#{cronExpression,jdbcType=VARCHAR},
</if>
<if test="isPause != null">
#{isPause,jdbcType=BIT},
</if>
<if test="jobName != null">
#{jobName,jdbcType=VARCHAR},
</if>
<if test="methodName != null">
#{methodName,jdbcType=VARCHAR},
</if>
<if test="params != null">
#{params,jdbcType=VARCHAR},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="personInCharge != null">
#{personInCharge,jdbcType=VARCHAR},
</if>
<if test="email != null">
#{email,jdbcType=VARCHAR},
</if>
<if test="subTask != null">
#{subTask,jdbcType=VARCHAR},
</if>
<if test="pauseAfterFailure != null">
#{pauseAfterFailure,jdbcType=BIT},
</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.SysQuartzJob">
update sys_quartz_job
<set>
<if test="beanName != null">
bean_name = #{beanName,jdbcType=VARCHAR},
</if>
<if test="cronExpression != null">
cron_expression = #{cronExpression,jdbcType=VARCHAR},
</if>
<if test="isPause != null">
is_pause = #{isPause,jdbcType=BIT},
</if>
<if test="jobName != null">
job_name = #{jobName,jdbcType=VARCHAR},
</if>
<if test="methodName != null">
method_name = #{methodName,jdbcType=VARCHAR},
</if>
<if test="params != null">
params = #{params,jdbcType=VARCHAR},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="personInCharge != null">
person_in_charge = #{personInCharge,jdbcType=VARCHAR},
</if>
<if test="email != null">
email = #{email,jdbcType=VARCHAR},
</if>
<if test="subTask != null">
sub_task = #{subTask,jdbcType=VARCHAR},
</if>
<if test="pauseAfterFailure != null">
pause_after_failure = #{pauseAfterFailure,jdbcType=BIT},
</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 job_id = #{jobId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.SysQuartzJob">
update sys_quartz_job
set bean_name = #{beanName,jdbcType=VARCHAR},
cron_expression = #{cronExpression,jdbcType=VARCHAR},
is_pause = #{isPause,jdbcType=BIT},
job_name = #{jobName,jdbcType=VARCHAR},
method_name = #{methodName,jdbcType=VARCHAR},
params = #{params,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
person_in_charge = #{personInCharge,jdbcType=VARCHAR},
email = #{email,jdbcType=VARCHAR},
sub_task = #{subTask,jdbcType=VARCHAR},
pause_after_failure = #{pauseAfterFailure,jdbcType=BIT},
create_by = #{createBy,jdbcType=VARCHAR},
update_by = #{updateBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where job_id = #{jobId,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,172 @@
<?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.SysQuartzLogMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.SysQuartzLog">
<id column="log_id" jdbcType="BIGINT" property="logId" />
<result column="bean_name" jdbcType="VARCHAR" property="beanName" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="cron_expression" jdbcType="VARCHAR" property="cronExpression" />
<result column="is_success" jdbcType="BIT" property="isSuccess" />
<result column="job_name" jdbcType="VARCHAR" property="jobName" />
<result column="method_name" jdbcType="VARCHAR" property="methodName" />
<result column="params" jdbcType="VARCHAR" property="params" />
<result column="time" jdbcType="BIGINT" property="time" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.SysQuartzLog">
<result column="exception_detail" jdbcType="LONGVARCHAR" property="exceptionDetail" />
</resultMap>
<sql id="Base_Column_List">
log_id, bean_name, create_time, cron_expression, is_success, job_name, method_name,
params, time
</sql>
<sql id="Blob_Column_List">
exception_detail
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from sys_quartz_log
where log_id = #{logId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from sys_quartz_log
where log_id = #{logId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.SysQuartzLog">
insert into sys_quartz_log (log_id, bean_name, create_time,
cron_expression, is_success, job_name,
method_name, params, time,
exception_detail)
values (#{logId,jdbcType=BIGINT}, #{beanName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{cronExpression,jdbcType=VARCHAR}, #{isSuccess,jdbcType=BIT}, #{jobName,jdbcType=VARCHAR},
#{methodName,jdbcType=VARCHAR}, #{params,jdbcType=VARCHAR}, #{time,jdbcType=BIGINT},
#{exceptionDetail,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.SysQuartzLog">
insert into sys_quartz_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="logId != null">
log_id,
</if>
<if test="beanName != null">
bean_name,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="cronExpression != null">
cron_expression,
</if>
<if test="isSuccess != null">
is_success,
</if>
<if test="jobName != null">
job_name,
</if>
<if test="methodName != null">
method_name,
</if>
<if test="params != null">
params,
</if>
<if test="time != null">
time,
</if>
<if test="exceptionDetail != null">
exception_detail,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="logId != null">
#{logId,jdbcType=BIGINT},
</if>
<if test="beanName != null">
#{beanName,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="cronExpression != null">
#{cronExpression,jdbcType=VARCHAR},
</if>
<if test="isSuccess != null">
#{isSuccess,jdbcType=BIT},
</if>
<if test="jobName != null">
#{jobName,jdbcType=VARCHAR},
</if>
<if test="methodName != null">
#{methodName,jdbcType=VARCHAR},
</if>
<if test="params != null">
#{params,jdbcType=VARCHAR},
</if>
<if test="time != null">
#{time,jdbcType=BIGINT},
</if>
<if test="exceptionDetail != null">
#{exceptionDetail,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.SysQuartzLog">
update sys_quartz_log
<set>
<if test="beanName != null">
bean_name = #{beanName,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="cronExpression != null">
cron_expression = #{cronExpression,jdbcType=VARCHAR},
</if>
<if test="isSuccess != null">
is_success = #{isSuccess,jdbcType=BIT},
</if>
<if test="jobName != null">
job_name = #{jobName,jdbcType=VARCHAR},
</if>
<if test="methodName != null">
method_name = #{methodName,jdbcType=VARCHAR},
</if>
<if test="params != null">
params = #{params,jdbcType=VARCHAR},
</if>
<if test="time != null">
time = #{time,jdbcType=BIGINT},
</if>
<if test="exceptionDetail != null">
exception_detail = #{exceptionDetail,jdbcType=LONGVARCHAR},
</if>
</set>
where log_id = #{logId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.system.cashierservice.entity.SysQuartzLog">
update sys_quartz_log
set bean_name = #{beanName,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
cron_expression = #{cronExpression,jdbcType=VARCHAR},
is_success = #{isSuccess,jdbcType=BIT},
job_name = #{jobName,jdbcType=VARCHAR},
method_name = #{methodName,jdbcType=VARCHAR},
params = #{params,jdbcType=VARCHAR},
time = #{time,jdbcType=BIGINT},
exception_detail = #{exceptionDetail,jdbcType=LONGVARCHAR}
where log_id = #{logId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.SysQuartzLog">
update sys_quartz_log
set bean_name = #{beanName,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
cron_expression = #{cronExpression,jdbcType=VARCHAR},
is_success = #{isSuccess,jdbcType=BIT},
job_name = #{jobName,jdbcType=VARCHAR},
method_name = #{methodName,jdbcType=VARCHAR},
params = #{params,jdbcType=VARCHAR},
time = #{time,jdbcType=BIGINT}
where log_id = #{logId,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,142 @@
<?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.SysRoleMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.SysRole">
<id column="role_id" jdbcType="BIGINT" property="roleId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="level" jdbcType="INTEGER" property="level" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="data_scope" jdbcType="VARCHAR" property="dataScope" />
<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">
role_id, name, level, description, data_scope, 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_role
where role_id = #{roleId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from sys_role
where role_id = #{roleId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.SysRole">
insert into sys_role (role_id, name, level,
description, data_scope, create_by,
update_by, create_time, update_time
)
values (#{roleId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{level,jdbcType=INTEGER},
#{description,jdbcType=VARCHAR}, #{dataScope,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR},
#{updateBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.SysRole">
insert into sys_role
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="roleId != null">
role_id,
</if>
<if test="name != null">
name,
</if>
<if test="level != null">
level,
</if>
<if test="description != null">
description,
</if>
<if test="dataScope != null">
data_scope,
</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="roleId != null">
#{roleId,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="level != null">
#{level,jdbcType=INTEGER},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="dataScope != null">
#{dataScope,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.SysRole">
update sys_role
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="level != null">
level = #{level,jdbcType=INTEGER},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="dataScope != null">
data_scope = #{dataScope,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 role_id = #{roleId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.SysRole">
update sys_role
set name = #{name,jdbcType=VARCHAR},
level = #{level,jdbcType=INTEGER},
description = #{description,jdbcType=VARCHAR},
data_scope = #{dataScope,jdbcType=VARCHAR},
create_by = #{createBy,jdbcType=VARCHAR},
update_by = #{updateBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where role_id = #{roleId,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,36 @@
<?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.SysRolesDeptsMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.SysRolesDeptsKey">
<id column="role_id" jdbcType="BIGINT" property="roleId" />
<id column="dept_id" jdbcType="BIGINT" property="deptId" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.SysRolesDeptsKey">
delete from sys_roles_depts
where role_id = #{roleId,jdbcType=BIGINT}
and dept_id = #{deptId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.SysRolesDeptsKey">
insert into sys_roles_depts (role_id, dept_id)
values (#{roleId,jdbcType=BIGINT}, #{deptId,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.SysRolesDeptsKey">
insert into sys_roles_depts
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="roleId != null">
role_id,
</if>
<if test="deptId != null">
dept_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="roleId != null">
#{roleId,jdbcType=BIGINT},
</if>
<if test="deptId != null">
#{deptId,jdbcType=BIGINT},
</if>
</trim>
</insert>
</mapper>

View File

@@ -0,0 +1,36 @@
<?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.SysRolesMenusMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.SysRolesMenusKey">
<id column="menu_id" jdbcType="BIGINT" property="menuId" />
<id column="role_id" jdbcType="BIGINT" property="roleId" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.SysRolesMenusKey">
delete from sys_roles_menus
where menu_id = #{menuId,jdbcType=BIGINT}
and role_id = #{roleId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.SysRolesMenusKey">
insert into sys_roles_menus (menu_id, role_id)
values (#{menuId,jdbcType=BIGINT}, #{roleId,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.SysRolesMenusKey">
insert into sys_roles_menus
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="menuId != null">
menu_id,
</if>
<if test="roleId != null">
role_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="menuId != null">
#{menuId,jdbcType=BIGINT},
</if>
<if test="roleId != null">
#{roleId,jdbcType=BIGINT},
</if>
</trim>
</insert>
</mapper>

View File

@@ -0,0 +1,234 @@
<?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.SysUserMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.SysUser">
<id column="user_id" jdbcType="BIGINT" property="userId" />
<result column="dept_id" jdbcType="BIGINT" property="deptId" />
<result column="username" jdbcType="VARCHAR" property="username" />
<result column="nick_name" jdbcType="VARCHAR" property="nickName" />
<result column="gender" jdbcType="VARCHAR" property="gender" />
<result column="phone" jdbcType="VARCHAR" property="phone" />
<result column="email" jdbcType="VARCHAR" property="email" />
<result column="avatar_name" jdbcType="VARCHAR" property="avatarName" />
<result column="avatar_path" jdbcType="VARCHAR" property="avatarPath" />
<result column="password" jdbcType="VARCHAR" property="password" />
<result column="is_admin" jdbcType="BIT" property="isAdmin" />
<result column="enabled" jdbcType="BIGINT" property="enabled" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="pwd_reset_time" jdbcType="TIMESTAMP" property="pwdResetTime" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
user_id, dept_id, username, nick_name, gender, phone, email, avatar_name, avatar_path,
password, is_admin, enabled, create_by, update_by, pwd_reset_time, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from sys_user
where user_id = #{userId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from sys_user
where user_id = #{userId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.SysUser">
insert into sys_user (user_id, dept_id, username,
nick_name, gender, phone,
email, avatar_name, avatar_path,
password, is_admin, enabled,
create_by, update_by, pwd_reset_time,
create_time, update_time)
values (#{userId,jdbcType=BIGINT}, #{deptId,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR},
#{nickName,jdbcType=VARCHAR}, #{gender,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR},
#{email,jdbcType=VARCHAR}, #{avatarName,jdbcType=VARCHAR}, #{avatarPath,jdbcType=VARCHAR},
#{password,jdbcType=VARCHAR}, #{isAdmin,jdbcType=BIT}, #{enabled,jdbcType=BIGINT},
#{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR}, #{pwdResetTime,jdbcType=TIMESTAMP},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.SysUser">
insert into sys_user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">
user_id,
</if>
<if test="deptId != null">
dept_id,
</if>
<if test="username != null">
username,
</if>
<if test="nickName != null">
nick_name,
</if>
<if test="gender != null">
gender,
</if>
<if test="phone != null">
phone,
</if>
<if test="email != null">
email,
</if>
<if test="avatarName != null">
avatar_name,
</if>
<if test="avatarPath != null">
avatar_path,
</if>
<if test="password != null">
password,
</if>
<if test="isAdmin != null">
is_admin,
</if>
<if test="enabled != null">
enabled,
</if>
<if test="createBy != null">
create_by,
</if>
<if test="updateBy != null">
update_by,
</if>
<if test="pwdResetTime != null">
pwd_reset_time,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="deptId != null">
#{deptId,jdbcType=BIGINT},
</if>
<if test="username != null">
#{username,jdbcType=VARCHAR},
</if>
<if test="nickName != null">
#{nickName,jdbcType=VARCHAR},
</if>
<if test="gender != null">
#{gender,jdbcType=VARCHAR},
</if>
<if test="phone != null">
#{phone,jdbcType=VARCHAR},
</if>
<if test="email != null">
#{email,jdbcType=VARCHAR},
</if>
<if test="avatarName != null">
#{avatarName,jdbcType=VARCHAR},
</if>
<if test="avatarPath != null">
#{avatarPath,jdbcType=VARCHAR},
</if>
<if test="password != null">
#{password,jdbcType=VARCHAR},
</if>
<if test="isAdmin != null">
#{isAdmin,jdbcType=BIT},
</if>
<if test="enabled != null">
#{enabled,jdbcType=BIGINT},
</if>
<if test="createBy != null">
#{createBy,jdbcType=VARCHAR},
</if>
<if test="updateBy != null">
#{updateBy,jdbcType=VARCHAR},
</if>
<if test="pwdResetTime != null">
#{pwdResetTime,jdbcType=TIMESTAMP},
</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.SysUser">
update sys_user
<set>
<if test="deptId != null">
dept_id = #{deptId,jdbcType=BIGINT},
</if>
<if test="username != null">
username = #{username,jdbcType=VARCHAR},
</if>
<if test="nickName != null">
nick_name = #{nickName,jdbcType=VARCHAR},
</if>
<if test="gender != null">
gender = #{gender,jdbcType=VARCHAR},
</if>
<if test="phone != null">
phone = #{phone,jdbcType=VARCHAR},
</if>
<if test="email != null">
email = #{email,jdbcType=VARCHAR},
</if>
<if test="avatarName != null">
avatar_name = #{avatarName,jdbcType=VARCHAR},
</if>
<if test="avatarPath != null">
avatar_path = #{avatarPath,jdbcType=VARCHAR},
</if>
<if test="password != null">
password = #{password,jdbcType=VARCHAR},
</if>
<if test="isAdmin != null">
is_admin = #{isAdmin,jdbcType=BIT},
</if>
<if test="enabled != null">
enabled = #{enabled,jdbcType=BIGINT},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="updateBy != null">
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="pwdResetTime != null">
pwd_reset_time = #{pwdResetTime,jdbcType=TIMESTAMP},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where user_id = #{userId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.SysUser">
update sys_user
set dept_id = #{deptId,jdbcType=BIGINT},
username = #{username,jdbcType=VARCHAR},
nick_name = #{nickName,jdbcType=VARCHAR},
gender = #{gender,jdbcType=VARCHAR},
phone = #{phone,jdbcType=VARCHAR},
email = #{email,jdbcType=VARCHAR},
avatar_name = #{avatarName,jdbcType=VARCHAR},
avatar_path = #{avatarPath,jdbcType=VARCHAR},
password = #{password,jdbcType=VARCHAR},
is_admin = #{isAdmin,jdbcType=BIT},
enabled = #{enabled,jdbcType=BIGINT},
create_by = #{createBy,jdbcType=VARCHAR},
update_by = #{updateBy,jdbcType=VARCHAR},
pwd_reset_time = #{pwdResetTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where user_id = #{userId,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,36 @@
<?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.SysUsersJobsMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.SysUsersJobsKey">
<id column="user_id" jdbcType="BIGINT" property="userId" />
<id column="job_id" jdbcType="BIGINT" property="jobId" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.SysUsersJobsKey">
delete from sys_users_jobs
where user_id = #{userId,jdbcType=BIGINT}
and job_id = #{jobId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.SysUsersJobsKey">
insert into sys_users_jobs (user_id, job_id)
values (#{userId,jdbcType=BIGINT}, #{jobId,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.SysUsersJobsKey">
insert into sys_users_jobs
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">
user_id,
</if>
<if test="jobId != null">
job_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="jobId != null">
#{jobId,jdbcType=BIGINT},
</if>
</trim>
</insert>
</mapper>

View File

@@ -0,0 +1,36 @@
<?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.SysUsersRolesMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.SysUsersRolesKey">
<id column="user_id" jdbcType="BIGINT" property="userId" />
<id column="role_id" jdbcType="BIGINT" property="roleId" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.SysUsersRolesKey">
delete from sys_users_roles
where user_id = #{userId,jdbcType=BIGINT}
and role_id = #{roleId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.SysUsersRolesKey">
insert into sys_users_roles (user_id, role_id)
values (#{userId,jdbcType=BIGINT}, #{roleId,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.SysUsersRolesKey">
insert into sys_users_roles
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">
user_id,
</if>
<if test="roleId != null">
role_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="roleId != null">
#{roleId,jdbcType=BIGINT},
</if>
</trim>
</insert>
</mapper>

View File

@@ -0,0 +1,388 @@
<?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.TbCashierCartMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbCashierCart">
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="master_id" jdbcType="VARCHAR" property="masterId"/>
<result column="order_id" jdbcType="VARCHAR" property="orderId"/>
<result column="ref_order_id" jdbcType="VARCHAR" property="refOrderId"/>
<result column="total_amount" jdbcType="DECIMAL" property="totalAmount"/>
<result column="product_id" jdbcType="VARCHAR" property="productId"/>
<result column="cover_img" jdbcType="VARCHAR" property="coverImg"/>
<result column="is_sku" jdbcType="TINYINT" property="isSku"/>
<result column="sku_id" jdbcType="VARCHAR" property="skuId"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
<result column="sale_price" jdbcType="DECIMAL" property="salePrice"/>
<result column="pack_fee" jdbcType="DECIMAL" property="packFee"/>
<result column="number" jdbcType="INTEGER" property="number"/>
<result column="total_number" jdbcType="INTEGER" property="totalNumber"/>
<result column="refund_number" jdbcType="INTEGER" property="refundNumber"/>
<result column="category_id" jdbcType="VARCHAR" property="categoryId"/>
<result column="status" jdbcType="VARCHAR" property="status"/>
<result column="type" jdbcType="TINYINT" property="type"/>
<result column="merchant_id" jdbcType="VARCHAR" property="merchantId"/>
<result column="shop_id" jdbcType="VARCHAR" property="shopId"/>
<result column="created_at" jdbcType="BIGINT" property="createdAt"/>
<result column="updated_at" jdbcType="BIGINT" property="updatedAt"/>
<result column="user_id" jdbcType="INTEGER" property="userId"/>
<result column="table_id" jdbcType="VARCHAR" property="tableId"/>
<result column="pack_fee" jdbcType="DECIMAL" property="packFee"/>
<result column="trade_day" jdbcType="VARCHAR" property="tradeDay"/>
<result column="is_pack" jdbcType="VARCHAR" property="isPack"/>
<result column="is_gift" jdbcType="VARCHAR" property="isGift"/>
<result column="pending_at" jdbcType="BIGINT" property="pendingAt"/>
<result column="uuid" jdbcType="VARCHAR" property="uuid"/>
</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
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from tb_cashier_cart
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectALlByMasterId" resultType="com.chaozhanggui.system.cashierservice.entity.TbCashierCart">
select
<include refid="Base_Column_List"/>
from tb_cashier_cart where master_id = #{masterId} and status = #{status}
</select>
<select id="selectByDetail" resultType="com.chaozhanggui.system.cashierservice.entity.TbCashierCart">
select
<include refid="Base_Column_List"/>
from tb_cashier_cart where master_id = #{masterId} and product_id = #{productId} and shop_id = #{shopId} and
sku_id = #{skuId} and trade_day = #{day}
<if test="uuid != null">
and uuid = #{uuid}
</if>
</select>
<select id="selectByMaskerId" resultType="com.chaozhanggui.system.cashierservice.entity.TbCashierCart">
select *
from tb_cashier_cart where master_id = #{masterId} and shop_id = #{shopId} and status = #{status} order by id desc
</select>
<select id="selectCartList" resultType="com.chaozhanggui.system.cashierservice.entity.po.CartPo">
select shop_Id as shopId,master_id as masterId,uuid,
TRIM(TRAILING ', ' FROM GROUP_CONCAT(name ORDER BY id SEPARATOR ', ')) AS productName,
pending_at as pendingAt,
ifnull(sum(total_amount),0) as totalAmount
from tb_cashier_cart where shop_id = #{shopId} and status = 'refund' group by shop_Id, master_id order by trade_day desc
</select>
<select id="selectAllCreateOrder" resultType="com.chaozhanggui.system.cashierservice.entity.TbCashierCart">
select
<include refid="Base_Column_List"/>
from tb_cashier_cart where master_id = #{masterId} and shop_id = #{shopId} and status = #{status}
<if test="uuid != null and uuid != ''">
and uuid = #{uuid}
</if>
<if test="day != null and day !=''">
and trade_day = #{day}
</if>
</select>
<select id="selectProductNumByMarketId" resultType="com.chaozhanggui.system.cashierservice.entity.po.QueryCartPo">
select ifnull(count(*),0) as productNum,ifnull(sum(number),0)as productSum from (select count(*),number from tb_cashier_cart where trade_day = #{day} and master_id = #{masterId} and shop_id = #{shopId} group by product_id ) a
</select>
<select id="selectqgList" resultType="java.lang.Integer">
select count(*) from (select ifnull(count(*),0)
from tb_cashier_cart where status = 'refund' and shop_id = #{shopId} group by shop_id,master_id,trade_day) a
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_cashier_cart
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByCartId">
delete from tb_cashier_cart where id = #{cartId} and master_id = #{masterId}
</delete>
<delete id="deleteBymasterId">
delete from tb_cashier_cart where master_id = #{masterId} and shop_id = #{shopId}
and status = #{status} and trade_day = #{day}
<if test="uuid != null">
and uuid = #{uuid}
</if>
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbCashierCart">
insert into tb_cashier_cart (id, master_id, order_id,
ref_order_id, total_amount, product_id,
cover_img, is_sku, sku_id,
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,uuid
)
values (#{id,jdbcType=INTEGER}, #{masterId,jdbcType=VARCHAR}, #{orderId,jdbcType=VARCHAR},
#{refOrderId,jdbcType=VARCHAR}, #{totalAmount,jdbcType=DECIMAL}, #{productId,jdbcType=VARCHAR},
#{coverImg,jdbcType=VARCHAR}, #{isSku,jdbcType=TINYINT}, #{skuId,jdbcType=VARCHAR},
#{name,jdbcType=VARCHAR}, #{salePrice,jdbcType=DECIMAL}, #{number,jdbcType=REAL},
#{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}, #{uuid,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbCashierCart">
insert into tb_cashier_cart
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="masterId != null">
master_id,
</if>
<if test="orderId != null">
order_id,
</if>
<if test="refOrderId != null">
ref_order_id,
</if>
<if test="totalAmount != null">
total_amount,
</if>
<if test="productId != null">
product_id,
</if>
<if test="coverImg != null">
cover_img,
</if>
<if test="isSku != null">
is_sku,
</if>
<if test="skuId != null">
sku_id,
</if>
<if test="name != null">
name,
</if>
<if test="salePrice != null">
sale_price,
</if>
<if test="number != null">
number,
</if>
<if test="totalNumber != null">
total_number,
</if>
<if test="refundNumber != null">
refund_number,
</if>
<if test="categoryId != null">
category_id,
</if>
<if test="status != null">
status,
</if>
<if test="type != null">
type,
</if>
<if test="merchantId != null">
merchant_id,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="masterId != null">
#{masterId,jdbcType=VARCHAR},
</if>
<if test="orderId != null">
#{orderId,jdbcType=VARCHAR},
</if>
<if test="refOrderId != null">
#{refOrderId,jdbcType=VARCHAR},
</if>
<if test="totalAmount != null">
#{totalAmount,jdbcType=DECIMAL},
</if>
<if test="productId != null">
#{productId,jdbcType=VARCHAR},
</if>
<if test="coverImg != null">
#{coverImg,jdbcType=VARCHAR},
</if>
<if test="isSku != null">
#{isSku,jdbcType=TINYINT},
</if>
<if test="skuId != null">
#{skuId,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="salePrice != null">
#{salePrice,jdbcType=DECIMAL},
</if>
<if test="number != null">
#{number,jdbcType=REAL},
</if>
<if test="totalNumber != null">
#{totalNumber,jdbcType=REAL},
</if>
<if test="refundNumber != null">
#{refundNumber,jdbcType=REAL},
</if>
<if test="categoryId != null">
#{categoryId,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=TINYINT},
</if>
<if test="merchantId != null">
#{merchantId,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
#{shopId,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective"
parameterType="com.chaozhanggui.system.cashierservice.entity.TbCashierCart">
update tb_cashier_cart
<set>
<if test="masterId != null">
master_id = #{masterId,jdbcType=VARCHAR},
</if>
<if test="orderId != null">
order_id = #{orderId,jdbcType=VARCHAR},
</if>
<if test="refOrderId != null">
ref_order_id = #{refOrderId,jdbcType=VARCHAR},
</if>
<if test="totalAmount != null">
total_amount = #{totalAmount,jdbcType=DECIMAL},
</if>
<if test="productId != null">
product_id = #{productId,jdbcType=VARCHAR},
</if>
<if test="coverImg != null">
cover_img = #{coverImg,jdbcType=VARCHAR},
</if>
<if test="isSku != null">
is_sku = #{isSku,jdbcType=TINYINT},
</if>
<if test="skuId != null">
sku_id = #{skuId,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="salePrice != null">
sale_price = #{salePrice,jdbcType=DECIMAL},
</if>
<if test="packFee != null">
pack_fee = #{packFee,jdbcType=DECIMAL},
</if>
<if test="number != null">
number = #{number,jdbcType=REAL},
</if>
<if test="totalNumber != null">
total_number = #{totalNumber,jdbcType=REAL},
</if>
<if test="refundNumber != null">
refund_number = #{refundNumber,jdbcType=REAL},
</if>
<if test="categoryId != null">
category_id = #{categoryId,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=TINYINT},
</if>
<if test="merchantId != null">
merchant_id = #{merchantId,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
<if test="pendingAt != null">
pending_at = #{pendingAt,jdbcType=BIGINT},
</if>
<if test="isGift != null">
is_gift = #{isGift,jdbcType=BIGINT},
</if>
<if test="isPack != null">
is_pack = #{isPack,jdbcType=VARCHAR},
</if>
<if test="uuid != null">
uuid = #{uuid,jdbcType=VARCHAR},
</if>
<if test="tableId != null">
table_id = #{tableId,jdbcType=VARCHAR},
</if>
</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>
<update id="updateStatusByMaster">
update tb_cashier_cart set status = #{status} , uuid = #{uuid}where shop_id = #{shopId} and master_id = #{masterId}
and trade_day = #{day} and status = 'refund'
</update>
<update id="updateByOrderId">
update tb_cashier_cart set `status`=#{status} where order_id=#{orderId} and `status`='create'
</update>
<update id="updateIsGift">
update tb_cashier_cart set is_pack = #{status} where master_id = #{maskerId} and trade_day = #{day} and shop_id = #{shopId}
</update>
<select id="selectByOrderId" resultMap="BaseResultMap">
select * from tb_cashier_cart where order_id=#{orderId} and `status`=#{status}
</select>
</mapper>

View File

@@ -0,0 +1,106 @@
<?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.TbDeviceOperateInfoMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbDeviceOperateInfo">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="deviceNo" jdbcType="VARCHAR" property="deviceno" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
<result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Base_Column_List">
id, deviceNo, type, shop_id, createTime, remark
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_device_operate_info
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_device_operate_info
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbDeviceOperateInfo">
insert into tb_device_operate_info (id, deviceNo, type,
shop_id, createTime, remark
)
values (#{id,jdbcType=INTEGER}, #{deviceno,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
#{shopId,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbDeviceOperateInfo">
insert into tb_device_operate_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="deviceno != null">
deviceNo,
</if>
<if test="type != null">
type,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="createtime != null">
createTime,
</if>
<if test="remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="deviceno != null">
#{deviceno,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
#{shopId,jdbcType=VARCHAR},
</if>
<if test="createtime != null">
#{createtime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbDeviceOperateInfo">
update tb_device_operate_info
<set>
<if test="deviceno != null">
deviceNo = #{deviceno,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=VARCHAR},
</if>
<if test="createtime != null">
createTime = #{createtime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbDeviceOperateInfo">
update tb_device_operate_info
set deviceNo = #{deviceno,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
shop_id = #{shopId,jdbcType=VARCHAR},
createTime = #{createtime,jdbcType=TIMESTAMP},
remark = #{remark,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,318 @@
<?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.TbDeviceStockMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbDeviceStock">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="snNo" jdbcType="VARCHAR" property="snno" />
<result column="orderNo" jdbcType="VARCHAR" property="orderno" />
<result column="price" jdbcType="DECIMAL" property="price" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="groupNo" jdbcType="VARCHAR" property="groupno" />
<result column="buyMercName" jdbcType="VARCHAR" property="buymercname" />
<result column="buyMercId" jdbcType="VARCHAR" property="buymercid" />
<result column="actMercName" jdbcType="VARCHAR" property="actmercname" />
<result column="actMercId" jdbcType="VARCHAR" property="actmercid" />
<result column="status" jdbcType="VARCHAR" property="status" />
<result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
<result column="createBy" jdbcType="VARCHAR" property="createby" />
<result column="delFlag" jdbcType="VARCHAR" property="delflag" />
<result column="remarks" jdbcType="VARCHAR" property="remarks" />
<result column="updateTime" jdbcType="TIMESTAMP" property="updatetime" />
<result column="deviceNo" jdbcType="VARCHAR" property="deviceno" />
<result column="belongUserId" jdbcType="INTEGER" property="belonguserid" />
<result column="extractUserId" jdbcType="INTEGER" property="extractuserid" />
<result column="roleCode" jdbcType="VARCHAR" property="rolecode" />
<result column="inStockTime" jdbcType="TIMESTAMP" property="instocktime" />
<result column="transferStatus" jdbcType="VARCHAR" property="transferstatus" />
<result column="bindTime" jdbcType="TIMESTAMP" property="bindtime" />
</resultMap>
<sql id="Base_Column_List">
id, code, snNo, orderNo, price, type, groupNo, buyMercName, buyMercId, actMercName,
actMercId, status, createTime, createBy, delFlag, remarks, updateTime, deviceNo,
belongUserId, extractUserId, roleCode, inStockTime, transferStatus, bindTime
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_device_stock
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_device_stock
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbDeviceStock">
insert into tb_device_stock (id, code, snNo,
orderNo, price, type,
groupNo, buyMercName, buyMercId,
actMercName, actMercId, status,
createTime, createBy, delFlag,
remarks, updateTime, deviceNo,
belongUserId, extractUserId, roleCode,
inStockTime, transferStatus, bindTime
)
values (#{id,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR}, #{snno,jdbcType=VARCHAR},
#{orderno,jdbcType=VARCHAR}, #{price,jdbcType=DECIMAL}, #{type,jdbcType=VARCHAR},
#{groupno,jdbcType=VARCHAR}, #{buymercname,jdbcType=VARCHAR}, #{buymercid,jdbcType=VARCHAR},
#{actmercname,jdbcType=VARCHAR}, #{actmercid,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
#{createtime,jdbcType=TIMESTAMP}, #{createby,jdbcType=VARCHAR}, #{delflag,jdbcType=VARCHAR},
#{remarks,jdbcType=VARCHAR}, #{updatetime,jdbcType=TIMESTAMP}, #{deviceno,jdbcType=VARCHAR},
#{belonguserid,jdbcType=INTEGER}, #{extractuserid,jdbcType=INTEGER}, #{rolecode,jdbcType=VARCHAR},
#{instocktime,jdbcType=TIMESTAMP}, #{transferstatus,jdbcType=VARCHAR}, #{bindtime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbDeviceStock">
insert into tb_device_stock
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="code != null">
code,
</if>
<if test="snno != null">
snNo,
</if>
<if test="orderno != null">
orderNo,
</if>
<if test="price != null">
price,
</if>
<if test="type != null">
type,
</if>
<if test="groupno != null">
groupNo,
</if>
<if test="buymercname != null">
buyMercName,
</if>
<if test="buymercid != null">
buyMercId,
</if>
<if test="actmercname != null">
actMercName,
</if>
<if test="actmercid != null">
actMercId,
</if>
<if test="status != null">
status,
</if>
<if test="createtime != null">
createTime,
</if>
<if test="createby != null">
createBy,
</if>
<if test="delflag != null">
delFlag,
</if>
<if test="remarks != null">
remarks,
</if>
<if test="updatetime != null">
updateTime,
</if>
<if test="deviceno != null">
deviceNo,
</if>
<if test="belonguserid != null">
belongUserId,
</if>
<if test="extractuserid != null">
extractUserId,
</if>
<if test="rolecode != null">
roleCode,
</if>
<if test="instocktime != null">
inStockTime,
</if>
<if test="transferstatus != null">
transferStatus,
</if>
<if test="bindtime != null">
bindTime,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
<if test="snno != null">
#{snno,jdbcType=VARCHAR},
</if>
<if test="orderno != null">
#{orderno,jdbcType=VARCHAR},
</if>
<if test="price != null">
#{price,jdbcType=DECIMAL},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="groupno != null">
#{groupno,jdbcType=VARCHAR},
</if>
<if test="buymercname != null">
#{buymercname,jdbcType=VARCHAR},
</if>
<if test="buymercid != null">
#{buymercid,jdbcType=VARCHAR},
</if>
<if test="actmercname != null">
#{actmercname,jdbcType=VARCHAR},
</if>
<if test="actmercid != null">
#{actmercid,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=VARCHAR},
</if>
<if test="createtime != null">
#{createtime,jdbcType=TIMESTAMP},
</if>
<if test="createby != null">
#{createby,jdbcType=VARCHAR},
</if>
<if test="delflag != null">
#{delflag,jdbcType=VARCHAR},
</if>
<if test="remarks != null">
#{remarks,jdbcType=VARCHAR},
</if>
<if test="updatetime != null">
#{updatetime,jdbcType=TIMESTAMP},
</if>
<if test="deviceno != null">
#{deviceno,jdbcType=VARCHAR},
</if>
<if test="belonguserid != null">
#{belonguserid,jdbcType=INTEGER},
</if>
<if test="extractuserid != null">
#{extractuserid,jdbcType=INTEGER},
</if>
<if test="rolecode != null">
#{rolecode,jdbcType=VARCHAR},
</if>
<if test="instocktime != null">
#{instocktime,jdbcType=TIMESTAMP},
</if>
<if test="transferstatus != null">
#{transferstatus,jdbcType=VARCHAR},
</if>
<if test="bindtime != null">
#{bindtime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbDeviceStock">
update tb_device_stock
<set>
<if test="code != null">
code = #{code,jdbcType=VARCHAR},
</if>
<if test="snno != null">
snNo = #{snno,jdbcType=VARCHAR},
</if>
<if test="orderno != null">
orderNo = #{orderno,jdbcType=VARCHAR},
</if>
<if test="price != null">
price = #{price,jdbcType=DECIMAL},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="groupno != null">
groupNo = #{groupno,jdbcType=VARCHAR},
</if>
<if test="buymercname != null">
buyMercName = #{buymercname,jdbcType=VARCHAR},
</if>
<if test="buymercid != null">
buyMercId = #{buymercid,jdbcType=VARCHAR},
</if>
<if test="actmercname != null">
actMercName = #{actmercname,jdbcType=VARCHAR},
</if>
<if test="actmercid != null">
actMercId = #{actmercid,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=VARCHAR},
</if>
<if test="createtime != null">
createTime = #{createtime,jdbcType=TIMESTAMP},
</if>
<if test="createby != null">
createBy = #{createby,jdbcType=VARCHAR},
</if>
<if test="delflag != null">
delFlag = #{delflag,jdbcType=VARCHAR},
</if>
<if test="remarks != null">
remarks = #{remarks,jdbcType=VARCHAR},
</if>
<if test="updatetime != null">
updateTime = #{updatetime,jdbcType=TIMESTAMP},
</if>
<if test="deviceno != null">
deviceNo = #{deviceno,jdbcType=VARCHAR},
</if>
<if test="belonguserid != null">
belongUserId = #{belonguserid,jdbcType=INTEGER},
</if>
<if test="extractuserid != null">
extractUserId = #{extractuserid,jdbcType=INTEGER},
</if>
<if test="rolecode != null">
roleCode = #{rolecode,jdbcType=VARCHAR},
</if>
<if test="instocktime != null">
inStockTime = #{instocktime,jdbcType=TIMESTAMP},
</if>
<if test="transferstatus != null">
transferStatus = #{transferstatus,jdbcType=VARCHAR},
</if>
<if test="bindtime != null">
bindTime = #{bindtime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbDeviceStock">
update tb_device_stock
set code = #{code,jdbcType=VARCHAR},
snNo = #{snno,jdbcType=VARCHAR},
orderNo = #{orderno,jdbcType=VARCHAR},
price = #{price,jdbcType=DECIMAL},
type = #{type,jdbcType=VARCHAR},
groupNo = #{groupno,jdbcType=VARCHAR},
buyMercName = #{buymercname,jdbcType=VARCHAR},
buyMercId = #{buymercid,jdbcType=VARCHAR},
actMercName = #{actmercname,jdbcType=VARCHAR},
actMercId = #{actmercid,jdbcType=VARCHAR},
status = #{status,jdbcType=VARCHAR},
createTime = #{createtime,jdbcType=TIMESTAMP},
createBy = #{createby,jdbcType=VARCHAR},
delFlag = #{delflag,jdbcType=VARCHAR},
remarks = #{remarks,jdbcType=VARCHAR},
updateTime = #{updatetime,jdbcType=TIMESTAMP},
deviceNo = #{deviceno,jdbcType=VARCHAR},
belongUserId = #{belonguserid,jdbcType=INTEGER},
extractUserId = #{extractuserid,jdbcType=INTEGER},
roleCode = #{rolecode,jdbcType=VARCHAR},
inStockTime = #{instocktime,jdbcType=TIMESTAMP},
transferStatus = #{transferstatus,jdbcType=VARCHAR},
bindTime = #{bindtime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,153 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.chaozhanggui.system.cashierservice.dao.TbMemberInMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbMemberIn">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="user_id" jdbcType="INTEGER" property="userId" />
<result column="merchant_id" jdbcType="INTEGER" property="merchantId" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="amount" jdbcType="DECIMAL" property="amount" />
<result column="status" jdbcType="VARCHAR" property="status" />
<result column="order_no" jdbcType="VARCHAR" property="orderNo" />
<result column="trade_no" jdbcType="VARCHAR" property="tradeNo" />
<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, merchant_id, code, amount, status, order_no, trade_no, create_time,
update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_member_in
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_member_in
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbMemberIn">
insert into tb_member_in (id, user_id, merchant_id,
code, amount, status,
order_no, trade_no, create_time,
update_time)
values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{merchantId,jdbcType=INTEGER},
#{code,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, #{status,jdbcType=VARCHAR},
#{orderNo,jdbcType=VARCHAR}, #{tradeNo,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbMemberIn">
insert into tb_member_in
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="merchantId != null">
merchant_id,
</if>
<if test="code != null">
code,
</if>
<if test="amount != null">
amount,
</if>
<if test="status != null">
status,
</if>
<if test="orderNo != null">
order_no,
</if>
<if test="tradeNo != null">
trade_no,
</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=INTEGER},
</if>
<if test="merchantId != null">
#{merchantId,jdbcType=INTEGER},
</if>
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
<if test="amount != null">
#{amount,jdbcType=DECIMAL},
</if>
<if test="status != null">
#{status,jdbcType=VARCHAR},
</if>
<if test="orderNo != null">
#{orderNo,jdbcType=VARCHAR},
</if>
<if test="tradeNo != null">
#{tradeNo,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.TbMemberIn">
update tb_member_in
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=INTEGER},
</if>
<if test="merchantId != null">
merchant_id = #{merchantId,jdbcType=INTEGER},
</if>
<if test="code != null">
code = #{code,jdbcType=VARCHAR},
</if>
<if test="amount != null">
amount = #{amount,jdbcType=DECIMAL},
</if>
<if test="status != null">
status = #{status,jdbcType=VARCHAR},
</if>
<if test="orderNo != null">
order_no = #{orderNo,jdbcType=VARCHAR},
</if>
<if test="tradeNo != null">
trade_no = #{tradeNo,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.TbMemberIn">
update tb_member_in
set user_id = #{userId,jdbcType=INTEGER},
merchant_id = #{merchantId,jdbcType=INTEGER},
code = #{code,jdbcType=VARCHAR},
amount = #{amount,jdbcType=DECIMAL},
status = #{status,jdbcType=VARCHAR},
order_no = #{orderNo,jdbcType=VARCHAR},
trade_no = #{tradeNo,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,259 @@
<?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.TbMerchantRegisterMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbMerchantRegister">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="register_code" jdbcType="VARCHAR" property="registerCode" />
<result column="app_code" jdbcType="VARCHAR" property="appCode" />
<result column="telephone" jdbcType="VARCHAR" property="telephone" />
<result column="merchant_id" jdbcType="VARCHAR" property="merchantId" />
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="amount" jdbcType="DECIMAL" property="amount" />
<result column="period_year" jdbcType="INTEGER" property="periodYear" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="address" jdbcType="VARCHAR" property="address" />
<result column="logo" jdbcType="VARCHAR" property="logo" />
<result column="industry" jdbcType="VARCHAR" property="industry" />
<result column="industry_name" jdbcType="VARCHAR" property="industryName" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="limit_shop_number" jdbcType="INTEGER" property="limitShopNumber" />
<result column="source_path" jdbcType="VARCHAR" property="sourcePath" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
</resultMap>
<sql id="Base_Column_List">
id, register_code, app_code, telephone, merchant_id, shop_id, type, amount, period_year,
name, address, logo, industry, industry_name, status, limit_shop_number, source_path,
created_at, updated_at
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_merchant_register
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_merchant_register
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbMerchantRegister">
insert into tb_merchant_register (id, register_code, app_code,
telephone, merchant_id, shop_id,
type, amount, period_year,
name, address, logo,
industry, industry_name, status,
limit_shop_number, source_path, created_at,
updated_at)
values (#{id,jdbcType=INTEGER}, #{registerCode,jdbcType=VARCHAR}, #{appCode,jdbcType=VARCHAR},
#{telephone,jdbcType=VARCHAR}, #{merchantId,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR},
#{type,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, #{periodYear,jdbcType=INTEGER},
#{name,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{logo,jdbcType=VARCHAR},
#{industry,jdbcType=VARCHAR}, #{industryName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{limitShopNumber,jdbcType=INTEGER}, #{sourcePath,jdbcType=VARCHAR}, #{createdAt,jdbcType=BIGINT},
#{updatedAt,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbMerchantRegister">
insert into tb_merchant_register
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="registerCode != null">
register_code,
</if>
<if test="appCode != null">
app_code,
</if>
<if test="telephone != null">
telephone,
</if>
<if test="merchantId != null">
merchant_id,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="type != null">
type,
</if>
<if test="amount != null">
amount,
</if>
<if test="periodYear != null">
period_year,
</if>
<if test="name != null">
name,
</if>
<if test="address != null">
address,
</if>
<if test="logo != null">
logo,
</if>
<if test="industry != null">
industry,
</if>
<if test="industryName != null">
industry_name,
</if>
<if test="status != null">
status,
</if>
<if test="limitShopNumber != null">
limit_shop_number,
</if>
<if test="sourcePath != null">
source_path,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="registerCode != null">
#{registerCode,jdbcType=VARCHAR},
</if>
<if test="appCode != null">
#{appCode,jdbcType=VARCHAR},
</if>
<if test="telephone != null">
#{telephone,jdbcType=VARCHAR},
</if>
<if test="merchantId != null">
#{merchantId,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
#{shopId,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="amount != null">
#{amount,jdbcType=DECIMAL},
</if>
<if test="periodYear != null">
#{periodYear,jdbcType=INTEGER},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="address != null">
#{address,jdbcType=VARCHAR},
</if>
<if test="logo != null">
#{logo,jdbcType=VARCHAR},
</if>
<if test="industry != null">
#{industry,jdbcType=VARCHAR},
</if>
<if test="industryName != null">
#{industryName,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="limitShopNumber != null">
#{limitShopNumber,jdbcType=INTEGER},
</if>
<if test="sourcePath != null">
#{sourcePath,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbMerchantRegister">
update tb_merchant_register
<set>
<if test="registerCode != null">
register_code = #{registerCode,jdbcType=VARCHAR},
</if>
<if test="appCode != null">
app_code = #{appCode,jdbcType=VARCHAR},
</if>
<if test="telephone != null">
telephone = #{telephone,jdbcType=VARCHAR},
</if>
<if test="merchantId != null">
merchant_id = #{merchantId,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="amount != null">
amount = #{amount,jdbcType=DECIMAL},
</if>
<if test="periodYear != null">
period_year = #{periodYear,jdbcType=INTEGER},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="address != null">
address = #{address,jdbcType=VARCHAR},
</if>
<if test="logo != null">
logo = #{logo,jdbcType=VARCHAR},
</if>
<if test="industry != null">
industry = #{industry,jdbcType=VARCHAR},
</if>
<if test="industryName != null">
industry_name = #{industryName,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="limitShopNumber != null">
limit_shop_number = #{limitShopNumber,jdbcType=INTEGER},
</if>
<if test="sourcePath != null">
source_path = #{sourcePath,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbMerchantRegister">
update tb_merchant_register
set register_code = #{registerCode,jdbcType=VARCHAR},
app_code = #{appCode,jdbcType=VARCHAR},
telephone = #{telephone,jdbcType=VARCHAR},
merchant_id = #{merchantId,jdbcType=VARCHAR},
shop_id = #{shopId,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
amount = #{amount,jdbcType=DECIMAL},
period_year = #{periodYear,jdbcType=INTEGER},
name = #{name,jdbcType=VARCHAR},
address = #{address,jdbcType=VARCHAR},
logo = #{logo,jdbcType=VARCHAR},
industry = #{industry,jdbcType=VARCHAR},
industry_name = #{industryName,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
limit_shop_number = #{limitShopNumber,jdbcType=INTEGER},
source_path = #{sourcePath,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,172 @@
<?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.TbMerchantThirdApplyMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbMerchantThirdApply">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="app_id" jdbcType="VARCHAR" property="appId" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="pay_password" jdbcType="VARCHAR" property="payPassword" />
<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="shop_id" jdbcType="INTEGER" property="shopId" />
</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,
shop_id
</sql>
<sql id="Blob_Column_List">
app_token
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from tb_merchant_third_apply
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_merchant_third_apply
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbMerchantThirdApply">
insert into tb_merchant_third_apply (id, type, app_id,
status, pay_password, applyment_state,
created_at, updated_at, shop_id,
app_token)
values (#{id,jdbcType=INTEGER}, #{type,jdbcType=VARCHAR}, #{appId,jdbcType=VARCHAR},
#{status,jdbcType=TINYINT}, #{payPassword,jdbcType=VARCHAR}, #{applymentState,jdbcType=VARCHAR},
#{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{shopId,jdbcType=INTEGER},
#{appToken,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbMerchantThirdApply">
insert into tb_merchant_third_apply
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="type != null">
type,
</if>
<if test="appId != null">
app_id,
</if>
<if test="status != null">
status,
</if>
<if test="payPassword != null">
pay_password,
</if>
<if test="applymentState != null">
applyment_state,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="appToken != null">
app_token,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="appId != null">
#{appId,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=TINYINT},
</if>
<if test="payPassword != null">
#{payPassword,jdbcType=VARCHAR},
</if>
<if test="applymentState != null">
#{applymentState,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
<if test="shopId != null">
#{shopId,jdbcType=INTEGER},
</if>
<if test="appToken != null">
#{appToken,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbMerchantThirdApply">
update tb_merchant_third_apply
<set>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="appId != null">
app_id = #{appId,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=TINYINT},
</if>
<if test="payPassword != null">
pay_password = #{payPassword,jdbcType=VARCHAR},
</if>
<if test="applymentState != null">
applyment_state = #{applymentState,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=INTEGER},
</if>
<if test="appToken != null">
app_token = #{appToken,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.system.cashierservice.entity.TbMerchantThirdApply">
update tb_merchant_third_apply
set type = #{type,jdbcType=VARCHAR},
app_id = #{appId,jdbcType=VARCHAR},
status = #{status,jdbcType=TINYINT},
pay_password = #{payPassword,jdbcType=VARCHAR},
applyment_state = #{applymentState,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
shop_id = #{shopId,jdbcType=INTEGER},
app_token = #{appToken,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbMerchantThirdApply">
update tb_merchant_third_apply
set type = #{type,jdbcType=VARCHAR},
app_id = #{appId,jdbcType=VARCHAR},
status = #{status,jdbcType=TINYINT},
pay_password = #{payPassword,jdbcType=VARCHAR},
applyment_state = #{applymentState,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
shop_id = #{shopId,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,241 @@
<?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.TbOrderDetailMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbOrderDetail">
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="order_id" jdbcType="INTEGER" property="orderId"/>
<result column="shop_id" jdbcType="INTEGER" property="shopId"/>
<result column="product_id" jdbcType="INTEGER" property="productId"/>
<result column="product_sku_id" jdbcType="INTEGER" property="productSkuId"/>
<result column="num" jdbcType="INTEGER" property="num"/>
<result column="product_name" jdbcType="VARCHAR" property="productName"/>
<result column="product_sku_name" jdbcType="VARCHAR" property="productSkuName"/>
<result column="product_img" jdbcType="VARCHAR" property="productImg"/>
<result column="status" jdbcType="VARCHAR" property="status"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
<result column="price" jdbcType="DECIMAL" property="price"/>
<result column="price_amount" jdbcType="DECIMAL" property="priceAmount"/>
<result column="pack_amount" jdbcType="DECIMAL" property="packAmount"/>
</resultMap>
<sql id="Base_Column_List">
id, order_id, shop_id, product_id, product_sku_id, num, product_name, product_sku_name,
product_img, create_time, update_time, price, price_amount,status,pack_amount
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from tb_order_detail
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectAllByOrderId" resultType="com.chaozhanggui.system.cashierservice.entity.TbOrderDetail">
select * from tb_order_detail where order_id = #{id}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_order_detail
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByOUrderId">
delete from tb_order_detail where order_id = #{orderId}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbOrderDetail">
insert into tb_order_detail (id, order_id, shop_id,
product_id, product_sku_id, num,
product_name, product_sku_name, product_img,
create_time, update_time, price,
price_amount,pack_amount,status)
values (#{id,jdbcType=INTEGER}, #{orderId,jdbcType=INTEGER}, #{shopId,jdbcType=INTEGER},
#{productId,jdbcType=INTEGER}, #{productSkuId,jdbcType=INTEGER}, #{num,jdbcType=INTEGER},
#{productName,jdbcType=VARCHAR}, #{productSkuName,jdbcType=VARCHAR}, #{productImg,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{price,jdbcType=DECIMAL},
#{priceAmount,jdbcType=DECIMAL},#{packAmount,jdbcType=DECIMAL},#{status,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbOrderDetail">
insert into tb_order_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="orderId != null">
order_id,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="productId != null">
product_id,
</if>
<if test="productSkuId != null">
product_sku_id,
</if>
<if test="num != null">
num,
</if>
<if test="productName != null">
product_name,
</if>
<if test="productSkuName != null">
product_sku_name,
</if>
<if test="productImg != null">
product_img,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="price != null">
price,
</if>
<if test="priceAmount != null">
price_amount,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="orderId != null">
#{orderId,jdbcType=INTEGER},
</if>
<if test="shopId != null">
#{shopId,jdbcType=INTEGER},
</if>
<if test="productId != null">
#{productId,jdbcType=INTEGER},
</if>
<if test="productSkuId != null">
#{productSkuId,jdbcType=INTEGER},
</if>
<if test="num != null">
#{num,jdbcType=INTEGER},
</if>
<if test="productName != null">
#{productName,jdbcType=VARCHAR},
</if>
<if test="productSkuName != null">
#{productSkuName,jdbcType=VARCHAR},
</if>
<if test="productImg != null">
#{productImg,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="price != null">
#{price,jdbcType=DECIMAL},
</if>
<if test="priceAmount != null">
#{priceAmount,jdbcType=DECIMAL},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective"
parameterType="com.chaozhanggui.system.cashierservice.entity.TbOrderDetail">
update tb_order_detail
<set>
<if test="orderId != null">
order_id = #{orderId,jdbcType=INTEGER},
</if>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=INTEGER},
</if>
<if test="productId != null">
product_id = #{productId,jdbcType=INTEGER},
</if>
<if test="productSkuId != null">
product_sku_id = #{productSkuId,jdbcType=INTEGER},
</if>
<if test="num != null">
num = #{num,jdbcType=INTEGER},
</if>
<if test="productName != null">
product_name = #{productName,jdbcType=VARCHAR},
</if>
<if test="sstatus != null">
sstatus = #{sstatus,jdbcType=VARCHAR},
</if>
<if test="productSkuName != null">
product_sku_name = #{productSkuName,jdbcType=VARCHAR},
</if>
<if test="productImg != null">
product_img = #{productImg,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="price != null">
price = #{price,jdbcType=DECIMAL},
</if>
<if test="priceAmount != null">
price_amount = #{priceAmount,jdbcType=DECIMAL},
</if>
<if test="packAmount != null">
pack_amount = #{packAmount,jdbcType=DECIMAL},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbOrderDetail">
update tb_order_detail
set order_id = #{orderId,jdbcType=INTEGER},
shop_id = #{shopId,jdbcType=INTEGER},
product_id = #{productId,jdbcType=INTEGER},
product_sku_id = #{productSkuId,jdbcType=INTEGER},
num = #{num,jdbcType=INTEGER},
product_name = #{productName,jdbcType=VARCHAR},
product_sku_name = #{productSkuName,jdbcType=VARCHAR},
product_img = #{productImg,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
price = #{price,jdbcType=DECIMAL},
price_amount = #{priceAmount,jdbcType=DECIMAL}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateStatusByOrderId">
update tb_order_detail set status = #{status} where order_id = #{orderId}
</update>
<update id="updateBatchOrderDetail" parameterType="com.chaozhanggui.system.cashierservice.entity.po.OrderDetailPo">
<foreach collection="list" item="item" index="index" open="" close="" separator=";">
update tb_order_detail
set status= #{item.status}
where id = #{item.id}
</foreach>
</update>
<select id="selectAllByOrderIdAndStatus" resultMap="BaseResultMap">
select * from tb_order_detail where status='closed' and order_id=#{orderId} and id in
<foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
#{item.id}
</foreach>
</select>
<select id="selectByOrderId" resultType="java.math.BigDecimal">
select IFNULL(sum(price_amount),0) from tb_order_detail where order_id=#{orderId} and `status`='refund'
</select>
<update id="updateStatusByOrderIdAndStatus">
update tb_order_detail set status = #{status} where order_id = #{orderId} and status='unpaid'
</update>
<insert id="batchInsert">
insert into tb_order_detail (order_id, shop_id,
product_id, product_sku_id, num,
product_name, product_sku_name, product_img,
create_time, update_time, price,
price_amount,pack_amount,status) values
<foreach collection="list" separator="," item="item">
(#{orderId},#{item.shopId},#{item.productId},#{item.productSkuId},#{item.num},#{item.productName},#{item.productSkuName},#{item.productImg},#{item.createTime},#{item.updateTime},#{item.price},#{item.priceAmount},#{item.packAmount},#{item.status})
</foreach>
</insert>
</mapper>

View File

@@ -0,0 +1,183 @@
<?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.TbOrderExtendMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbOrderExtend">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="creator_snap" jdbcType="VARCHAR" property="creatorSnap" />
<result column="cashier_snap" jdbcType="VARCHAR" property="cashierSnap" />
<result column="terminal_snap" jdbcType="VARCHAR" property="terminalSnap" />
<result column="table_party" jdbcType="VARCHAR" property="tableParty" />
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
<result column="shop_snap" jdbcType="VARCHAR" property="shopSnap" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbOrderExtendWithBLOBs">
<result column="cart_list" jdbcType="LONGVARCHAR" property="cartList" />
<result column="payment_list" jdbcType="LONGVARCHAR" property="paymentList" />
</resultMap>
<sql id="Base_Column_List">
id, creator_snap, cashier_snap, terminal_snap, table_party, shop_id, created_at,
updated_at, shop_snap
</sql>
<sql id="Blob_Column_List">
cart_list, payment_list
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from tb_order_extend
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_order_extend
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbOrderExtendWithBLOBs">
insert into tb_order_extend (id, creator_snap, cashier_snap,
terminal_snap, table_party, shop_id,
created_at, updated_at, shop_snap,
cart_list, payment_list)
values (#{id,jdbcType=INTEGER}, #{creatorSnap,jdbcType=VARCHAR}, #{cashierSnap,jdbcType=VARCHAR},
#{terminalSnap,jdbcType=VARCHAR}, #{tableParty,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR},
#{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{shopSnap,jdbcType=VARCHAR},
#{cartList,jdbcType=LONGVARCHAR}, #{paymentList,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbOrderExtendWithBLOBs">
insert into tb_order_extend
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="creatorSnap != null">
creator_snap,
</if>
<if test="cashierSnap != null">
cashier_snap,
</if>
<if test="terminalSnap != null">
terminal_snap,
</if>
<if test="tableParty != null">
table_party,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="shopSnap != null">
shop_snap,
</if>
<if test="cartList != null">
cart_list,
</if>
<if test="paymentList != null">
payment_list,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="creatorSnap != null">
#{creatorSnap,jdbcType=VARCHAR},
</if>
<if test="cashierSnap != null">
#{cashierSnap,jdbcType=VARCHAR},
</if>
<if test="terminalSnap != null">
#{terminalSnap,jdbcType=VARCHAR},
</if>
<if test="tableParty != null">
#{tableParty,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
#{shopId,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
<if test="shopSnap != null">
#{shopSnap,jdbcType=VARCHAR},
</if>
<if test="cartList != null">
#{cartList,jdbcType=LONGVARCHAR},
</if>
<if test="paymentList != null">
#{paymentList,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbOrderExtendWithBLOBs">
update tb_order_extend
<set>
<if test="creatorSnap != null">
creator_snap = #{creatorSnap,jdbcType=VARCHAR},
</if>
<if test="cashierSnap != null">
cashier_snap = #{cashierSnap,jdbcType=VARCHAR},
</if>
<if test="terminalSnap != null">
terminal_snap = #{terminalSnap,jdbcType=VARCHAR},
</if>
<if test="tableParty != null">
table_party = #{tableParty,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
<if test="shopSnap != null">
shop_snap = #{shopSnap,jdbcType=VARCHAR},
</if>
<if test="cartList != null">
cart_list = #{cartList,jdbcType=LONGVARCHAR},
</if>
<if test="paymentList != null">
payment_list = #{paymentList,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.system.cashierservice.entity.TbOrderExtendWithBLOBs">
update tb_order_extend
set creator_snap = #{creatorSnap,jdbcType=VARCHAR},
cashier_snap = #{cashierSnap,jdbcType=VARCHAR},
terminal_snap = #{terminalSnap,jdbcType=VARCHAR},
table_party = #{tableParty,jdbcType=VARCHAR},
shop_id = #{shopId,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
shop_snap = #{shopSnap,jdbcType=VARCHAR},
cart_list = #{cartList,jdbcType=LONGVARCHAR},
payment_list = #{paymentList,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbOrderExtend">
update tb_order_extend
set creator_snap = #{creatorSnap,jdbcType=VARCHAR},
cashier_snap = #{cashierSnap,jdbcType=VARCHAR},
terminal_snap = #{terminalSnap,jdbcType=VARCHAR},
table_party = #{tableParty,jdbcType=VARCHAR},
shop_id = #{shopId,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
shop_snap = #{shopSnap,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,540 @@
<?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.TbOrderInfoMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbOrderInfo">
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="order_no" jdbcType="VARCHAR" property="orderNo"/>
<result column="settlement_amount" jdbcType="DECIMAL" property="settlementAmount"/>
<result column="pack_fee" jdbcType="DECIMAL" property="packFee"/>
<result column="origin_amount" jdbcType="DECIMAL" property="originAmount"/>
<result column="product_amount" jdbcType="DECIMAL" property="productAmount"/>
<result column="amount" jdbcType="DECIMAL" property="amount"/>
<result column="refund_amount" jdbcType="DECIMAL" property="refundAmount"/>
<result column="pay_type" jdbcType="VARCHAR" property="payType"/>
<result column="pay_amount" jdbcType="DECIMAL" property="payAmount"/>
<result column="order_amount" jdbcType="DECIMAL" property="orderAmount"/>
<result column="freight_amount" jdbcType="DECIMAL" property="freightAmount"/>
<result column="discount_ratio" jdbcType="DECIMAL" property="discountRatio"/>
<result column="discount_amount" jdbcType="DECIMAL" property="discountAmount"/>
<result column="table_id" jdbcType="VARCHAR" property="tableId"/>
<result column="small_change" jdbcType="DECIMAL" property="smallChange"/>
<result column="send_type" jdbcType="VARCHAR" property="sendType"/>
<result column="order_type" jdbcType="VARCHAR" property="orderType"/>
<result column="product_type" jdbcType="VARCHAR" property="productType"/>
<result column="status" jdbcType="VARCHAR" property="status"/>
<result column="billing_id" jdbcType="VARCHAR" property="billingId"/>
<result column="merchant_id" jdbcType="VARCHAR" property="merchantId"/>
<result column="shop_id" jdbcType="VARCHAR" property="shopId"/>
<result column="is_vip" jdbcType="TINYINT" property="isVip"/>
<result column="member_id" jdbcType="VARCHAR" property="memberId"/>
<result column="user_id" jdbcType="VARCHAR" property="userId"/>
<result column="product_score" jdbcType="INTEGER" property="productScore"/>
<result column="deduct_score" jdbcType="INTEGER" property="deductScore"/>
<result column="user_coupon_id" jdbcType="VARCHAR" property="userCouponId"/>
<result column="user_coupon_amount" jdbcType="DECIMAL" property="userCouponAmount"/>
<result column="refund_able" jdbcType="TINYINT" property="refundAble"/>
<result column="paid_time" jdbcType="BIGINT" property="paidTime"/>
<result column="is_effect" jdbcType="TINYINT" property="isEffect"/>
<result column="is_group" jdbcType="TINYINT" property="isGroup"/>
<result column="updated_at" jdbcType="BIGINT" property="updatedAt"/>
<result column="system_time" jdbcType="BIGINT" property="systemTime"/>
<result column="created_at" jdbcType="BIGINT" property="createdAt"/>
<result column="is_accepted" jdbcType="TINYINT" property="isAccepted"/>
<result column="pay_order_no" jdbcType="VARCHAR" property="payOrderNo"/>
<result column="trade_day" jdbcType="VARCHAR" property="tradeDay"/>
<result column="source" jdbcType="VARCHAR" property="source"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="master_id" jdbcType="VARCHAR" property="masterId"/>
<result column="table_name" jdbcType="VARCHAR" property="tableName"/>
</resultMap>
<sql id="Base_Column_List">
id, order_no, settlement_amount, pack_fee, origin_amount, product_amount, amount,
refund_amount, pay_type, pay_amount, order_amount, freight_amount, discount_ratio,
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`
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from tb_order_info
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectAllByShop" resultType="com.chaozhanggui.system.cashierservice.entity.po.OrderPo">
select toi.created_at as createAt,toi.id,toi.order_no as orderNo,toi.order_amount as orderAmount,count(*) as
productNum,toi.order_type as orderType,
ifnull(TRIM(TRAILING ', ' FROM GROUP_CONCAT(tod.product_name ORDER BY tod.id SEPARATOR ', ')),'') AS productName,
toi.status from tb_order_info toi left join tb_order_detail tod on tod.order_id = toi.id
where toi.shop_id = #{shopId}
<choose>
<when test="orderType == 'return'">
and toi.order_type = 'return' and toi.status in ('refund','closed')
</when>
<when test="orderType == 'cash'">
and toi.order_type in ('cash','miniapp') and toi.status in ('refund','closed')
</when>
<otherwise>
and toi.status in ('refund','closed')
</otherwise>
</choose>
<if test="day != null and day != ''">
and toi.trade_day = #{day}
</if>
<if test="orderNo != null and orderNo != ''">
and toi.order_no = #{orderNo}
</if>
group by toi.shop_id,toi.order_no
order by toi.id desc
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_order_info
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbOrderInfo"
useGeneratedKeys="true" keyProperty="id">
insert into tb_order_info (id, order_no, settlement_amount,
pack_fee, origin_amount, product_amount,
amount, refund_amount, pay_type,
pay_amount, order_amount, freight_amount,
discount_ratio, 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
)
values (#{id,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{settlementAmount,jdbcType=DECIMAL},
#{packFee,jdbcType=DECIMAL}, #{originAmount,jdbcType=DECIMAL}, #{productAmount,jdbcType=DECIMAL},
#{amount,jdbcType=DECIMAL}, #{refundAmount,jdbcType=DECIMAL}, #{payType,jdbcType=VARCHAR},
#{payAmount,jdbcType=DECIMAL}, #{orderAmount,jdbcType=DECIMAL}, #{freightAmount,jdbcType=DECIMAL},
#{discountRatio,jdbcType=DECIMAL}, #{discountAmount,jdbcType=DECIMAL}, #{tableId,jdbcType=VARCHAR},
#{smallChange,jdbcType=DECIMAL}, #{sendType,jdbcType=VARCHAR}, #{orderType,jdbcType=VARCHAR},
#{productType,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{billingId,jdbcType=VARCHAR},
#{merchantId,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR}, #{isVip,jdbcType=TINYINT},
#{memberId,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{productScore,jdbcType=INTEGER},
#{deductScore,jdbcType=INTEGER}, #{userCouponId,jdbcType=VARCHAR}, #{userCouponAmount,jdbcType=DECIMAL},
#{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}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbOrderInfo">
insert into tb_order_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="orderNo != null">
order_no,
</if>
<if test="settlementAmount != null">
settlement_amount,
</if>
<if test="packFee != null">
pack_fee,
</if>
<if test="originAmount != null">
origin_amount,
</if>
<if test="productAmount != null">
product_amount,
</if>
<if test="amount != null">
amount,
</if>
<if test="refundAmount != null">
refund_amount,
</if>
<if test="payType != null">
pay_type,
</if>
<if test="payAmount != null">
pay_amount,
</if>
<if test="orderAmount != null">
order_amount,
</if>
<if test="freightAmount != null">
freight_amount,
</if>
<if test="discountRatio != null">
discount_ratio,
</if>
<if test="discountAmount != null">
discount_amount,
</if>
<if test="tableId != null">
table_id,
</if>
<if test="smallChange != null">
small_change,
</if>
<if test="sendType != null">
send_type,
</if>
<if test="orderType != null">
order_type,
</if>
<if test="productType != null">
product_type,
</if>
<if test="status != null">
status,
</if>
<if test="billingId != null">
billing_id,
</if>
<if test="merchantId != null">
merchant_id,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="isVip != null">
is_vip,
</if>
<if test="memberId != null">
member_id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="productScore != null">
product_score,
</if>
<if test="deductScore != null">
deduct_score,
</if>
<if test="userCouponId != null">
user_coupon_id,
</if>
<if test="userCouponAmount != null">
user_coupon_amount,
</if>
<if test="refundAble != null">
refund_able,
</if>
<if test="paidTime != null">
paid_time,
</if>
<if test="isEffect != null">
is_effect,
</if>
<if test="isGroup != null">
is_group,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="systemTime != null">
system_time,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="isAccepted != null">
is_accepted,
</if>
<if test="payOrderNo != null">
pay_order_no,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="orderNo != null">
#{orderNo,jdbcType=VARCHAR},
</if>
<if test="settlementAmount != null">
#{settlementAmount,jdbcType=DECIMAL},
</if>
<if test="packFee != null">
#{packFee,jdbcType=DECIMAL},
</if>
<if test="originAmount != null">
#{originAmount,jdbcType=DECIMAL},
</if>
<if test="productAmount != null">
#{productAmount,jdbcType=DECIMAL},
</if>
<if test="amount != null">
#{amount,jdbcType=DECIMAL},
</if>
<if test="refundAmount != null">
#{refundAmount,jdbcType=DECIMAL},
</if>
<if test="payType != null">
#{payType,jdbcType=VARCHAR},
</if>
<if test="payAmount != null">
#{payAmount,jdbcType=DECIMAL},
</if>
<if test="orderAmount != null">
#{orderAmount,jdbcType=DECIMAL},
</if>
<if test="freightAmount != null">
#{freightAmount,jdbcType=DECIMAL},
</if>
<if test="discountRatio != null">
#{discountRatio,jdbcType=DECIMAL},
</if>
<if test="discountAmount != null">
#{discountAmount,jdbcType=DECIMAL},
</if>
<if test="tableId != null">
#{tableId,jdbcType=VARCHAR},
</if>
<if test="smallChange != null">
#{smallChange,jdbcType=DECIMAL},
</if>
<if test="sendType != null">
#{sendType,jdbcType=VARCHAR},
</if>
<if test="orderType != null">
#{orderType,jdbcType=VARCHAR},
</if>
<if test="productType != null">
#{productType,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=VARCHAR},
</if>
<if test="billingId != null">
#{billingId,jdbcType=VARCHAR},
</if>
<if test="merchantId != null">
#{merchantId,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
#{shopId,jdbcType=VARCHAR},
</if>
<if test="isVip != null">
#{isVip,jdbcType=TINYINT},
</if>
<if test="memberId != null">
#{memberId,jdbcType=VARCHAR},
</if>
<if test="userId != null">
#{userId,jdbcType=VARCHAR},
</if>
<if test="productScore != null">
#{productScore,jdbcType=INTEGER},
</if>
<if test="deductScore != null">
#{deductScore,jdbcType=INTEGER},
</if>
<if test="userCouponId != null">
#{userCouponId,jdbcType=VARCHAR},
</if>
<if test="userCouponAmount != null">
#{userCouponAmount,jdbcType=DECIMAL},
</if>
<if test="refundAble != null">
#{refundAble,jdbcType=TINYINT},
</if>
<if test="paidTime != null">
#{paidTime,jdbcType=BIGINT},
</if>
<if test="isEffect != null">
#{isEffect,jdbcType=TINYINT},
</if>
<if test="isGroup != null">
#{isGroup,jdbcType=TINYINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
<if test="systemTime != null">
#{systemTime,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="isAccepted != null">
#{isAccepted,jdbcType=TINYINT},
</if>
<if test="payOrderNo != null">
#{payOrderNo,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbOrderInfo">
update tb_order_info
<set>
<if test="orderNo != null">
order_no = #{orderNo,jdbcType=VARCHAR},
</if>
<if test="settlementAmount != null">
settlement_amount = #{settlementAmount,jdbcType=DECIMAL},
</if>
<if test="packFee != null">
pack_fee = #{packFee,jdbcType=DECIMAL},
</if>
<if test="originAmount != null">
origin_amount = #{originAmount,jdbcType=DECIMAL},
</if>
<if test="productAmount != null">
product_amount = #{productAmount,jdbcType=DECIMAL},
</if>
<if test="amount != null">
amount = #{amount,jdbcType=DECIMAL},
</if>
<if test="refundAmount != null">
refund_amount = #{refundAmount,jdbcType=DECIMAL},
</if>
<if test="payType != null">
pay_type = #{payType,jdbcType=VARCHAR},
</if>
<if test="payAmount != null">
pay_amount = #{payAmount,jdbcType=DECIMAL},
</if>
<if test="orderAmount != null">
order_amount = #{orderAmount,jdbcType=DECIMAL},
</if>
<if test="freightAmount != null">
freight_amount = #{freightAmount,jdbcType=DECIMAL},
</if>
<if test="discountRatio != null">
discount_ratio = #{discountRatio,jdbcType=DECIMAL},
</if>
<if test="discountAmount != null">
discount_amount = #{discountAmount,jdbcType=DECIMAL},
</if>
<if test="tableId != null">
table_id = #{tableId,jdbcType=VARCHAR},
</if>
<if test="smallChange != null">
small_change = #{smallChange,jdbcType=DECIMAL},
</if>
<if test="sendType != null">
send_type = #{sendType,jdbcType=VARCHAR},
</if>
<if test="orderType != null">
order_type = #{orderType,jdbcType=VARCHAR},
</if>
<if test="productType != null">
product_type = #{productType,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=VARCHAR},
</if>
<if test="billingId != null">
billing_id = #{billingId,jdbcType=VARCHAR},
</if>
<if test="merchantId != null">
merchant_id = #{merchantId,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=VARCHAR},
</if>
<if test="isVip != null">
is_vip = #{isVip,jdbcType=TINYINT},
</if>
<if test="memberId != null">
member_id = #{memberId,jdbcType=VARCHAR},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=VARCHAR},
</if>
<if test="productScore != null">
product_score = #{productScore,jdbcType=INTEGER},
</if>
<if test="deductScore != null">
deduct_score = #{deductScore,jdbcType=INTEGER},
</if>
<if test="userCouponId != null">
user_coupon_id = #{userCouponId,jdbcType=VARCHAR},
</if>
<if test="userCouponAmount != null">
user_coupon_amount = #{userCouponAmount,jdbcType=DECIMAL},
</if>
<if test="refundAble != null">
refund_able = #{refundAble,jdbcType=TINYINT},
</if>
<if test="paidTime != null">
paid_time = #{paidTime,jdbcType=BIGINT},
</if>
<if test="isEffect != null">
is_effect = #{isEffect,jdbcType=TINYINT},
</if>
<if test="isGroup != null">
is_group = #{isGroup,jdbcType=TINYINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
<if test="systemTime != null">
system_time = #{systemTime,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="isAccepted != null">
is_accepted = #{isAccepted,jdbcType=TINYINT},
</if>
<if test="payOrderNo != null">
pay_order_no = #{payOrderNo,jdbcType=VARCHAR},
</if>
<if test="masterId != null">
master_id = #{masterId,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbOrderInfo">
update tb_order_info
set order_no = #{orderNo,jdbcType=VARCHAR},
settlement_amount = #{settlementAmount,jdbcType=DECIMAL},
pack_fee = #{packFee,jdbcType=DECIMAL},
origin_amount = #{originAmount,jdbcType=DECIMAL},
product_amount = #{productAmount,jdbcType=DECIMAL},
amount = #{amount,jdbcType=DECIMAL},
refund_amount = #{refundAmount,jdbcType=DECIMAL},
pay_type = #{payType,jdbcType=VARCHAR},
pay_amount = #{payAmount,jdbcType=DECIMAL},
order_amount = #{orderAmount,jdbcType=DECIMAL},
freight_amount = #{freightAmount,jdbcType=DECIMAL},
discount_ratio = #{discountRatio,jdbcType=DECIMAL},
discount_amount = #{discountAmount,jdbcType=DECIMAL},
table_id = #{tableId,jdbcType=VARCHAR},
small_change = #{smallChange,jdbcType=DECIMAL},
send_type = #{sendType,jdbcType=VARCHAR},
order_type = #{orderType,jdbcType=VARCHAR},
product_type = #{productType,jdbcType=VARCHAR},
status = #{status,jdbcType=VARCHAR},
billing_id = #{billingId,jdbcType=VARCHAR},
merchant_id = #{merchantId,jdbcType=VARCHAR},
shop_id = #{shopId,jdbcType=VARCHAR},
is_vip = #{isVip,jdbcType=TINYINT},
member_id = #{memberId,jdbcType=VARCHAR},
user_id = #{userId,jdbcType=VARCHAR},
product_score = #{productScore,jdbcType=INTEGER},
deduct_score = #{deductScore,jdbcType=INTEGER},
user_coupon_id = #{userCouponId,jdbcType=VARCHAR},
user_coupon_amount = #{userCouponAmount,jdbcType=DECIMAL},
refund_able = #{refundAble,jdbcType=TINYINT},
paid_time = #{paidTime,jdbcType=BIGINT},
is_effect = #{isEffect,jdbcType=TINYINT},
is_group = #{isGroup,jdbcType=TINYINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
system_time = #{systemTime,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=BIGINT},
is_accepted = #{isAccepted,jdbcType=TINYINT},
pay_order_no = #{payOrderNo,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateStatusById">
update tb_order_info set status = #{status} where id = #{orderId}
</update>
<select id="selectAllByStatus" resultMap="BaseResultMap">
select * from tb_order_info where `status`=#{status} and order_type !='miniapp'
</select>
</mapper>

View File

@@ -0,0 +1,263 @@
<?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.TbOrderPaymentMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbOrderPayment">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="pay_type_id" jdbcType="VARCHAR" property="payTypeId" />
<result column="amount" jdbcType="DECIMAL" property="amount" />
<result column="paid_amount" jdbcType="DECIMAL" property="paidAmount" />
<result column="has_refund_amount" jdbcType="DECIMAL" property="hasRefundAmount" />
<result column="pay_name" jdbcType="VARCHAR" property="payName" />
<result column="pay_type" jdbcType="VARCHAR" property="payType" />
<result column="received" jdbcType="DECIMAL" property="received" />
<result column="change_fee" jdbcType="DECIMAL" property="changeFee" />
<result column="merchant_id" jdbcType="VARCHAR" property="merchantId" />
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
<result column="billing_id" jdbcType="VARCHAR" property="billingId" />
<result column="order_id" jdbcType="VARCHAR" property="orderId" />
<result column="auth_code" jdbcType="VARCHAR" property="authCode" />
<result column="refundable" jdbcType="VARCHAR" property="refundable" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
<result column="trade_number" jdbcType="VARCHAR" property="tradeNumber" />
<result column="member_id" jdbcType="VARCHAR" property="memberId" />
</resultMap>
<sql id="Base_Column_List">
id, pay_type_id, amount, paid_amount, has_refund_amount, pay_name, pay_type, received,
change_fee, merchant_id, shop_id, billing_id, order_id, auth_code, refundable, created_at,
updated_at, trade_number, member_id
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_order_payment
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_order_payment
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbOrderPayment" keyProperty="id" useGeneratedKeys="true">
insert into tb_order_payment (id, pay_type_id, amount,
paid_amount, has_refund_amount, pay_name,
pay_type, received, change_fee,
merchant_id, shop_id, billing_id,
order_id, auth_code, refundable,
created_at, updated_at, trade_number,
member_id)
values (#{id,jdbcType=INTEGER}, #{payTypeId,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL},
#{paidAmount,jdbcType=DECIMAL}, #{hasRefundAmount,jdbcType=DECIMAL}, #{payName,jdbcType=VARCHAR},
#{payType,jdbcType=VARCHAR}, #{received,jdbcType=DECIMAL}, #{changeFee,jdbcType=DECIMAL},
#{merchantId,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR}, #{billingId,jdbcType=VARCHAR},
#{orderId,jdbcType=VARCHAR}, #{authCode,jdbcType=VARCHAR}, #{refundable,jdbcType=VARCHAR},
#{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{tradeNumber,jdbcType=VARCHAR},
#{memberId,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbOrderPayment">
insert into tb_order_payment
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="payTypeId != null">
pay_type_id,
</if>
<if test="amount != null">
amount,
</if>
<if test="paidAmount != null">
paid_amount,
</if>
<if test="hasRefundAmount != null">
has_refund_amount,
</if>
<if test="payName != null">
pay_name,
</if>
<if test="payType != null">
pay_type,
</if>
<if test="received != null">
received,
</if>
<if test="changeFee != null">
change_fee,
</if>
<if test="merchantId != null">
merchant_id,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="billingId != null">
billing_id,
</if>
<if test="orderId != null">
order_id,
</if>
<if test="authCode != null">
auth_code,
</if>
<if test="refundable != null">
refundable,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="tradeNumber != null">
trade_number,
</if>
<if test="memberId != null">
member_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="payTypeId != null">
#{payTypeId,jdbcType=VARCHAR},
</if>
<if test="amount != null">
#{amount,jdbcType=DECIMAL},
</if>
<if test="paidAmount != null">
#{paidAmount,jdbcType=DECIMAL},
</if>
<if test="hasRefundAmount != null">
#{hasRefundAmount,jdbcType=DECIMAL},
</if>
<if test="payName != null">
#{payName,jdbcType=VARCHAR},
</if>
<if test="payType != null">
#{payType,jdbcType=VARCHAR},
</if>
<if test="received != null">
#{received,jdbcType=DECIMAL},
</if>
<if test="changeFee != null">
#{changeFee,jdbcType=DECIMAL},
</if>
<if test="merchantId != null">
#{merchantId,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
#{shopId,jdbcType=VARCHAR},
</if>
<if test="billingId != null">
#{billingId,jdbcType=VARCHAR},
</if>
<if test="orderId != null">
#{orderId,jdbcType=VARCHAR},
</if>
<if test="authCode != null">
#{authCode,jdbcType=VARCHAR},
</if>
<if test="refundable != null">
#{refundable,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
<if test="tradeNumber != null">
#{tradeNumber,jdbcType=VARCHAR},
</if>
<if test="memberId != null">
#{memberId,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbOrderPayment">
update tb_order_payment
<set>
<if test="payTypeId != null">
pay_type_id = #{payTypeId,jdbcType=VARCHAR},
</if>
<if test="amount != null">
amount = #{amount,jdbcType=DECIMAL},
</if>
<if test="paidAmount != null">
paid_amount = #{paidAmount,jdbcType=DECIMAL},
</if>
<if test="hasRefundAmount != null">
has_refund_amount = #{hasRefundAmount,jdbcType=DECIMAL},
</if>
<if test="payName != null">
pay_name = #{payName,jdbcType=VARCHAR},
</if>
<if test="payType != null">
pay_type = #{payType,jdbcType=VARCHAR},
</if>
<if test="received != null">
received = #{received,jdbcType=DECIMAL},
</if>
<if test="changeFee != null">
change_fee = #{changeFee,jdbcType=DECIMAL},
</if>
<if test="merchantId != null">
merchant_id = #{merchantId,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=VARCHAR},
</if>
<if test="billingId != null">
billing_id = #{billingId,jdbcType=VARCHAR},
</if>
<if test="orderId != null">
order_id = #{orderId,jdbcType=VARCHAR},
</if>
<if test="authCode != null">
auth_code = #{authCode,jdbcType=VARCHAR},
</if>
<if test="refundable != null">
refundable = #{refundable,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
<if test="tradeNumber != null">
trade_number = #{tradeNumber,jdbcType=VARCHAR},
</if>
<if test="memberId != null">
member_id = #{memberId,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbOrderPayment">
update tb_order_payment
set pay_type_id = #{payTypeId,jdbcType=VARCHAR},
amount = #{amount,jdbcType=DECIMAL},
paid_amount = #{paidAmount,jdbcType=DECIMAL},
has_refund_amount = #{hasRefundAmount,jdbcType=DECIMAL},
pay_name = #{payName,jdbcType=VARCHAR},
pay_type = #{payType,jdbcType=VARCHAR},
received = #{received,jdbcType=DECIMAL},
change_fee = #{changeFee,jdbcType=DECIMAL},
merchant_id = #{merchantId,jdbcType=VARCHAR},
shop_id = #{shopId,jdbcType=VARCHAR},
billing_id = #{billingId,jdbcType=VARCHAR},
order_id = #{orderId,jdbcType=VARCHAR},
auth_code = #{authCode,jdbcType=VARCHAR},
refundable = #{refundable,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
trade_number = #{tradeNumber,jdbcType=VARCHAR},
member_id = #{memberId,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByOrderId" resultMap="BaseResultMap">
select * from tb_order_payment where order_id=#{orderId}
</select>
</mapper>

View File

@@ -0,0 +1,198 @@
<?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.TbPlussDeviceGoodsMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbPlussDeviceGoods">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="deviceLogo" jdbcType="VARCHAR" property="devicelogo" />
<result column="introDesc" jdbcType="VARCHAR" property="introdesc" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="tagId" jdbcType="INTEGER" property="tagid" />
<result column="depositFlag" jdbcType="VARCHAR" property="depositflag" />
<result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
<result column="updateTime" jdbcType="TIMESTAMP" property="updatetime" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbPlussDeviceGoods">
<result column="detail" jdbcType="LONGVARCHAR" property="detail" />
</resultMap>
<sql id="Base_Column_List">
id, code, name, deviceLogo, introDesc, sort, status, tagId, depositFlag, createTime,
updateTime
</sql>
<sql id="Blob_Column_List">
detail
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from tb_pluss_device_goods
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_pluss_device_goods
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbPlussDeviceGoods">
insert into tb_pluss_device_goods (id, code, name,
deviceLogo, introDesc, sort,
status, tagId, depositFlag,
createTime, updateTime, detail
)
values (#{id,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{devicelogo,jdbcType=VARCHAR}, #{introdesc,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER},
#{status,jdbcType=INTEGER}, #{tagid,jdbcType=INTEGER}, #{depositflag,jdbcType=VARCHAR},
#{createtime,jdbcType=TIMESTAMP}, #{updatetime,jdbcType=TIMESTAMP}, #{detail,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbPlussDeviceGoods">
insert into tb_pluss_device_goods
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="code != null">
code,
</if>
<if test="name != null">
name,
</if>
<if test="devicelogo != null">
deviceLogo,
</if>
<if test="introdesc != null">
introDesc,
</if>
<if test="sort != null">
sort,
</if>
<if test="status != null">
status,
</if>
<if test="tagid != null">
tagId,
</if>
<if test="depositflag != null">
depositFlag,
</if>
<if test="createtime != null">
createTime,
</if>
<if test="updatetime != null">
updateTime,
</if>
<if test="detail != null">
detail,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="devicelogo != null">
#{devicelogo,jdbcType=VARCHAR},
</if>
<if test="introdesc != null">
#{introdesc,jdbcType=VARCHAR},
</if>
<if test="sort != null">
#{sort,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="tagid != null">
#{tagid,jdbcType=INTEGER},
</if>
<if test="depositflag != null">
#{depositflag,jdbcType=VARCHAR},
</if>
<if test="createtime != null">
#{createtime,jdbcType=TIMESTAMP},
</if>
<if test="updatetime != null">
#{updatetime,jdbcType=TIMESTAMP},
</if>
<if test="detail != null">
#{detail,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbPlussDeviceGoods">
update tb_pluss_device_goods
<set>
<if test="code != null">
code = #{code,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="devicelogo != null">
deviceLogo = #{devicelogo,jdbcType=VARCHAR},
</if>
<if test="introdesc != null">
introDesc = #{introdesc,jdbcType=VARCHAR},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="tagid != null">
tagId = #{tagid,jdbcType=INTEGER},
</if>
<if test="depositflag != null">
depositFlag = #{depositflag,jdbcType=VARCHAR},
</if>
<if test="createtime != null">
createTime = #{createtime,jdbcType=TIMESTAMP},
</if>
<if test="updatetime != null">
updateTime = #{updatetime,jdbcType=TIMESTAMP},
</if>
<if test="detail != null">
detail = #{detail,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.system.cashierservice.entity.TbPlussDeviceGoods">
update tb_pluss_device_goods
set code = #{code,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
deviceLogo = #{devicelogo,jdbcType=VARCHAR},
introDesc = #{introdesc,jdbcType=VARCHAR},
sort = #{sort,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
tagId = #{tagid,jdbcType=INTEGER},
depositFlag = #{depositflag,jdbcType=VARCHAR},
createTime = #{createtime,jdbcType=TIMESTAMP},
updateTime = #{updatetime,jdbcType=TIMESTAMP},
detail = #{detail,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbPlussDeviceGoods">
update tb_pluss_device_goods
set code = #{code,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
deviceLogo = #{devicelogo,jdbcType=VARCHAR},
introDesc = #{introdesc,jdbcType=VARCHAR},
sort = #{sort,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
tagId = #{tagid,jdbcType=INTEGER},
depositFlag = #{depositflag,jdbcType=VARCHAR},
createTime = #{createtime,jdbcType=TIMESTAMP},
updateTime = #{updatetime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,181 @@
<?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.TbPlussShopStaffMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbPlussShopStaff">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="account" jdbcType="VARCHAR" property="account" />
<result column="password" jdbcType="VARCHAR" property="password" />
<result column="max_discount_amount" jdbcType="DECIMAL" property="maxDiscountAmount" />
<result column="status" jdbcType="BIT" property="status" />
<result column="employee" jdbcType="VARCHAR" property="employee" />
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
<result column="type" jdbcType="VARCHAR" property="type" />
</resultMap>
<sql id="Base_Column_List">
id, code, name, account, password, max_discount_amount, status, employee, shop_id,
created_at, updated_at, type
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_pluss_shop_staff
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_pluss_shop_staff
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbPlussShopStaff">
insert into tb_pluss_shop_staff (id, code, name,
account, password, max_discount_amount,
status, employee, shop_id,
created_at, updated_at, type
)
values (#{id,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{account,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{maxDiscountAmount,jdbcType=DECIMAL},
#{status,jdbcType=BIT}, #{employee,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR},
#{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbPlussShopStaff">
insert into tb_pluss_shop_staff
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="code != null">
code,
</if>
<if test="name != null">
name,
</if>
<if test="account != null">
account,
</if>
<if test="password != null">
password,
</if>
<if test="maxDiscountAmount != null">
max_discount_amount,
</if>
<if test="status != null">
status,
</if>
<if test="employee != null">
employee,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="type != null">
type,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="account != null">
#{account,jdbcType=VARCHAR},
</if>
<if test="password != null">
#{password,jdbcType=VARCHAR},
</if>
<if test="maxDiscountAmount != null">
#{maxDiscountAmount,jdbcType=DECIMAL},
</if>
<if test="status != null">
#{status,jdbcType=BIT},
</if>
<if test="employee != null">
#{employee,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
#{shopId,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbPlussShopStaff">
update tb_pluss_shop_staff
<set>
<if test="code != null">
code = #{code,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="account != null">
account = #{account,jdbcType=VARCHAR},
</if>
<if test="password != null">
password = #{password,jdbcType=VARCHAR},
</if>
<if test="maxDiscountAmount != null">
max_discount_amount = #{maxDiscountAmount,jdbcType=DECIMAL},
</if>
<if test="status != null">
status = #{status,jdbcType=BIT},
</if>
<if test="employee != null">
employee = #{employee,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbPlussShopStaff">
update tb_pluss_shop_staff
set code = #{code,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
account = #{account,jdbcType=VARCHAR},
password = #{password,jdbcType=VARCHAR},
max_discount_amount = #{maxDiscountAmount,jdbcType=DECIMAL},
status = #{status,jdbcType=BIT},
employee = #{employee,jdbcType=VARCHAR},
shop_id = #{shopId,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
type = #{type,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByAccount" resultMap="BaseResultMap">
select * from tb_pluss_shop_staff where account=#{account}
</select>
</mapper>

View File

@@ -0,0 +1,277 @@
<?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.TbPrintMachineMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbPrintMachine">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="connection_type" jdbcType="VARCHAR" property="connectionType" />
<result column="address" jdbcType="VARCHAR" property="address" />
<result column="port" jdbcType="VARCHAR" property="port" />
<result column="sub_type" jdbcType="VARCHAR" property="subType" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
<result column="category_ids" jdbcType="VARCHAR" property="categoryIds" />
<result column="content_type" jdbcType="VARCHAR" property="contentType" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="vendor_id" jdbcType="VARCHAR" property="vendorId" />
<result column="product_id" jdbcType="VARCHAR" property="productId" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbPrintMachineWithBLOBs">
<result column="config" jdbcType="LONGVARCHAR" property="config" />
<result column="category_list" jdbcType="LONGVARCHAR" property="categoryList" />
</resultMap>
<sql id="Base_Column_List">
id, name, type, connection_type, address, port, sub_type, status, shop_id, category_ids,
content_type, created_at, updated_at, sort, vendor_id, product_id
</sql>
<sql id="Blob_Column_List">
config, category_list
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from tb_print_machine
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_print_machine
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbPrintMachineWithBLOBs">
insert into tb_print_machine (id, name, type,
connection_type, address, port,
sub_type, status, shop_id,
category_ids, content_type, created_at,
updated_at, sort, vendor_id,
product_id, config, category_list
)
values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
#{connectionType,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{port,jdbcType=VARCHAR},
#{subType,jdbcType=VARCHAR}, #{status,jdbcType=TINYINT}, #{shopId,jdbcType=VARCHAR},
#{categoryIds,jdbcType=VARCHAR}, #{contentType,jdbcType=VARCHAR}, #{createdAt,jdbcType=BIGINT},
#{updatedAt,jdbcType=BIGINT}, #{sort,jdbcType=INTEGER}, #{vendorId,jdbcType=VARCHAR},
#{productId,jdbcType=VARCHAR}, #{config,jdbcType=LONGVARCHAR}, #{categoryList,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbPrintMachineWithBLOBs">
insert into tb_print_machine
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
name,
</if>
<if test="type != null">
type,
</if>
<if test="connectionType != null">
connection_type,
</if>
<if test="address != null">
address,
</if>
<if test="port != null">
port,
</if>
<if test="subType != null">
sub_type,
</if>
<if test="status != null">
status,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="categoryIds != null">
category_ids,
</if>
<if test="contentType != null">
content_type,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="sort != null">
sort,
</if>
<if test="vendorId != null">
vendor_id,
</if>
<if test="productId != null">
product_id,
</if>
<if test="config != null">
config,
</if>
<if test="categoryList != null">
category_list,
</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="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="connectionType != null">
#{connectionType,jdbcType=VARCHAR},
</if>
<if test="address != null">
#{address,jdbcType=VARCHAR},
</if>
<if test="port != null">
#{port,jdbcType=VARCHAR},
</if>
<if test="subType != null">
#{subType,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=TINYINT},
</if>
<if test="shopId != null">
#{shopId,jdbcType=VARCHAR},
</if>
<if test="categoryIds != null">
#{categoryIds,jdbcType=VARCHAR},
</if>
<if test="contentType != null">
#{contentType,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
<if test="sort != null">
#{sort,jdbcType=INTEGER},
</if>
<if test="vendorId != null">
#{vendorId,jdbcType=VARCHAR},
</if>
<if test="productId != null">
#{productId,jdbcType=VARCHAR},
</if>
<if test="config != null">
#{config,jdbcType=LONGVARCHAR},
</if>
<if test="categoryList != null">
#{categoryList,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbPrintMachineWithBLOBs">
update tb_print_machine
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="connectionType != null">
connection_type = #{connectionType,jdbcType=VARCHAR},
</if>
<if test="address != null">
address = #{address,jdbcType=VARCHAR},
</if>
<if test="port != null">
port = #{port,jdbcType=VARCHAR},
</if>
<if test="subType != null">
sub_type = #{subType,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=TINYINT},
</if>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=VARCHAR},
</if>
<if test="categoryIds != null">
category_ids = #{categoryIds,jdbcType=VARCHAR},
</if>
<if test="contentType != null">
content_type = #{contentType,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=INTEGER},
</if>
<if test="vendorId != null">
vendor_id = #{vendorId,jdbcType=VARCHAR},
</if>
<if test="productId != null">
product_id = #{productId,jdbcType=VARCHAR},
</if>
<if test="config != null">
config = #{config,jdbcType=LONGVARCHAR},
</if>
<if test="categoryList != null">
category_list = #{categoryList,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.system.cashierservice.entity.TbPrintMachineWithBLOBs">
update tb_print_machine
set name = #{name,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
connection_type = #{connectionType,jdbcType=VARCHAR},
address = #{address,jdbcType=VARCHAR},
port = #{port,jdbcType=VARCHAR},
sub_type = #{subType,jdbcType=VARCHAR},
status = #{status,jdbcType=TINYINT},
shop_id = #{shopId,jdbcType=VARCHAR},
category_ids = #{categoryIds,jdbcType=VARCHAR},
content_type = #{contentType,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
sort = #{sort,jdbcType=INTEGER},
vendor_id = #{vendorId,jdbcType=VARCHAR},
product_id = #{productId,jdbcType=VARCHAR},
config = #{config,jdbcType=LONGVARCHAR},
category_list = #{categoryList,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbPrintMachine">
update tb_print_machine
set name = #{name,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
connection_type = #{connectionType,jdbcType=VARCHAR},
address = #{address,jdbcType=VARCHAR},
port = #{port,jdbcType=VARCHAR},
sub_type = #{subType,jdbcType=VARCHAR},
status = #{status,jdbcType=TINYINT},
shop_id = #{shopId,jdbcType=VARCHAR},
category_ids = #{categoryIds,jdbcType=VARCHAR},
content_type = #{contentType,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
sort = #{sort,jdbcType=INTEGER},
vendor_id = #{vendorId,jdbcType=VARCHAR},
product_id = #{productId,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByShopId" resultMap="ResultMapWithBLOBs">
select * from tb_print_machine where shop_id=#{shopId} and status=1
</select>
</mapper>

View File

@@ -0,0 +1,197 @@
<?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.TbProductGroupMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbProductGroup">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="merchant_id" jdbcType="VARCHAR" property="merchantId" />
<result column="shop_id" jdbcType="INTEGER" property="shopId" />
<result column="pic" jdbcType="VARCHAR" property="pic" />
<result column="is_show" jdbcType="TINYINT" property="isShow" />
<result column="detail" jdbcType="VARCHAR" property="detail" />
<result column="style" jdbcType="VARCHAR" property="style" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbProductGroup">
<result column="product_ids" jdbcType="LONGVARCHAR" property="productIds" />
</resultMap>
<sql id="Base_Column_List">
id, name, merchant_id, shop_id, pic, is_show, detail, style, sort, created_at, updated_at
</sql>
<sql id="Blob_Column_List">
product_ids
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from tb_product_group
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_product_group
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductGroup">
insert into tb_product_group (id, name, merchant_id,
shop_id, pic, is_show,
detail, style, sort,
created_at, updated_at, product_ids
)
values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{merchantId,jdbcType=VARCHAR},
#{shopId,jdbcType=INTEGER}, #{pic,jdbcType=VARCHAR}, #{isShow,jdbcType=TINYINT},
#{detail,jdbcType=VARCHAR}, #{style,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER},
#{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{productIds,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductGroup">
insert into tb_product_group
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
name,
</if>
<if test="merchantId != null">
merchant_id,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="pic != null">
pic,
</if>
<if test="isShow != null">
is_show,
</if>
<if test="detail != null">
detail,
</if>
<if test="style != null">
style,
</if>
<if test="sort != null">
sort,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="productIds != null">
product_ids,
</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="merchantId != null">
#{merchantId,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
#{shopId,jdbcType=INTEGER},
</if>
<if test="pic != null">
#{pic,jdbcType=VARCHAR},
</if>
<if test="isShow != null">
#{isShow,jdbcType=TINYINT},
</if>
<if test="detail != null">
#{detail,jdbcType=VARCHAR},
</if>
<if test="style != null">
#{style,jdbcType=VARCHAR},
</if>
<if test="sort != null">
#{sort,jdbcType=INTEGER},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
<if test="productIds != null">
#{productIds,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductGroup">
update tb_product_group
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="merchantId != null">
merchant_id = #{merchantId,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=INTEGER},
</if>
<if test="pic != null">
pic = #{pic,jdbcType=VARCHAR},
</if>
<if test="isShow != null">
is_show = #{isShow,jdbcType=TINYINT},
</if>
<if test="detail != null">
detail = #{detail,jdbcType=VARCHAR},
</if>
<if test="style != null">
style = #{style,jdbcType=VARCHAR},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=INTEGER},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
<if test="productIds != null">
product_ids = #{productIds,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductGroup">
update tb_product_group
set name = #{name,jdbcType=VARCHAR},
merchant_id = #{merchantId,jdbcType=VARCHAR},
shop_id = #{shopId,jdbcType=INTEGER},
pic = #{pic,jdbcType=VARCHAR},
is_show = #{isShow,jdbcType=TINYINT},
detail = #{detail,jdbcType=VARCHAR},
style = #{style,jdbcType=VARCHAR},
sort = #{sort,jdbcType=INTEGER},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
product_ids = #{productIds,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductGroup">
update tb_product_group
set name = #{name,jdbcType=VARCHAR},
merchant_id = #{merchantId,jdbcType=VARCHAR},
shop_id = #{shopId,jdbcType=INTEGER},
pic = #{pic,jdbcType=VARCHAR},
is_show = #{isShow,jdbcType=TINYINT},
detail = #{detail,jdbcType=VARCHAR},
style = #{style,jdbcType=VARCHAR},
sort = #{sort,jdbcType=INTEGER},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,918 @@
<?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.TbProductMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbProduct">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="category_id" jdbcType="VARCHAR" property="categoryId" />
<result column="spec_id" jdbcType="INTEGER" property="specId" />
<result column="source_path" jdbcType="VARCHAR" property="sourcePath" />
<result column="brand_id" jdbcType="INTEGER" property="brandId" />
<result column="merchant_id" jdbcType="VARCHAR" property="merchantId" />
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="short_title" jdbcType="VARCHAR" property="shortTitle" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="pack_fee" jdbcType="DECIMAL" property="packFee" />
<result column="low_price" jdbcType="DECIMAL" property="lowPrice" />
<result column="low_member_price" jdbcType="DECIMAL" property="lowMemberPrice" />
<result column="unit_id" jdbcType="VARCHAR" property="unitId" />
<result column="unit_snap" jdbcType="VARCHAR" property="unitSnap" />
<result column="cover_img" jdbcType="VARCHAR" property="coverImg" />
<result column="share_img" jdbcType="VARCHAR" property="shareImg" />
<result column="video_cover_img" jdbcType="VARCHAR" property="videoCoverImg" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="limit_number" jdbcType="INTEGER" property="limitNumber" />
<result column="product_score" jdbcType="INTEGER" property="productScore" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="fail_msg" jdbcType="VARCHAR" property="failMsg" />
<result column="is_recommend" jdbcType="TINYINT" property="isRecommend" />
<result column="is_hot" jdbcType="TINYINT" property="isHot" />
<result column="is_new" jdbcType="TINYINT" property="isNew" />
<result column="is_on_sale" jdbcType="TINYINT" property="isOnSale" />
<result column="is_show" jdbcType="TINYINT" property="isShow" />
<result column="type_enum" jdbcType="VARCHAR" property="typeEnum" />
<result column="is_distribute" jdbcType="TINYINT" property="isDistribute" />
<result column="is_del" jdbcType="TINYINT" property="isDel" />
<result column="is_stock" jdbcType="TINYINT" property="isStock" />
<result column="is_pause_sale" jdbcType="TINYINT" property="isPauseSale" />
<result column="is_free_freight" jdbcType="TINYINT" property="isFreeFreight" />
<result column="freight_id" jdbcType="BIGINT" property="freightId" />
<result column="strategy_type" jdbcType="VARCHAR" property="strategyType" />
<result column="strategy_id" jdbcType="INTEGER" property="strategyId" />
<result column="is_vip" jdbcType="TINYINT" property="isVip" />
<result column="is_delete" jdbcType="TINYINT" property="isDelete" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
<result column="base_sales_number" jdbcType="DOUBLE" property="baseSalesNumber" />
<result column="real_sales_number" jdbcType="INTEGER" property="realSalesNumber" />
<result column="sales_number" jdbcType="INTEGER" property="salesNumber" />
<result column="thumb_count" jdbcType="INTEGER" property="thumbCount" />
<result column="store_count" jdbcType="INTEGER" property="storeCount" />
<result column="furnish_meal" jdbcType="INTEGER" property="furnishMeal" />
<result column="furnish_express" jdbcType="INTEGER" property="furnishExpress" />
<result column="furnish_draw" jdbcType="INTEGER" property="furnishDraw" />
<result column="furnish_vir" jdbcType="INTEGER" property="furnishVir" />
<result column="is_combo" jdbcType="TINYINT" property="isCombo" />
<result column="is_show_cash" jdbcType="TINYINT" property="isShowCash" />
<result column="is_show_mall" jdbcType="TINYINT" property="isShowMall" />
<result column="is_need_examine" jdbcType="TINYINT" property="isNeedExamine" />
<result column="show_on_mall_status" jdbcType="TINYINT" property="showOnMallStatus" />
<result column="show_on_mall_time" jdbcType="BIGINT" property="showOnMallTime" />
<result column="show_on_mall_error_msg" jdbcType="VARCHAR" property="showOnMallErrorMsg" />
<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" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
<result column="images" jdbcType="LONGVARCHAR" property="images" />
<result column="video" jdbcType="LONGVARCHAR" property="video" />
<result column="notice" jdbcType="LONGVARCHAR" property="notice" />
<result column="group_snap" jdbcType="LONGVARCHAR" property="groupSnap" />
<result column="spec_info" jdbcType="LONGVARCHAR" property="specInfo" />
<result column="select_spec" jdbcType="LONGVARCHAR" property="selectSpec" />
</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,
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
</sql>
<sql id="Blob_Column_List">
images, video, notice, group_snap, spec_info, select_spec
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from tb_product
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_product
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
insert into tb_product (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, 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,
images, video, notice,
group_snap, spec_info, select_spec
)
values (#{id,jdbcType=INTEGER}, #{categoryId,jdbcType=VARCHAR}, #{specId,jdbcType=INTEGER},
#{sourcePath,jdbcType=VARCHAR}, #{brandId,jdbcType=INTEGER}, #{merchantId,jdbcType=VARCHAR},
#{shopId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{shortTitle,jdbcType=VARCHAR},
#{type,jdbcType=VARCHAR}, #{packFee,jdbcType=DECIMAL}, #{lowPrice,jdbcType=DECIMAL},
#{lowMemberPrice,jdbcType=DECIMAL}, #{unitId,jdbcType=VARCHAR}, #{unitSnap,jdbcType=VARCHAR},
#{coverImg,jdbcType=VARCHAR}, #{shareImg,jdbcType=VARCHAR}, #{videoCoverImg,jdbcType=VARCHAR},
#{sort,jdbcType=INTEGER}, #{limitNumber,jdbcType=INTEGER}, #{productScore,jdbcType=INTEGER},
#{status,jdbcType=TINYINT}, #{failMsg,jdbcType=VARCHAR}, #{isRecommend,jdbcType=TINYINT},
#{isHot,jdbcType=TINYINT}, #{isNew,jdbcType=TINYINT}, #{isOnSale,jdbcType=TINYINT},
#{isShow,jdbcType=TINYINT}, #{typeEnum,jdbcType=VARCHAR}, #{isDistribute,jdbcType=TINYINT},
#{isDel,jdbcType=TINYINT}, #{isStock,jdbcType=TINYINT}, #{isPauseSale,jdbcType=TINYINT},
#{isFreeFreight,jdbcType=TINYINT}, #{freightId,jdbcType=BIGINT}, #{strategyType,jdbcType=VARCHAR},
#{strategyId,jdbcType=INTEGER}, #{isVip,jdbcType=TINYINT}, #{isDelete,jdbcType=TINYINT},
#{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{baseSalesNumber,jdbcType=DOUBLE},
#{realSalesNumber,jdbcType=INTEGER}, #{salesNumber,jdbcType=INTEGER}, #{thumbCount,jdbcType=INTEGER},
#{storeCount,jdbcType=INTEGER}, #{furnishMeal,jdbcType=INTEGER}, #{furnishExpress,jdbcType=INTEGER},
#{furnishDraw,jdbcType=INTEGER}, #{furnishVir,jdbcType=INTEGER}, #{isCombo,jdbcType=TINYINT},
#{isShowCash,jdbcType=TINYINT}, #{isShowMall,jdbcType=TINYINT}, #{isNeedExamine,jdbcType=TINYINT},
#{showOnMallStatus,jdbcType=TINYINT}, #{showOnMallTime,jdbcType=BIGINT}, #{showOnMallErrorMsg,jdbcType=VARCHAR},
#{enableLabel,jdbcType=TINYINT}, #{taxConfigId,jdbcType=VARCHAR}, #{specTableHeaders,jdbcType=VARCHAR},
#{images,jdbcType=LONGVARCHAR}, #{video,jdbcType=LONGVARCHAR}, #{notice,jdbcType=LONGVARCHAR},
#{groupSnap,jdbcType=LONGVARCHAR}, #{specInfo,jdbcType=LONGVARCHAR}, #{selectSpec,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
insert into tb_product
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="categoryId != null">
category_id,
</if>
<if test="specId != null">
spec_id,
</if>
<if test="sourcePath != null">
source_path,
</if>
<if test="brandId != null">
brand_id,
</if>
<if test="merchantId != null">
merchant_id,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="name != null">
name,
</if>
<if test="shortTitle != null">
short_title,
</if>
<if test="type != null">
type,
</if>
<if test="packFee != null">
pack_fee,
</if>
<if test="lowPrice != null">
low_price,
</if>
<if test="lowMemberPrice != null">
low_member_price,
</if>
<if test="unitId != null">
unit_id,
</if>
<if test="unitSnap != null">
unit_snap,
</if>
<if test="coverImg != null">
cover_img,
</if>
<if test="shareImg != null">
share_img,
</if>
<if test="videoCoverImg != null">
video_cover_img,
</if>
<if test="sort != null">
sort,
</if>
<if test="limitNumber != null">
limit_number,
</if>
<if test="productScore != null">
product_score,
</if>
<if test="status != null">
status,
</if>
<if test="failMsg != null">
fail_msg,
</if>
<if test="isRecommend != null">
is_recommend,
</if>
<if test="isHot != null">
is_hot,
</if>
<if test="isNew != null">
is_new,
</if>
<if test="isOnSale != null">
is_on_sale,
</if>
<if test="isShow != null">
is_show,
</if>
<if test="typeEnum != null">
type_enum,
</if>
<if test="isDistribute != null">
is_distribute,
</if>
<if test="isDel != null">
is_del,
</if>
<if test="isStock != null">
is_stock,
</if>
<if test="isPauseSale != null">
is_pause_sale,
</if>
<if test="isFreeFreight != null">
is_free_freight,
</if>
<if test="freightId != null">
freight_id,
</if>
<if test="strategyType != null">
strategy_type,
</if>
<if test="strategyId != null">
strategy_id,
</if>
<if test="isVip != null">
is_vip,
</if>
<if test="isDelete != null">
is_delete,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="baseSalesNumber != null">
base_sales_number,
</if>
<if test="realSalesNumber != null">
real_sales_number,
</if>
<if test="salesNumber != null">
sales_number,
</if>
<if test="thumbCount != null">
thumb_count,
</if>
<if test="storeCount != null">
store_count,
</if>
<if test="furnishMeal != null">
furnish_meal,
</if>
<if test="furnishExpress != null">
furnish_express,
</if>
<if test="furnishDraw != null">
furnish_draw,
</if>
<if test="furnishVir != null">
furnish_vir,
</if>
<if test="isCombo != null">
is_combo,
</if>
<if test="isShowCash != null">
is_show_cash,
</if>
<if test="isShowMall != null">
is_show_mall,
</if>
<if test="isNeedExamine != null">
is_need_examine,
</if>
<if test="showOnMallStatus != null">
show_on_mall_status,
</if>
<if test="showOnMallTime != null">
show_on_mall_time,
</if>
<if test="showOnMallErrorMsg != null">
show_on_mall_error_msg,
</if>
<if test="enableLabel != null">
enable_label,
</if>
<if test="taxConfigId != null">
tax_config_id,
</if>
<if test="specTableHeaders != null">
spec_table_headers,
</if>
<if test="images != null">
images,
</if>
<if test="video != null">
video,
</if>
<if test="notice != null">
notice,
</if>
<if test="groupSnap != null">
group_snap,
</if>
<if test="specInfo != null">
spec_info,
</if>
<if test="selectSpec != null">
select_spec,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="categoryId != null">
#{categoryId,jdbcType=VARCHAR},
</if>
<if test="specId != null">
#{specId,jdbcType=INTEGER},
</if>
<if test="sourcePath != null">
#{sourcePath,jdbcType=VARCHAR},
</if>
<if test="brandId != null">
#{brandId,jdbcType=INTEGER},
</if>
<if test="merchantId != null">
#{merchantId,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
#{shopId,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="shortTitle != null">
#{shortTitle,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="packFee != null">
#{packFee,jdbcType=DECIMAL},
</if>
<if test="lowPrice != null">
#{lowPrice,jdbcType=DECIMAL},
</if>
<if test="lowMemberPrice != null">
#{lowMemberPrice,jdbcType=DECIMAL},
</if>
<if test="unitId != null">
#{unitId,jdbcType=VARCHAR},
</if>
<if test="unitSnap != null">
#{unitSnap,jdbcType=VARCHAR},
</if>
<if test="coverImg != null">
#{coverImg,jdbcType=VARCHAR},
</if>
<if test="shareImg != null">
#{shareImg,jdbcType=VARCHAR},
</if>
<if test="videoCoverImg != null">
#{videoCoverImg,jdbcType=VARCHAR},
</if>
<if test="sort != null">
#{sort,jdbcType=INTEGER},
</if>
<if test="limitNumber != null">
#{limitNumber,jdbcType=INTEGER},
</if>
<if test="productScore != null">
#{productScore,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=TINYINT},
</if>
<if test="failMsg != null">
#{failMsg,jdbcType=VARCHAR},
</if>
<if test="isRecommend != null">
#{isRecommend,jdbcType=TINYINT},
</if>
<if test="isHot != null">
#{isHot,jdbcType=TINYINT},
</if>
<if test="isNew != null">
#{isNew,jdbcType=TINYINT},
</if>
<if test="isOnSale != null">
#{isOnSale,jdbcType=TINYINT},
</if>
<if test="isShow != null">
#{isShow,jdbcType=TINYINT},
</if>
<if test="typeEnum != null">
#{typeEnum,jdbcType=VARCHAR},
</if>
<if test="isDistribute != null">
#{isDistribute,jdbcType=TINYINT},
</if>
<if test="isDel != null">
#{isDel,jdbcType=TINYINT},
</if>
<if test="isStock != null">
#{isStock,jdbcType=TINYINT},
</if>
<if test="isPauseSale != null">
#{isPauseSale,jdbcType=TINYINT},
</if>
<if test="isFreeFreight != null">
#{isFreeFreight,jdbcType=TINYINT},
</if>
<if test="freightId != null">
#{freightId,jdbcType=BIGINT},
</if>
<if test="strategyType != null">
#{strategyType,jdbcType=VARCHAR},
</if>
<if test="strategyId != null">
#{strategyId,jdbcType=INTEGER},
</if>
<if test="isVip != null">
#{isVip,jdbcType=TINYINT},
</if>
<if test="isDelete != null">
#{isDelete,jdbcType=TINYINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
<if test="baseSalesNumber != null">
#{baseSalesNumber,jdbcType=DOUBLE},
</if>
<if test="realSalesNumber != null">
#{realSalesNumber,jdbcType=INTEGER},
</if>
<if test="salesNumber != null">
#{salesNumber,jdbcType=INTEGER},
</if>
<if test="thumbCount != null">
#{thumbCount,jdbcType=INTEGER},
</if>
<if test="storeCount != null">
#{storeCount,jdbcType=INTEGER},
</if>
<if test="furnishMeal != null">
#{furnishMeal,jdbcType=INTEGER},
</if>
<if test="furnishExpress != null">
#{furnishExpress,jdbcType=INTEGER},
</if>
<if test="furnishDraw != null">
#{furnishDraw,jdbcType=INTEGER},
</if>
<if test="furnishVir != null">
#{furnishVir,jdbcType=INTEGER},
</if>
<if test="isCombo != null">
#{isCombo,jdbcType=TINYINT},
</if>
<if test="isShowCash != null">
#{isShowCash,jdbcType=TINYINT},
</if>
<if test="isShowMall != null">
#{isShowMall,jdbcType=TINYINT},
</if>
<if test="isNeedExamine != null">
#{isNeedExamine,jdbcType=TINYINT},
</if>
<if test="showOnMallStatus != null">
#{showOnMallStatus,jdbcType=TINYINT},
</if>
<if test="showOnMallTime != null">
#{showOnMallTime,jdbcType=BIGINT},
</if>
<if test="showOnMallErrorMsg != null">
#{showOnMallErrorMsg,jdbcType=VARCHAR},
</if>
<if test="enableLabel != null">
#{enableLabel,jdbcType=TINYINT},
</if>
<if test="taxConfigId != null">
#{taxConfigId,jdbcType=VARCHAR},
</if>
<if test="specTableHeaders != null">
#{specTableHeaders,jdbcType=VARCHAR},
</if>
<if test="images != null">
#{images,jdbcType=LONGVARCHAR},
</if>
<if test="video != null">
#{video,jdbcType=LONGVARCHAR},
</if>
<if test="notice != null">
#{notice,jdbcType=LONGVARCHAR},
</if>
<if test="groupSnap != null">
#{groupSnap,jdbcType=LONGVARCHAR},
</if>
<if test="specInfo != null">
#{specInfo,jdbcType=LONGVARCHAR},
</if>
<if test="selectSpec != null">
#{selectSpec,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
update tb_product
<set>
<if test="categoryId != null">
category_id = #{categoryId,jdbcType=VARCHAR},
</if>
<if test="specId != null">
spec_id = #{specId,jdbcType=INTEGER},
</if>
<if test="sourcePath != null">
source_path = #{sourcePath,jdbcType=VARCHAR},
</if>
<if test="brandId != null">
brand_id = #{brandId,jdbcType=INTEGER},
</if>
<if test="merchantId != null">
merchant_id = #{merchantId,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="shortTitle != null">
short_title = #{shortTitle,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="packFee != null">
pack_fee = #{packFee,jdbcType=DECIMAL},
</if>
<if test="lowPrice != null">
low_price = #{lowPrice,jdbcType=DECIMAL},
</if>
<if test="lowMemberPrice != null">
low_member_price = #{lowMemberPrice,jdbcType=DECIMAL},
</if>
<if test="unitId != null">
unit_id = #{unitId,jdbcType=VARCHAR},
</if>
<if test="unitSnap != null">
unit_snap = #{unitSnap,jdbcType=VARCHAR},
</if>
<if test="coverImg != null">
cover_img = #{coverImg,jdbcType=VARCHAR},
</if>
<if test="shareImg != null">
share_img = #{shareImg,jdbcType=VARCHAR},
</if>
<if test="videoCoverImg != null">
video_cover_img = #{videoCoverImg,jdbcType=VARCHAR},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=INTEGER},
</if>
<if test="limitNumber != null">
limit_number = #{limitNumber,jdbcType=INTEGER},
</if>
<if test="productScore != null">
product_score = #{productScore,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=TINYINT},
</if>
<if test="failMsg != null">
fail_msg = #{failMsg,jdbcType=VARCHAR},
</if>
<if test="isRecommend != null">
is_recommend = #{isRecommend,jdbcType=TINYINT},
</if>
<if test="isHot != null">
is_hot = #{isHot,jdbcType=TINYINT},
</if>
<if test="isNew != null">
is_new = #{isNew,jdbcType=TINYINT},
</if>
<if test="isOnSale != null">
is_on_sale = #{isOnSale,jdbcType=TINYINT},
</if>
<if test="isShow != null">
is_show = #{isShow,jdbcType=TINYINT},
</if>
<if test="typeEnum != null">
type_enum = #{typeEnum,jdbcType=VARCHAR},
</if>
<if test="isDistribute != null">
is_distribute = #{isDistribute,jdbcType=TINYINT},
</if>
<if test="isDel != null">
is_del = #{isDel,jdbcType=TINYINT},
</if>
<if test="isStock != null">
is_stock = #{isStock,jdbcType=TINYINT},
</if>
<if test="isPauseSale != null">
is_pause_sale = #{isPauseSale,jdbcType=TINYINT},
</if>
<if test="isFreeFreight != null">
is_free_freight = #{isFreeFreight,jdbcType=TINYINT},
</if>
<if test="freightId != null">
freight_id = #{freightId,jdbcType=BIGINT},
</if>
<if test="strategyType != null">
strategy_type = #{strategyType,jdbcType=VARCHAR},
</if>
<if test="strategyId != null">
strategy_id = #{strategyId,jdbcType=INTEGER},
</if>
<if test="isVip != null">
is_vip = #{isVip,jdbcType=TINYINT},
</if>
<if test="isDelete != null">
is_delete = #{isDelete,jdbcType=TINYINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
<if test="baseSalesNumber != null">
base_sales_number = #{baseSalesNumber,jdbcType=DOUBLE},
</if>
<if test="realSalesNumber != null">
real_sales_number = #{realSalesNumber,jdbcType=INTEGER},
</if>
<if test="salesNumber != null">
sales_number = #{salesNumber,jdbcType=INTEGER},
</if>
<if test="thumbCount != null">
thumb_count = #{thumbCount,jdbcType=INTEGER},
</if>
<if test="storeCount != null">
store_count = #{storeCount,jdbcType=INTEGER},
</if>
<if test="furnishMeal != null">
furnish_meal = #{furnishMeal,jdbcType=INTEGER},
</if>
<if test="furnishExpress != null">
furnish_express = #{furnishExpress,jdbcType=INTEGER},
</if>
<if test="furnishDraw != null">
furnish_draw = #{furnishDraw,jdbcType=INTEGER},
</if>
<if test="furnishVir != null">
furnish_vir = #{furnishVir,jdbcType=INTEGER},
</if>
<if test="isCombo != null">
is_combo = #{isCombo,jdbcType=TINYINT},
</if>
<if test="isShowCash != null">
is_show_cash = #{isShowCash,jdbcType=TINYINT},
</if>
<if test="isShowMall != null">
is_show_mall = #{isShowMall,jdbcType=TINYINT},
</if>
<if test="isNeedExamine != null">
is_need_examine = #{isNeedExamine,jdbcType=TINYINT},
</if>
<if test="showOnMallStatus != null">
show_on_mall_status = #{showOnMallStatus,jdbcType=TINYINT},
</if>
<if test="showOnMallTime != null">
show_on_mall_time = #{showOnMallTime,jdbcType=BIGINT},
</if>
<if test="showOnMallErrorMsg != null">
show_on_mall_error_msg = #{showOnMallErrorMsg,jdbcType=VARCHAR},
</if>
<if test="enableLabel != null">
enable_label = #{enableLabel,jdbcType=TINYINT},
</if>
<if test="taxConfigId != null">
tax_config_id = #{taxConfigId,jdbcType=VARCHAR},
</if>
<if test="specTableHeaders != null">
spec_table_headers = #{specTableHeaders,jdbcType=VARCHAR},
</if>
<if test="images != null">
images = #{images,jdbcType=LONGVARCHAR},
</if>
<if test="video != null">
video = #{video,jdbcType=LONGVARCHAR},
</if>
<if test="notice != null">
notice = #{notice,jdbcType=LONGVARCHAR},
</if>
<if test="groupSnap != null">
group_snap = #{groupSnap,jdbcType=LONGVARCHAR},
</if>
<if test="specInfo != null">
spec_info = #{specInfo,jdbcType=LONGVARCHAR},
</if>
<if test="selectSpec != null">
select_spec = #{selectSpec,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
update tb_product
set category_id = #{categoryId,jdbcType=VARCHAR},
spec_id = #{specId,jdbcType=INTEGER},
source_path = #{sourcePath,jdbcType=VARCHAR},
brand_id = #{brandId,jdbcType=INTEGER},
merchant_id = #{merchantId,jdbcType=VARCHAR},
shop_id = #{shopId,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
short_title = #{shortTitle,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
pack_fee = #{packFee,jdbcType=DECIMAL},
low_price = #{lowPrice,jdbcType=DECIMAL},
low_member_price = #{lowMemberPrice,jdbcType=DECIMAL},
unit_id = #{unitId,jdbcType=VARCHAR},
unit_snap = #{unitSnap,jdbcType=VARCHAR},
cover_img = #{coverImg,jdbcType=VARCHAR},
share_img = #{shareImg,jdbcType=VARCHAR},
video_cover_img = #{videoCoverImg,jdbcType=VARCHAR},
sort = #{sort,jdbcType=INTEGER},
limit_number = #{limitNumber,jdbcType=INTEGER},
product_score = #{productScore,jdbcType=INTEGER},
status = #{status,jdbcType=TINYINT},
fail_msg = #{failMsg,jdbcType=VARCHAR},
is_recommend = #{isRecommend,jdbcType=TINYINT},
is_hot = #{isHot,jdbcType=TINYINT},
is_new = #{isNew,jdbcType=TINYINT},
is_on_sale = #{isOnSale,jdbcType=TINYINT},
is_show = #{isShow,jdbcType=TINYINT},
type_enum = #{typeEnum,jdbcType=VARCHAR},
is_distribute = #{isDistribute,jdbcType=TINYINT},
is_del = #{isDel,jdbcType=TINYINT},
is_stock = #{isStock,jdbcType=TINYINT},
is_pause_sale = #{isPauseSale,jdbcType=TINYINT},
is_free_freight = #{isFreeFreight,jdbcType=TINYINT},
freight_id = #{freightId,jdbcType=BIGINT},
strategy_type = #{strategyType,jdbcType=VARCHAR},
strategy_id = #{strategyId,jdbcType=INTEGER},
is_vip = #{isVip,jdbcType=TINYINT},
is_delete = #{isDelete,jdbcType=TINYINT},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
base_sales_number = #{baseSalesNumber,jdbcType=DOUBLE},
real_sales_number = #{realSalesNumber,jdbcType=INTEGER},
sales_number = #{salesNumber,jdbcType=INTEGER},
thumb_count = #{thumbCount,jdbcType=INTEGER},
store_count = #{storeCount,jdbcType=INTEGER},
furnish_meal = #{furnishMeal,jdbcType=INTEGER},
furnish_express = #{furnishExpress,jdbcType=INTEGER},
furnish_draw = #{furnishDraw,jdbcType=INTEGER},
furnish_vir = #{furnishVir,jdbcType=INTEGER},
is_combo = #{isCombo,jdbcType=TINYINT},
is_show_cash = #{isShowCash,jdbcType=TINYINT},
is_show_mall = #{isShowMall,jdbcType=TINYINT},
is_need_examine = #{isNeedExamine,jdbcType=TINYINT},
show_on_mall_status = #{showOnMallStatus,jdbcType=TINYINT},
show_on_mall_time = #{showOnMallTime,jdbcType=BIGINT},
show_on_mall_error_msg = #{showOnMallErrorMsg,jdbcType=VARCHAR},
enable_label = #{enableLabel,jdbcType=TINYINT},
tax_config_id = #{taxConfigId,jdbcType=VARCHAR},
spec_table_headers = #{specTableHeaders,jdbcType=VARCHAR},
images = #{images,jdbcType=LONGVARCHAR},
video = #{video,jdbcType=LONGVARCHAR},
notice = #{notice,jdbcType=LONGVARCHAR},
group_snap = #{groupSnap,jdbcType=LONGVARCHAR},
spec_info = #{specInfo,jdbcType=LONGVARCHAR},
select_spec = #{selectSpec,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProduct">
update tb_product
set category_id = #{categoryId,jdbcType=VARCHAR},
spec_id = #{specId,jdbcType=INTEGER},
source_path = #{sourcePath,jdbcType=VARCHAR},
brand_id = #{brandId,jdbcType=INTEGER},
merchant_id = #{merchantId,jdbcType=VARCHAR},
shop_id = #{shopId,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
short_title = #{shortTitle,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
pack_fee = #{packFee,jdbcType=DECIMAL},
low_price = #{lowPrice,jdbcType=DECIMAL},
low_member_price = #{lowMemberPrice,jdbcType=DECIMAL},
unit_id = #{unitId,jdbcType=VARCHAR},
unit_snap = #{unitSnap,jdbcType=VARCHAR},
cover_img = #{coverImg,jdbcType=VARCHAR},
share_img = #{shareImg,jdbcType=VARCHAR},
video_cover_img = #{videoCoverImg,jdbcType=VARCHAR},
sort = #{sort,jdbcType=INTEGER},
limit_number = #{limitNumber,jdbcType=INTEGER},
product_score = #{productScore,jdbcType=INTEGER},
status = #{status,jdbcType=TINYINT},
fail_msg = #{failMsg,jdbcType=VARCHAR},
is_recommend = #{isRecommend,jdbcType=TINYINT},
is_hot = #{isHot,jdbcType=TINYINT},
is_new = #{isNew,jdbcType=TINYINT},
is_on_sale = #{isOnSale,jdbcType=TINYINT},
is_show = #{isShow,jdbcType=TINYINT},
type_enum = #{typeEnum,jdbcType=VARCHAR},
is_distribute = #{isDistribute,jdbcType=TINYINT},
is_del = #{isDel,jdbcType=TINYINT},
is_stock = #{isStock,jdbcType=TINYINT},
is_pause_sale = #{isPauseSale,jdbcType=TINYINT},
is_free_freight = #{isFreeFreight,jdbcType=TINYINT},
freight_id = #{freightId,jdbcType=BIGINT},
strategy_type = #{strategyType,jdbcType=VARCHAR},
strategy_id = #{strategyId,jdbcType=INTEGER},
is_vip = #{isVip,jdbcType=TINYINT},
is_delete = #{isDelete,jdbcType=TINYINT},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
base_sales_number = #{baseSalesNumber,jdbcType=DOUBLE},
real_sales_number = #{realSalesNumber,jdbcType=INTEGER},
sales_number = #{salesNumber,jdbcType=INTEGER},
thumb_count = #{thumbCount,jdbcType=INTEGER},
store_count = #{storeCount,jdbcType=INTEGER},
furnish_meal = #{furnishMeal,jdbcType=INTEGER},
furnish_express = #{furnishExpress,jdbcType=INTEGER},
furnish_draw = #{furnishDraw,jdbcType=INTEGER},
furnish_vir = #{furnishVir,jdbcType=INTEGER},
is_combo = #{isCombo,jdbcType=TINYINT},
is_show_cash = #{isShowCash,jdbcType=TINYINT},
is_show_mall = #{isShowMall,jdbcType=TINYINT},
is_need_examine = #{isNeedExamine,jdbcType=TINYINT},
show_on_mall_status = #{showOnMallStatus,jdbcType=TINYINT},
show_on_mall_time = #{showOnMallTime,jdbcType=BIGINT},
show_on_mall_error_msg = #{showOnMallErrorMsg,jdbcType=VARCHAR},
enable_label = #{enableLabel,jdbcType=TINYINT},
tax_config_id = #{taxConfigId,jdbcType=VARCHAR},
spec_table_headers = #{specTableHeaders,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByShopId" resultMap="ResultMapWithBLOBs">
select * from tb_product where shop_id=#{shopId} and status=1 and is_show_cash = 1
<if test="commdityName != null and commdityName!='' ">
and name like CONCAT('%',#{commdityName},'%')
</if>
order by `sort` asc
</select>
<select id="selectByShopIdAndShopType" resultMap="ResultMapWithBLOBs">
select * from tb_product where shop_id=#{shopId} and status=1 and category_id=#{categoryId} and is_show_cash = 1
<if test="commdityName != null and commdityName!='' ">
and name like CONCAT('%',#{commdityName},'%')
</if>
order by `sort` asc
</select>
<select id="countOrderByshopIdAndProductId" resultType="INTEGER">
SELECT
IFNULL(sum( number ) ,0)
FROM
tb_cashier_cart
WHERE
shop_id = #{shopId}
AND product_id = #{productId}
AND `status` = 'create'
and master_id = #{masterId}
group by shop_id,product_id
</select>
</mapper>

View File

@@ -0,0 +1,349 @@
<?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.TbProductSkuMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbProductSku">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
<result column="bar_code" jdbcType="VARCHAR" property="barCode" />
<result column="product_id" jdbcType="VARCHAR" property="productId" />
<result column="origin_price" jdbcType="DECIMAL" property="originPrice" />
<result column="cost_price" jdbcType="DECIMAL" property="costPrice" />
<result column="member_price" jdbcType="DECIMAL" property="memberPrice" />
<result column="meal_price" jdbcType="DECIMAL" property="mealPrice" />
<result column="sale_price" jdbcType="DECIMAL" property="salePrice" />
<result column="guide_price" jdbcType="DECIMAL" property="guidePrice" />
<result column="strategy_price" jdbcType="DECIMAL" property="strategyPrice" />
<result column="stock_number" jdbcType="DOUBLE" property="stockNumber" />
<result column="cover_img" jdbcType="VARCHAR" property="coverImg" />
<result column="warn_line" jdbcType="INTEGER" property="warnLine" />
<result column="weight" jdbcType="DOUBLE" property="weight" />
<result column="volume" jdbcType="REAL" property="volume" />
<result column="real_sales_number" jdbcType="DOUBLE" property="realSalesNumber" />
<result column="first_shared" jdbcType="DECIMAL" property="firstShared" />
<result column="second_shared" jdbcType="DECIMAL" property="secondShared" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbProductSkuWithBLOBs">
<result column="spec_info" jdbcType="LONGVARCHAR" property="specInfo" />
<result column="spec_snap" jdbcType="LONGVARCHAR" property="specSnap" />
</resultMap>
<sql id="Base_Column_List">
id, shop_id, bar_code, product_id, origin_price, cost_price, member_price, meal_price,
sale_price, guide_price, strategy_price, stock_number, cover_img, warn_line, weight,
volume, real_sales_number, first_shared, second_shared, created_at, updated_at
</sql>
<sql id="Blob_Column_List">
spec_info, spec_snap
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from tb_product_sku
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_product_sku
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductSkuWithBLOBs">
insert into tb_product_sku (id, shop_id, bar_code,
product_id, origin_price, cost_price,
member_price, meal_price, sale_price,
guide_price, strategy_price, stock_number,
cover_img, warn_line, weight,
volume, real_sales_number, first_shared,
second_shared, created_at, updated_at,
spec_info, spec_snap)
values (#{id,jdbcType=INTEGER}, #{shopId,jdbcType=VARCHAR}, #{barCode,jdbcType=VARCHAR},
#{productId,jdbcType=VARCHAR}, #{originPrice,jdbcType=DECIMAL}, #{costPrice,jdbcType=DECIMAL},
#{memberPrice,jdbcType=DECIMAL}, #{mealPrice,jdbcType=DECIMAL}, #{salePrice,jdbcType=DECIMAL},
#{guidePrice,jdbcType=DECIMAL}, #{strategyPrice,jdbcType=DECIMAL}, #{stockNumber,jdbcType=DOUBLE},
#{coverImg,jdbcType=VARCHAR}, #{warnLine,jdbcType=INTEGER}, #{weight,jdbcType=DOUBLE},
#{volume,jdbcType=REAL}, #{realSalesNumber,jdbcType=DOUBLE}, #{firstShared,jdbcType=DECIMAL},
#{secondShared,jdbcType=DECIMAL}, #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT},
#{specInfo,jdbcType=LONGVARCHAR}, #{specSnap,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductSkuWithBLOBs">
insert into tb_product_sku
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="barCode != null">
bar_code,
</if>
<if test="productId != null">
product_id,
</if>
<if test="originPrice != null">
origin_price,
</if>
<if test="costPrice != null">
cost_price,
</if>
<if test="memberPrice != null">
member_price,
</if>
<if test="mealPrice != null">
meal_price,
</if>
<if test="salePrice != null">
sale_price,
</if>
<if test="guidePrice != null">
guide_price,
</if>
<if test="strategyPrice != null">
strategy_price,
</if>
<if test="stockNumber != null">
stock_number,
</if>
<if test="coverImg != null">
cover_img,
</if>
<if test="warnLine != null">
warn_line,
</if>
<if test="weight != null">
weight,
</if>
<if test="volume != null">
volume,
</if>
<if test="realSalesNumber != null">
real_sales_number,
</if>
<if test="firstShared != null">
first_shared,
</if>
<if test="secondShared != null">
second_shared,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="specInfo != null">
spec_info,
</if>
<if test="specSnap != null">
spec_snap,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="shopId != null">
#{shopId,jdbcType=VARCHAR},
</if>
<if test="barCode != null">
#{barCode,jdbcType=VARCHAR},
</if>
<if test="productId != null">
#{productId,jdbcType=VARCHAR},
</if>
<if test="originPrice != null">
#{originPrice,jdbcType=DECIMAL},
</if>
<if test="costPrice != null">
#{costPrice,jdbcType=DECIMAL},
</if>
<if test="memberPrice != null">
#{memberPrice,jdbcType=DECIMAL},
</if>
<if test="mealPrice != null">
#{mealPrice,jdbcType=DECIMAL},
</if>
<if test="salePrice != null">
#{salePrice,jdbcType=DECIMAL},
</if>
<if test="guidePrice != null">
#{guidePrice,jdbcType=DECIMAL},
</if>
<if test="strategyPrice != null">
#{strategyPrice,jdbcType=DECIMAL},
</if>
<if test="stockNumber != null">
#{stockNumber,jdbcType=DOUBLE},
</if>
<if test="coverImg != null">
#{coverImg,jdbcType=VARCHAR},
</if>
<if test="warnLine != null">
#{warnLine,jdbcType=INTEGER},
</if>
<if test="weight != null">
#{weight,jdbcType=DOUBLE},
</if>
<if test="volume != null">
#{volume,jdbcType=REAL},
</if>
<if test="realSalesNumber != null">
#{realSalesNumber,jdbcType=DOUBLE},
</if>
<if test="firstShared != null">
#{firstShared,jdbcType=DECIMAL},
</if>
<if test="secondShared != null">
#{secondShared,jdbcType=DECIMAL},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
<if test="specInfo != null">
#{specInfo,jdbcType=LONGVARCHAR},
</if>
<if test="specSnap != null">
#{specSnap,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductSkuWithBLOBs">
update tb_product_sku
<set>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=VARCHAR},
</if>
<if test="barCode != null">
bar_code = #{barCode,jdbcType=VARCHAR},
</if>
<if test="productId != null">
product_id = #{productId,jdbcType=VARCHAR},
</if>
<if test="originPrice != null">
origin_price = #{originPrice,jdbcType=DECIMAL},
</if>
<if test="costPrice != null">
cost_price = #{costPrice,jdbcType=DECIMAL},
</if>
<if test="memberPrice != null">
member_price = #{memberPrice,jdbcType=DECIMAL},
</if>
<if test="mealPrice != null">
meal_price = #{mealPrice,jdbcType=DECIMAL},
</if>
<if test="salePrice != null">
sale_price = #{salePrice,jdbcType=DECIMAL},
</if>
<if test="guidePrice != null">
guide_price = #{guidePrice,jdbcType=DECIMAL},
</if>
<if test="strategyPrice != null">
strategy_price = #{strategyPrice,jdbcType=DECIMAL},
</if>
<if test="stockNumber != null">
stock_number = #{stockNumber,jdbcType=DOUBLE},
</if>
<if test="coverImg != null">
cover_img = #{coverImg,jdbcType=VARCHAR},
</if>
<if test="warnLine != null">
warn_line = #{warnLine,jdbcType=INTEGER},
</if>
<if test="weight != null">
weight = #{weight,jdbcType=DOUBLE},
</if>
<if test="volume != null">
volume = #{volume,jdbcType=REAL},
</if>
<if test="realSalesNumber != null">
real_sales_number = #{realSalesNumber,jdbcType=DOUBLE},
</if>
<if test="firstShared != null">
first_shared = #{firstShared,jdbcType=DECIMAL},
</if>
<if test="secondShared != null">
second_shared = #{secondShared,jdbcType=DECIMAL},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
<if test="specInfo != null">
spec_info = #{specInfo,jdbcType=LONGVARCHAR},
</if>
<if test="specSnap != null">
spec_snap = #{specSnap,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductSkuWithBLOBs">
update tb_product_sku
set shop_id = #{shopId,jdbcType=VARCHAR},
bar_code = #{barCode,jdbcType=VARCHAR},
product_id = #{productId,jdbcType=VARCHAR},
origin_price = #{originPrice,jdbcType=DECIMAL},
cost_price = #{costPrice,jdbcType=DECIMAL},
member_price = #{memberPrice,jdbcType=DECIMAL},
meal_price = #{mealPrice,jdbcType=DECIMAL},
sale_price = #{salePrice,jdbcType=DECIMAL},
guide_price = #{guidePrice,jdbcType=DECIMAL},
strategy_price = #{strategyPrice,jdbcType=DECIMAL},
stock_number = #{stockNumber,jdbcType=DOUBLE},
cover_img = #{coverImg,jdbcType=VARCHAR},
warn_line = #{warnLine,jdbcType=INTEGER},
weight = #{weight,jdbcType=DOUBLE},
volume = #{volume,jdbcType=REAL},
real_sales_number = #{realSalesNumber,jdbcType=DOUBLE},
first_shared = #{firstShared,jdbcType=DECIMAL},
second_shared = #{secondShared,jdbcType=DECIMAL},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
spec_info = #{specInfo,jdbcType=LONGVARCHAR},
spec_snap = #{specSnap,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductSku">
update tb_product_sku
set shop_id = #{shopId,jdbcType=VARCHAR},
bar_code = #{barCode,jdbcType=VARCHAR},
product_id = #{productId,jdbcType=VARCHAR},
origin_price = #{originPrice,jdbcType=DECIMAL},
cost_price = #{costPrice,jdbcType=DECIMAL},
member_price = #{memberPrice,jdbcType=DECIMAL},
meal_price = #{mealPrice,jdbcType=DECIMAL},
sale_price = #{salePrice,jdbcType=DECIMAL},
guide_price = #{guidePrice,jdbcType=DECIMAL},
strategy_price = #{strategyPrice,jdbcType=DECIMAL},
stock_number = #{stockNumber,jdbcType=DOUBLE},
cover_img = #{coverImg,jdbcType=VARCHAR},
warn_line = #{warnLine,jdbcType=INTEGER},
weight = #{weight,jdbcType=DOUBLE},
volume = #{volume,jdbcType=REAL},
real_sales_number = #{realSalesNumber,jdbcType=DOUBLE},
first_shared = #{firstShared,jdbcType=DECIMAL},
second_shared = #{secondShared,jdbcType=DECIMAL},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByShopIdAndProductIdAndSpec" resultMap="ResultMapWithBLOBs">
select * from tb_product_sku where shop_id=#{shopId} and product_id=#{productId}
<if test="spec != null and spec !=''">
and spec_snap = #{spec}
</if>
</select>
<select id="selectByProduct"
resultType="com.chaozhanggui.system.cashierservice.entity.TbProductSkuWithBLOBs">
select * from tb_product_sku where product_id = #{productId}
</select>
</mapper>

View File

@@ -0,0 +1,121 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.chaozhanggui.system.cashierservice.dao.TbProductSkuResultMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbProductSkuResult">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="merchant_id" jdbcType="VARCHAR" property="merchantId" />
<result column="spec_id" jdbcType="BIGINT" property="specId" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbProductSkuResult">
<result column="tag_snap" jdbcType="LONGVARCHAR" property="tagSnap" />
</resultMap>
<sql id="Base_Column_List">
id, merchant_id, spec_id, created_at, updated_at
</sql>
<sql id="Blob_Column_List">
tag_snap
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from tb_product_sku_result
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_product_sku_result
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductSkuResult">
insert into tb_product_sku_result (id, merchant_id, spec_id,
created_at, updated_at, tag_snap
)
values (#{id,jdbcType=INTEGER}, #{merchantId,jdbcType=VARCHAR}, #{specId,jdbcType=BIGINT},
#{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{tagSnap,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductSkuResult">
insert into tb_product_sku_result
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="merchantId != null">
merchant_id,
</if>
<if test="specId != null">
spec_id,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="tagSnap != null">
tag_snap,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="merchantId != null">
#{merchantId,jdbcType=VARCHAR},
</if>
<if test="specId != null">
#{specId,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
<if test="tagSnap != null">
#{tagSnap,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductSkuResult">
update tb_product_sku_result
<set>
<if test="merchantId != null">
merchant_id = #{merchantId,jdbcType=VARCHAR},
</if>
<if test="specId != null">
spec_id = #{specId,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
<if test="tagSnap != null">
tag_snap = #{tagSnap,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductSkuResult">
update tb_product_sku_result
set merchant_id = #{merchantId,jdbcType=VARCHAR},
spec_id = #{specId,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
tag_snap = #{tagSnap,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductSkuResult">
update tb_product_sku_result
set merchant_id = #{merchantId,jdbcType=VARCHAR},
spec_id = #{specId,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,160 @@
<?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.TbProductSpecMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbProductSpec">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="spec_tag" jdbcType="VARCHAR" property="specTag" />
<result column="spec_tag_detail" jdbcType="VARCHAR" property="specTagDetail" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbProductSpec">
<result column="spec_list" jdbcType="LONGVARCHAR" property="specList" />
</resultMap>
<sql id="Base_Column_List">
id, shop_id, name, spec_tag, spec_tag_detail, sort, created_at, updated_at
</sql>
<sql id="Blob_Column_List">
spec_list
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from tb_product_spec
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_product_spec
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductSpec">
insert into tb_product_spec (id, shop_id, name,
spec_tag, spec_tag_detail, sort,
created_at, updated_at, spec_list
)
values (#{id,jdbcType=INTEGER}, #{shopId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{specTag,jdbcType=VARCHAR}, #{specTagDetail,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER},
#{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{specList,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductSpec">
insert into tb_product_spec
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="name != null">
name,
</if>
<if test="specTag != null">
spec_tag,
</if>
<if test="specTagDetail != null">
spec_tag_detail,
</if>
<if test="sort != null">
sort,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="specList != null">
spec_list,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="shopId != null">
#{shopId,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="specTag != null">
#{specTag,jdbcType=VARCHAR},
</if>
<if test="specTagDetail != null">
#{specTagDetail,jdbcType=VARCHAR},
</if>
<if test="sort != null">
#{sort,jdbcType=INTEGER},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
<if test="specList != null">
#{specList,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductSpec">
update tb_product_spec
<set>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="specTag != null">
spec_tag = #{specTag,jdbcType=VARCHAR},
</if>
<if test="specTagDetail != null">
spec_tag_detail = #{specTagDetail,jdbcType=VARCHAR},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=INTEGER},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
<if test="specList != null">
spec_list = #{specList,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductSpec">
update tb_product_spec
set shop_id = #{shopId,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
spec_tag = #{specTag,jdbcType=VARCHAR},
spec_tag_detail = #{specTagDetail,jdbcType=VARCHAR},
sort = #{sort,jdbcType=INTEGER},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
spec_list = #{specList,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductSpec">
update tb_product_spec
set shop_id = #{shopId,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
spec_tag = #{specTag,jdbcType=VARCHAR},
spec_tag_detail = #{specTagDetail,jdbcType=VARCHAR},
sort = #{sort,jdbcType=INTEGER},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,375 @@
<?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.TbProductStockDetailMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbProductStockDetail">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="sku_id" jdbcType="VARCHAR" property="skuId" />
<result column="product_id" jdbcType="VARCHAR" property="productId" />
<result column="product_name" jdbcType="VARCHAR" property="productName" />
<result column="is_stock" jdbcType="TINYINT" property="isStock" />
<result column="spec_snap" jdbcType="VARCHAR" property="specSnap" />
<result column="unit_name" jdbcType="VARCHAR" property="unitName" />
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
<result column="record_id" jdbcType="VARCHAR" property="recordId" />
<result column="batch_number" jdbcType="VARCHAR" property="batchNumber" />
<result column="source_path" jdbcType="VARCHAR" property="sourcePath" />
<result column="order_id" jdbcType="VARCHAR" property="orderId" />
<result column="sub_type" jdbcType="TINYINT" property="subType" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="left_number" jdbcType="INTEGER" property="leftNumber" />
<result column="stock_time" jdbcType="BIGINT" property="stockTime" />
<result column="stock_number" jdbcType="DOUBLE" property="stockNumber" />
<result column="cost_amount" jdbcType="DECIMAL" property="costAmount" />
<result column="sales_amount" jdbcType="DECIMAL" property="salesAmount" />
<result column="operator" jdbcType="VARCHAR" property="operator" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="bar_code" jdbcType="VARCHAR" property="barCode" />
<result column="cover_img" jdbcType="VARCHAR" property="coverImg" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbProductStockDetail">
<result column="stock_snap" jdbcType="LONGVARCHAR" property="stockSnap" />
</resultMap>
<sql id="Base_Column_List">
id, sku_id, product_id, product_name, is_stock, spec_snap, unit_name, shop_id, record_id,
batch_number, source_path, order_id, sub_type, type, left_number, stock_time, stock_number,
cost_amount, sales_amount, operator, remark, bar_code, cover_img, created_at, updated_at
</sql>
<sql id="Blob_Column_List">
stock_snap
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from tb_product_stock_detail
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from tb_product_stock_detail
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductStockDetail">
insert into tb_product_stock_detail (id, sku_id, product_id,
product_name, is_stock, spec_snap,
unit_name, shop_id, record_id,
batch_number, source_path, order_id,
sub_type, type, left_number,
stock_time, stock_number, cost_amount,
sales_amount, operator, remark,
bar_code, cover_img, created_at,
updated_at, stock_snap)
values (#{id,jdbcType=BIGINT}, #{skuId,jdbcType=VARCHAR}, #{productId,jdbcType=VARCHAR},
#{productName,jdbcType=VARCHAR}, #{isStock,jdbcType=TINYINT}, #{specSnap,jdbcType=VARCHAR},
#{unitName,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR}, #{recordId,jdbcType=VARCHAR},
#{batchNumber,jdbcType=VARCHAR}, #{sourcePath,jdbcType=VARCHAR}, #{orderId,jdbcType=VARCHAR},
#{subType,jdbcType=TINYINT}, #{type,jdbcType=VARCHAR}, #{leftNumber,jdbcType=INTEGER},
#{stockTime,jdbcType=BIGINT}, #{stockNumber,jdbcType=DOUBLE}, #{costAmount,jdbcType=DECIMAL},
#{salesAmount,jdbcType=DECIMAL}, #{operator,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
#{barCode,jdbcType=VARCHAR}, #{coverImg,jdbcType=VARCHAR}, #{createdAt,jdbcType=BIGINT},
#{updatedAt,jdbcType=BIGINT}, #{stockSnap,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductStockDetail">
insert into tb_product_stock_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="skuId != null">
sku_id,
</if>
<if test="productId != null">
product_id,
</if>
<if test="productName != null">
product_name,
</if>
<if test="isStock != null">
is_stock,
</if>
<if test="specSnap != null">
spec_snap,
</if>
<if test="unitName != null">
unit_name,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="recordId != null">
record_id,
</if>
<if test="batchNumber != null">
batch_number,
</if>
<if test="sourcePath != null">
source_path,
</if>
<if test="orderId != null">
order_id,
</if>
<if test="subType != null">
sub_type,
</if>
<if test="type != null">
type,
</if>
<if test="leftNumber != null">
left_number,
</if>
<if test="stockTime != null">
stock_time,
</if>
<if test="stockNumber != null">
stock_number,
</if>
<if test="costAmount != null">
cost_amount,
</if>
<if test="salesAmount != null">
sales_amount,
</if>
<if test="operator != null">
operator,
</if>
<if test="remark != null">
remark,
</if>
<if test="barCode != null">
bar_code,
</if>
<if test="coverImg != null">
cover_img,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="stockSnap != null">
stock_snap,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="skuId != null">
#{skuId,jdbcType=VARCHAR},
</if>
<if test="productId != null">
#{productId,jdbcType=VARCHAR},
</if>
<if test="productName != null">
#{productName,jdbcType=VARCHAR},
</if>
<if test="isStock != null">
#{isStock,jdbcType=TINYINT},
</if>
<if test="specSnap != null">
#{specSnap,jdbcType=VARCHAR},
</if>
<if test="unitName != null">
#{unitName,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
#{shopId,jdbcType=VARCHAR},
</if>
<if test="recordId != null">
#{recordId,jdbcType=VARCHAR},
</if>
<if test="batchNumber != null">
#{batchNumber,jdbcType=VARCHAR},
</if>
<if test="sourcePath != null">
#{sourcePath,jdbcType=VARCHAR},
</if>
<if test="orderId != null">
#{orderId,jdbcType=VARCHAR},
</if>
<if test="subType != null">
#{subType,jdbcType=TINYINT},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="leftNumber != null">
#{leftNumber,jdbcType=INTEGER},
</if>
<if test="stockTime != null">
#{stockTime,jdbcType=BIGINT},
</if>
<if test="stockNumber != null">
#{stockNumber,jdbcType=DOUBLE},
</if>
<if test="costAmount != null">
#{costAmount,jdbcType=DECIMAL},
</if>
<if test="salesAmount != null">
#{salesAmount,jdbcType=DECIMAL},
</if>
<if test="operator != null">
#{operator,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="barCode != null">
#{barCode,jdbcType=VARCHAR},
</if>
<if test="coverImg != null">
#{coverImg,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
<if test="stockSnap != null">
#{stockSnap,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductStockDetail">
update tb_product_stock_detail
<set>
<if test="skuId != null">
sku_id = #{skuId,jdbcType=VARCHAR},
</if>
<if test="productId != null">
product_id = #{productId,jdbcType=VARCHAR},
</if>
<if test="productName != null">
product_name = #{productName,jdbcType=VARCHAR},
</if>
<if test="isStock != null">
is_stock = #{isStock,jdbcType=TINYINT},
</if>
<if test="specSnap != null">
spec_snap = #{specSnap,jdbcType=VARCHAR},
</if>
<if test="unitName != null">
unit_name = #{unitName,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=VARCHAR},
</if>
<if test="recordId != null">
record_id = #{recordId,jdbcType=VARCHAR},
</if>
<if test="batchNumber != null">
batch_number = #{batchNumber,jdbcType=VARCHAR},
</if>
<if test="sourcePath != null">
source_path = #{sourcePath,jdbcType=VARCHAR},
</if>
<if test="orderId != null">
order_id = #{orderId,jdbcType=VARCHAR},
</if>
<if test="subType != null">
sub_type = #{subType,jdbcType=TINYINT},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="leftNumber != null">
left_number = #{leftNumber,jdbcType=INTEGER},
</if>
<if test="stockTime != null">
stock_time = #{stockTime,jdbcType=BIGINT},
</if>
<if test="stockNumber != null">
stock_number = #{stockNumber,jdbcType=DOUBLE},
</if>
<if test="costAmount != null">
cost_amount = #{costAmount,jdbcType=DECIMAL},
</if>
<if test="salesAmount != null">
sales_amount = #{salesAmount,jdbcType=DECIMAL},
</if>
<if test="operator != null">
operator = #{operator,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="barCode != null">
bar_code = #{barCode,jdbcType=VARCHAR},
</if>
<if test="coverImg != null">
cover_img = #{coverImg,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
<if test="stockSnap != null">
stock_snap = #{stockSnap,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductStockDetail">
update tb_product_stock_detail
set sku_id = #{skuId,jdbcType=VARCHAR},
product_id = #{productId,jdbcType=VARCHAR},
product_name = #{productName,jdbcType=VARCHAR},
is_stock = #{isStock,jdbcType=TINYINT},
spec_snap = #{specSnap,jdbcType=VARCHAR},
unit_name = #{unitName,jdbcType=VARCHAR},
shop_id = #{shopId,jdbcType=VARCHAR},
record_id = #{recordId,jdbcType=VARCHAR},
batch_number = #{batchNumber,jdbcType=VARCHAR},
source_path = #{sourcePath,jdbcType=VARCHAR},
order_id = #{orderId,jdbcType=VARCHAR},
sub_type = #{subType,jdbcType=TINYINT},
type = #{type,jdbcType=VARCHAR},
left_number = #{leftNumber,jdbcType=INTEGER},
stock_time = #{stockTime,jdbcType=BIGINT},
stock_number = #{stockNumber,jdbcType=DOUBLE},
cost_amount = #{costAmount,jdbcType=DECIMAL},
sales_amount = #{salesAmount,jdbcType=DECIMAL},
operator = #{operator,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
bar_code = #{barCode,jdbcType=VARCHAR},
cover_img = #{coverImg,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
stock_snap = #{stockSnap,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductStockDetail">
update tb_product_stock_detail
set sku_id = #{skuId,jdbcType=VARCHAR},
product_id = #{productId,jdbcType=VARCHAR},
product_name = #{productName,jdbcType=VARCHAR},
is_stock = #{isStock,jdbcType=TINYINT},
spec_snap = #{specSnap,jdbcType=VARCHAR},
unit_name = #{unitName,jdbcType=VARCHAR},
shop_id = #{shopId,jdbcType=VARCHAR},
record_id = #{recordId,jdbcType=VARCHAR},
batch_number = #{batchNumber,jdbcType=VARCHAR},
source_path = #{sourcePath,jdbcType=VARCHAR},
order_id = #{orderId,jdbcType=VARCHAR},
sub_type = #{subType,jdbcType=TINYINT},
type = #{type,jdbcType=VARCHAR},
left_number = #{leftNumber,jdbcType=INTEGER},
stock_time = #{stockTime,jdbcType=BIGINT},
stock_number = #{stockNumber,jdbcType=DOUBLE},
cost_amount = #{costAmount,jdbcType=DECIMAL},
sales_amount = #{salesAmount,jdbcType=DECIMAL},
operator = #{operator,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
bar_code = #{barCode,jdbcType=VARCHAR},
cover_img = #{coverImg,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,222 @@
<?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.TbProductStockOperateMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbProductStockOperate">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="sub_type" jdbcType="TINYINT" property="subType" />
<result column="batch_number" jdbcType="VARCHAR" property="batchNumber" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="stock_time" jdbcType="BIGINT" property="stockTime" />
<result column="operator_snap" jdbcType="VARCHAR" property="operatorSnap" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
<result column="purveyor_id" jdbcType="VARCHAR" property="purveyorId" />
<result column="purveyor_name" jdbcType="VARCHAR" property="purveyorName" />
<result column="status" jdbcType="VARCHAR" property="status" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbProductStockOperate">
<result column="stock_snap" jdbcType="LONGVARCHAR" property="stockSnap" />
</resultMap>
<sql id="Base_Column_List">
id, shop_id, type, sub_type, batch_number, remark, stock_time, operator_snap, created_at,
updated_at, purveyor_id, purveyor_name, status
</sql>
<sql id="Blob_Column_List">
stock_snap
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from tb_product_stock_operate
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_product_stock_operate
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductStockOperate">
insert into tb_product_stock_operate (id, shop_id, type,
sub_type, batch_number, remark,
stock_time, operator_snap, created_at,
updated_at, purveyor_id, purveyor_name,
status, stock_snap)
values (#{id,jdbcType=INTEGER}, #{shopId,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
#{subType,jdbcType=TINYINT}, #{batchNumber,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
#{stockTime,jdbcType=BIGINT}, #{operatorSnap,jdbcType=VARCHAR}, #{createdAt,jdbcType=BIGINT},
#{updatedAt,jdbcType=BIGINT}, #{purveyorId,jdbcType=VARCHAR}, #{purveyorName,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR}, #{stockSnap,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductStockOperate">
insert into tb_product_stock_operate
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="type != null">
type,
</if>
<if test="subType != null">
sub_type,
</if>
<if test="batchNumber != null">
batch_number,
</if>
<if test="remark != null">
remark,
</if>
<if test="stockTime != null">
stock_time,
</if>
<if test="operatorSnap != null">
operator_snap,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="purveyorId != null">
purveyor_id,
</if>
<if test="purveyorName != null">
purveyor_name,
</if>
<if test="status != null">
status,
</if>
<if test="stockSnap != null">
stock_snap,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="shopId != null">
#{shopId,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="subType != null">
#{subType,jdbcType=TINYINT},
</if>
<if test="batchNumber != null">
#{batchNumber,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="stockTime != null">
#{stockTime,jdbcType=BIGINT},
</if>
<if test="operatorSnap != null">
#{operatorSnap,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
<if test="purveyorId != null">
#{purveyorId,jdbcType=VARCHAR},
</if>
<if test="purveyorName != null">
#{purveyorName,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=VARCHAR},
</if>
<if test="stockSnap != null">
#{stockSnap,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductStockOperate">
update tb_product_stock_operate
<set>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="subType != null">
sub_type = #{subType,jdbcType=TINYINT},
</if>
<if test="batchNumber != null">
batch_number = #{batchNumber,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="stockTime != null">
stock_time = #{stockTime,jdbcType=BIGINT},
</if>
<if test="operatorSnap != null">
operator_snap = #{operatorSnap,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
<if test="purveyorId != null">
purveyor_id = #{purveyorId,jdbcType=VARCHAR},
</if>
<if test="purveyorName != null">
purveyor_name = #{purveyorName,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=VARCHAR},
</if>
<if test="stockSnap != null">
stock_snap = #{stockSnap,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductStockOperate">
update tb_product_stock_operate
set shop_id = #{shopId,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
sub_type = #{subType,jdbcType=TINYINT},
batch_number = #{batchNumber,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
stock_time = #{stockTime,jdbcType=BIGINT},
operator_snap = #{operatorSnap,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
purveyor_id = #{purveyorId,jdbcType=VARCHAR},
purveyor_name = #{purveyorName,jdbcType=VARCHAR},
status = #{status,jdbcType=VARCHAR},
stock_snap = #{stockSnap,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductStockOperate">
update tb_product_stock_operate
set shop_id = #{shopId,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
sub_type = #{subType,jdbcType=TINYINT},
batch_number = #{batchNumber,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
stock_time = #{stockTime,jdbcType=BIGINT},
operator_snap = #{operatorSnap,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
purveyor_id = #{purveyorId,jdbcType=VARCHAR},
purveyor_name = #{purveyorName,jdbcType=VARCHAR},
status = #{status,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,271 @@
<?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.TbReceiptSalesMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbReceiptSales">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="logo" jdbcType="VARCHAR" property="logo" />
<result column="show_contact_info" jdbcType="BIT" property="showContactInfo" />
<result column="show_member" jdbcType="BIT" property="showMember" />
<result column="show_member_code" jdbcType="BIT" property="showMemberCode" />
<result column="show_member_score" jdbcType="BIT" property="showMemberScore" />
<result column="show_member_wallet" jdbcType="BIT" property="showMemberWallet" />
<result column="footer_remark" jdbcType="VARCHAR" property="footerRemark" />
<result column="show_cash_charge" jdbcType="BIT" property="showCashCharge" />
<result column="show_serial_no" jdbcType="BIT" property="showSerialNo" />
<result column="big_serial_no" jdbcType="BIT" property="bigSerialNo" />
<result column="header_text" jdbcType="VARCHAR" property="headerText" />
<result column="header_text_align" jdbcType="VARCHAR" property="headerTextAlign" />
<result column="footer_text" jdbcType="VARCHAR" property="footerText" />
<result column="footer_text_align" jdbcType="VARCHAR" property="footerTextAlign" />
<result column="footer_image" jdbcType="VARCHAR" property="footerImage" />
<result column="pre_print" jdbcType="VARCHAR" property="prePrint" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
</resultMap>
<sql id="Base_Column_List">
id, title, logo, show_contact_info, show_member, show_member_code, show_member_score,
show_member_wallet, footer_remark, show_cash_charge, show_serial_no, big_serial_no,
header_text, header_text_align, footer_text, footer_text_align, footer_image, pre_print,
created_at, updated_at
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_receipt_sales
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_receipt_sales
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbReceiptSales">
insert into tb_receipt_sales (id, title, logo,
show_contact_info, show_member, show_member_code,
show_member_score, show_member_wallet, footer_remark,
show_cash_charge, show_serial_no, big_serial_no,
header_text, header_text_align, footer_text,
footer_text_align, footer_image, pre_print,
created_at, updated_at)
values (#{id,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{logo,jdbcType=VARCHAR},
#{showContactInfo,jdbcType=BIT}, #{showMember,jdbcType=BIT}, #{showMemberCode,jdbcType=BIT},
#{showMemberScore,jdbcType=BIT}, #{showMemberWallet,jdbcType=BIT}, #{footerRemark,jdbcType=VARCHAR},
#{showCashCharge,jdbcType=BIT}, #{showSerialNo,jdbcType=BIT}, #{bigSerialNo,jdbcType=BIT},
#{headerText,jdbcType=VARCHAR}, #{headerTextAlign,jdbcType=VARCHAR}, #{footerText,jdbcType=VARCHAR},
#{footerTextAlign,jdbcType=VARCHAR}, #{footerImage,jdbcType=VARCHAR}, #{prePrint,jdbcType=VARCHAR},
#{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbReceiptSales">
insert into tb_receipt_sales
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="title != null">
title,
</if>
<if test="logo != null">
logo,
</if>
<if test="showContactInfo != null">
show_contact_info,
</if>
<if test="showMember != null">
show_member,
</if>
<if test="showMemberCode != null">
show_member_code,
</if>
<if test="showMemberScore != null">
show_member_score,
</if>
<if test="showMemberWallet != null">
show_member_wallet,
</if>
<if test="footerRemark != null">
footer_remark,
</if>
<if test="showCashCharge != null">
show_cash_charge,
</if>
<if test="showSerialNo != null">
show_serial_no,
</if>
<if test="bigSerialNo != null">
big_serial_no,
</if>
<if test="headerText != null">
header_text,
</if>
<if test="headerTextAlign != null">
header_text_align,
</if>
<if test="footerText != null">
footer_text,
</if>
<if test="footerTextAlign != null">
footer_text_align,
</if>
<if test="footerImage != null">
footer_image,
</if>
<if test="prePrint != null">
pre_print,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="title != null">
#{title,jdbcType=VARCHAR},
</if>
<if test="logo != null">
#{logo,jdbcType=VARCHAR},
</if>
<if test="showContactInfo != null">
#{showContactInfo,jdbcType=BIT},
</if>
<if test="showMember != null">
#{showMember,jdbcType=BIT},
</if>
<if test="showMemberCode != null">
#{showMemberCode,jdbcType=BIT},
</if>
<if test="showMemberScore != null">
#{showMemberScore,jdbcType=BIT},
</if>
<if test="showMemberWallet != null">
#{showMemberWallet,jdbcType=BIT},
</if>
<if test="footerRemark != null">
#{footerRemark,jdbcType=VARCHAR},
</if>
<if test="showCashCharge != null">
#{showCashCharge,jdbcType=BIT},
</if>
<if test="showSerialNo != null">
#{showSerialNo,jdbcType=BIT},
</if>
<if test="bigSerialNo != null">
#{bigSerialNo,jdbcType=BIT},
</if>
<if test="headerText != null">
#{headerText,jdbcType=VARCHAR},
</if>
<if test="headerTextAlign != null">
#{headerTextAlign,jdbcType=VARCHAR},
</if>
<if test="footerText != null">
#{footerText,jdbcType=VARCHAR},
</if>
<if test="footerTextAlign != null">
#{footerTextAlign,jdbcType=VARCHAR},
</if>
<if test="footerImage != null">
#{footerImage,jdbcType=VARCHAR},
</if>
<if test="prePrint != null">
#{prePrint,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbReceiptSales">
update tb_receipt_sales
<set>
<if test="title != null">
title = #{title,jdbcType=VARCHAR},
</if>
<if test="logo != null">
logo = #{logo,jdbcType=VARCHAR},
</if>
<if test="showContactInfo != null">
show_contact_info = #{showContactInfo,jdbcType=BIT},
</if>
<if test="showMember != null">
show_member = #{showMember,jdbcType=BIT},
</if>
<if test="showMemberCode != null">
show_member_code = #{showMemberCode,jdbcType=BIT},
</if>
<if test="showMemberScore != null">
show_member_score = #{showMemberScore,jdbcType=BIT},
</if>
<if test="showMemberWallet != null">
show_member_wallet = #{showMemberWallet,jdbcType=BIT},
</if>
<if test="footerRemark != null">
footer_remark = #{footerRemark,jdbcType=VARCHAR},
</if>
<if test="showCashCharge != null">
show_cash_charge = #{showCashCharge,jdbcType=BIT},
</if>
<if test="showSerialNo != null">
show_serial_no = #{showSerialNo,jdbcType=BIT},
</if>
<if test="bigSerialNo != null">
big_serial_no = #{bigSerialNo,jdbcType=BIT},
</if>
<if test="headerText != null">
header_text = #{headerText,jdbcType=VARCHAR},
</if>
<if test="headerTextAlign != null">
header_text_align = #{headerTextAlign,jdbcType=VARCHAR},
</if>
<if test="footerText != null">
footer_text = #{footerText,jdbcType=VARCHAR},
</if>
<if test="footerTextAlign != null">
footer_text_align = #{footerTextAlign,jdbcType=VARCHAR},
</if>
<if test="footerImage != null">
footer_image = #{footerImage,jdbcType=VARCHAR},
</if>
<if test="prePrint != null">
pre_print = #{prePrint,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbReceiptSales">
update tb_receipt_sales
set title = #{title,jdbcType=VARCHAR},
logo = #{logo,jdbcType=VARCHAR},
show_contact_info = #{showContactInfo,jdbcType=BIT},
show_member = #{showMember,jdbcType=BIT},
show_member_code = #{showMemberCode,jdbcType=BIT},
show_member_score = #{showMemberScore,jdbcType=BIT},
show_member_wallet = #{showMemberWallet,jdbcType=BIT},
footer_remark = #{footerRemark,jdbcType=VARCHAR},
show_cash_charge = #{showCashCharge,jdbcType=BIT},
show_serial_no = #{showSerialNo,jdbcType=BIT},
big_serial_no = #{bigSerialNo,jdbcType=BIT},
header_text = #{headerText,jdbcType=VARCHAR},
header_text_align = #{headerTextAlign,jdbcType=VARCHAR},
footer_text = #{footerText,jdbcType=VARCHAR},
footer_text_align = #{footerTextAlign,jdbcType=VARCHAR},
footer_image = #{footerImage,jdbcType=VARCHAR},
pre_print = #{prePrint,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,199 @@
<?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.TbRenewalsPayLogMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbRenewalsPayLog">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="pay_type" jdbcType="VARCHAR" property="payType" />
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
<result column="order_id" jdbcType="VARCHAR" property="orderId" />
<result column="open_id" jdbcType="VARCHAR" property="openId" />
<result column="user_id" jdbcType="VARCHAR" property="userId" />
<result column="transaction_id" jdbcType="VARCHAR" property="transactionId" />
<result column="amount" jdbcType="DECIMAL" property="amount" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="attach" jdbcType="VARCHAR" property="attach" />
<result column="expired_at" jdbcType="BIGINT" property="expiredAt" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
</resultMap>
<sql id="Base_Column_List">
id, pay_type, shop_id, order_id, open_id, user_id, transaction_id, amount, status,
remark, attach, expired_at, created_at, updated_at
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_renewals_pay_log
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_renewals_pay_log
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbRenewalsPayLog">
insert into tb_renewals_pay_log (id, pay_type, shop_id,
order_id, open_id, user_id,
transaction_id, amount, status,
remark, attach, expired_at,
created_at, updated_at)
values (#{id,jdbcType=INTEGER}, #{payType,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR},
#{orderId,jdbcType=VARCHAR}, #{openId,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR},
#{transactionId,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, #{status,jdbcType=TINYINT},
#{remark,jdbcType=VARCHAR}, #{attach,jdbcType=VARCHAR}, #{expiredAt,jdbcType=BIGINT},
#{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbRenewalsPayLog">
insert into tb_renewals_pay_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="payType != null">
pay_type,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="orderId != null">
order_id,
</if>
<if test="openId != null">
open_id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="transactionId != null">
transaction_id,
</if>
<if test="amount != null">
amount,
</if>
<if test="status != null">
status,
</if>
<if test="remark != null">
remark,
</if>
<if test="attach != null">
attach,
</if>
<if test="expiredAt != null">
expired_at,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="payType != null">
#{payType,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
#{shopId,jdbcType=VARCHAR},
</if>
<if test="orderId != null">
#{orderId,jdbcType=VARCHAR},
</if>
<if test="openId != null">
#{openId,jdbcType=VARCHAR},
</if>
<if test="userId != null">
#{userId,jdbcType=VARCHAR},
</if>
<if test="transactionId != null">
#{transactionId,jdbcType=VARCHAR},
</if>
<if test="amount != null">
#{amount,jdbcType=DECIMAL},
</if>
<if test="status != null">
#{status,jdbcType=TINYINT},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="attach != null">
#{attach,jdbcType=VARCHAR},
</if>
<if test="expiredAt != null">
#{expiredAt,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbRenewalsPayLog">
update tb_renewals_pay_log
<set>
<if test="payType != null">
pay_type = #{payType,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=VARCHAR},
</if>
<if test="orderId != null">
order_id = #{orderId,jdbcType=VARCHAR},
</if>
<if test="openId != null">
open_id = #{openId,jdbcType=VARCHAR},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=VARCHAR},
</if>
<if test="transactionId != null">
transaction_id = #{transactionId,jdbcType=VARCHAR},
</if>
<if test="amount != null">
amount = #{amount,jdbcType=DECIMAL},
</if>
<if test="status != null">
status = #{status,jdbcType=TINYINT},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="attach != null">
attach = #{attach,jdbcType=VARCHAR},
</if>
<if test="expiredAt != null">
expired_at = #{expiredAt,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbRenewalsPayLog">
update tb_renewals_pay_log
set pay_type = #{payType,jdbcType=VARCHAR},
shop_id = #{shopId,jdbcType=VARCHAR},
order_id = #{orderId,jdbcType=VARCHAR},
open_id = #{openId,jdbcType=VARCHAR},
user_id = #{userId,jdbcType=VARCHAR},
transaction_id = #{transactionId,jdbcType=VARCHAR},
amount = #{amount,jdbcType=DECIMAL},
status = #{status,jdbcType=TINYINT},
remark = #{remark,jdbcType=VARCHAR},
attach = #{attach,jdbcType=VARCHAR},
expired_at = #{expiredAt,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,163 @@
<?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.TbShopAreaMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbShopArea">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="shop_id" jdbcType="INTEGER" property="shopId" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="price" jdbcType="INTEGER" property="price" />
<result column="capacity_range" jdbcType="VARCHAR" property="capacityRange" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbShopArea">
<result column="view" jdbcType="LONGVARCHAR" property="view" />
</resultMap>
<sql id="Base_Column_List">
id, shop_id, sort, name, price, capacity_range, created_at, updated_at
</sql>
<sql id="Blob_Column_List">
view
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from tb_shop_area
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_shop_area
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopArea">
insert into tb_shop_area (id, shop_id, sort,
name, price, capacity_range,
created_at, updated_at, view
)
values (#{id,jdbcType=INTEGER}, #{shopId,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER},
#{name,jdbcType=VARCHAR}, #{price,jdbcType=INTEGER}, #{capacityRange,jdbcType=VARCHAR},
#{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{view,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopArea">
insert into tb_shop_area
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="sort != null">
sort,
</if>
<if test="name != null">
name,
</if>
<if test="price != null">
price,
</if>
<if test="capacityRange != null">
capacity_range,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="view != null">
view,
</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="sort != null">
#{sort,jdbcType=INTEGER},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="price != null">
#{price,jdbcType=INTEGER},
</if>
<if test="capacityRange != null">
#{capacityRange,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
<if test="view != null">
#{view,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopArea">
update tb_shop_area
<set>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=INTEGER},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=INTEGER},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="price != null">
price = #{price,jdbcType=INTEGER},
</if>
<if test="capacityRange != null">
capacity_range = #{capacityRange,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
<if test="view != null">
view = #{view,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopArea">
update tb_shop_area
set shop_id = #{shopId,jdbcType=INTEGER},
sort = #{sort,jdbcType=INTEGER},
name = #{name,jdbcType=VARCHAR},
price = #{price,jdbcType=INTEGER},
capacity_range = #{capacityRange,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
view = #{view,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopArea">
update tb_shop_area
set shop_id = #{shopId,jdbcType=INTEGER},
sort = #{sort,jdbcType=INTEGER},
name = #{name,jdbcType=VARCHAR},
price = #{price,jdbcType=INTEGER},
capacity_range = #{capacityRange,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByShopId" resultMap="BaseResultMap">
select * from tb_shop_area where shop_id=#{shopId} order by `sort` asc
</select>
</mapper>

View File

@@ -0,0 +1,143 @@
<?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.TbShopCashSpreadMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbShopCashSpread">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbShopCashSpreadWithBLOBs">
<result column="sale_receipt" jdbcType="LONGVARCHAR" property="saleReceipt" />
<result column="triplicate_receipt" jdbcType="LONGVARCHAR" property="triplicateReceipt" />
<result column="screen_config" jdbcType="LONGVARCHAR" property="screenConfig" />
<result column="tag_config" jdbcType="LONGVARCHAR" property="tagConfig" />
<result column="scale_config" jdbcType="LONGVARCHAR" property="scaleConfig" />
</resultMap>
<sql id="Base_Column_List">
id, created_at, updated_at
</sql>
<sql id="Blob_Column_List">
sale_receipt, triplicate_receipt, screen_config, tag_config, scale_config
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from tb_shop_cash_spread
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_shop_cash_spread
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopCashSpreadWithBLOBs">
insert into tb_shop_cash_spread (id, created_at, updated_at,
sale_receipt, triplicate_receipt,
screen_config, tag_config, scale_config
)
values (#{id,jdbcType=INTEGER}, #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT},
#{saleReceipt,jdbcType=LONGVARCHAR}, #{triplicateReceipt,jdbcType=LONGVARCHAR},
#{screenConfig,jdbcType=LONGVARCHAR}, #{tagConfig,jdbcType=LONGVARCHAR}, #{scaleConfig,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopCashSpreadWithBLOBs">
insert into tb_shop_cash_spread
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="saleReceipt != null">
sale_receipt,
</if>
<if test="triplicateReceipt != null">
triplicate_receipt,
</if>
<if test="screenConfig != null">
screen_config,
</if>
<if test="tagConfig != null">
tag_config,
</if>
<if test="scaleConfig != null">
scale_config,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
<if test="saleReceipt != null">
#{saleReceipt,jdbcType=LONGVARCHAR},
</if>
<if test="triplicateReceipt != null">
#{triplicateReceipt,jdbcType=LONGVARCHAR},
</if>
<if test="screenConfig != null">
#{screenConfig,jdbcType=LONGVARCHAR},
</if>
<if test="tagConfig != null">
#{tagConfig,jdbcType=LONGVARCHAR},
</if>
<if test="scaleConfig != null">
#{scaleConfig,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopCashSpreadWithBLOBs">
update tb_shop_cash_spread
<set>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
<if test="saleReceipt != null">
sale_receipt = #{saleReceipt,jdbcType=LONGVARCHAR},
</if>
<if test="triplicateReceipt != null">
triplicate_receipt = #{triplicateReceipt,jdbcType=LONGVARCHAR},
</if>
<if test="screenConfig != null">
screen_config = #{screenConfig,jdbcType=LONGVARCHAR},
</if>
<if test="tagConfig != null">
tag_config = #{tagConfig,jdbcType=LONGVARCHAR},
</if>
<if test="scaleConfig != null">
scale_config = #{scaleConfig,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopCashSpreadWithBLOBs">
update tb_shop_cash_spread
set created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
sale_receipt = #{saleReceipt,jdbcType=LONGVARCHAR},
triplicate_receipt = #{triplicateReceipt,jdbcType=LONGVARCHAR},
screen_config = #{screenConfig,jdbcType=LONGVARCHAR},
tag_config = #{tagConfig,jdbcType=LONGVARCHAR},
scale_config = #{scaleConfig,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopCashSpread">
update tb_shop_cash_spread
set created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,223 @@
<?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.TbShopCategoryMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbShopCategory">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="short_name" jdbcType="VARCHAR" property="shortName" />
<result column="tree" jdbcType="INTEGER" property="tree" />
<result column="pid" jdbcType="VARCHAR" property="pid" />
<result column="pic" jdbcType="VARCHAR" property="pic" />
<result column="merchant_id" jdbcType="VARCHAR" property="merchantId" />
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
<result column="style" jdbcType="VARCHAR" property="style" />
<result column="is_show" jdbcType="TINYINT" property="isShow" />
<result column="detail" jdbcType="VARCHAR" property="detail" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="key_word" jdbcType="VARCHAR" property="keyWord" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
</resultMap>
<sql id="Base_Column_List">
id, name, short_name, tree, pid, pic, merchant_id, shop_id, style, is_show, detail,
sort, key_word, created_at, updated_at
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_shop_category
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_shop_category
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopCategory">
insert into tb_shop_category (id, name, short_name,
tree, pid, pic, merchant_id,
shop_id, style, is_show,
detail, sort, key_word,
created_at, updated_at)
values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{shortName,jdbcType=VARCHAR},
#{tree,jdbcType=INTEGER}, #{pid,jdbcType=VARCHAR}, #{pic,jdbcType=VARCHAR}, #{merchantId,jdbcType=VARCHAR},
#{shopId,jdbcType=VARCHAR}, #{style,jdbcType=VARCHAR}, #{isShow,jdbcType=TINYINT},
#{detail,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, #{keyWord,jdbcType=VARCHAR},
#{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopCategory">
insert into tb_shop_category
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
name,
</if>
<if test="shortName != null">
short_name,
</if>
<if test="tree != null">
tree,
</if>
<if test="pid != null">
pid,
</if>
<if test="pic != null">
pic,
</if>
<if test="merchantId != null">
merchant_id,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="style != null">
style,
</if>
<if test="isShow != null">
is_show,
</if>
<if test="detail != null">
detail,
</if>
<if test="sort != null">
sort,
</if>
<if test="keyWord != null">
key_word,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="shortName != null">
#{shortName,jdbcType=VARCHAR},
</if>
<if test="tree != null">
#{tree,jdbcType=INTEGER},
</if>
<if test="pid != null">
#{pid,jdbcType=VARCHAR},
</if>
<if test="pic != null">
#{pic,jdbcType=VARCHAR},
</if>
<if test="merchantId != null">
#{merchantId,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
#{shopId,jdbcType=VARCHAR},
</if>
<if test="style != null">
#{style,jdbcType=VARCHAR},
</if>
<if test="isShow != null">
#{isShow,jdbcType=TINYINT},
</if>
<if test="detail != null">
#{detail,jdbcType=VARCHAR},
</if>
<if test="sort != null">
#{sort,jdbcType=INTEGER},
</if>
<if test="keyWord != null">
#{keyWord,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopCategory">
update tb_shop_category
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="shortName != null">
short_name = #{shortName,jdbcType=VARCHAR},
</if>
<if test="tree != null">
tree = #{tree,jdbcType=INTEGER},
</if>
<if test="pid != null">
pid = #{pid,jdbcType=VARCHAR},
</if>
<if test="pic != null">
pic = #{pic,jdbcType=VARCHAR},
</if>
<if test="merchantId != null">
merchant_id = #{merchantId,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=VARCHAR},
</if>
<if test="style != null">
style = #{style,jdbcType=VARCHAR},
</if>
<if test="isShow != null">
is_show = #{isShow,jdbcType=TINYINT},
</if>
<if test="detail != null">
detail = #{detail,jdbcType=VARCHAR},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=INTEGER},
</if>
<if test="keyWord != null">
key_word = #{keyWord,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopCategory">
update tb_shop_category
set name = #{name,jdbcType=VARCHAR},
short_name = #{shortName,jdbcType=VARCHAR},
tree = #{tree,jdbcType=INTEGER},
pid = #{pid,jdbcType=VARCHAR},
pic = #{pic,jdbcType=VARCHAR},
merchant_id = #{merchantId,jdbcType=VARCHAR},
shop_id = #{shopId,jdbcType=VARCHAR},
style = #{style,jdbcType=VARCHAR},
is_show = #{isShow,jdbcType=TINYINT},
detail = #{detail,jdbcType=VARCHAR},
sort = #{sort,jdbcType=INTEGER},
key_word = #{keyWord,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByAll" resultMap="BaseResultMap">
SELECT
*
FROM
tb_shop_category
WHERE
shop_id=#{shopId}
and
is_show = 1
ORDER BY
`sort` asc
</select>
</mapper>

View File

@@ -0,0 +1,325 @@
<?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.TbShopCurrencyMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbShopCurrency">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
<result column="prepare_amount" jdbcType="DECIMAL" property="prepareAmount" />
<result column="currency" jdbcType="VARCHAR" property="currency" />
<result column="decimals_digits" jdbcType="TINYINT" property="decimalsDigits" />
<result column="discount_round" jdbcType="VARCHAR" property="discountRound" />
<result column="merchant_id" jdbcType="VARCHAR" property="merchantId" />
<result column="small_change" jdbcType="TINYINT" property="smallChange" />
<result column="enable_custom_discount" jdbcType="TINYINT" property="enableCustomDiscount" />
<result column="max_discount" jdbcType="DECIMAL" property="maxDiscount" />
<result column="max_percent" jdbcType="DOUBLE" property="maxPercent" />
<result column="biz_duration" jdbcType="VARCHAR" property="bizDuration" />
<result column="allow_web_pay" jdbcType="TINYINT" property="allowWebPay" />
<result column="is_auto_to_zero" jdbcType="TINYINT" property="isAutoToZero" />
<result column="is_include_tax_price" jdbcType="TINYINT" property="isIncludeTaxPrice" />
<result column="tax_number" jdbcType="VARCHAR" property="taxNumber" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
<result column="auto_lock_screen" jdbcType="TINYINT" property="autoLockScreen" />
<result column="voice_notification" jdbcType="TINYINT" property="voiceNotification" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbShopCurrencyWithBLOBs">
<result column="discount_configs" jdbcType="LONGVARCHAR" property="discountConfigs" />
<result column="service_charge" jdbcType="LONGVARCHAR" property="serviceCharge" />
</resultMap>
<sql id="Base_Column_List">
id, shop_id, prepare_amount, currency, decimals_digits, discount_round, merchant_id,
small_change, enable_custom_discount, max_discount, max_percent, biz_duration, allow_web_pay,
is_auto_to_zero, is_include_tax_price, tax_number, created_at, updated_at, auto_lock_screen,
voice_notification
</sql>
<sql id="Blob_Column_List">
discount_configs, service_charge
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from tb_shop_currency
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_shop_currency
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopCurrencyWithBLOBs">
insert into tb_shop_currency (id, shop_id, prepare_amount,
currency, decimals_digits, discount_round,
merchant_id, small_change, enable_custom_discount,
max_discount, max_percent, biz_duration,
allow_web_pay, is_auto_to_zero, is_include_tax_price,
tax_number, created_at, updated_at,
auto_lock_screen, voice_notification, discount_configs,
service_charge)
values (#{id,jdbcType=INTEGER}, #{shopId,jdbcType=VARCHAR}, #{prepareAmount,jdbcType=DECIMAL},
#{currency,jdbcType=VARCHAR}, #{decimalsDigits,jdbcType=TINYINT}, #{discountRound,jdbcType=VARCHAR},
#{merchantId,jdbcType=VARCHAR}, #{smallChange,jdbcType=TINYINT}, #{enableCustomDiscount,jdbcType=TINYINT},
#{maxDiscount,jdbcType=DECIMAL}, #{maxPercent,jdbcType=DOUBLE}, #{bizDuration,jdbcType=VARCHAR},
#{allowWebPay,jdbcType=TINYINT}, #{isAutoToZero,jdbcType=TINYINT}, #{isIncludeTaxPrice,jdbcType=TINYINT},
#{taxNumber,jdbcType=VARCHAR}, #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT},
#{autoLockScreen,jdbcType=TINYINT}, #{voiceNotification,jdbcType=TINYINT}, #{discountConfigs,jdbcType=LONGVARCHAR},
#{serviceCharge,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopCurrencyWithBLOBs">
insert into tb_shop_currency
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="prepareAmount != null">
prepare_amount,
</if>
<if test="currency != null">
currency,
</if>
<if test="decimalsDigits != null">
decimals_digits,
</if>
<if test="discountRound != null">
discount_round,
</if>
<if test="merchantId != null">
merchant_id,
</if>
<if test="smallChange != null">
small_change,
</if>
<if test="enableCustomDiscount != null">
enable_custom_discount,
</if>
<if test="maxDiscount != null">
max_discount,
</if>
<if test="maxPercent != null">
max_percent,
</if>
<if test="bizDuration != null">
biz_duration,
</if>
<if test="allowWebPay != null">
allow_web_pay,
</if>
<if test="isAutoToZero != null">
is_auto_to_zero,
</if>
<if test="isIncludeTaxPrice != null">
is_include_tax_price,
</if>
<if test="taxNumber != null">
tax_number,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="autoLockScreen != null">
auto_lock_screen,
</if>
<if test="voiceNotification != null">
voice_notification,
</if>
<if test="discountConfigs != null">
discount_configs,
</if>
<if test="serviceCharge != null">
service_charge,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="shopId != null">
#{shopId,jdbcType=VARCHAR},
</if>
<if test="prepareAmount != null">
#{prepareAmount,jdbcType=DECIMAL},
</if>
<if test="currency != null">
#{currency,jdbcType=VARCHAR},
</if>
<if test="decimalsDigits != null">
#{decimalsDigits,jdbcType=TINYINT},
</if>
<if test="discountRound != null">
#{discountRound,jdbcType=VARCHAR},
</if>
<if test="merchantId != null">
#{merchantId,jdbcType=VARCHAR},
</if>
<if test="smallChange != null">
#{smallChange,jdbcType=TINYINT},
</if>
<if test="enableCustomDiscount != null">
#{enableCustomDiscount,jdbcType=TINYINT},
</if>
<if test="maxDiscount != null">
#{maxDiscount,jdbcType=DECIMAL},
</if>
<if test="maxPercent != null">
#{maxPercent,jdbcType=DOUBLE},
</if>
<if test="bizDuration != null">
#{bizDuration,jdbcType=VARCHAR},
</if>
<if test="allowWebPay != null">
#{allowWebPay,jdbcType=TINYINT},
</if>
<if test="isAutoToZero != null">
#{isAutoToZero,jdbcType=TINYINT},
</if>
<if test="isIncludeTaxPrice != null">
#{isIncludeTaxPrice,jdbcType=TINYINT},
</if>
<if test="taxNumber != null">
#{taxNumber,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
<if test="autoLockScreen != null">
#{autoLockScreen,jdbcType=TINYINT},
</if>
<if test="voiceNotification != null">
#{voiceNotification,jdbcType=TINYINT},
</if>
<if test="discountConfigs != null">
#{discountConfigs,jdbcType=LONGVARCHAR},
</if>
<if test="serviceCharge != null">
#{serviceCharge,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopCurrencyWithBLOBs">
update tb_shop_currency
<set>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=VARCHAR},
</if>
<if test="prepareAmount != null">
prepare_amount = #{prepareAmount,jdbcType=DECIMAL},
</if>
<if test="currency != null">
currency = #{currency,jdbcType=VARCHAR},
</if>
<if test="decimalsDigits != null">
decimals_digits = #{decimalsDigits,jdbcType=TINYINT},
</if>
<if test="discountRound != null">
discount_round = #{discountRound,jdbcType=VARCHAR},
</if>
<if test="merchantId != null">
merchant_id = #{merchantId,jdbcType=VARCHAR},
</if>
<if test="smallChange != null">
small_change = #{smallChange,jdbcType=TINYINT},
</if>
<if test="enableCustomDiscount != null">
enable_custom_discount = #{enableCustomDiscount,jdbcType=TINYINT},
</if>
<if test="maxDiscount != null">
max_discount = #{maxDiscount,jdbcType=DECIMAL},
</if>
<if test="maxPercent != null">
max_percent = #{maxPercent,jdbcType=DOUBLE},
</if>
<if test="bizDuration != null">
biz_duration = #{bizDuration,jdbcType=VARCHAR},
</if>
<if test="allowWebPay != null">
allow_web_pay = #{allowWebPay,jdbcType=TINYINT},
</if>
<if test="isAutoToZero != null">
is_auto_to_zero = #{isAutoToZero,jdbcType=TINYINT},
</if>
<if test="isIncludeTaxPrice != null">
is_include_tax_price = #{isIncludeTaxPrice,jdbcType=TINYINT},
</if>
<if test="taxNumber != null">
tax_number = #{taxNumber,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
<if test="autoLockScreen != null">
auto_lock_screen = #{autoLockScreen,jdbcType=TINYINT},
</if>
<if test="voiceNotification != null">
voice_notification = #{voiceNotification,jdbcType=TINYINT},
</if>
<if test="discountConfigs != null">
discount_configs = #{discountConfigs,jdbcType=LONGVARCHAR},
</if>
<if test="serviceCharge != null">
service_charge = #{serviceCharge,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopCurrencyWithBLOBs">
update tb_shop_currency
set shop_id = #{shopId,jdbcType=VARCHAR},
prepare_amount = #{prepareAmount,jdbcType=DECIMAL},
currency = #{currency,jdbcType=VARCHAR},
decimals_digits = #{decimalsDigits,jdbcType=TINYINT},
discount_round = #{discountRound,jdbcType=VARCHAR},
merchant_id = #{merchantId,jdbcType=VARCHAR},
small_change = #{smallChange,jdbcType=TINYINT},
enable_custom_discount = #{enableCustomDiscount,jdbcType=TINYINT},
max_discount = #{maxDiscount,jdbcType=DECIMAL},
max_percent = #{maxPercent,jdbcType=DOUBLE},
biz_duration = #{bizDuration,jdbcType=VARCHAR},
allow_web_pay = #{allowWebPay,jdbcType=TINYINT},
is_auto_to_zero = #{isAutoToZero,jdbcType=TINYINT},
is_include_tax_price = #{isIncludeTaxPrice,jdbcType=TINYINT},
tax_number = #{taxNumber,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
auto_lock_screen = #{autoLockScreen,jdbcType=TINYINT},
voice_notification = #{voiceNotification,jdbcType=TINYINT},
discount_configs = #{discountConfigs,jdbcType=LONGVARCHAR},
service_charge = #{serviceCharge,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopCurrency">
update tb_shop_currency
set shop_id = #{shopId,jdbcType=VARCHAR},
prepare_amount = #{prepareAmount,jdbcType=DECIMAL},
currency = #{currency,jdbcType=VARCHAR},
decimals_digits = #{decimalsDigits,jdbcType=TINYINT},
discount_round = #{discountRound,jdbcType=VARCHAR},
merchant_id = #{merchantId,jdbcType=VARCHAR},
small_change = #{smallChange,jdbcType=TINYINT},
enable_custom_discount = #{enableCustomDiscount,jdbcType=TINYINT},
max_discount = #{maxDiscount,jdbcType=DECIMAL},
max_percent = #{maxPercent,jdbcType=DOUBLE},
biz_duration = #{bizDuration,jdbcType=VARCHAR},
allow_web_pay = #{allowWebPay,jdbcType=TINYINT},
is_auto_to_zero = #{isAutoToZero,jdbcType=TINYINT},
is_include_tax_price = #{isIncludeTaxPrice,jdbcType=TINYINT},
tax_number = #{taxNumber,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
auto_lock_screen = #{autoLockScreen,jdbcType=TINYINT},
voice_notification = #{voiceNotification,jdbcType=TINYINT}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,625 @@
<?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.TbShopInfoMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbShopInfo">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="account" jdbcType="VARCHAR" property="account" />
<result column="shop_code" jdbcType="VARCHAR" property="shopCode" />
<result column="sub_title" jdbcType="VARCHAR" property="subTitle" />
<result column="merchant_id" jdbcType="VARCHAR" property="merchantId" />
<result column="shop_name" jdbcType="VARCHAR" property="shopName" />
<result column="chain_name" jdbcType="VARCHAR" property="chainName" />
<result column="back_img" jdbcType="VARCHAR" property="backImg" />
<result column="front_img" jdbcType="VARCHAR" property="frontImg" />
<result column="contact_name" jdbcType="VARCHAR" property="contactName" />
<result column="phone" jdbcType="VARCHAR" property="phone" />
<result column="logo" jdbcType="VARCHAR" property="logo" />
<result column="is_deposit" jdbcType="TINYINT" property="isDeposit" />
<result column="is_supply" jdbcType="TINYINT" property="isSupply" />
<result column="cover_img" jdbcType="VARCHAR" property="coverImg" />
<result column="share_img" jdbcType="VARCHAR" property="shareImg" />
<result column="detail" jdbcType="VARCHAR" property="detail" />
<result column="lat" jdbcType="VARCHAR" property="lat" />
<result column="lng" jdbcType="VARCHAR" property="lng" />
<result column="mch_id" jdbcType="VARCHAR" property="mchId" />
<result column="register_type" jdbcType="VARCHAR" property="registerType" />
<result column="is_wx_ma_independent" jdbcType="TINYINT" property="isWxMaIndependent" />
<result column="address" jdbcType="VARCHAR" property="address" />
<result column="city" jdbcType="VARCHAR" property="city" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="industry" jdbcType="VARCHAR" property="industry" />
<result column="industry_name" jdbcType="VARCHAR" property="industryName" />
<result column="business_time" jdbcType="VARCHAR" property="businessTime" />
<result column="post_time" jdbcType="VARCHAR" property="postTime" />
<result column="post_amount_line" jdbcType="DECIMAL" property="postAmountLine" />
<result column="on_sale" jdbcType="TINYINT" property="onSale" />
<result column="settle_type" jdbcType="TINYINT" property="settleType" />
<result column="settle_time" jdbcType="VARCHAR" property="settleTime" />
<result column="enter_at" jdbcType="INTEGER" property="enterAt" />
<result column="expire_at" jdbcType="BIGINT" property="expireAt" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="average" jdbcType="REAL" property="average" />
<result column="order_wait_pay_minute" jdbcType="INTEGER" property="orderWaitPayMinute" />
<result column="support_device_number" jdbcType="INTEGER" property="supportDeviceNumber" />
<result column="distribute_level" jdbcType="TINYINT" property="distributeLevel" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
<result column="proxy_id" jdbcType="VARCHAR" property="proxyId" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbShopInfo">
<result column="view" jdbcType="LONGVARCHAR" property="view" />
</resultMap>
<sql id="Base_Column_List">
id, account, shop_code, sub_title, merchant_id, shop_name, chain_name, back_img,
front_img, contact_name, phone, logo, is_deposit, is_supply, cover_img, share_img,
detail, lat, lng, mch_id, register_type, is_wx_ma_independent, address, city, type,
industry, industry_name, business_time, post_time, post_amount_line, on_sale, settle_type,
settle_time, enter_at, expire_at, status, average, order_wait_pay_minute, support_device_number,
distribute_level, created_at, updated_at, proxy_id
</sql>
<sql id="Blob_Column_List">
view
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from tb_shop_info
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_shop_info
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopInfo">
insert into tb_shop_info (id, account, shop_code,
sub_title, merchant_id, shop_name,
chain_name, back_img, front_img,
contact_name, phone, logo,
is_deposit, is_supply, cover_img,
share_img, detail, lat,
lng, mch_id, register_type,
is_wx_ma_independent, address, city,
type, industry, industry_name,
business_time, post_time, post_amount_line,
on_sale, settle_type, settle_time,
enter_at, expire_at, status,
average, order_wait_pay_minute, support_device_number,
distribute_level, created_at, updated_at,
proxy_id, view)
values (#{id,jdbcType=INTEGER}, #{account,jdbcType=VARCHAR}, #{shopCode,jdbcType=VARCHAR},
#{subTitle,jdbcType=VARCHAR}, #{merchantId,jdbcType=VARCHAR}, #{shopName,jdbcType=VARCHAR},
#{chainName,jdbcType=VARCHAR}, #{backImg,jdbcType=VARCHAR}, #{frontImg,jdbcType=VARCHAR},
#{contactName,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{logo,jdbcType=VARCHAR},
#{isDeposit,jdbcType=TINYINT}, #{isSupply,jdbcType=TINYINT}, #{coverImg,jdbcType=VARCHAR},
#{shareImg,jdbcType=VARCHAR}, #{detail,jdbcType=VARCHAR}, #{lat,jdbcType=VARCHAR},
#{lng,jdbcType=VARCHAR}, #{mchId,jdbcType=VARCHAR}, #{registerType,jdbcType=VARCHAR},
#{isWxMaIndependent,jdbcType=TINYINT}, #{address,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR},
#{type,jdbcType=VARCHAR}, #{industry,jdbcType=VARCHAR}, #{industryName,jdbcType=VARCHAR},
#{businessTime,jdbcType=VARCHAR}, #{postTime,jdbcType=VARCHAR}, #{postAmountLine,jdbcType=DECIMAL},
#{onSale,jdbcType=TINYINT}, #{settleType,jdbcType=TINYINT}, #{settleTime,jdbcType=VARCHAR},
#{enterAt,jdbcType=INTEGER}, #{expireAt,jdbcType=BIGINT}, #{status,jdbcType=TINYINT},
#{average,jdbcType=REAL}, #{orderWaitPayMinute,jdbcType=INTEGER}, #{supportDeviceNumber,jdbcType=INTEGER},
#{distributeLevel,jdbcType=TINYINT}, #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT},
#{proxyId,jdbcType=VARCHAR}, #{view,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopInfo">
insert into tb_shop_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="account != null">
account,
</if>
<if test="shopCode != null">
shop_code,
</if>
<if test="subTitle != null">
sub_title,
</if>
<if test="merchantId != null">
merchant_id,
</if>
<if test="shopName != null">
shop_name,
</if>
<if test="chainName != null">
chain_name,
</if>
<if test="backImg != null">
back_img,
</if>
<if test="frontImg != null">
front_img,
</if>
<if test="contactName != null">
contact_name,
</if>
<if test="phone != null">
phone,
</if>
<if test="logo != null">
logo,
</if>
<if test="isDeposit != null">
is_deposit,
</if>
<if test="isSupply != null">
is_supply,
</if>
<if test="coverImg != null">
cover_img,
</if>
<if test="shareImg != null">
share_img,
</if>
<if test="detail != null">
detail,
</if>
<if test="lat != null">
lat,
</if>
<if test="lng != null">
lng,
</if>
<if test="mchId != null">
mch_id,
</if>
<if test="registerType != null">
register_type,
</if>
<if test="isWxMaIndependent != null">
is_wx_ma_independent,
</if>
<if test="address != null">
address,
</if>
<if test="city != null">
city,
</if>
<if test="type != null">
type,
</if>
<if test="industry != null">
industry,
</if>
<if test="industryName != null">
industry_name,
</if>
<if test="businessTime != null">
business_time,
</if>
<if test="postTime != null">
post_time,
</if>
<if test="postAmountLine != null">
post_amount_line,
</if>
<if test="onSale != null">
on_sale,
</if>
<if test="settleType != null">
settle_type,
</if>
<if test="settleTime != null">
settle_time,
</if>
<if test="enterAt != null">
enter_at,
</if>
<if test="expireAt != null">
expire_at,
</if>
<if test="status != null">
status,
</if>
<if test="average != null">
average,
</if>
<if test="orderWaitPayMinute != null">
order_wait_pay_minute,
</if>
<if test="supportDeviceNumber != null">
support_device_number,
</if>
<if test="distributeLevel != null">
distribute_level,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="proxyId != null">
proxy_id,
</if>
<if test="view != null">
view,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="account != null">
#{account,jdbcType=VARCHAR},
</if>
<if test="shopCode != null">
#{shopCode,jdbcType=VARCHAR},
</if>
<if test="subTitle != null">
#{subTitle,jdbcType=VARCHAR},
</if>
<if test="merchantId != null">
#{merchantId,jdbcType=VARCHAR},
</if>
<if test="shopName != null">
#{shopName,jdbcType=VARCHAR},
</if>
<if test="chainName != null">
#{chainName,jdbcType=VARCHAR},
</if>
<if test="backImg != null">
#{backImg,jdbcType=VARCHAR},
</if>
<if test="frontImg != null">
#{frontImg,jdbcType=VARCHAR},
</if>
<if test="contactName != null">
#{contactName,jdbcType=VARCHAR},
</if>
<if test="phone != null">
#{phone,jdbcType=VARCHAR},
</if>
<if test="logo != null">
#{logo,jdbcType=VARCHAR},
</if>
<if test="isDeposit != null">
#{isDeposit,jdbcType=TINYINT},
</if>
<if test="isSupply != null">
#{isSupply,jdbcType=TINYINT},
</if>
<if test="coverImg != null">
#{coverImg,jdbcType=VARCHAR},
</if>
<if test="shareImg != null">
#{shareImg,jdbcType=VARCHAR},
</if>
<if test="detail != null">
#{detail,jdbcType=VARCHAR},
</if>
<if test="lat != null">
#{lat,jdbcType=VARCHAR},
</if>
<if test="lng != null">
#{lng,jdbcType=VARCHAR},
</if>
<if test="mchId != null">
#{mchId,jdbcType=VARCHAR},
</if>
<if test="registerType != null">
#{registerType,jdbcType=VARCHAR},
</if>
<if test="isWxMaIndependent != null">
#{isWxMaIndependent,jdbcType=TINYINT},
</if>
<if test="address != null">
#{address,jdbcType=VARCHAR},
</if>
<if test="city != null">
#{city,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="industry != null">
#{industry,jdbcType=VARCHAR},
</if>
<if test="industryName != null">
#{industryName,jdbcType=VARCHAR},
</if>
<if test="businessTime != null">
#{businessTime,jdbcType=VARCHAR},
</if>
<if test="postTime != null">
#{postTime,jdbcType=VARCHAR},
</if>
<if test="postAmountLine != null">
#{postAmountLine,jdbcType=DECIMAL},
</if>
<if test="onSale != null">
#{onSale,jdbcType=TINYINT},
</if>
<if test="settleType != null">
#{settleType,jdbcType=TINYINT},
</if>
<if test="settleTime != null">
#{settleTime,jdbcType=VARCHAR},
</if>
<if test="enterAt != null">
#{enterAt,jdbcType=INTEGER},
</if>
<if test="expireAt != null">
#{expireAt,jdbcType=BIGINT},
</if>
<if test="status != null">
#{status,jdbcType=TINYINT},
</if>
<if test="average != null">
#{average,jdbcType=REAL},
</if>
<if test="orderWaitPayMinute != null">
#{orderWaitPayMinute,jdbcType=INTEGER},
</if>
<if test="supportDeviceNumber != null">
#{supportDeviceNumber,jdbcType=INTEGER},
</if>
<if test="distributeLevel != null">
#{distributeLevel,jdbcType=TINYINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
<if test="proxyId != null">
#{proxyId,jdbcType=VARCHAR},
</if>
<if test="view != null">
#{view,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopInfo">
update tb_shop_info
<set>
<if test="account != null">
account = #{account,jdbcType=VARCHAR},
</if>
<if test="shopCode != null">
shop_code = #{shopCode,jdbcType=VARCHAR},
</if>
<if test="subTitle != null">
sub_title = #{subTitle,jdbcType=VARCHAR},
</if>
<if test="merchantId != null">
merchant_id = #{merchantId,jdbcType=VARCHAR},
</if>
<if test="shopName != null">
shop_name = #{shopName,jdbcType=VARCHAR},
</if>
<if test="chainName != null">
chain_name = #{chainName,jdbcType=VARCHAR},
</if>
<if test="backImg != null">
back_img = #{backImg,jdbcType=VARCHAR},
</if>
<if test="frontImg != null">
front_img = #{frontImg,jdbcType=VARCHAR},
</if>
<if test="contactName != null">
contact_name = #{contactName,jdbcType=VARCHAR},
</if>
<if test="phone != null">
phone = #{phone,jdbcType=VARCHAR},
</if>
<if test="logo != null">
logo = #{logo,jdbcType=VARCHAR},
</if>
<if test="isDeposit != null">
is_deposit = #{isDeposit,jdbcType=TINYINT},
</if>
<if test="isSupply != null">
is_supply = #{isSupply,jdbcType=TINYINT},
</if>
<if test="coverImg != null">
cover_img = #{coverImg,jdbcType=VARCHAR},
</if>
<if test="shareImg != null">
share_img = #{shareImg,jdbcType=VARCHAR},
</if>
<if test="detail != null">
detail = #{detail,jdbcType=VARCHAR},
</if>
<if test="lat != null">
lat = #{lat,jdbcType=VARCHAR},
</if>
<if test="lng != null">
lng = #{lng,jdbcType=VARCHAR},
</if>
<if test="mchId != null">
mch_id = #{mchId,jdbcType=VARCHAR},
</if>
<if test="registerType != null">
register_type = #{registerType,jdbcType=VARCHAR},
</if>
<if test="isWxMaIndependent != null">
is_wx_ma_independent = #{isWxMaIndependent,jdbcType=TINYINT},
</if>
<if test="address != null">
address = #{address,jdbcType=VARCHAR},
</if>
<if test="city != null">
city = #{city,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="industry != null">
industry = #{industry,jdbcType=VARCHAR},
</if>
<if test="industryName != null">
industry_name = #{industryName,jdbcType=VARCHAR},
</if>
<if test="businessTime != null">
business_time = #{businessTime,jdbcType=VARCHAR},
</if>
<if test="postTime != null">
post_time = #{postTime,jdbcType=VARCHAR},
</if>
<if test="postAmountLine != null">
post_amount_line = #{postAmountLine,jdbcType=DECIMAL},
</if>
<if test="onSale != null">
on_sale = #{onSale,jdbcType=TINYINT},
</if>
<if test="settleType != null">
settle_type = #{settleType,jdbcType=TINYINT},
</if>
<if test="settleTime != null">
settle_time = #{settleTime,jdbcType=VARCHAR},
</if>
<if test="enterAt != null">
enter_at = #{enterAt,jdbcType=INTEGER},
</if>
<if test="expireAt != null">
expire_at = #{expireAt,jdbcType=BIGINT},
</if>
<if test="status != null">
status = #{status,jdbcType=TINYINT},
</if>
<if test="average != null">
average = #{average,jdbcType=REAL},
</if>
<if test="orderWaitPayMinute != null">
order_wait_pay_minute = #{orderWaitPayMinute,jdbcType=INTEGER},
</if>
<if test="supportDeviceNumber != null">
support_device_number = #{supportDeviceNumber,jdbcType=INTEGER},
</if>
<if test="distributeLevel != null">
distribute_level = #{distributeLevel,jdbcType=TINYINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
<if test="proxyId != null">
proxy_id = #{proxyId,jdbcType=VARCHAR},
</if>
<if test="view != null">
view = #{view,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopInfo">
update tb_shop_info
set account = #{account,jdbcType=VARCHAR},
shop_code = #{shopCode,jdbcType=VARCHAR},
sub_title = #{subTitle,jdbcType=VARCHAR},
merchant_id = #{merchantId,jdbcType=VARCHAR},
shop_name = #{shopName,jdbcType=VARCHAR},
chain_name = #{chainName,jdbcType=VARCHAR},
back_img = #{backImg,jdbcType=VARCHAR},
front_img = #{frontImg,jdbcType=VARCHAR},
contact_name = #{contactName,jdbcType=VARCHAR},
phone = #{phone,jdbcType=VARCHAR},
logo = #{logo,jdbcType=VARCHAR},
is_deposit = #{isDeposit,jdbcType=TINYINT},
is_supply = #{isSupply,jdbcType=TINYINT},
cover_img = #{coverImg,jdbcType=VARCHAR},
share_img = #{shareImg,jdbcType=VARCHAR},
detail = #{detail,jdbcType=VARCHAR},
lat = #{lat,jdbcType=VARCHAR},
lng = #{lng,jdbcType=VARCHAR},
mch_id = #{mchId,jdbcType=VARCHAR},
register_type = #{registerType,jdbcType=VARCHAR},
is_wx_ma_independent = #{isWxMaIndependent,jdbcType=TINYINT},
address = #{address,jdbcType=VARCHAR},
city = #{city,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
industry = #{industry,jdbcType=VARCHAR},
industry_name = #{industryName,jdbcType=VARCHAR},
business_time = #{businessTime,jdbcType=VARCHAR},
post_time = #{postTime,jdbcType=VARCHAR},
post_amount_line = #{postAmountLine,jdbcType=DECIMAL},
on_sale = #{onSale,jdbcType=TINYINT},
settle_type = #{settleType,jdbcType=TINYINT},
settle_time = #{settleTime,jdbcType=VARCHAR},
enter_at = #{enterAt,jdbcType=INTEGER},
expire_at = #{expireAt,jdbcType=BIGINT},
status = #{status,jdbcType=TINYINT},
average = #{average,jdbcType=REAL},
order_wait_pay_minute = #{orderWaitPayMinute,jdbcType=INTEGER},
support_device_number = #{supportDeviceNumber,jdbcType=INTEGER},
distribute_level = #{distributeLevel,jdbcType=TINYINT},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
proxy_id = #{proxyId,jdbcType=VARCHAR},
view = #{view,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopInfo">
update tb_shop_info
set account = #{account,jdbcType=VARCHAR},
shop_code = #{shopCode,jdbcType=VARCHAR},
sub_title = #{subTitle,jdbcType=VARCHAR},
merchant_id = #{merchantId,jdbcType=VARCHAR},
shop_name = #{shopName,jdbcType=VARCHAR},
chain_name = #{chainName,jdbcType=VARCHAR},
back_img = #{backImg,jdbcType=VARCHAR},
front_img = #{frontImg,jdbcType=VARCHAR},
contact_name = #{contactName,jdbcType=VARCHAR},
phone = #{phone,jdbcType=VARCHAR},
logo = #{logo,jdbcType=VARCHAR},
is_deposit = #{isDeposit,jdbcType=TINYINT},
is_supply = #{isSupply,jdbcType=TINYINT},
cover_img = #{coverImg,jdbcType=VARCHAR},
share_img = #{shareImg,jdbcType=VARCHAR},
detail = #{detail,jdbcType=VARCHAR},
lat = #{lat,jdbcType=VARCHAR},
lng = #{lng,jdbcType=VARCHAR},
mch_id = #{mchId,jdbcType=VARCHAR},
register_type = #{registerType,jdbcType=VARCHAR},
is_wx_ma_independent = #{isWxMaIndependent,jdbcType=TINYINT},
address = #{address,jdbcType=VARCHAR},
city = #{city,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
industry = #{industry,jdbcType=VARCHAR},
industry_name = #{industryName,jdbcType=VARCHAR},
business_time = #{businessTime,jdbcType=VARCHAR},
post_time = #{postTime,jdbcType=VARCHAR},
post_amount_line = #{postAmountLine,jdbcType=DECIMAL},
on_sale = #{onSale,jdbcType=TINYINT},
settle_type = #{settleType,jdbcType=TINYINT},
settle_time = #{settleTime,jdbcType=VARCHAR},
enter_at = #{enterAt,jdbcType=INTEGER},
expire_at = #{expireAt,jdbcType=BIGINT},
status = #{status,jdbcType=TINYINT},
average = #{average,jdbcType=REAL},
order_wait_pay_minute = #{orderWaitPayMinute,jdbcType=INTEGER},
support_device_number = #{supportDeviceNumber,jdbcType=INTEGER},
distribute_level = #{distributeLevel,jdbcType=TINYINT},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
proxy_id = #{proxyId,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectAll" resultMap="BaseResultMap">
select * from tb_shop_info
</select>
<select id="selectAllByCreateTime" resultMap="BaseResultMap">
SELECT
*
FROM
tb_shop_info t
WHERE
(
FROM_UNIXTIME( t.created_at / 1000 ) BETWEEN NOW() - INTERVAL 15 MINUTE
AND NOW())
OR (
FROM_UNIXTIME( t.updated_at / 1000 ) BETWEEN NOW() - INTERVAL 15 MINUTE
AND NOW());
</select>
</mapper>

View File

@@ -0,0 +1,106 @@
<?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.TbShopOnlineMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbShopOnline">
<id column="shop_id" jdbcType="INTEGER" property="shopId" />
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
<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">
shop_id, start_time, end_time, status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_shop_online
where shop_id = #{shopId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_shop_online
where shop_id = #{shopId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopOnline">
insert into tb_shop_online (shop_id, start_time, end_time,
status, create_time, update_time
)
values (#{shopId,jdbcType=INTEGER}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},
#{status,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopOnline">
insert into tb_shop_online
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="shopId != null">
shop_id,
</if>
<if test="startTime != null">
start_time,
</if>
<if test="endTime != null">
end_time,
</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="shopId != null">
#{shopId,jdbcType=INTEGER},
</if>
<if test="startTime != null">
#{startTime,jdbcType=TIMESTAMP},
</if>
<if test="endTime != null">
#{endTime,jdbcType=TIMESTAMP},
</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.TbShopOnline">
update tb_shop_online
<set>
<if test="startTime != null">
start_time = #{startTime,jdbcType=TIMESTAMP},
</if>
<if test="endTime != null">
end_time = #{endTime,jdbcType=TIMESTAMP},
</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 shop_id = #{shopId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopOnline">
update tb_shop_online
set start_time = #{startTime,jdbcType=TIMESTAMP},
end_time = #{endTime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where shop_id = #{shopId,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,208 @@
<?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.TbShopPayTypeMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbShopPayType">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="pay_type" jdbcType="VARCHAR" property="payType" />
<result column="pay_name" jdbcType="VARCHAR" property="payName" />
<result column="is_show_shortcut" jdbcType="TINYINT" property="isShowShortcut" />
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
<result column="is_refundable" jdbcType="TINYINT" property="isRefundable" />
<result column="is_open_cash_drawer" jdbcType="TINYINT" property="isOpenCashDrawer" />
<result column="is_system" jdbcType="TINYINT" property="isSystem" />
<result column="is_ideal" jdbcType="TINYINT" property="isIdeal" />
<result column="is_display" jdbcType="TINYINT" property="isDisplay" />
<result column="sorts" jdbcType="INTEGER" property="sorts" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
<result column="icon" jdbcType="VARCHAR" property="icon" />
</resultMap>
<sql id="Base_Column_List">
id, pay_type, pay_name, is_show_shortcut, shop_id, is_refundable, is_open_cash_drawer,
is_system, is_ideal, is_display, sorts, created_at, updated_at, icon
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_shop_pay_type
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_shop_pay_type
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopPayType">
insert into tb_shop_pay_type (id, pay_type, pay_name,
is_show_shortcut, shop_id, is_refundable,
is_open_cash_drawer, is_system, is_ideal,
is_display, sorts, created_at,
updated_at, icon)
values (#{id,jdbcType=INTEGER}, #{payType,jdbcType=VARCHAR}, #{payName,jdbcType=VARCHAR},
#{isShowShortcut,jdbcType=TINYINT}, #{shopId,jdbcType=VARCHAR}, #{isRefundable,jdbcType=TINYINT},
#{isOpenCashDrawer,jdbcType=TINYINT}, #{isSystem,jdbcType=TINYINT}, #{isIdeal,jdbcType=TINYINT},
#{isDisplay,jdbcType=TINYINT}, #{sorts,jdbcType=INTEGER}, #{createdAt,jdbcType=BIGINT},
#{updatedAt,jdbcType=BIGINT}, #{icon,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopPayType">
insert into tb_shop_pay_type
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="payType != null">
pay_type,
</if>
<if test="payName != null">
pay_name,
</if>
<if test="isShowShortcut != null">
is_show_shortcut,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="isRefundable != null">
is_refundable,
</if>
<if test="isOpenCashDrawer != null">
is_open_cash_drawer,
</if>
<if test="isSystem != null">
is_system,
</if>
<if test="isIdeal != null">
is_ideal,
</if>
<if test="isDisplay != null">
is_display,
</if>
<if test="sorts != null">
sorts,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="icon != null">
icon,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="payType != null">
#{payType,jdbcType=VARCHAR},
</if>
<if test="payName != null">
#{payName,jdbcType=VARCHAR},
</if>
<if test="isShowShortcut != null">
#{isShowShortcut,jdbcType=TINYINT},
</if>
<if test="shopId != null">
#{shopId,jdbcType=VARCHAR},
</if>
<if test="isRefundable != null">
#{isRefundable,jdbcType=TINYINT},
</if>
<if test="isOpenCashDrawer != null">
#{isOpenCashDrawer,jdbcType=TINYINT},
</if>
<if test="isSystem != null">
#{isSystem,jdbcType=TINYINT},
</if>
<if test="isIdeal != null">
#{isIdeal,jdbcType=TINYINT},
</if>
<if test="isDisplay != null">
#{isDisplay,jdbcType=TINYINT},
</if>
<if test="sorts != null">
#{sorts,jdbcType=INTEGER},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
<if test="icon != null">
#{icon,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopPayType">
update tb_shop_pay_type
<set>
<if test="payType != null">
pay_type = #{payType,jdbcType=VARCHAR},
</if>
<if test="payName != null">
pay_name = #{payName,jdbcType=VARCHAR},
</if>
<if test="isShowShortcut != null">
is_show_shortcut = #{isShowShortcut,jdbcType=TINYINT},
</if>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=VARCHAR},
</if>
<if test="isRefundable != null">
is_refundable = #{isRefundable,jdbcType=TINYINT},
</if>
<if test="isOpenCashDrawer != null">
is_open_cash_drawer = #{isOpenCashDrawer,jdbcType=TINYINT},
</if>
<if test="isSystem != null">
is_system = #{isSystem,jdbcType=TINYINT},
</if>
<if test="isIdeal != null">
is_ideal = #{isIdeal,jdbcType=TINYINT},
</if>
<if test="isDisplay != null">
is_display = #{isDisplay,jdbcType=TINYINT},
</if>
<if test="sorts != null">
sorts = #{sorts,jdbcType=INTEGER},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
<if test="icon != null">
icon = #{icon,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopPayType">
update tb_shop_pay_type
set pay_type = #{payType,jdbcType=VARCHAR},
pay_name = #{payName,jdbcType=VARCHAR},
is_show_shortcut = #{isShowShortcut,jdbcType=TINYINT},
shop_id = #{shopId,jdbcType=VARCHAR},
is_refundable = #{isRefundable,jdbcType=TINYINT},
is_open_cash_drawer = #{isOpenCashDrawer,jdbcType=TINYINT},
is_system = #{isSystem,jdbcType=TINYINT},
is_ideal = #{isIdeal,jdbcType=TINYINT},
is_display = #{isDisplay,jdbcType=TINYINT},
sorts = #{sorts,jdbcType=INTEGER},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
icon = #{icon,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByShopId" resultMap="BaseResultMap">
select * from tb_shop_pay_type where shop_id=#{shopId} and is_display=1 order by `sorts` asc
</select>
<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

@@ -0,0 +1,188 @@
<?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.TbShopPurveyorMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbShopPurveyor">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="purveyor_name" jdbcType="VARCHAR" property="purveyorName" />
<result column="purveyor_telephone" jdbcType="VARCHAR" property="purveyorTelephone" />
<result column="period" jdbcType="INTEGER" property="period" />
<result column="address" jdbcType="VARCHAR" property="address" />
<result column="tip" jdbcType="VARCHAR" property="tip" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
<result column="last_transact_at" jdbcType="BIGINT" property="lastTransactAt" />
</resultMap>
<sql id="Base_Column_List">
id, shop_id, sort, name, purveyor_name, purveyor_telephone, period, address, tip,
remark, created_at, updated_at, last_transact_at
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_shop_purveyor
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_shop_purveyor
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopPurveyor">
insert into tb_shop_purveyor (id, shop_id, sort,
name, purveyor_name, purveyor_telephone,
period, address, tip,
remark, created_at, updated_at,
last_transact_at)
values (#{id,jdbcType=INTEGER}, #{shopId,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER},
#{name,jdbcType=VARCHAR}, #{purveyorName,jdbcType=VARCHAR}, #{purveyorTelephone,jdbcType=VARCHAR},
#{period,jdbcType=INTEGER}, #{address,jdbcType=VARCHAR}, #{tip,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}, #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT},
#{lastTransactAt,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopPurveyor">
insert into tb_shop_purveyor
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="sort != null">
sort,
</if>
<if test="name != null">
name,
</if>
<if test="purveyorName != null">
purveyor_name,
</if>
<if test="purveyorTelephone != null">
purveyor_telephone,
</if>
<if test="period != null">
period,
</if>
<if test="address != null">
address,
</if>
<if test="tip != null">
tip,
</if>
<if test="remark != null">
remark,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="lastTransactAt != null">
last_transact_at,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="shopId != null">
#{shopId,jdbcType=VARCHAR},
</if>
<if test="sort != null">
#{sort,jdbcType=INTEGER},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="purveyorName != null">
#{purveyorName,jdbcType=VARCHAR},
</if>
<if test="purveyorTelephone != null">
#{purveyorTelephone,jdbcType=VARCHAR},
</if>
<if test="period != null">
#{period,jdbcType=INTEGER},
</if>
<if test="address != null">
#{address,jdbcType=VARCHAR},
</if>
<if test="tip != null">
#{tip,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
<if test="lastTransactAt != null">
#{lastTransactAt,jdbcType=BIGINT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopPurveyor">
update tb_shop_purveyor
<set>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=VARCHAR},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=INTEGER},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="purveyorName != null">
purveyor_name = #{purveyorName,jdbcType=VARCHAR},
</if>
<if test="purveyorTelephone != null">
purveyor_telephone = #{purveyorTelephone,jdbcType=VARCHAR},
</if>
<if test="period != null">
period = #{period,jdbcType=INTEGER},
</if>
<if test="address != null">
address = #{address,jdbcType=VARCHAR},
</if>
<if test="tip != null">
tip = #{tip,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
<if test="lastTransactAt != null">
last_transact_at = #{lastTransactAt,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopPurveyor">
update tb_shop_purveyor
set shop_id = #{shopId,jdbcType=VARCHAR},
sort = #{sort,jdbcType=INTEGER},
name = #{name,jdbcType=VARCHAR},
purveyor_name = #{purveyorName,jdbcType=VARCHAR},
purveyor_telephone = #{purveyorTelephone,jdbcType=VARCHAR},
period = #{period,jdbcType=INTEGER},
address = #{address,jdbcType=VARCHAR},
tip = #{tip,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
last_transact_at = #{lastTransactAt,jdbcType=BIGINT}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,188 @@
<?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.TbShopPurveyorTransactMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbShopPurveyorTransact">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
<result column="purveyor_name" jdbcType="VARCHAR" property="purveyorName" />
<result column="purveyor_id" jdbcType="VARCHAR" property="purveyorId" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
<result column="total_amount" jdbcType="DECIMAL" property="totalAmount" />
<result column="wait_amount" jdbcType="DECIMAL" property="waitAmount" />
<result column="paid_amount" jdbcType="DECIMAL" property="paidAmount" />
<result column="paid_at" jdbcType="BIGINT" property="paidAt" />
<result column="type" jdbcType="VARCHAR" property="type" />
</resultMap>
<sql id="Base_Column_List">
id, shop_id, purveyor_name, purveyor_id, status, remark, created_at, updated_at,
total_amount, wait_amount, paid_amount, paid_at, type
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_shop_purveyor_transact
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_shop_purveyor_transact
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopPurveyorTransact">
insert into tb_shop_purveyor_transact (id, shop_id, purveyor_name,
purveyor_id, status, remark,
created_at, updated_at, total_amount,
wait_amount, paid_amount, paid_at,
type)
values (#{id,jdbcType=INTEGER}, #{shopId,jdbcType=VARCHAR}, #{purveyorName,jdbcType=VARCHAR},
#{purveyorId,jdbcType=VARCHAR}, #{status,jdbcType=TINYINT}, #{remark,jdbcType=VARCHAR},
#{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{totalAmount,jdbcType=DECIMAL},
#{waitAmount,jdbcType=DECIMAL}, #{paidAmount,jdbcType=DECIMAL}, #{paidAt,jdbcType=BIGINT},
#{type,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopPurveyorTransact">
insert into tb_shop_purveyor_transact
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="purveyorName != null">
purveyor_name,
</if>
<if test="purveyorId != null">
purveyor_id,
</if>
<if test="status != null">
status,
</if>
<if test="remark != null">
remark,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="totalAmount != null">
total_amount,
</if>
<if test="waitAmount != null">
wait_amount,
</if>
<if test="paidAmount != null">
paid_amount,
</if>
<if test="paidAt != null">
paid_at,
</if>
<if test="type != null">
type,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="shopId != null">
#{shopId,jdbcType=VARCHAR},
</if>
<if test="purveyorName != null">
#{purveyorName,jdbcType=VARCHAR},
</if>
<if test="purveyorId != null">
#{purveyorId,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=TINYINT},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
<if test="totalAmount != null">
#{totalAmount,jdbcType=DECIMAL},
</if>
<if test="waitAmount != null">
#{waitAmount,jdbcType=DECIMAL},
</if>
<if test="paidAmount != null">
#{paidAmount,jdbcType=DECIMAL},
</if>
<if test="paidAt != null">
#{paidAt,jdbcType=BIGINT},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopPurveyorTransact">
update tb_shop_purveyor_transact
<set>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=VARCHAR},
</if>
<if test="purveyorName != null">
purveyor_name = #{purveyorName,jdbcType=VARCHAR},
</if>
<if test="purveyorId != null">
purveyor_id = #{purveyorId,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=TINYINT},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
<if test="totalAmount != null">
total_amount = #{totalAmount,jdbcType=DECIMAL},
</if>
<if test="waitAmount != null">
wait_amount = #{waitAmount,jdbcType=DECIMAL},
</if>
<if test="paidAmount != null">
paid_amount = #{paidAmount,jdbcType=DECIMAL},
</if>
<if test="paidAt != null">
paid_at = #{paidAt,jdbcType=BIGINT},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopPurveyorTransact">
update tb_shop_purveyor_transact
set shop_id = #{shopId,jdbcType=VARCHAR},
purveyor_name = #{purveyorName,jdbcType=VARCHAR},
purveyor_id = #{purveyorId,jdbcType=VARCHAR},
status = #{status,jdbcType=TINYINT},
remark = #{remark,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
total_amount = #{totalAmount,jdbcType=DECIMAL},
wait_amount = #{waitAmount,jdbcType=DECIMAL},
paid_amount = #{paidAmount,jdbcType=DECIMAL},
paid_at = #{paidAt,jdbcType=BIGINT},
type = #{type,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,230 @@
<?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.TbShopTableMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbShopTable">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="shop_id" jdbcType="INTEGER" property="shopId" />
<result column="max_capacity" jdbcType="INTEGER" property="maxCapacity" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="area_id" jdbcType="INTEGER" property="areaId" />
<result column="is_predate" jdbcType="TINYINT" property="isPredate" />
<result column="predate_amount" jdbcType="DECIMAL" property="predateAmount" />
<result column="status" jdbcType="VARCHAR" property="status" />
<result column="type" jdbcType="TINYINT" property="type" />
<result column="amount" jdbcType="DECIMAL" property="amount" />
<result column="perhour" jdbcType="DECIMAL" property="perhour" />
<result column="view" jdbcType="VARCHAR" property="view" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
</resultMap>
<sql id="Base_Column_List">
id, name, shop_id, max_capacity, sort, area_id, is_predate, predate_amount, status,
type, amount, perhour, view, created_at, updated_at
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_shop_table
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_shop_table
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopTable">
insert into tb_shop_table (id, name, shop_id,
max_capacity, sort, area_id,
is_predate, predate_amount, status,
type, amount, perhour,
view, created_at, updated_at
)
values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{shopId,jdbcType=INTEGER},
#{maxCapacity,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}, #{areaId,jdbcType=INTEGER},
#{isPredate,jdbcType=TINYINT}, #{predateAmount,jdbcType=DECIMAL}, #{status,jdbcType=VARCHAR},
#{type,jdbcType=TINYINT}, #{amount,jdbcType=DECIMAL}, #{perhour,jdbcType=DECIMAL},
#{view,jdbcType=VARCHAR}, #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopTable">
insert into tb_shop_table
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
name,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="maxCapacity != null">
max_capacity,
</if>
<if test="sort != null">
sort,
</if>
<if test="areaId != null">
area_id,
</if>
<if test="isPredate != null">
is_predate,
</if>
<if test="predateAmount != null">
predate_amount,
</if>
<if test="status != null">
status,
</if>
<if test="type != null">
type,
</if>
<if test="amount != null">
amount,
</if>
<if test="perhour != null">
perhour,
</if>
<if test="view != null">
view,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
#{shopId,jdbcType=INTEGER},
</if>
<if test="maxCapacity != null">
#{maxCapacity,jdbcType=INTEGER},
</if>
<if test="sort != null">
#{sort,jdbcType=INTEGER},
</if>
<if test="areaId != null">
#{areaId,jdbcType=INTEGER},
</if>
<if test="isPredate != null">
#{isPredate,jdbcType=TINYINT},
</if>
<if test="predateAmount != null">
#{predateAmount,jdbcType=DECIMAL},
</if>
<if test="status != null">
#{status,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=TINYINT},
</if>
<if test="amount != null">
#{amount,jdbcType=DECIMAL},
</if>
<if test="perhour != null">
#{perhour,jdbcType=DECIMAL},
</if>
<if test="view != null">
#{view,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopTable">
update tb_shop_table
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=INTEGER},
</if>
<if test="maxCapacity != null">
max_capacity = #{maxCapacity,jdbcType=INTEGER},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=INTEGER},
</if>
<if test="areaId != null">
area_id = #{areaId,jdbcType=INTEGER},
</if>
<if test="isPredate != null">
is_predate = #{isPredate,jdbcType=TINYINT},
</if>
<if test="predateAmount != null">
predate_amount = #{predateAmount,jdbcType=DECIMAL},
</if>
<if test="status != null">
status = #{status,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=TINYINT},
</if>
<if test="amount != null">
amount = #{amount,jdbcType=DECIMAL},
</if>
<if test="perhour != null">
perhour = #{perhour,jdbcType=DECIMAL},
</if>
<if test="view != null">
view = #{view,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopTable">
update tb_shop_table
set name = #{name,jdbcType=VARCHAR},
shop_id = #{shopId,jdbcType=INTEGER},
max_capacity = #{maxCapacity,jdbcType=INTEGER},
sort = #{sort,jdbcType=INTEGER},
area_id = #{areaId,jdbcType=INTEGER},
is_predate = #{isPredate,jdbcType=TINYINT},
predate_amount = #{predateAmount,jdbcType=DECIMAL},
status = #{status,jdbcType=VARCHAR},
type = #{type,jdbcType=TINYINT},
amount = #{amount,jdbcType=DECIMAL},
perhour = #{perhour,jdbcType=DECIMAL},
view = #{view,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByShopIdAndStatus" resultMap="BaseResultMap">
select * from tb_shop_table where shop_id=#{shopId}
<if test="areaId != null and areaId !=''">
and area_id = #{areaId}
</if>
<if test="status != null and status !=''">
and status = #{status}
</if>
order by `sort` asc
</select>
</mapper>

View File

@@ -0,0 +1,153 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.chaozhanggui.system.cashierservice.dao.TbShopUnitMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbShopUnit">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="decimals_digits" jdbcType="INTEGER" property="decimalsDigits" />
<result column="unit_type" jdbcType="VARCHAR" property="unitType" />
<result column="is_system" jdbcType="TINYINT" property="isSystem" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="merchant_id" jdbcType="VARCHAR" property="merchantId" />
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
</resultMap>
<sql id="Base_Column_List">
id, name, decimals_digits, unit_type, is_system, status, merchant_id, shop_id, created_at,
updated_at
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_shop_unit
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_shop_unit
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUnit">
insert into tb_shop_unit (id, name, decimals_digits,
unit_type, is_system, status,
merchant_id, shop_id, created_at,
updated_at)
values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{decimalsDigits,jdbcType=INTEGER},
#{unitType,jdbcType=VARCHAR}, #{isSystem,jdbcType=TINYINT}, #{status,jdbcType=TINYINT},
#{merchantId,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR}, #{createdAt,jdbcType=BIGINT},
#{updatedAt,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUnit">
insert into tb_shop_unit
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
name,
</if>
<if test="decimalsDigits != null">
decimals_digits,
</if>
<if test="unitType != null">
unit_type,
</if>
<if test="isSystem != null">
is_system,
</if>
<if test="status != null">
status,
</if>
<if test="merchantId != null">
merchant_id,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="decimalsDigits != null">
#{decimalsDigits,jdbcType=INTEGER},
</if>
<if test="unitType != null">
#{unitType,jdbcType=VARCHAR},
</if>
<if test="isSystem != null">
#{isSystem,jdbcType=TINYINT},
</if>
<if test="status != null">
#{status,jdbcType=TINYINT},
</if>
<if test="merchantId != null">
#{merchantId,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
#{shopId,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUnit">
update tb_shop_unit
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="decimalsDigits != null">
decimals_digits = #{decimalsDigits,jdbcType=INTEGER},
</if>
<if test="unitType != null">
unit_type = #{unitType,jdbcType=VARCHAR},
</if>
<if test="isSystem != null">
is_system = #{isSystem,jdbcType=TINYINT},
</if>
<if test="status != null">
status = #{status,jdbcType=TINYINT},
</if>
<if test="merchantId != null">
merchant_id = #{merchantId,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUnit">
update tb_shop_unit
set name = #{name,jdbcType=VARCHAR},
decimals_digits = #{decimalsDigits,jdbcType=INTEGER},
unit_type = #{unitType,jdbcType=VARCHAR},
is_system = #{isSystem,jdbcType=TINYINT},
status = #{status,jdbcType=TINYINT},
merchant_id = #{merchantId,jdbcType=VARCHAR},
shop_id = #{shopId,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,127 @@
<?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.TbShopUserFlowMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbShopUserFlow">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="shop_user_id" jdbcType="INTEGER" property="shopUserId" />
<result column="amount" jdbcType="DECIMAL" property="amount" />
<result column="balance" jdbcType="DECIMAL" property="balance" />
<result column="biz_code" jdbcType="VARCHAR" property="bizCode" />
<result column="biz_name" jdbcType="VARCHAR" property="bizName" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
</resultMap>
<sql id="Base_Column_List">
id, shop_user_id, amount, balance, biz_code, biz_name, create_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_shop_user_flow
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_shop_user_flow
where id = #{id,jdbcType=INTEGER}
</delete>
<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)
values (#{id,jdbcType=INTEGER}, #{shopUserId,jdbcType=INTEGER}, #{amount,jdbcType=DECIMAL},
#{balance,jdbcType=DECIMAL}, #{bizCode,jdbcType=VARCHAR}, #{bizName,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUserFlow">
insert into tb_shop_user_flow
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="shopUserId != null">
shop_user_id,
</if>
<if test="amount != null">
amount,
</if>
<if test="balance != null">
balance,
</if>
<if test="bizCode != null">
biz_code,
</if>
<if test="bizName != null">
biz_name,
</if>
<if test="createTime != null">
create_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="shopUserId != null">
#{shopUserId,jdbcType=INTEGER},
</if>
<if test="amount != null">
#{amount,jdbcType=DECIMAL},
</if>
<if test="balance != null">
#{balance,jdbcType=DECIMAL},
</if>
<if test="bizCode != null">
#{bizCode,jdbcType=VARCHAR},
</if>
<if test="bizName != null">
#{bizName,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUserFlow">
update tb_shop_user_flow
<set>
<if test="shopUserId != null">
shop_user_id = #{shopUserId,jdbcType=INTEGER},
</if>
<if test="amount != null">
amount = #{amount,jdbcType=DECIMAL},
</if>
<if test="balance != null">
balance = #{balance,jdbcType=DECIMAL},
</if>
<if test="bizCode != null">
biz_code = #{bizCode,jdbcType=VARCHAR},
</if>
<if test="bizName != null">
biz_name = #{bizName,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.TbShopUserFlow">
update tb_shop_user_flow
set shop_user_id = #{shopUserId,jdbcType=INTEGER},
amount = #{amount,jdbcType=DECIMAL},
balance = #{balance,jdbcType=DECIMAL},
biz_code = #{bizCode,jdbcType=VARCHAR},
biz_name = #{bizName,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByMemberAccountFlow" resultType="java.util.Map">
SELECT
f.*,
u.`name`
FROM
tb_shop_user_flow f
LEFT JOIN tb_shop_user u ON f.shop_user_id = u.id
order by f.id desc
</select>
</mapper>

View File

@@ -0,0 +1,376 @@
<?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.TbShopUserMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbShopUser">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="amount" jdbcType="DECIMAL" property="amount" />
<result column="credit_amount" jdbcType="DECIMAL" property="creditAmount" />
<result column="consume_amount" jdbcType="DECIMAL" property="consumeAmount" />
<result column="consume_number" jdbcType="INTEGER" property="consumeNumber" />
<result column="level_consume" jdbcType="DECIMAL" property="levelConsume" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="merchant_id" jdbcType="VARCHAR" property="merchantId" />
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
<result column="user_id" jdbcType="VARCHAR" property="userId" />
<result column="parent_id" jdbcType="VARCHAR" property="parentId" />
<result column="parent_level" jdbcType="VARCHAR" property="parentLevel" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="head_img" jdbcType="VARCHAR" property="headImg" />
<result column="sex" jdbcType="TINYINT" property="sex" />
<result column="birth_day" jdbcType="VARCHAR" property="birthDay" />
<result column="telephone" jdbcType="VARCHAR" property="telephone" />
<result column="is_vip" jdbcType="TINYINT" property="isVip" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="is_attention" jdbcType="TINYINT" property="isAttention" />
<result column="attention_at" jdbcType="INTEGER" property="attentionAt" />
<result column="is_shareholder" jdbcType="TINYINT" property="isShareholder" />
<result column="level" jdbcType="TINYINT" property="level" />
<result column="distribute_type" jdbcType="VARCHAR" property="distributeType" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
<result column="mini_open_id" jdbcType="VARCHAR" property="miniOpenId" />
</resultMap>
<sql id="Base_Column_List">
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
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_shop_user
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_shop_user
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUser">
insert into tb_shop_user (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)
values (#{id,jdbcType=INTEGER}, #{amount,jdbcType=DECIMAL}, #{creditAmount,jdbcType=DECIMAL},
#{consumeAmount,jdbcType=DECIMAL}, #{consumeNumber,jdbcType=INTEGER}, #{levelConsume,jdbcType=DECIMAL},
#{status,jdbcType=TINYINT}, #{merchantId,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR},
#{userId,jdbcType=VARCHAR}, #{parentId,jdbcType=VARCHAR}, #{parentLevel,jdbcType=VARCHAR},
#{name,jdbcType=VARCHAR}, #{headImg,jdbcType=VARCHAR}, #{sex,jdbcType=TINYINT},
#{birthDay,jdbcType=VARCHAR}, #{telephone,jdbcType=VARCHAR}, #{isVip,jdbcType=TINYINT},
#{code,jdbcType=VARCHAR}, #{isAttention,jdbcType=TINYINT}, #{attentionAt,jdbcType=INTEGER},
#{isShareholder,jdbcType=TINYINT}, #{level,jdbcType=TINYINT}, #{distributeType,jdbcType=VARCHAR},
#{sort,jdbcType=INTEGER}, #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT},
#{miniOpenId,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUser">
insert into tb_shop_user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="amount != null">
amount,
</if>
<if test="creditAmount != null">
credit_amount,
</if>
<if test="consumeAmount != null">
consume_amount,
</if>
<if test="consumeNumber != null">
consume_number,
</if>
<if test="levelConsume != null">
level_consume,
</if>
<if test="status != null">
status,
</if>
<if test="merchantId != null">
merchant_id,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="parentId != null">
parent_id,
</if>
<if test="parentLevel != null">
parent_level,
</if>
<if test="name != null">
name,
</if>
<if test="headImg != null">
head_img,
</if>
<if test="sex != null">
sex,
</if>
<if test="birthDay != null">
birth_day,
</if>
<if test="telephone != null">
telephone,
</if>
<if test="isVip != null">
is_vip,
</if>
<if test="code != null">
code,
</if>
<if test="isAttention != null">
is_attention,
</if>
<if test="attentionAt != null">
attention_at,
</if>
<if test="isShareholder != null">
is_shareholder,
</if>
<if test="level != null">
level,
</if>
<if test="distributeType != null">
distribute_type,
</if>
<if test="sort != null">
sort,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="miniOpenId != null">
mini_open_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="amount != null">
#{amount,jdbcType=DECIMAL},
</if>
<if test="creditAmount != null">
#{creditAmount,jdbcType=DECIMAL},
</if>
<if test="consumeAmount != null">
#{consumeAmount,jdbcType=DECIMAL},
</if>
<if test="consumeNumber != null">
#{consumeNumber,jdbcType=INTEGER},
</if>
<if test="levelConsume != null">
#{levelConsume,jdbcType=DECIMAL},
</if>
<if test="status != null">
#{status,jdbcType=TINYINT},
</if>
<if test="merchantId != null">
#{merchantId,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
#{shopId,jdbcType=VARCHAR},
</if>
<if test="userId != null">
#{userId,jdbcType=VARCHAR},
</if>
<if test="parentId != null">
#{parentId,jdbcType=VARCHAR},
</if>
<if test="parentLevel != null">
#{parentLevel,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="headImg != null">
#{headImg,jdbcType=VARCHAR},
</if>
<if test="sex != null">
#{sex,jdbcType=TINYINT},
</if>
<if test="birthDay != null">
#{birthDay,jdbcType=VARCHAR},
</if>
<if test="telephone != null">
#{telephone,jdbcType=VARCHAR},
</if>
<if test="isVip != null">
#{isVip,jdbcType=TINYINT},
</if>
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
<if test="isAttention != null">
#{isAttention,jdbcType=TINYINT},
</if>
<if test="attentionAt != null">
#{attentionAt,jdbcType=INTEGER},
</if>
<if test="isShareholder != null">
#{isShareholder,jdbcType=TINYINT},
</if>
<if test="level != null">
#{level,jdbcType=TINYINT},
</if>
<if test="distributeType != null">
#{distributeType,jdbcType=VARCHAR},
</if>
<if test="sort != null">
#{sort,jdbcType=INTEGER},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
<if test="miniOpenId != null">
#{miniOpenId,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUser">
update tb_shop_user
<set>
<if test="amount != null">
amount = #{amount,jdbcType=DECIMAL},
</if>
<if test="creditAmount != null">
credit_amount = #{creditAmount,jdbcType=DECIMAL},
</if>
<if test="consumeAmount != null">
consume_amount = #{consumeAmount,jdbcType=DECIMAL},
</if>
<if test="consumeNumber != null">
consume_number = #{consumeNumber,jdbcType=INTEGER},
</if>
<if test="levelConsume != null">
level_consume = #{levelConsume,jdbcType=DECIMAL},
</if>
<if test="status != null">
status = #{status,jdbcType=TINYINT},
</if>
<if test="merchantId != null">
merchant_id = #{merchantId,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=VARCHAR},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=VARCHAR},
</if>
<if test="parentId != null">
parent_id = #{parentId,jdbcType=VARCHAR},
</if>
<if test="parentLevel != null">
parent_level = #{parentLevel,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="headImg != null">
head_img = #{headImg,jdbcType=VARCHAR},
</if>
<if test="sex != null">
sex = #{sex,jdbcType=TINYINT},
</if>
<if test="birthDay != null">
birth_day = #{birthDay,jdbcType=VARCHAR},
</if>
<if test="telephone != null">
telephone = #{telephone,jdbcType=VARCHAR},
</if>
<if test="isVip != null">
is_vip = #{isVip,jdbcType=TINYINT},
</if>
<if test="code != null">
code = #{code,jdbcType=VARCHAR},
</if>
<if test="isAttention != null">
is_attention = #{isAttention,jdbcType=TINYINT},
</if>
<if test="attentionAt != null">
attention_at = #{attentionAt,jdbcType=INTEGER},
</if>
<if test="isShareholder != null">
is_shareholder = #{isShareholder,jdbcType=TINYINT},
</if>
<if test="level != null">
level = #{level,jdbcType=TINYINT},
</if>
<if test="distributeType != null">
distribute_type = #{distributeType,jdbcType=VARCHAR},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=INTEGER},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
<if test="miniOpenId != null">
mini_open_id = #{miniOpenId,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUser">
update tb_shop_user
set amount = #{amount,jdbcType=DECIMAL},
credit_amount = #{creditAmount,jdbcType=DECIMAL},
consume_amount = #{consumeAmount,jdbcType=DECIMAL},
consume_number = #{consumeNumber,jdbcType=INTEGER},
level_consume = #{levelConsume,jdbcType=DECIMAL},
status = #{status,jdbcType=TINYINT},
merchant_id = #{merchantId,jdbcType=VARCHAR},
shop_id = #{shopId,jdbcType=VARCHAR},
user_id = #{userId,jdbcType=VARCHAR},
parent_id = #{parentId,jdbcType=VARCHAR},
parent_level = #{parentLevel,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
head_img = #{headImg,jdbcType=VARCHAR},
sex = #{sex,jdbcType=TINYINT},
birth_day = #{birthDay,jdbcType=VARCHAR},
telephone = #{telephone,jdbcType=VARCHAR},
is_vip = #{isVip,jdbcType=TINYINT},
code = #{code,jdbcType=VARCHAR},
is_attention = #{isAttention,jdbcType=TINYINT},
attention_at = #{attentionAt,jdbcType=INTEGER},
is_shareholder = #{isShareholder,jdbcType=TINYINT},
level = #{level,jdbcType=TINYINT},
distribute_type = #{distributeType,jdbcType=VARCHAR},
sort = #{sort,jdbcType=INTEGER},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
mini_open_id = #{miniOpenId,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByShopId" resultMap="BaseResultMap">
select * from tb_shop_user where shop_id=#{shopId} and is_vip=1
<if test="phone != null and phone !='' ">
and telephone = #{phone}
</if>
order by id desc
</select>
</mapper>

View File

@@ -0,0 +1,144 @@
<?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.TbTokenMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbToken">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="account_id" jdbcType="INTEGER" property="accountId" />
<result column="staff_id" jdbcType="INTEGER" property="staffId" />
<result column="client_type" jdbcType="VARCHAR" property="clientType" />
<result column="token" jdbcType="VARCHAR" property="token" />
<result column="ip" jdbcType="VARCHAR" property="ip" />
<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, account_id, staff_id, client_type, token, ip, status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_token
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_token
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbToken">
insert into tb_token (id, account_id, staff_id,
client_type, token, ip,
status, create_time, update_time
)
values (#{id,jdbcType=INTEGER}, #{accountId,jdbcType=INTEGER}, #{staffId,jdbcType=INTEGER},
#{clientType,jdbcType=VARCHAR}, #{token,jdbcType=VARCHAR}, #{ip,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbToken">
insert into tb_token
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="accountId != null">
account_id,
</if>
<if test="staffId != null">
staff_id,
</if>
<if test="clientType != null">
client_type,
</if>
<if test="token != null">
token,
</if>
<if test="ip != null">
ip,
</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="accountId != null">
#{accountId,jdbcType=INTEGER},
</if>
<if test="staffId != null">
#{staffId,jdbcType=INTEGER},
</if>
<if test="clientType != null">
#{clientType,jdbcType=VARCHAR},
</if>
<if test="token != null">
#{token,jdbcType=VARCHAR},
</if>
<if test="ip != null">
#{ip,jdbcType=VARCHAR},
</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.TbToken">
update tb_token
<set>
<if test="accountId != null">
account_id = #{accountId,jdbcType=INTEGER},
</if>
<if test="staffId != null">
staff_id = #{staffId,jdbcType=INTEGER},
</if>
<if test="clientType != null">
client_type = #{clientType,jdbcType=VARCHAR},
</if>
<if test="token != null">
token = #{token,jdbcType=VARCHAR},
</if>
<if test="ip != null">
ip = #{ip,jdbcType=VARCHAR},
</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.TbToken">
update tb_token
set account_id = #{accountId,jdbcType=INTEGER},
staff_id = #{staffId,jdbcType=INTEGER},
client_type = #{clientType,jdbcType=VARCHAR},
token = #{token,jdbcType=VARCHAR},
ip = #{ip,jdbcType=VARCHAR},
status = #{status,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByToken" resultMap="BaseResultMap">
select id, account_id, staff_id, token, ip, `status`, create_time, update_time from tb_token where token=#{token}
</select>
</mapper>

View File

@@ -0,0 +1,567 @@
<?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.TbUserInfoMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbUserInfo">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="amount" jdbcType="DECIMAL" property="amount" />
<result column="charge_amount" jdbcType="DECIMAL" property="chargeAmount" />
<result column="line_of_credit" jdbcType="DECIMAL" property="lineOfCredit" />
<result column="consume_amount" jdbcType="DECIMAL" property="consumeAmount" />
<result column="consume_number" jdbcType="INTEGER" property="consumeNumber" />
<result column="total_score" jdbcType="INTEGER" property="totalScore" />
<result column="lock_score" jdbcType="INTEGER" property="lockScore" />
<result column="card_no" jdbcType="VARCHAR" property="cardNo" />
<result column="card_password" jdbcType="VARCHAR" property="cardPassword" />
<result column="level_id" jdbcType="VARCHAR" property="levelId" />
<result column="head_img" jdbcType="VARCHAR" property="headImg" />
<result column="nick_name" jdbcType="VARCHAR" property="nickName" />
<result column="telephone" jdbcType="VARCHAR" property="telephone" />
<result column="wx_ma_app_id" jdbcType="VARCHAR" property="wxMaAppId" />
<result column="birth_day" jdbcType="VARCHAR" property="birthDay" />
<result column="sex" jdbcType="TINYINT" property="sex" />
<result column="mini_app_open_id" jdbcType="VARCHAR" property="miniAppOpenId" />
<result column="open_id" jdbcType="VARCHAR" property="openId" />
<result column="union_id" jdbcType="VARCHAR" property="unionId" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="identify" jdbcType="TINYINT" property="identify" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="parent_id" jdbcType="VARCHAR" property="parentId" />
<result column="parent_level" jdbcType="VARCHAR" property="parentLevel" />
<result column="parent_type" jdbcType="VARCHAR" property="parentType" />
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
<result column="merchant_id" jdbcType="VARCHAR" property="merchantId" />
<result column="is_resource" jdbcType="TINYINT" property="isResource" />
<result column="is_online" jdbcType="TINYINT" property="isOnline" />
<result column="is_vip" jdbcType="TINYINT" property="isVip" />
<result column="vip_effect_at" jdbcType="INTEGER" property="vipEffectAt" />
<result column="tips" jdbcType="VARCHAR" property="tips" />
<result column="source_path" jdbcType="VARCHAR" property="sourcePath" />
<result column="is_sales_person" jdbcType="TINYINT" property="isSalesPerson" />
<result column="is_attention_mp" jdbcType="TINYINT" property="isAttentionMp" />
<result column="city" jdbcType="VARCHAR" property="city" />
<result column="search_word" jdbcType="VARCHAR" property="searchWord" />
<result column="last_log_in_at" jdbcType="BIGINT" property="lastLogInAt" />
<result column="last_leave_at" jdbcType="BIGINT" property="lastLeaveAt" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
<result column="bind_parent_at" jdbcType="BIGINT" property="bindParentAt" />
<result column="grand_parent_id" jdbcType="VARCHAR" property="grandParentId" />
</resultMap>
<sql id="Base_Column_List">
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
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_user_info
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_user_info
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbUserInfo">
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,
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
)
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},
#{nickName,jdbcType=VARCHAR}, #{telephone,jdbcType=VARCHAR}, #{wxMaAppId,jdbcType=VARCHAR},
#{birthDay,jdbcType=VARCHAR}, #{sex,jdbcType=TINYINT}, #{miniAppOpenId,jdbcType=VARCHAR},
#{openId,jdbcType=VARCHAR}, #{unionId,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR},
#{type,jdbcType=VARCHAR}, #{identify,jdbcType=TINYINT}, #{status,jdbcType=TINYINT},
#{parentId,jdbcType=VARCHAR}, #{parentLevel,jdbcType=VARCHAR}, #{parentType,jdbcType=VARCHAR},
#{projectId,jdbcType=VARCHAR}, #{merchantId,jdbcType=VARCHAR}, #{isResource,jdbcType=TINYINT},
#{isOnline,jdbcType=TINYINT}, #{isVip,jdbcType=TINYINT}, #{vipEffectAt,jdbcType=INTEGER},
#{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}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbUserInfo">
insert into tb_user_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="amount != null">
amount,
</if>
<if test="chargeAmount != null">
charge_amount,
</if>
<if test="lineOfCredit != null">
line_of_credit,
</if>
<if test="consumeAmount != null">
consume_amount,
</if>
<if test="consumeNumber != null">
consume_number,
</if>
<if test="totalScore != null">
total_score,
</if>
<if test="lockScore != null">
lock_score,
</if>
<if test="cardNo != null">
card_no,
</if>
<if test="cardPassword != null">
card_password,
</if>
<if test="levelId != null">
level_id,
</if>
<if test="headImg != null">
head_img,
</if>
<if test="nickName != null">
nick_name,
</if>
<if test="telephone != null">
telephone,
</if>
<if test="wxMaAppId != null">
wx_ma_app_id,
</if>
<if test="birthDay != null">
birth_day,
</if>
<if test="sex != null">
sex,
</if>
<if test="miniAppOpenId != null">
mini_app_open_id,
</if>
<if test="openId != null">
open_id,
</if>
<if test="unionId != null">
union_id,
</if>
<if test="code != null">
code,
</if>
<if test="type != null">
type,
</if>
<if test="identify != null">
identify,
</if>
<if test="status != null">
status,
</if>
<if test="parentId != null">
parent_id,
</if>
<if test="parentLevel != null">
parent_level,
</if>
<if test="parentType != null">
parent_type,
</if>
<if test="projectId != null">
project_id,
</if>
<if test="merchantId != null">
merchant_id,
</if>
<if test="isResource != null">
is_resource,
</if>
<if test="isOnline != null">
is_online,
</if>
<if test="isVip != null">
is_vip,
</if>
<if test="vipEffectAt != null">
vip_effect_at,
</if>
<if test="tips != null">
tips,
</if>
<if test="sourcePath != null">
source_path,
</if>
<if test="isSalesPerson != null">
is_sales_person,
</if>
<if test="isAttentionMp != null">
is_attention_mp,
</if>
<if test="city != null">
city,
</if>
<if test="searchWord != null">
search_word,
</if>
<if test="lastLogInAt != null">
last_log_in_at,
</if>
<if test="lastLeaveAt != null">
last_leave_at,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="bindParentAt != null">
bind_parent_at,
</if>
<if test="grandParentId != null">
grand_parent_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="amount != null">
#{amount,jdbcType=DECIMAL},
</if>
<if test="chargeAmount != null">
#{chargeAmount,jdbcType=DECIMAL},
</if>
<if test="lineOfCredit != null">
#{lineOfCredit,jdbcType=DECIMAL},
</if>
<if test="consumeAmount != null">
#{consumeAmount,jdbcType=DECIMAL},
</if>
<if test="consumeNumber != null">
#{consumeNumber,jdbcType=INTEGER},
</if>
<if test="totalScore != null">
#{totalScore,jdbcType=INTEGER},
</if>
<if test="lockScore != null">
#{lockScore,jdbcType=INTEGER},
</if>
<if test="cardNo != null">
#{cardNo,jdbcType=VARCHAR},
</if>
<if test="cardPassword != null">
#{cardPassword,jdbcType=VARCHAR},
</if>
<if test="levelId != null">
#{levelId,jdbcType=VARCHAR},
</if>
<if test="headImg != null">
#{headImg,jdbcType=VARCHAR},
</if>
<if test="nickName != null">
#{nickName,jdbcType=VARCHAR},
</if>
<if test="telephone != null">
#{telephone,jdbcType=VARCHAR},
</if>
<if test="wxMaAppId != null">
#{wxMaAppId,jdbcType=VARCHAR},
</if>
<if test="birthDay != null">
#{birthDay,jdbcType=VARCHAR},
</if>
<if test="sex != null">
#{sex,jdbcType=TINYINT},
</if>
<if test="miniAppOpenId != null">
#{miniAppOpenId,jdbcType=VARCHAR},
</if>
<if test="openId != null">
#{openId,jdbcType=VARCHAR},
</if>
<if test="unionId != null">
#{unionId,jdbcType=VARCHAR},
</if>
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="identify != null">
#{identify,jdbcType=TINYINT},
</if>
<if test="status != null">
#{status,jdbcType=TINYINT},
</if>
<if test="parentId != null">
#{parentId,jdbcType=VARCHAR},
</if>
<if test="parentLevel != null">
#{parentLevel,jdbcType=VARCHAR},
</if>
<if test="parentType != null">
#{parentType,jdbcType=VARCHAR},
</if>
<if test="projectId != null">
#{projectId,jdbcType=VARCHAR},
</if>
<if test="merchantId != null">
#{merchantId,jdbcType=VARCHAR},
</if>
<if test="isResource != null">
#{isResource,jdbcType=TINYINT},
</if>
<if test="isOnline != null">
#{isOnline,jdbcType=TINYINT},
</if>
<if test="isVip != null">
#{isVip,jdbcType=TINYINT},
</if>
<if test="vipEffectAt != null">
#{vipEffectAt,jdbcType=INTEGER},
</if>
<if test="tips != null">
#{tips,jdbcType=VARCHAR},
</if>
<if test="sourcePath != null">
#{sourcePath,jdbcType=VARCHAR},
</if>
<if test="isSalesPerson != null">
#{isSalesPerson,jdbcType=TINYINT},
</if>
<if test="isAttentionMp != null">
#{isAttentionMp,jdbcType=TINYINT},
</if>
<if test="city != null">
#{city,jdbcType=VARCHAR},
</if>
<if test="searchWord != null">
#{searchWord,jdbcType=VARCHAR},
</if>
<if test="lastLogInAt != null">
#{lastLogInAt,jdbcType=BIGINT},
</if>
<if test="lastLeaveAt != null">
#{lastLeaveAt,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
<if test="bindParentAt != null">
#{bindParentAt,jdbcType=BIGINT},
</if>
<if test="grandParentId != null">
#{grandParentId,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbUserInfo">
update tb_user_info
<set>
<if test="amount != null">
amount = #{amount,jdbcType=DECIMAL},
</if>
<if test="chargeAmount != null">
charge_amount = #{chargeAmount,jdbcType=DECIMAL},
</if>
<if test="lineOfCredit != null">
line_of_credit = #{lineOfCredit,jdbcType=DECIMAL},
</if>
<if test="consumeAmount != null">
consume_amount = #{consumeAmount,jdbcType=DECIMAL},
</if>
<if test="consumeNumber != null">
consume_number = #{consumeNumber,jdbcType=INTEGER},
</if>
<if test="totalScore != null">
total_score = #{totalScore,jdbcType=INTEGER},
</if>
<if test="lockScore != null">
lock_score = #{lockScore,jdbcType=INTEGER},
</if>
<if test="cardNo != null">
card_no = #{cardNo,jdbcType=VARCHAR},
</if>
<if test="cardPassword != null">
card_password = #{cardPassword,jdbcType=VARCHAR},
</if>
<if test="levelId != null">
level_id = #{levelId,jdbcType=VARCHAR},
</if>
<if test="headImg != null">
head_img = #{headImg,jdbcType=VARCHAR},
</if>
<if test="nickName != null">
nick_name = #{nickName,jdbcType=VARCHAR},
</if>
<if test="telephone != null">
telephone = #{telephone,jdbcType=VARCHAR},
</if>
<if test="wxMaAppId != null">
wx_ma_app_id = #{wxMaAppId,jdbcType=VARCHAR},
</if>
<if test="birthDay != null">
birth_day = #{birthDay,jdbcType=VARCHAR},
</if>
<if test="sex != null">
sex = #{sex,jdbcType=TINYINT},
</if>
<if test="miniAppOpenId != null">
mini_app_open_id = #{miniAppOpenId,jdbcType=VARCHAR},
</if>
<if test="openId != null">
open_id = #{openId,jdbcType=VARCHAR},
</if>
<if test="unionId != null">
union_id = #{unionId,jdbcType=VARCHAR},
</if>
<if test="code != null">
code = #{code,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="identify != null">
identify = #{identify,jdbcType=TINYINT},
</if>
<if test="status != null">
status = #{status,jdbcType=TINYINT},
</if>
<if test="parentId != null">
parent_id = #{parentId,jdbcType=VARCHAR},
</if>
<if test="parentLevel != null">
parent_level = #{parentLevel,jdbcType=VARCHAR},
</if>
<if test="parentType != null">
parent_type = #{parentType,jdbcType=VARCHAR},
</if>
<if test="projectId != null">
project_id = #{projectId,jdbcType=VARCHAR},
</if>
<if test="merchantId != null">
merchant_id = #{merchantId,jdbcType=VARCHAR},
</if>
<if test="isResource != null">
is_resource = #{isResource,jdbcType=TINYINT},
</if>
<if test="isOnline != null">
is_online = #{isOnline,jdbcType=TINYINT},
</if>
<if test="isVip != null">
is_vip = #{isVip,jdbcType=TINYINT},
</if>
<if test="vipEffectAt != null">
vip_effect_at = #{vipEffectAt,jdbcType=INTEGER},
</if>
<if test="tips != null">
tips = #{tips,jdbcType=VARCHAR},
</if>
<if test="sourcePath != null">
source_path = #{sourcePath,jdbcType=VARCHAR},
</if>
<if test="isSalesPerson != null">
is_sales_person = #{isSalesPerson,jdbcType=TINYINT},
</if>
<if test="isAttentionMp != null">
is_attention_mp = #{isAttentionMp,jdbcType=TINYINT},
</if>
<if test="city != null">
city = #{city,jdbcType=VARCHAR},
</if>
<if test="searchWord != null">
search_word = #{searchWord,jdbcType=VARCHAR},
</if>
<if test="lastLogInAt != null">
last_log_in_at = #{lastLogInAt,jdbcType=BIGINT},
</if>
<if test="lastLeaveAt != null">
last_leave_at = #{lastLeaveAt,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
<if test="bindParentAt != null">
bind_parent_at = #{bindParentAt,jdbcType=BIGINT},
</if>
<if test="grandParentId != null">
grand_parent_id = #{grandParentId,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbUserInfo">
update tb_user_info
set amount = #{amount,jdbcType=DECIMAL},
charge_amount = #{chargeAmount,jdbcType=DECIMAL},
line_of_credit = #{lineOfCredit,jdbcType=DECIMAL},
consume_amount = #{consumeAmount,jdbcType=DECIMAL},
consume_number = #{consumeNumber,jdbcType=INTEGER},
total_score = #{totalScore,jdbcType=INTEGER},
lock_score = #{lockScore,jdbcType=INTEGER},
card_no = #{cardNo,jdbcType=VARCHAR},
card_password = #{cardPassword,jdbcType=VARCHAR},
level_id = #{levelId,jdbcType=VARCHAR},
head_img = #{headImg,jdbcType=VARCHAR},
nick_name = #{nickName,jdbcType=VARCHAR},
telephone = #{telephone,jdbcType=VARCHAR},
wx_ma_app_id = #{wxMaAppId,jdbcType=VARCHAR},
birth_day = #{birthDay,jdbcType=VARCHAR},
sex = #{sex,jdbcType=TINYINT},
mini_app_open_id = #{miniAppOpenId,jdbcType=VARCHAR},
open_id = #{openId,jdbcType=VARCHAR},
union_id = #{unionId,jdbcType=VARCHAR},
code = #{code,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
identify = #{identify,jdbcType=TINYINT},
status = #{status,jdbcType=TINYINT},
parent_id = #{parentId,jdbcType=VARCHAR},
parent_level = #{parentLevel,jdbcType=VARCHAR},
parent_type = #{parentType,jdbcType=VARCHAR},
project_id = #{projectId,jdbcType=VARCHAR},
merchant_id = #{merchantId,jdbcType=VARCHAR},
is_resource = #{isResource,jdbcType=TINYINT},
is_online = #{isOnline,jdbcType=TINYINT},
is_vip = #{isVip,jdbcType=TINYINT},
vip_effect_at = #{vipEffectAt,jdbcType=INTEGER},
tips = #{tips,jdbcType=VARCHAR},
source_path = #{sourcePath,jdbcType=VARCHAR},
is_sales_person = #{isSalesPerson,jdbcType=TINYINT},
is_attention_mp = #{isAttentionMp,jdbcType=TINYINT},
city = #{city,jdbcType=VARCHAR},
search_word = #{searchWord,jdbcType=VARCHAR},
last_log_in_at = #{lastLogInAt,jdbcType=BIGINT},
last_leave_at = #{lastLeaveAt,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
bind_parent_at = #{bindParentAt,jdbcType=BIGINT},
grand_parent_id = #{grandParentId,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,315 @@
<?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.TbmerchantAccountMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbmerchantAccount">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="account" jdbcType="VARCHAR" property="account" />
<result column="password" jdbcType="VARCHAR" property="password" />
<result column="merchant_id" jdbcType="VARCHAR" property="merchantId" />
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
<result column="shop_snap" jdbcType="VARCHAR" property="shopSnap" />
<result column="is_admin" jdbcType="TINYINT" property="isAdmin" />
<result column="is_mercantile" jdbcType="TINYINT" property="isMercantile" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="sex" jdbcType="TINYINT" property="sex" />
<result column="email" jdbcType="VARCHAR" property="email" />
<result column="telephone" jdbcType="VARCHAR" property="telephone" />
<result column="status" jdbcType="BIT" property="status" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="role_id" jdbcType="INTEGER" property="roleId" />
<result column="last_login_at" jdbcType="INTEGER" property="lastLoginAt" />
<result column="mp_open_id" jdbcType="VARCHAR" property="mpOpenId" />
<result column="msg_able" jdbcType="TINYINT" property="msgAble" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbmerchantAccount">
<result column="head_img" jdbcType="LONGVARCHAR" property="headImg" />
</resultMap>
<sql id="Base_Column_List">
id, account, password, merchant_id, shop_id, shop_snap, is_admin, is_mercantile,
name, sex, email, telephone, status, sort, role_id, last_login_at, mp_open_id, msg_able,
created_at, updated_at
</sql>
<sql id="Blob_Column_List">
head_img
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from tb_merchant_account
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_merchant_account
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbmerchantAccount">
insert into tb_merchant_account (id, account, password,
merchant_id, shop_id, shop_snap,
is_admin, is_mercantile, name,
sex, email, telephone,
status, sort, role_id, last_login_at,
mp_open_id, msg_able, created_at,
updated_at, head_img)
values (#{id,jdbcType=INTEGER}, #{account,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
#{merchantId,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR}, #{shopSnap,jdbcType=VARCHAR},
#{isAdmin,jdbcType=TINYINT}, #{isMercantile,jdbcType=TINYINT}, #{name,jdbcType=VARCHAR},
#{sex,jdbcType=TINYINT}, #{email,jdbcType=VARCHAR}, #{telephone,jdbcType=VARCHAR},
#{status,jdbcType=BIT}, #{sort,jdbcType=INTEGER}, #{roleId,jdbcType=INTEGER}, #{lastLoginAt,jdbcType=INTEGER},
#{mpOpenId,jdbcType=VARCHAR}, #{msgAble,jdbcType=TINYINT}, #{createdAt,jdbcType=BIGINT},
#{updatedAt,jdbcType=BIGINT}, #{headImg,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbmerchantAccount">
insert into tb_merchant_account
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="account != null">
account,
</if>
<if test="password != null">
password,
</if>
<if test="merchantId != null">
merchant_id,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="shopSnap != null">
shop_snap,
</if>
<if test="isAdmin != null">
is_admin,
</if>
<if test="isMercantile != null">
is_mercantile,
</if>
<if test="name != null">
name,
</if>
<if test="sex != null">
sex,
</if>
<if test="email != null">
email,
</if>
<if test="telephone != null">
telephone,
</if>
<if test="status != null">
status,
</if>
<if test="sort != null">
sort,
</if>
<if test="roleId != null">
role_id,
</if>
<if test="lastLoginAt != null">
last_login_at,
</if>
<if test="mpOpenId != null">
mp_open_id,
</if>
<if test="msgAble != null">
msg_able,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="headImg != null">
head_img,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="account != null">
#{account,jdbcType=VARCHAR},
</if>
<if test="password != null">
#{password,jdbcType=VARCHAR},
</if>
<if test="merchantId != null">
#{merchantId,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
#{shopId,jdbcType=VARCHAR},
</if>
<if test="shopSnap != null">
#{shopSnap,jdbcType=VARCHAR},
</if>
<if test="isAdmin != null">
#{isAdmin,jdbcType=TINYINT},
</if>
<if test="isMercantile != null">
#{isMercantile,jdbcType=TINYINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="sex != null">
#{sex,jdbcType=TINYINT},
</if>
<if test="email != null">
#{email,jdbcType=VARCHAR},
</if>
<if test="telephone != null">
#{telephone,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=BIT},
</if>
<if test="sort != null">
#{sort,jdbcType=INTEGER},
</if>
<if test="roleId != null">
#{roleId,jdbcType=INTEGER},
</if>
<if test="lastLoginAt != null">
#{lastLoginAt,jdbcType=INTEGER},
</if>
<if test="mpOpenId != null">
#{mpOpenId,jdbcType=VARCHAR},
</if>
<if test="msgAble != null">
#{msgAble,jdbcType=TINYINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
<if test="headImg != null">
#{headImg,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbmerchantAccount">
update tb_merchant_account
<set>
<if test="account != null">
account = #{account,jdbcType=VARCHAR},
</if>
<if test="password != null">
password = #{password,jdbcType=VARCHAR},
</if>
<if test="merchantId != null">
merchant_id = #{merchantId,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=VARCHAR},
</if>
<if test="shopSnap != null">
shop_snap = #{shopSnap,jdbcType=VARCHAR},
</if>
<if test="isAdmin != null">
is_admin = #{isAdmin,jdbcType=TINYINT},
</if>
<if test="isMercantile != null">
is_mercantile = #{isMercantile,jdbcType=TINYINT},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="sex != null">
sex = #{sex,jdbcType=TINYINT},
</if>
<if test="email != null">
email = #{email,jdbcType=VARCHAR},
</if>
<if test="telephone != null">
telephone = #{telephone,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=BIT},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=INTEGER},
</if>
<if test="roleId != null">
role_id = #{roleId,jdbcType=INTEGER},
</if>
<if test="lastLoginAt != null">
last_login_at = #{lastLoginAt,jdbcType=INTEGER},
</if>
<if test="mpOpenId != null">
mp_open_id = #{mpOpenId,jdbcType=VARCHAR},
</if>
<if test="msgAble != null">
msg_able = #{msgAble,jdbcType=TINYINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
<if test="headImg != null">
head_img = #{headImg,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.system.cashierservice.entity.TbmerchantAccount">
update tb_merchant_account
set account = #{account,jdbcType=VARCHAR},
password = #{password,jdbcType=VARCHAR},
merchant_id = #{merchantId,jdbcType=VARCHAR},
shop_id = #{shopId,jdbcType=VARCHAR},
shop_snap = #{shopSnap,jdbcType=VARCHAR},
is_admin = #{isAdmin,jdbcType=TINYINT},
is_mercantile = #{isMercantile,jdbcType=TINYINT},
name = #{name,jdbcType=VARCHAR},
sex = #{sex,jdbcType=TINYINT},
email = #{email,jdbcType=VARCHAR},
telephone = #{telephone,jdbcType=VARCHAR},
status = #{status,jdbcType=BIT},
sort = #{sort,jdbcType=INTEGER},
role_id = #{roleId,jdbcType=INTEGER},
last_login_at = #{lastLoginAt,jdbcType=INTEGER},
mp_open_id = #{mpOpenId,jdbcType=VARCHAR},
msg_able = #{msgAble,jdbcType=TINYINT},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
head_img = #{headImg,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbmerchantAccount">
update tb_merchant_account
set account = #{account,jdbcType=VARCHAR},
password = #{password,jdbcType=VARCHAR},
merchant_id = #{merchantId,jdbcType=VARCHAR},
shop_id = #{shopId,jdbcType=VARCHAR},
shop_snap = #{shopSnap,jdbcType=VARCHAR},
is_admin = #{isAdmin,jdbcType=TINYINT},
is_mercantile = #{isMercantile,jdbcType=TINYINT},
name = #{name,jdbcType=VARCHAR},
sex = #{sex,jdbcType=TINYINT},
email = #{email,jdbcType=VARCHAR},
telephone = #{telephone,jdbcType=VARCHAR},
status = #{status,jdbcType=BIT},
sort = #{sort,jdbcType=INTEGER},
role_id = #{roleId,jdbcType=INTEGER},
last_login_at = #{lastLoginAt,jdbcType=INTEGER},
mp_open_id = #{mpOpenId,jdbcType=VARCHAR},
msg_able = #{msgAble,jdbcType=TINYINT},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByAccount" resultMap="BaseResultMap">
select * from tb_merchant_account where account=#{account}
</select>
</mapper>

View File

@@ -0,0 +1,183 @@
<?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.ToolAlipayConfigMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.ToolAlipayConfig">
<id column="config_id" jdbcType="BIGINT" property="configId" />
<result column="app_id" jdbcType="VARCHAR" property="appId" />
<result column="charset" jdbcType="VARCHAR" property="charset" />
<result column="format" jdbcType="VARCHAR" property="format" />
<result column="gateway_url" jdbcType="VARCHAR" property="gatewayUrl" />
<result column="notify_url" jdbcType="VARCHAR" property="notifyUrl" />
<result column="return_url" jdbcType="VARCHAR" property="returnUrl" />
<result column="sign_type" jdbcType="VARCHAR" property="signType" />
<result column="sys_service_provider_id" jdbcType="VARCHAR" property="sysServiceProviderId" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.ToolAlipayConfigWithBLOBs">
<result column="private_key" jdbcType="LONGVARCHAR" property="privateKey" />
<result column="public_key" jdbcType="LONGVARCHAR" property="publicKey" />
</resultMap>
<sql id="Base_Column_List">
config_id, app_id, charset, format, gateway_url, notify_url, return_url, sign_type,
sys_service_provider_id
</sql>
<sql id="Blob_Column_List">
private_key, public_key
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from tool_alipay_config
where config_id = #{configId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from tool_alipay_config
where config_id = #{configId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolAlipayConfigWithBLOBs">
insert into tool_alipay_config (config_id, app_id, charset,
format, gateway_url, notify_url,
return_url, sign_type, sys_service_provider_id,
private_key, public_key)
values (#{configId,jdbcType=BIGINT}, #{appId,jdbcType=VARCHAR}, #{charset,jdbcType=VARCHAR},
#{format,jdbcType=VARCHAR}, #{gatewayUrl,jdbcType=VARCHAR}, #{notifyUrl,jdbcType=VARCHAR},
#{returnUrl,jdbcType=VARCHAR}, #{signType,jdbcType=VARCHAR}, #{sysServiceProviderId,jdbcType=VARCHAR},
#{privateKey,jdbcType=LONGVARCHAR}, #{publicKey,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolAlipayConfigWithBLOBs">
insert into tool_alipay_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="configId != null">
config_id,
</if>
<if test="appId != null">
app_id,
</if>
<if test="charset != null">
charset,
</if>
<if test="format != null">
format,
</if>
<if test="gatewayUrl != null">
gateway_url,
</if>
<if test="notifyUrl != null">
notify_url,
</if>
<if test="returnUrl != null">
return_url,
</if>
<if test="signType != null">
sign_type,
</if>
<if test="sysServiceProviderId != null">
sys_service_provider_id,
</if>
<if test="privateKey != null">
private_key,
</if>
<if test="publicKey != null">
public_key,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="configId != null">
#{configId,jdbcType=BIGINT},
</if>
<if test="appId != null">
#{appId,jdbcType=VARCHAR},
</if>
<if test="charset != null">
#{charset,jdbcType=VARCHAR},
</if>
<if test="format != null">
#{format,jdbcType=VARCHAR},
</if>
<if test="gatewayUrl != null">
#{gatewayUrl,jdbcType=VARCHAR},
</if>
<if test="notifyUrl != null">
#{notifyUrl,jdbcType=VARCHAR},
</if>
<if test="returnUrl != null">
#{returnUrl,jdbcType=VARCHAR},
</if>
<if test="signType != null">
#{signType,jdbcType=VARCHAR},
</if>
<if test="sysServiceProviderId != null">
#{sysServiceProviderId,jdbcType=VARCHAR},
</if>
<if test="privateKey != null">
#{privateKey,jdbcType=LONGVARCHAR},
</if>
<if test="publicKey != null">
#{publicKey,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolAlipayConfigWithBLOBs">
update tool_alipay_config
<set>
<if test="appId != null">
app_id = #{appId,jdbcType=VARCHAR},
</if>
<if test="charset != null">
charset = #{charset,jdbcType=VARCHAR},
</if>
<if test="format != null">
format = #{format,jdbcType=VARCHAR},
</if>
<if test="gatewayUrl != null">
gateway_url = #{gatewayUrl,jdbcType=VARCHAR},
</if>
<if test="notifyUrl != null">
notify_url = #{notifyUrl,jdbcType=VARCHAR},
</if>
<if test="returnUrl != null">
return_url = #{returnUrl,jdbcType=VARCHAR},
</if>
<if test="signType != null">
sign_type = #{signType,jdbcType=VARCHAR},
</if>
<if test="sysServiceProviderId != null">
sys_service_provider_id = #{sysServiceProviderId,jdbcType=VARCHAR},
</if>
<if test="privateKey != null">
private_key = #{privateKey,jdbcType=LONGVARCHAR},
</if>
<if test="publicKey != null">
public_key = #{publicKey,jdbcType=LONGVARCHAR},
</if>
</set>
where config_id = #{configId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolAlipayConfigWithBLOBs">
update tool_alipay_config
set app_id = #{appId,jdbcType=VARCHAR},
charset = #{charset,jdbcType=VARCHAR},
format = #{format,jdbcType=VARCHAR},
gateway_url = #{gatewayUrl,jdbcType=VARCHAR},
notify_url = #{notifyUrl,jdbcType=VARCHAR},
return_url = #{returnUrl,jdbcType=VARCHAR},
sign_type = #{signType,jdbcType=VARCHAR},
sys_service_provider_id = #{sysServiceProviderId,jdbcType=VARCHAR},
private_key = #{privateKey,jdbcType=LONGVARCHAR},
public_key = #{publicKey,jdbcType=LONGVARCHAR}
where config_id = #{configId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolAlipayConfig">
update tool_alipay_config
set app_id = #{appId,jdbcType=VARCHAR},
charset = #{charset,jdbcType=VARCHAR},
format = #{format,jdbcType=VARCHAR},
gateway_url = #{gatewayUrl,jdbcType=VARCHAR},
notify_url = #{notifyUrl,jdbcType=VARCHAR},
return_url = #{returnUrl,jdbcType=VARCHAR},
sign_type = #{signType,jdbcType=VARCHAR},
sys_service_provider_id = #{sysServiceProviderId,jdbcType=VARCHAR}
where config_id = #{configId,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,104 @@
<?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.ToolEmailConfigMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.ToolEmailConfig">
<id column="config_id" jdbcType="BIGINT" property="configId" />
<result column="from_user" jdbcType="VARCHAR" property="fromUser" />
<result column="host" jdbcType="VARCHAR" property="host" />
<result column="pass" jdbcType="VARCHAR" property="pass" />
<result column="port" jdbcType="VARCHAR" property="port" />
<result column="user" jdbcType="VARCHAR" property="user" />
</resultMap>
<sql id="Base_Column_List">
config_id, from_user, host, pass, port, user
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tool_email_config
where config_id = #{configId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from tool_email_config
where config_id = #{configId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolEmailConfig">
insert into tool_email_config (config_id, from_user, host,
pass, port, user)
values (#{configId,jdbcType=BIGINT}, #{fromUser,jdbcType=VARCHAR}, #{host,jdbcType=VARCHAR},
#{pass,jdbcType=VARCHAR}, #{port,jdbcType=VARCHAR}, #{user,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolEmailConfig">
insert into tool_email_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="configId != null">
config_id,
</if>
<if test="fromUser != null">
from_user,
</if>
<if test="host != null">
host,
</if>
<if test="pass != null">
pass,
</if>
<if test="port != null">
port,
</if>
<if test="user != null">
user,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="configId != null">
#{configId,jdbcType=BIGINT},
</if>
<if test="fromUser != null">
#{fromUser,jdbcType=VARCHAR},
</if>
<if test="host != null">
#{host,jdbcType=VARCHAR},
</if>
<if test="pass != null">
#{pass,jdbcType=VARCHAR},
</if>
<if test="port != null">
#{port,jdbcType=VARCHAR},
</if>
<if test="user != null">
#{user,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolEmailConfig">
update tool_email_config
<set>
<if test="fromUser != null">
from_user = #{fromUser,jdbcType=VARCHAR},
</if>
<if test="host != null">
host = #{host,jdbcType=VARCHAR},
</if>
<if test="pass != null">
pass = #{pass,jdbcType=VARCHAR},
</if>
<if test="port != null">
port = #{port,jdbcType=VARCHAR},
</if>
<if test="user != null">
user = #{user,jdbcType=VARCHAR},
</if>
</set>
where config_id = #{configId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolEmailConfig">
update tool_email_config
set from_user = #{fromUser,jdbcType=VARCHAR},
host = #{host,jdbcType=VARCHAR},
pass = #{pass,jdbcType=VARCHAR},
port = #{port,jdbcType=VARCHAR},
user = #{user,jdbcType=VARCHAR}
where config_id = #{configId,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,164 @@
<?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.ToolLocalStorageMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.ToolLocalStorage">
<id column="storage_id" jdbcType="BIGINT" property="storageId" />
<result column="real_name" jdbcType="VARCHAR" property="realName" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="suffix" jdbcType="VARCHAR" property="suffix" />
<result column="path" jdbcType="VARCHAR" property="path" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="size" jdbcType="VARCHAR" property="size" />
<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">
storage_id, real_name, name, suffix, path, type, size, 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 tool_local_storage
where storage_id = #{storageId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from tool_local_storage
where storage_id = #{storageId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolLocalStorage">
insert into tool_local_storage (storage_id, real_name, name,
suffix, path, type,
size, create_by, update_by,
create_time, update_time)
values (#{storageId,jdbcType=BIGINT}, #{realName,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{suffix,jdbcType=VARCHAR}, #{path,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
#{size,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolLocalStorage">
insert into tool_local_storage
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="storageId != null">
storage_id,
</if>
<if test="realName != null">
real_name,
</if>
<if test="name != null">
name,
</if>
<if test="suffix != null">
suffix,
</if>
<if test="path != null">
path,
</if>
<if test="type != null">
type,
</if>
<if test="size != null">
size,
</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="storageId != null">
#{storageId,jdbcType=BIGINT},
</if>
<if test="realName != null">
#{realName,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="suffix != null">
#{suffix,jdbcType=VARCHAR},
</if>
<if test="path != null">
#{path,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="size != null">
#{size,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.ToolLocalStorage">
update tool_local_storage
<set>
<if test="realName != null">
real_name = #{realName,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="suffix != null">
suffix = #{suffix,jdbcType=VARCHAR},
</if>
<if test="path != null">
path = #{path,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="size != null">
size = #{size,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 storage_id = #{storageId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolLocalStorage">
update tool_local_storage
set real_name = #{realName,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
suffix = #{suffix,jdbcType=VARCHAR},
path = #{path,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
size = #{size,jdbcType=VARCHAR},
create_by = #{createBy,jdbcType=VARCHAR},
update_by = #{updateBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where storage_id = #{storageId,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,132 @@
<?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.ToolQiniuConfigMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.ToolQiniuConfig">
<id column="config_id" jdbcType="BIGINT" property="configId" />
<result column="bucket" jdbcType="VARCHAR" property="bucket" />
<result column="host" jdbcType="VARCHAR" property="host" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="zone" jdbcType="VARCHAR" property="zone" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.ToolQiniuConfigWithBLOBs">
<result column="access_key" jdbcType="LONGVARCHAR" property="accessKey" />
<result column="secret_key" jdbcType="LONGVARCHAR" property="secretKey" />
</resultMap>
<sql id="Base_Column_List">
config_id, bucket, host, type, zone
</sql>
<sql id="Blob_Column_List">
access_key, secret_key
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from tool_qiniu_config
where config_id = #{configId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from tool_qiniu_config
where config_id = #{configId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolQiniuConfigWithBLOBs">
insert into tool_qiniu_config (config_id, bucket, host,
type, zone, access_key,
secret_key)
values (#{configId,jdbcType=BIGINT}, #{bucket,jdbcType=VARCHAR}, #{host,jdbcType=VARCHAR},
#{type,jdbcType=VARCHAR}, #{zone,jdbcType=VARCHAR}, #{accessKey,jdbcType=LONGVARCHAR},
#{secretKey,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolQiniuConfigWithBLOBs">
insert into tool_qiniu_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="configId != null">
config_id,
</if>
<if test="bucket != null">
bucket,
</if>
<if test="host != null">
host,
</if>
<if test="type != null">
type,
</if>
<if test="zone != null">
zone,
</if>
<if test="accessKey != null">
access_key,
</if>
<if test="secretKey != null">
secret_key,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="configId != null">
#{configId,jdbcType=BIGINT},
</if>
<if test="bucket != null">
#{bucket,jdbcType=VARCHAR},
</if>
<if test="host != null">
#{host,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="zone != null">
#{zone,jdbcType=VARCHAR},
</if>
<if test="accessKey != null">
#{accessKey,jdbcType=LONGVARCHAR},
</if>
<if test="secretKey != null">
#{secretKey,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolQiniuConfigWithBLOBs">
update tool_qiniu_config
<set>
<if test="bucket != null">
bucket = #{bucket,jdbcType=VARCHAR},
</if>
<if test="host != null">
host = #{host,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="zone != null">
zone = #{zone,jdbcType=VARCHAR},
</if>
<if test="accessKey != null">
access_key = #{accessKey,jdbcType=LONGVARCHAR},
</if>
<if test="secretKey != null">
secret_key = #{secretKey,jdbcType=LONGVARCHAR},
</if>
</set>
where config_id = #{configId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolQiniuConfigWithBLOBs">
update tool_qiniu_config
set bucket = #{bucket,jdbcType=VARCHAR},
host = #{host,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
zone = #{zone,jdbcType=VARCHAR},
access_key = #{accessKey,jdbcType=LONGVARCHAR},
secret_key = #{secretKey,jdbcType=LONGVARCHAR}
where config_id = #{configId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolQiniuConfig">
update tool_qiniu_config
set bucket = #{bucket,jdbcType=VARCHAR},
host = #{host,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
zone = #{zone,jdbcType=VARCHAR}
where config_id = #{configId,jdbcType=BIGINT}
</update>
</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.ToolQiniuContentMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.ToolQiniuContent">
<id column="content_id" jdbcType="BIGINT" property="contentId" />
<result column="bucket" jdbcType="VARCHAR" property="bucket" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="size" jdbcType="VARCHAR" property="size" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="url" jdbcType="VARCHAR" property="url" />
<result column="suffix" jdbcType="VARCHAR" property="suffix" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
content_id, bucket, name, size, type, url, suffix, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tool_qiniu_content
where content_id = #{contentId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from tool_qiniu_content
where content_id = #{contentId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolQiniuContent">
insert into tool_qiniu_content (content_id, bucket, name,
size, type, url, suffix,
update_time)
values (#{contentId,jdbcType=BIGINT}, #{bucket,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{size,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{suffix,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolQiniuContent">
insert into tool_qiniu_content
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="contentId != null">
content_id,
</if>
<if test="bucket != null">
bucket,
</if>
<if test="name != null">
name,
</if>
<if test="size != null">
size,
</if>
<if test="type != null">
type,
</if>
<if test="url != null">
url,
</if>
<if test="suffix != null">
suffix,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="contentId != null">
#{contentId,jdbcType=BIGINT},
</if>
<if test="bucket != null">
#{bucket,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="size != null">
#{size,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="url != null">
#{url,jdbcType=VARCHAR},
</if>
<if test="suffix != null">
#{suffix,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolQiniuContent">
update tool_qiniu_content
<set>
<if test="bucket != null">
bucket = #{bucket,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="size != null">
size = #{size,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="url != null">
url = #{url,jdbcType=VARCHAR},
</if>
<if test="suffix != null">
suffix = #{suffix,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where content_id = #{contentId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolQiniuContent">
update tool_qiniu_content
set bucket = #{bucket,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
size = #{size,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
url = #{url,jdbcType=VARCHAR},
suffix = #{suffix,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where content_id = #{contentId,jdbcType=BIGINT}
</update>
</mapper>