Merge branch 'refs/heads/test' into dev

# Conflicts:
#	src/main/java/com/chaozhanggui/system/cashierservice/controller/OrderController.java
This commit is contained in:
2024-10-22 15:26:31 +08:00
184 changed files with 9089 additions and 4240 deletions

View File

@@ -4,10 +4,10 @@ spring:
application:
name: cashierService
datasource:
url: jdbc:mysql://rm-bp1kn7h89nz62cno1ro.mysql.rds.aliyuncs.com:3306/fycashier_test?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useJDBCCompliantTimezoneShift=true&serverTimezone=Asia/Shanghai&useSSL=false&allowMultiQueries=true
url: jdbc:p6spy:mysql://rm-bp1kn7h89nz62cno1ro.mysql.rds.aliyuncs.com:3306/fycashier_test?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useJDBCCompliantTimezoneShift=true&serverTimezone=Asia/Shanghai&useSSL=false&allowMultiQueries=true
username: cashier
password: Cashier@1@
driver-class-name: com.mysql.cj.jdbc.Driver
driver-class-name: com.p6spy.engine.spy.P6SpyDriver
initialSize: 5
minIdle: 5
maxActive: 20
@@ -17,6 +17,7 @@ spring:
database: 0
# redis服务器地址默认为localhost
host: 101.37.12.135
# host: 127.0.0.1
# redis端口默认为6379
port: 6379
# redis访问密码默认为空
@@ -47,12 +48,17 @@ pagehelper:
mybatis:
configuration:
map-underscore-to-camel-case: true
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
mapper-locations: classpath:mapper/*.xml
subscribe:
message:
miniprogramState: trial
client:
backUrl: https://cashierclient.sxczgkj.cn/cashier-client/notify/notifyPay
thirdPay:
payType: fushangtong
callBack: https://cashierclient.sxczgkj.cn/cashier-client/notify/notifyPay
url: https://paymentapi.sxczgkj.cn

View File

@@ -58,3 +58,9 @@ subscribe:
client:
backUrl: https://pre-cashierclient.sxczgkj.cn/cashier-client/notify/notifyPay
thirdPay:
payType: fushangtong
callBack: https://pre-cashierclient.sxczgkj.cn/cashier-client/notify/notifyPay
url: https://paymentapi.sxczgkj.cn

View File

@@ -58,5 +58,10 @@ subscribe:
message:
miniprogramState: formal
client:
backUrl: https://cashierclient.sxczgkj.cn/cashier-client/notify/notifyPay
thirdPay:
payType: fushangtong
callBack: https://cashierclient.sxczgkj.cn/cashier-client/notify/notifyPay
url: https://paymentapi.sxczgkj.cn

View File

@@ -1,4 +1,6 @@
spring:
jmx:
enabled: false
profiles:
active: dev
server:
@@ -7,11 +9,12 @@ server:
# 日志配置
logging:
level:
# web日志
org.springframework.web: debug
# mybatis日志
mybits: DEBUG
org.apache.ibatis: DEBUG
root: info
org.springframework.web.filter.CommonsRequestLoggingFilter: debug
com.chaozhanggui.system.cashierservice.dao: debug
com.chaozhanggui.system.cashierservice.mapper: debug
com.chaozhanggui.system.cashierservice.mybatis: debug
charset:
# 输出控制台编码
console: UTF-8
@@ -38,12 +41,7 @@ logging:
gateway:
url: https://gateway.api.sxczgkj.cn/gate-service/
client:
backUrl: https://cashierclient.sxczgkj.cn/cashier-client/notify/notifyPay
thirdPay:
payType: fushangtong
callBack: https://cashierclient.sxczgkj.cn/cashier-client/notify/notifyPay
url: https://paymentapi.sxczgkj.cn
wx:
appId: wxd88fffa983758a30
secrete: a34a61adc0602118b49400baa8812454
@@ -60,6 +58,13 @@ wx:
appId: wxd88fffa983758a30
secrete: a34a61adc0602118b49400baa8812454
warnMsgTmpId: AV-KybUHaK3KtFVLqpy6PHccHBS7XeX__mOM4RbufnQ
mini:
page:
call: https://cashier.sxczgkj.cn/make?shopId={}&queueId={}
ali:
appId: 2021004174605036
privateKey: MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQD48HaUoV7OH7os+9L01kHgxzwIhJick4OkFq4aHsntsXEJ J3gedhuEZtV8oHKZ30DPW12IJ4S8NXtpr8OWaqrAPFonf4wVaRY1d0yIAea57kfLEn9oOEEy4FzARgMNDkyxC+/3OUdGbLHpTjfVX3gusXsEhUDy1/WewihAkoNYF37+W3W/uVLzeWoPq0EcUbRv/G/t/p6gL69ltsMAiVFG4Q/Yk24YAN6lYgBPNLXUEwQ1Q+T+1omjfavHgvarKOp33z3JOUH+aGOmDsJ5Y9gyGtJzOCipAd8Zcv+T1ygsEzZYO1/gzcbPnfO1ShqStCHzssuw8FBVx2JdfQKXKMMNAgMBAAECggEAVTrO/pg5Q00titU1Jspsh67u6OOs9H605Ws2dI7yB8VmtAGlaJh7V1t14FN2qSP8poHbhhAxq9aLyGV7C3a9u09udnN+3J28EtYjh7VO732bavWMVXxdJjQWzWWrCb9JlpxFrlkYBA6W4w/6ob0sAqCVQ7jzwbEa0R4cde8ztOa5nysKSfr4YTSs0gqvoiC6fmg8eiRJraEQBoYz9VkKFtOhhh/4w5FhVcYQ2gQvZ3kK3QVuD1eJIQKlCtz8qaox9lXKDiZT4SCmnKshdUL0u5TYIcYeBjZmhJz0Q50KHcpZrCs5y7I0+vRBH3hU+TKSQt7ureymwhbwWMHScLV2gQKBgQD+58SHXhr5M8NGagAmTdsgmCnNv2kOYMd4STyPMY10SVwCv1Bk808ZuP+7e558J1b5/OuDLI5dLq6xrZ/1wLv1G++XqxI00hlFuWS5mUGJVcXotT1mw20rVeUILc7Qe3mLvbMGgfyKf4A7Qa5SSZ4bDeDTJYaFxyiQ281hMzDuPQKBgQD6AiL/Na2/uPH4CG6juwpjYvYVUcjK+7gbRwf3wWsWMpk90Z4ju2iUiP5c1J/oK9P+1T3PIr6M4Xjza8JJj+r9KC/PVB0gBv6vVM96cDpKUEy/UMpcn/T81vqj/Z+WEOODU8Ms6NiTTm+u9ldvpCjbu0u8M+9c0JeIyadJvSTFEQKBgQCsxmFyM3nq8YfpgU2qqNjfBeRH3faSVUy+nj1a/YZYjKS+A/i1BCnYUImeBVNN6chNV342ggvY4xxruDiU9Vcw8wd58O09Oi8BEIFSP6upL6cebUI6Fjo3xlegLJRiwV6INkNTJOYM5hD/mSxUACwXQFfkJipBINXBIgraWD1RLQKBgQCj49axWq0F6+WjZVOyPaD3uh37p9trRUxRhWTxw3fB23WdktaKMgbCqHOmwzP4bRLSEVQtf2dOz1gMqu14b8HqJvgAf/F/11YJ9hz09LEhmjZVjE68HZfqT7uK2W5OX8/lfXmK7TFcj6SjG5YB96lZMhTZ0WnufEd6QkdKDZYXIQKBgQD9GDTcIMbFwbEaKHnfZaTD3f876EGRgsgrCxwdEk7LBCRPwWo7yI929M4psIlpNwNeiyjBkBunWIVkpznp6qPtJqagIPUYesU4f5v6/okq5wcpaNKSkWbIvWVLaLGOiA1aeGJtbpMpyClbSr52puHpRRdvAiIEQ74yYh0JX8q96g==
publicKey: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAiQkrz+emAuS1mB3KKDOMmAZRd/BlPbh7fAIHAqAj1+QCZNcV3o2BTLIIqnuKpSlFXDG3uDzp2VsBxcizXuBbFyPGylnD9CgCj5abyh3+FIHPAZ2IM3TtpqImZ0TSPGXrMli4Nir7MvZktgccCqQKCC4o6iaDGz+UwWwJUIPna8fm2tiTZ+KH150CZbKVj4ZGNpBh5XSV/1dRgyQIV9D/EwSbkZ0n6VgKQLJBi0C2UE3QB17aL1Ir6+gDXIDbknN8O7GUD3aMGdThYdSRUb5wp9CZ5qfV7vCS/CgaRo38nhH3NOzkTL+7v0m1ZDHPmqEkn9VzZN6sCQdL7PoAOjHOCwIDAQAB
mybatis-plus:

View File

@@ -0,0 +1,65 @@
<?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.ShopPrinterServiceMapper">
<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="getList" resultType="com.chaozhanggui.system.cashierservice.entity.dto.ShopPrinterDTO">
select
<include refid="Base_Column_List" />,
<include refid="Blob_Column_List" />
from tb_print_machine
where shop_id = #{shopId}
<if test="name != null and name != ''">
and name like concat(#{name}, '%')
</if>
<if test="type != null and type != ''">
and type = #{type}
</if>
<if test="connectionType != null and connectionType != ''">
and connection_type = #{connectionType}
</if>
<if test="address != null and address != ''">
and address = #{address}
</if>
<if test="port != null and port != ''">
and port = #{port}
</if>
<if test="subType != null and subType != ''">
and sub_type = #{subType}
</if>
<if test="status != null and status != ''">
and status = #{status}
</if>
<if test="categoryIds != null and categoryIds != ''">
and category_ids = #{categoryIds}
</if>
<if test="contentType != null and contentType != ''">
and content_type = #{contentType}
</if>
<if test="config != null and config != ''">
and config = #{config}
</if>
<if test="categoryList != null and categoryList != ''">
and category_list = #{categoryList}
</if>
<if test="vendorId != null and vendorId != ''">
and vendor_id = #{vendorId}
</if>
<if test="productId != null and productId != ''">
and product_id = #{productId}
</if>
order by sort asc,id desc
</select>
<update id="updateStatus">
update tb_print_machine set status = #{status} where id = #{id}
</update>
</mapper>

View File

@@ -0,0 +1,28 @@
<?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.mapper.TbCallConfigMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbCallConfig">
<id property="id" column="id" jdbcType="INTEGER"/>
<result property="pageAddress" column="page_address" jdbcType="VARCHAR"/>
<result property="isOnline" column="is_online" jdbcType="TINYINT"/>
<result property="bgCover" column="bg_cover" jdbcType="VARCHAR"/>
<result property="successMsg" column="success_msg" jdbcType="VARCHAR"/>
<result property="nearMsg" column="near_msg" jdbcType="VARCHAR"/>
<result property="callingMsg" column="calling_msg" jdbcType="VARCHAR"/>
<result property="shopId" column="shop_id" jdbcType="INTEGER"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
<result property="isPostpone" column="is_postpone" jdbcType="TINYINT"/>
<result property="postponeNum" column="postpone_num" jdbcType="INTEGER"/>
</resultMap>
<sql id="Base_Column_List">
id,page_address,is_online,
bg_cover,success_msg,near_msg,
calling_msg,shop_id,create_time,
update_time,is_postpone,postpone_num
</sql>
</mapper>

View File

@@ -0,0 +1,38 @@
<?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.mapper.TbCallQueueMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbCallQueue">
<id property="id" column="id" jdbcType="INTEGER"/>
<result property="callTableId" column="call_table_id" jdbcType="INTEGER"/>
<result property="phone" column="phone" jdbcType="VARCHAR"/>
<result property="name" column="name" jdbcType="VARCHAR"/>
<result property="shopName" column="shop_name" jdbcType="VARCHAR"/>
<result property="shopId" column="shop_id" jdbcType="INTEGER"/>
<result property="state" column="state" jdbcType="TINYINT"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="callTime" column="call_time" jdbcType="TIMESTAMP"/>
<result property="callCount" column="call_count" jdbcType="INTEGER"/>
<result property="passTime" column="pass_time" jdbcType="TIMESTAMP"/>
<result property="cancelTime" column="cancel_time" jdbcType="TIMESTAMP"/>
<result property="note" column="note" jdbcType="VARCHAR"/>
<result property="userId" column="user_id" jdbcType="INTEGER"/>
<result property="openId" column="open_id" jdbcType="VARCHAR"/>
<result property="subState" column="sub_state" jdbcType="TINYINT"/>
<result property="confirmTime" column="confirm_time" jdbcType="TIMESTAMP"/>
<result property="callNum" column="call_num" jdbcType="VARCHAR"/>
<result property="createDay" column="create_day" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
id,call_table_id,phone,
name,shop_name,shop_id,
state,create_time,call_time,
call_count,pass_time,cancel_time,
note,user_id,open_id,
sub_state,confirm_time,call_num,
create_day
</sql>
</mapper>

View File

@@ -0,0 +1,28 @@
<?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.mapper.TbCallTableMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbCallTable">
<id property="id" column="id" jdbcType="INTEGER"/>
<result property="name" column="name" jdbcType="VARCHAR"/>
<result property="note" column="note" jdbcType="VARCHAR"/>
<result property="waitTime" column="wait_time" jdbcType="INTEGER"/>
<result property="prefix" column="prefix" jdbcType="VARCHAR"/>
<result property="start" column="start" jdbcType="INTEGER"/>
<result property="nearNum" column="near_num" jdbcType="INTEGER"/>
<result property="state" column="state" jdbcType="TINYINT"/>
<result property="shopId" column="shop_id" jdbcType="INTEGER"/>
<result property="qrcode" column="qrcode" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
id,name,note,
wait_time,prefix,start,
near_num,state,shop_id,
qrcode,create_time,update_time
</sql>
</mapper>

View File

@@ -80,7 +80,7 @@
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
ifnull(sum(total_amount),0) as totalAmount, order_id as orderId
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">

View File

@@ -12,6 +12,7 @@
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
<result column="shop_id" jdbcType="INTEGER" property="shopId" />
<result column="small_appid" jdbcType="VARCHAR" property="smallAppid" />
<result column="alipay_small_appid" jdbcType="VARCHAR" property="alipaySmallAppid" />
<result column="store_id" jdbcType="VARCHAR" property="storeId" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbMerchantThirdApply">
@@ -19,7 +20,7 @@
</resultMap>
<sql id="Base_Column_List">
id, type, app_id, status, pay_password, applyment_state, created_at, updated_at,
shop_id,small_appid,store_id
shop_id,small_appid,alipay_small_appid,store_id
</sql>
<sql id="Blob_Column_List">
app_token

View File

@@ -611,7 +611,8 @@ select * from tb_order_info where trade_day = #{day} and table_id = #{masterId}
d.product_sku_name AS productSkuName,
c.category_id AS categoryId,
d.price_amount as priceAmount,
d.pack_amount as packAmount
d.pack_amount as packAmount,
d.price as price
FROM
tb_order_detail d
LEFT JOIN tb_cashier_cart c ON d.order_id = c.order_id
@@ -630,7 +631,8 @@ select * from tb_order_info where trade_day = #{day} and table_id = #{masterId}
d.product_sku_name AS productSkuName,
'' AS categoryId,
d.price_amount as priceAmount,
d.pack_amount as packAmount
d.pack_amount as packAmount,
d.price as price
FROM
tb_order_detail d
where d.order_id=#{orderId}

View File

@@ -260,4 +260,8 @@
<select id="selectByOrderId" resultMap="BaseResultMap">
select * from tb_order_payment where order_id=#{orderId}
</select>
<select id="selectListByOrderId" resultType="com.chaozhanggui.system.cashierservice.entity.TbOrderPayment">
select * from tb_order_payment where order_id = #{orderId}
</select>
</mapper>

View File

@@ -0,0 +1,7 @@
<?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.TbPrintMachineLogMapper">
</mapper>

View File

@@ -18,6 +18,14 @@
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="vendor_id" jdbcType="VARCHAR" property="vendorId" />
<result column="product_id" jdbcType="VARCHAR" property="productId" />
<result column="receipt_size" jdbcType="VARCHAR" property="receiptSize" />
<result column="classify_print" jdbcType="VARCHAR" property="classifyPrint" />
<result column="table_print" jdbcType="VARCHAR" property="tablePrint" />
<result column="print_qty" jdbcType="VARCHAR" property="printQty" />
<result column="print_method" jdbcType="VARCHAR" property="printMethod" />
<result column="print_type" jdbcType="VARCHAR" property="printType" />
<result column="print_receipt" jdbcType="VARCHAR" property="printReceipt" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbPrintMachineWithBLOBs">
<result column="config" jdbcType="LONGVARCHAR" property="config" />
@@ -25,7 +33,7 @@
</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
content_type, created_at, updated_at, sort, vendor_id, product_id, receipt_size, classify_print, table_print, print_qty, print_method, print_type, print_receipt
</sql>
<sql id="Blob_Column_List">
config, category_list

View File

@@ -21,11 +21,19 @@
<result property="sort" column="sort" jdbcType="INTEGER"/>
<result property="vendorId" column="vendor_id" jdbcType="VARCHAR"/>
<result property="productId" column="product_id" jdbcType="VARCHAR"/>
<result column="receipt_size" jdbcType="VARCHAR" property="receiptSize" />
<result column="classify_print" jdbcType="VARCHAR" property="classifyPrint" />
<result column="table_print" jdbcType="VARCHAR" property="tablePrint" />
<result column="print_qty" jdbcType="VARCHAR" property="printQty" />
<result column="print_method" jdbcType="VARCHAR" property="printMethod" />
<result column="print_type" jdbcType="VARCHAR" property="printType" />
<result column="print_receipt" jdbcType="VARCHAR" property="printReceipt" />
</resultMap>
<sql id="Base_Column_List">
id
, name, type, connection_type, address, port, sub_type, status, shop_id, category_ids, content_type, config, created_at, updated_at, category_list, sort, vendor_id, product_id </sql>
, name, type, connection_type, address, port, sub_type, status, shop_id, category_ids, content_type, config, created_at, updated_at, category_list, sort, vendor_id, product_id, receipt_size, classify_print, table_print, print_qty, print_method, print_type, print_receipt </sql>
<!--查询单个-->
<select id="queryById" resultMap="TbPrintMachineMap">

View File

@@ -63,6 +63,7 @@
<result column="tax_config_id" jdbcType="VARCHAR" property="taxConfigId" />
<result column="spec_table_headers" jdbcType="VARCHAR" property="specTableHeaders" />
<result column="stock_number" jdbcType="INTEGER" property="stockNumber" />
<result column="warn_line" jdbcType="INTEGER" property="warnLine" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
<result column="images" jdbcType="LONGVARCHAR" property="images" />
@@ -81,7 +82,7 @@
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, stock_number
show_on_mall_error_msg, enable_label, tax_config_id, spec_table_headers, stock_number,warn_line
</sql>
<sql id="Blob_Column_List">
images, video, notice, group_snap, spec_info, select_spec
@@ -120,7 +121,7 @@
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, stock_number
group_snap, spec_info, select_spec, stock_number,warn_line
)
values (#{id,jdbcType=INTEGER}, #{categoryId,jdbcType=VARCHAR}, #{specId,jdbcType=INTEGER},
#{sourcePath,jdbcType=VARCHAR}, #{brandId,jdbcType=INTEGER}, #{merchantId,jdbcType=VARCHAR},
@@ -144,7 +145,7 @@
#{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},
#{stockNumber,jdbcType=INTEGER}
#{stockNumber,jdbcType=INTEGER},#{warnLine,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
@@ -351,6 +352,9 @@
<if test="stockNumber != null">
stock_number,
</if>
<if test="warnLine != null">
warn_line,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@@ -551,9 +555,12 @@
<if test="selectSpec != null">
#{selectSpec,jdbcType=LONGVARCHAR},
</if>
<if test="stockNumber != null">
#{stockNumber,jdbcType=INTEGER},
</if>
<if test="stockNumber != null">
#{stockNumber,jdbcType=INTEGER},
</if>
<if test="warnLine != null">
#{warnLine,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
@@ -754,80 +761,84 @@
<if test="selectSpec != null">
select_spec = #{selectSpec,jdbcType=LONGVARCHAR},
</if>
<if test="stockNumber != null">
stock_number = #{stockNumber,jdbcType=INTEGER},
</if>
<if test="stockNumber != null">
stock_number = #{stockNumber,jdbcType=INTEGER},
</if>
<if test="warnLine != null">
warn_line = #{warnLine,jdbcType=INTEGER},
</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},
stock_number = #{stockNumber,jdbcType=INTEGER}
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},
stock_number = #{stockNumber,jdbcType=INTEGER},
warn_line = #{warnLine,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProduct">
@@ -891,7 +902,8 @@
enable_label = #{enableLabel,jdbcType=TINYINT},
tax_config_id = #{taxConfigId,jdbcType=VARCHAR},
spec_table_headers = #{specTableHeaders,jdbcType=VARCHAR},
stock_number = #{stockNumber,jdbcType=INTEGER}
stock_number = #{stockNumber,jdbcType=INTEGER},
warn_line = #{warnLine,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>

View File

@@ -15,7 +15,6 @@
<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="suit" jdbcType="INTEGER" property="suit" />
<result column="weight" jdbcType="DOUBLE" property="weight" />
<result column="volume" jdbcType="REAL" property="volume" />
@@ -31,7 +30,7 @@
</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,
sale_price, guide_price, strategy_price, stock_number, cover_img, weight,
volume, real_sales_number, first_shared, second_shared, created_at, updated_at,suit
</sql>
<sql id="Blob_Column_List">
@@ -54,7 +53,7 @@
product_id, origin_price, cost_price,
member_price, meal_price, sale_price,
guide_price, strategy_price, stock_number,
cover_img, warn_line, weight,
cover_img, weight,
volume, real_sales_number, first_shared,
second_shared, created_at, updated_at,
spec_info, spec_snap)
@@ -62,7 +61,7 @@
#{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},
#{coverImg,jdbcType=VARCHAR}, #{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})
@@ -109,9 +108,6 @@
<if test="coverImg != null">
cover_img,
</if>
<if test="warnLine != null">
warn_line,
</if>
<if test="weight != null">
weight,
</if>
@@ -180,9 +176,6 @@
<if test="coverImg != null">
#{coverImg,jdbcType=VARCHAR},
</if>
<if test="warnLine != null">
#{warnLine,jdbcType=INTEGER},
</if>
<if test="weight != null">
#{weight,jdbcType=DOUBLE},
</if>
@@ -251,9 +244,6 @@
<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>
@@ -298,7 +288,6 @@
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},
@@ -324,7 +313,6 @@
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},

View File

@@ -143,7 +143,7 @@
<select id="selectByShopIdAndSkuIdAndProductId" resultMap="BaseResultMap">
select * from tb_prosku_con where product_sku_id=#{skuId} and shop_id=#{shopId} and product_id=#{productId} and status=1
select * from tb_prosku_con where product_sku_id=#{skuId} or product_sku_id='0' and shop_id=#{shopId} and product_id=#{productId} and status=1
</select>
<select id="selectByShopIdAndSkuIdAndProductIdAndCheck" resultMap="BaseResultMap">

View File

@@ -51,6 +51,11 @@
<result column="is_member_in" jdbcType="VARCHAR" property="isMemberIn" />
<result column="is_member_return" jdbcType="VARCHAR" property="isMemberReturn" />
<result column="is_table_fee" jdbcType="TINYINT" property="isTableFee" />
<result column="table_fee" jdbcType="DECIMAL" property="tableFee" />
<result column="eat_model" jdbcType="VARCHAR" property="eatModel" />
<result column="small_qrcode" jdbcType="VARCHAR" property="smallQrcode" />
<result column="payment_qrcode" jdbcType="VARCHAR" property="paymentQrcode" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbShopInfo">
<result column="view" jdbcType="LONGVARCHAR" property="view" />
@@ -61,7 +66,8 @@
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,is_custom,is_return,is_member_in,is_member_return
distribute_level, created_at, updated_at, proxy_id,is_custom,is_return,is_member_in,is_member_return,
is_table_fee,table_fee,eat_model,small_qrcode,payment_qrcode
</sql>
<sql id="Blob_Column_List">
view

View File

@@ -230,7 +230,8 @@
</select>
<select id="selectTableInfo" resultType="com.chaozhanggui.system.cashierservice.entity.vo.TbShopTableVO">
select a.*, b.user_id, b.master_id, b.id as orderId, b.order_no as orderNo, b.amount as orderAmount from tb_shop_table a
left join tb_order_info b on a.qrcode=b.table_id and (b.`status`='unpaid') and b.master_id is not null and b.shop_id=#{shopId} and b.trade_day=#{day} and b.use_type='postPay' and b.order_type='cash'
left join tb_order_info b on a.qrcode=b.table_id and (b.`status`='unpaid') and b.master_id is not null
and b.shop_id=#{shopId} and b.trade_day=#{day} and b.use_type!='takeout' and b.order_type='cash' and b.created_at > UNIX_TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 1 DAY)) * 1000
where a.shop_id=#{shopId}
<if test="areaId != null and areaId !=''">
and a.area_id = #{areaId}

View File

@@ -32,12 +32,13 @@
<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" />
<result column="join_time" jdbcType="VARCHAR" property="joinTime" />
</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,dynamic_code
sort, created_at, updated_at, mini_open_id,dynamic_code,join_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
@@ -59,7 +60,7 @@
code, is_attention, attention_at,
is_shareholder, level, distribute_type,
sort, created_at, updated_at,
mini_open_id)
mini_open_id,join_time)
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},
@@ -69,7 +70,7 @@
#{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})
#{miniOpenId,jdbcType=VARCHAR},#{joinTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUser">
insert into tb_shop_user
@@ -158,6 +159,9 @@
<if test="miniOpenId != null">
mini_open_id,
</if>
<if test="joinTime != null">
join_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@@ -244,6 +248,9 @@
<if test="miniOpenId != null">
#{miniOpenId,jdbcType=VARCHAR},
</if>
<if test="joinTime != null">
#{joinTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUser">
@@ -330,6 +337,9 @@
<if test="miniOpenId != null">
mini_open_id = #{miniOpenId,jdbcType=VARCHAR},
</if>
<if test="joinTime != null">
join_time = #{joinTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
@@ -361,7 +371,8 @@
sort = #{sort,jdbcType=INTEGER},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
mini_open_id = #{miniOpenId,jdbcType=VARCHAR}
mini_open_id = #{miniOpenId,jdbcType=VARCHAR},
join_time = #{joinTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>

View File

@@ -0,0 +1,32 @@
#??????????
modulelist=com.baomidou.mybatisplus.extension.p6spy.MybatisPlusLogFactory,com.p6spy.engine.outage.P6OutageFactory
#??????????
logMessageFormat=com.baomidou.mybatisplus.extension.p6spy.P6SpyLogger
#?????? ????
#appender=com.baomidou.mybatisplus.extension.p6spy.StdoutLogger
#??????? SLF4J ????
#appender=com.p6spy.engine.spy.appender.Slf4JLogger
#??????? file??
appender=com.p6spy.engine.spy.appender.FileLogger
#??????????
logfile=sql.log
#???? JDBC ???????????
#deregisterdrivers=true
#??????????????
useprefix=true
#?????????????????????
excludecategories=info,debug,result,commit,resultset
#?????????????
dateformat=yyyy-MM-dd HH:mm:ss
#??????????????
databaseDialectTimestampFormat=yyyy-MM-dd HH:mm:ss
#?? JDBC ??????
#driverlist=org.h2.Driver
#??????
outagedetection=true
#??????????????????
outagedetectioninterval=2
#?? SQL ????
filter=true
#?????? "SELECT 1" ? SQL ??
exclude=SELECT 1