商品后台接口统一字段

This commit is contained in:
2024-12-12 09:00:51 +08:00
parent 956fc602a7
commit 7466b3dc06
60 changed files with 79625 additions and 1 deletions

3
README.md Normal file
View File

@@ -0,0 +1,3 @@
# yxt-ordermall-biz
预约提货商城系统系统后台业务

View File

@@ -0,0 +1,26 @@
DROP TABLE IF EXISTS `applet_banner`;
CREATE TABLE `applet_banner` (
`id` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号',
`sid` VARCHAR(64) NOT NULL COMMENT 'sid',
`createTime` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
`remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息',
`isEnable` INT(11) NULL DEFAULT '1' COMMENT '是否可用 1显示 2 不显示',
`bannerUrl` VARCHAR(1024) NULL DEFAULT NULL COMMENT '轮播图完整URL',
`bannerPath` VARCHAR(1024) NULL DEFAULT NULL COMMENT '轮播图相对地址',
`title` VARCHAR(255) NULL DEFAULT NULL COMMENT '标题',
`content` TEXT NULL DEFAULT NULL COMMENT '内容',
`startDate` DATETIME NULL DEFAULT NULL COMMENT '开始时间',
`endDate` DATETIME NULL DEFAULT NULL COMMENT '结束时间',
`sort` int DEFAULT 1,
`releaseTime` DATETIME NULL DEFAULT NULL COMMENT '发布时间',
`publisher` VARCHAR(255) NULL DEFAULT NULL COMMENT '发布人',
`isShow` VARCHAR(255) NULL DEFAULT '1' COMMENT '是否显示 1 显示 2不显示',
`contentUrl` VARCHAR(1024) NULL DEFAULT NULL COMMENT '内容图片URL',
PRIMARY KEY (`id`) USING BTREE
) COMMENT='小程序轮播图' ENGINE=InnoDB;
-- alter table applet_banner add `contentUrl` VARCHAR(1024) NULL DEFAULT NULL COMMENT '内容图片URL';

View File

@@ -0,0 +1,2 @@
alter table lpk_customer convert to character set utf8 collate utf8_general_ci

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,3 @@
ALTER TABLE pms_brand ADD qssl int default 0 COMMENT '起始销售数量';
ALTER TABLE pms_brand ADD dgxy varchar(255) DEFAULT NULL COMMENT '订购协议';

View File

@@ -0,0 +1,30 @@
DROP TABLE IF EXISTS `vege_replenish`;
CREATE TABLE `vege_replenish` (
`id` BIGINT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号',
`sid` VARCHAR(64) NOT NULL COMMENT 'sid',
`createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
`remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息',
`cardCode` VARCHAR(255) NULL DEFAULT NULL COMMENT '卡编码,个人卡、企业卡是卡编码,转赠记录的是转赠编码',
`customerSid` VARCHAR(100) NULL DEFAULT NULL COMMENT '绑卡人',
`cardtype` VARCHAR(255) NULL DEFAULT 0 COMMENT '0 个人卡 1 企业卡 2 转赠的',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB COMMENT='绑卡记录';
DROP TABLE IF EXISTS `vege_replenish_detail`;
CREATE TABLE `vege_replenish_detail` (
`id` BIGINT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号',
`sid` VARCHAR(64) NOT NULL COMMENT 'sid',
`createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
`remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息',
`orderSid` VARCHAR(100) NULL DEFAULT NULL COMMENT '订单SID',
`goodsSid` VARCHAR(100) NULL DEFAULT NULL COMMENT '商品Sid',
`goodsName` VARCHAR(100) NULL DEFAULT NULL COMMENT '商品名称',
`goodsNumber` INT(10) NULL DEFAULT '1' COMMENT '商品数量',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB COMMENT='绑卡记录商品信息';

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,5 @@
ALTER TABLE lpk_goods ADD brandId bigint default NULL COMMENT '品牌ID';
ALTER TABLE lpk_goods ADD brandName varchar(255) DEFAULT NULL COMMENT '品牌名称';
ALTER TABLE lpk_goods ADD categoryId bigint DEFAULT NULL COMMENT '类别ID';
ALTER TABLE lpk_goods ADD categoryName varchar(255) DEFAULT NULL COMMENT '类别名称';

View File

@@ -0,0 +1,371 @@
-- 个人卡
CREATE TABLE tmp_cust_goods(
SELECT
r.wxMpOpenid,
d.customerSid,
d.bindDate,
d.giftbagSid,
d.serialNumber,
d.code,
s.goodsSid,
s.goodsNumber,
e.NAME AS goodsName,
'个人卡' cardtype
FROM lpk_giftcard d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN lpk_giftbag_goods s ON s.giftbagSid=d.giftbagSid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid IS NOT NULL AND d.customerSid <> ''
ORDER BY r.wxMpOpenid
);
-- 企业卡
INSERT INTO tmp_cust_goods
SELECT
r.wxMpOpenid,
d.customerSid,
d.bindDate,
d.giftbagSid,
d.serialNumber,
d.code,
s.goodsSid,
s.goodsNumber,
e.NAME AS goodsName,
'企业卡' cardtype
FROM emp_card d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN lpk_giftbag_goods s ON s.giftbagSid=d.giftbagSid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid IS NOT NULL AND d.customerSid <> ''
ORDER BY r.wxMpOpenid;
-- 购买卡
INSERT INTO tmp_cust_goods
SELECT
r.wxMpOpenid,
d.customerSid,
d.bindDate,
d.sid,
d.serialNumber,
d.code,
s.goodsSid,
s.goodsNumber,
e.NAME AS goodsName,
'购买卡' cardtype
FROM emp_card_gift d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN emp_card_gift_goods s ON s.empCardGiftSid=d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid IS NOT NULL AND d.customerSid <> '' AND d.isSenior = '1'
ORDER BY r.wxMpOpenid;
-- 转赠卡
INSERT INTO tmp_cust_goods
SELECT
r.wxMpOpenid,
d.customerSid,
d.bindDate,
d.sid,
d.serialNumber,
d.code,
s.goodsSid,
s.goodsNumber,
e.NAME AS goodsName,
'转赠卡' cardtype
FROM emp_card_gift d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN emp_card_gift_goods s ON s.empCardGiftSid=d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid IS NOT NULL AND d.customerSid <> '' AND d.isSenior = '2'
ORDER BY r.wxMpOpenid;
-- 预约提货,数量为负值
INSERT INTO tmp_cust_goods
SELECT
r.wxMpOpenid,
d.customerSid,
d.reserveDate,
d.sid,
d.storeSid,
d.cardCode,
s.goodsSid,
-s.goodsNumber AS goodsNumber,
e.NAME AS goodsName,
d.cardType cardtype
FROM lpk_reserve_order d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN lpk_reserve_order_goods s ON s.orderSid=d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE 1=1
ORDER BY r.wxMpOpenid;
-- 赠出的卡,数量为负值
INSERT INTO tmp_cust_goods
SELECT
r.wxMpOpenid,
d.empCardCustomerSid,
d.grantDate,
d.sid,
d.serialNumber,
d.code,
s.goodsSid,
-s.goodsNumber AS goodsNumber,
e.NAME AS goodsName,
'赠出' cardtype
FROM emp_card_gift d
LEFT JOIN lpk_customer r ON r.sid = d.empCardCustomerSid
LEFT JOIN emp_card_gift_goods s ON s.empCardGiftSid=d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.empCardCustomerSid IS NOT NULL AND d.empCardCustomerSid <> '' AND d.isSenior = '2'
ORDER BY r.wxMpOpenid;
select * from tmp_cust_goods;
-- 统计
INSERT INTO vegetable_cellar(sid,customerSid,goodsSid,goodsNumber)
SELECT
UUID(),
customerSid,
goodsSid,
SUM(goodsNumber) AS goodsNumber
FROM tmp_cust_goods
GROUP BY customerSid,goodsSid
HAVING goodsNumber>0
update vegetable_cellar vc set affiliation=(select brandId from lpk_goods lg where vc.goodsSid=lg.sid) where 1=1
聂金义:
默认名称为“惠享客户000142”
聂金义:
把“小主”换成“惠享客户”
SELECT * FROM lpk_customer WHERE nick LIKE '小主%'
SELECT * FROM lpk_customer WHERE nick IS NOT NULL
UPDATE lpk_customer set nick=REPLACE(nick,'小主','惠享客户') WHERE nick LIKE '小主%'
SELECT * FROM lpk_goods WHERE sid='ac146c0f-9002-4203-8f59-ff7c46d3159c'
SELECT * FROM lpk_goods WHERE sid IN (
SELECT goodsSid FROM vegetable_cellar WHERE affiliation IS NULL GROUP BY goodsSid
)
SELECT * FROM lpk_giftcard WHERE serialNumber='00000010'
SELECT * FROM lpk_customer WHERE sid='e0f2b745-8055-48bc-a506-ff09dd82ddb5'
SELECT * FROM lpk_giftbag WHERE sid='8e667618-63de-480c-ad1e-2747b76aa99b'
SELECT * FROM lpk_giftbag_goods lgg
LEFT join lpk_goods lg on lg.sid=lgg.goodsSid
WHERE lgg.giftbagSid='8e667618-63de-480c-ad1e-2747b76aa99b'
SELECT * FROM lpk_giftcard WHERE serialNumber in(
'00000001',
'00000002',
'00000003',
'00000004',
'00000005',
'00000006',
'00000007',
'00000008',
'00000009',
'00000010',
'00000011',
'00000012',
'00000013',
'00000014',
'00000015',
'00000016',
'00000017',
'00000018',
'00000019',
'00000020'
)
SELECT
r.wxMpOpenid,
serialNumber,customerSid,giftbagSid
FROM lpk_giftcard lg
LEFT JOIN lpk_customer r ON r.sid = lg.customerSid
WHERE serialNumber in(
'00000001',
'00000002',
'00000003',
'00000004',
'00000005',
'00000006',
'00000007',
'00000008',
'00000009',
'00000010',
'00000011',
'00000012',
'00000013',
'00000014',
'00000015',
'00000016',
'00000017',
'00000018',
'00000019',
'00000020'
)
"wxMpOpenid" "serialNumber" "customerSid" "giftbagSid"
"o81zC6xQKV_Rau7cntsaUwOkf9NM" "00000013" "c89f8631-e401-4010-a223-0caf3fabd5c6" "8e667618-63de-480c-ad1e-2747b76aa99b"
"o81zC6xQKV_Rau7cntsaUwOkf9NM" "00000015" "c89f8631-e401-4010-a223-0caf3fabd5c6" "8e667618-63de-480c-ad1e-2747b76aa99b"
"o81zC65z6tNd5L6ximemKJKBc-4w" "00000010" "e0f2b745-8055-48bc-a506-ff09dd82ddb5" "8e667618-63de-480c-ad1e-2747b76aa99b"
"o81zC610j5hKap2qQL_IxskermLY" "00000006" "a43573f1-e94f-455c-ad5d-3979bf56864e" "8e667618-63de-480c-ad1e-2747b76aa99b"
"o81zC610j5hKap2qQL_IxskermLY" "00000008" "a43573f1-e94f-455c-ad5d-3979bf56864e" "8e667618-63de-480c-ad1e-2747b76aa99b"
"o81zC6xZjXUAHJqbEkeHtec2vPPo" "00000001" "e157745c-856a-472d-a81e-2975312bf171" "8e667618-63de-480c-ad1e-2747b76aa99b"
"o81zC60V3ymrfjgK-BifvcyWfJBo" "00000014" "05ba58d6-f1f0-4f68-9bcc-62ceeaf4c088" "8e667618-63de-480c-ad1e-2747b76aa99b"
"o81zC6xfASEwu63AUvjeeJ6_t4oU" "00000002" "e569243c-1830-4316-8b4e-d4568b5a151d" "8e667618-63de-480c-ad1e-2747b76aa99b"
\N "00000003" "" "8e667618-63de-480c-ad1e-2747b76aa99b"
\N "00000004" "" "8e667618-63de-480c-ad1e-2747b76aa99b"
\N "00000005" "" "8e667618-63de-480c-ad1e-2747b76aa99b"
\N "00000007" "" "8e667618-63de-480c-ad1e-2747b76aa99b"
\N "00000009" "" "8e667618-63de-480c-ad1e-2747b76aa99b"
\N "00000011" "" "8e667618-63de-480c-ad1e-2747b76aa99b"
\N "00000012" "" "8e667618-63de-480c-ad1e-2747b76aa99b"
"serialNumber" "customerSid" "giftbagSid"
"00000001" "e157745c-856a-472d-a81e-2975312bf171" "8e667618-63de-480c-ad1e-2747b76aa99b"
"00000002" "e569243c-1830-4316-8b4e-d4568b5a151d" "8e667618-63de-480c-ad1e-2747b76aa99b"
"00000006" "a43573f1-e94f-455c-ad5d-3979bf56864e" "8e667618-63de-480c-ad1e-2747b76aa99b"
"00000008" "a43573f1-e94f-455c-ad5d-3979bf56864e" "8e667618-63de-480c-ad1e-2747b76aa99b"
"00000010" "e0f2b745-8055-48bc-a506-ff09dd82ddb5" "8e667618-63de-480c-ad1e-2747b76aa99b"
"00000013" "c89f8631-e401-4010-a223-0caf3fabd5c6" "8e667618-63de-480c-ad1e-2747b76aa99b"
"00000014" "05ba58d6-f1f0-4f68-9bcc-62ceeaf4c088" "8e667618-63de-480c-ad1e-2747b76aa99b"
"00000015" "c89f8631-e401-4010-a223-0caf3fabd5c6" "8e667618-63de-480c-ad1e-2747b76aa99b"
SELECT COUNT(1) FROM vegetable_cellar; -- 970
select * from vegetable_cellar where customerSid='a43573f1-e94f-455c-ad5d-3979bf56864e'; -- 14
delete FROM vegetable_cellar where customerSid='a43573f1-e94f-455c-ad5d-3979bf56864e';
SELECT * FROM tmp_cust_goods WHERE customerSid='a43573f1-e94f-455c-ad5d-3979bf56864e';
INSERT INTO vegetable_cellar(sid,customerSid,goodsSid,goodsNumber)
SELECT
UUID(),
customerSid,
goodsSid,
SUM(goodsNumber) AS goodsNumber
FROM tmp_cust_goods
where customerSid='a43573f1-e94f-455c-ad5d-3979bf56864e' and serialNumber not in ('00000006','00000008')
GROUP BY customerSid,goodsSid
HAVING goodsNumber>0
SELECT COUNT(1) FROM vegetable_cellar; -- 970
select * from vegetable_cellar where customerSid='c89f8631-e401-4010-a223-0caf3fabd5c6'; -- 17
delete FROM vegetable_cellar where customerSid='c89f8631-e401-4010-a223-0caf3fabd5c6';
SELECT * FROM tmp_cust_goods WHERE customerSid='c89f8631-e401-4010-a223-0caf3fabd5c6';
INSERT INTO vegetable_cellar(sid,customerSid,goodsSid,goodsNumber)
SELECT
UUID(),
customerSid,
goodsSid,
SUM(goodsNumber) AS goodsNumber
FROM tmp_cust_goods
where customerSid='c89f8631-e401-4010-a223-0caf3fabd5c6' and serialNumber not in ('00000013','00000015')
GROUP BY customerSid,goodsSid
HAVING goodsNumber>0
SELECT COUNT(1) FROM vegetable_cellar; -- 958
select * from vegetable_cellar where customerSid='05ba58d6-f1f0-4f68-9bcc-62ceeaf4c088'; -- 14
delete FROM vegetable_cellar where customerSid='05ba58d6-f1f0-4f68-9bcc-62ceeaf4c088';
SELECT * FROM tmp_cust_goods WHERE customerSid='05ba58d6-f1f0-4f68-9bcc-62ceeaf4c088';
INSERT INTO vegetable_cellar(sid,customerSid,goodsSid,goodsNumber)
SELECT
UUID(),
customerSid,
goodsSid,
SUM(goodsNumber) AS goodsNumber
FROM tmp_cust_goods
where customerSid='05ba58d6-f1f0-4f68-9bcc-62ceeaf4c088' and serialNumber not in ('00000014')
GROUP BY customerSid,goodsSid
HAVING goodsNumber>0
delete FROM vegetable_cellar where customerSid='e157745c-856a-472d-a81e-2975312bf171';
INSERT INTO vegetable_cellar(sid,customerSid,goodsSid,goodsNumber)
SELECT
UUID(),
customerSid,
goodsSid,
SUM(goodsNumber) AS goodsNumber
FROM tmp_cust_goods
where customerSid='e157745c-856a-472d-a81e-2975312bf171' and serialNumber not in ('00000001')
GROUP BY customerSid,goodsSid
HAVING goodsNumber>0
delete FROM vegetable_cellar where customerSid='e569243c-1830-4316-8b4e-d4568b5a151d';
INSERT INTO vegetable_cellar(sid,customerSid,goodsSid,goodsNumber)
SELECT
UUID(),
customerSid,
goodsSid,
SUM(goodsNumber) AS goodsNumber
FROM tmp_cust_goods
where customerSid='e569243c-1830-4316-8b4e-d4568b5a151d' and serialNumber not in ('00000002')
GROUP BY customerSid,goodsSid
HAVING goodsNumber>0
delete FROM vegetable_cellar where customerSid='e0f2b745-8055-48bc-a506-ff09dd82ddb5';
INSERT INTO vegetable_cellar(sid,customerSid,goodsSid,goodsNumber)
SELECT
UUID(),
customerSid,
goodsSid,
SUM(goodsNumber) AS goodsNumber
FROM tmp_cust_goods
where customerSid='e0f2b745-8055-48bc-a506-ff09dd82ddb5' and serialNumber not in ('00000010')
GROUP BY customerSid,goodsSid
HAVING goodsNumber>0

View File

@@ -0,0 +1,158 @@
-- 个人卡
CREATE TABLE tmp_cust_goods(
SELECT
r.wxMpOpenid,
d.customerSid,
d.bindDate,
d.giftbagSid,
d.serialNumber,
d.code,
s.goodsSid,
s.goodsNumber,
e.NAME AS goodsName,
'个人卡' cardtype
FROM lpk_giftcard d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN lpk_giftbag_goods s ON s.giftbagSid=d.giftbagSid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid IS NOT NULL AND d.customerSid <> ''
ORDER BY r.wxMpOpenid
);
select count(1) from tmp_cust_goods; -- 5080
-- 企业卡
INSERT INTO tmp_cust_goods
SELECT
r.wxMpOpenid,
d.customerSid,
d.bindDate,
d.giftbagSid,
d.serialNumber,
d.code,
s.goodsSid,
s.goodsNumber,
e.NAME AS goodsName,
'企业卡' cardtype
FROM emp_card d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN lpk_giftbag_goods s ON s.giftbagSid=d.giftbagSid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid IS NOT NULL AND d.customerSid <> ''
ORDER BY r.wxMpOpenid;
select count(1) from tmp_cust_goods; -- 5256
-- 购买卡
INSERT INTO tmp_cust_goods
SELECT
r.wxMpOpenid,
d.customerSid,
d.bindDate,
d.sid,
d.serialNumber,
d.code,
s.goodsSid,
s.goodsNumber,
e.NAME AS goodsName,
'购买卡' cardtype
FROM emp_card_gift d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN emp_card_gift_goods s ON s.empCardGiftSid=d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid IS NOT NULL AND d.customerSid <> '' AND d.isSenior = '1'
ORDER BY r.wxMpOpenid;
select count(1) from tmp_cust_goods; -- 5325
-- 转赠卡
INSERT INTO tmp_cust_goods
SELECT
r.wxMpOpenid,
d.customerSid,
d.bindDate,
d.sid,
d.serialNumber,
d.code,
s.goodsSid,
s.goodsNumber,
e.NAME AS goodsName,
'转赠卡' cardtype
FROM emp_card_gift d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN emp_card_gift_goods s ON s.empCardGiftSid=d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid IS NOT NULL AND d.customerSid <> '' AND d.isSenior = '2'
ORDER BY r.wxMpOpenid;
select count(1) from tmp_cust_goods; -- 5652
-- 预约提货,数量为负值
INSERT INTO tmp_cust_goods
SELECT
r.wxMpOpenid,
d.customerSid,
d.reserveDate,
d.sid,
d.storeSid,
d.cardCode,
s.goodsSid,
-s.goodsNumber AS goodsNumber,
e.NAME AS goodsName,
d.cardType cardtype
FROM lpk_reserve_order d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN lpk_reserve_order_goods s ON s.orderSid=d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE 1=1
ORDER BY r.wxMpOpenid;
select count(1) from tmp_cust_goods; -- 10917
-- 赠出的卡,数量为负值
INSERT INTO tmp_cust_goods
SELECT
r.wxMpOpenid,
d.empCardCustomerSid,
d.grantDate,
d.sid,
d.serialNumber,
d.code,
s.goodsSid,
-s.goodsNumber AS goodsNumber,
e.NAME AS goodsName,
'赠出' cardtype
FROM emp_card_gift d
LEFT JOIN lpk_customer r ON r.sid = d.empCardCustomerSid
LEFT JOIN emp_card_gift_goods s ON s.empCardGiftSid=d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.empCardCustomerSid IS NOT NULL AND d.empCardCustomerSid <> '' AND d.isSenior = '2'
ORDER BY r.wxMpOpenid;
select count(1) from tmp_cust_goods; -- 11292
select * from tmp_cust_goods;
delete from vegetable_cellar where 1=1;
-- 统计
INSERT INTO vegetable_cellar(sid,customerSid,goodsSid,goodsNumber)
SELECT
UUID(),
customerSid,
goodsSid,
SUM(goodsNumber) AS goodsNumber
FROM tmp_cust_goods
GROUP BY customerSid,goodsSid
HAVING goodsNumber>0
update vegetable_cellar vc set affiliation=(select brandId from lpk_goods lg where vc.goodsSid=lg.sid) where 1=1

View File

@@ -0,0 +1,87 @@
-- 微信用户数-日
SELECT
COUNT(1) 日增加微信用户数
FROM lpk_customer lc
WHERE date(lc.createTime)='2024-01-30'
-- 微信用户数-累计
SELECT
COUNT(1) 微信用户总数
FROM lpk_customer lc
-- 购买人数-日 指定日期线上下单加上绑定个人卡和企业卡的用户数(同一用户记一条)
SELECT COUNT(1) FROM (
SELECT
oo.openId openid
FROM ord_order oo
WHERE oo.payStatus=4 AND date(oo.payTime)='2024-01-30'
UNION
SELECT
lc.wxMpOpenid openid
FROM emp_card ec
LEFT JOIN lpk_customer lc ON lc.sid = ec.customerSid
WHERE ec.customerSid IS NOT NULL AND ec.customerSid <> ''
AND date(ec.bindDate)='2024-01-30'
UNION
SELECT
lc.wxMpOpenid openid
FROM lpk_giftcard lg
LEFT JOIN lpk_customer lc ON lc.sid = lg.customerSid
WHERE lg.customerSid IS NOT NULL AND lg.customerSid <> ''
AND date(lg.bindDate)='2024-01-30'
) t1
-- 购买人数-累计 线上下单加上绑定个人卡和企业卡的用户数(同一用户记一条)
SELECT COUNT(1) FROM (
SELECT
oo.openId openid
FROM ord_order oo WHERE oo.payStatus=4
UNION
SELECT
lc.wxMpOpenid openid
FROM emp_card ec
LEFT JOIN lpk_customer lc ON lc.sid = ec.customerSid
WHERE ec.customerSid IS NOT NULL AND ec.customerSid <> ''
UNION
SELECT
lc.wxMpOpenid openid
FROM lpk_giftcard lg
LEFT JOIN lpk_customer lc ON lc.sid = lg.customerSid
WHERE lg.customerSid IS NOT NULL AND lg.customerSid <> ''
) t1
-- 复购用户数-累计
SELECT COUNT(1) FROM (
SELECT openid,COUNT(1) num FROM (
SELECT
oo.openId openid
FROM ord_order oo WHERE oo.payStatus=4
UNION ALL
SELECT
lc.wxMpOpenid openid
FROM emp_card ec
LEFT JOIN lpk_customer lc ON lc.sid = ec.customerSid
WHERE ec.customerSid IS NOT NULL AND ec.customerSid <> ''
UNION ALL
SELECT
lc.wxMpOpenid openid
FROM lpk_giftcard lg
LEFT JOIN lpk_customer lc ON lc.sid = lg.customerSid
WHERE lg.customerSid IS NOT NULL AND lg.customerSid <> ''
) t GROUP BY openid
) tt WHERE tt.num>1
-- 两次以上提货用户数-累计
SELECT COUNT(1) FROM (
SELECT openid,COUNT(1) num FROM (
SELECT
lc.wxMpOpenid openid
FROM lpk_reserve_order lro
LEFT JOIN lpk_customer lc ON lc.sid = lro.customerSid
UNION ALL
SELECT
lc.wxMpOpenid openid
FROM vege_cellar_reserve_order vcro
LEFT JOIN lpk_customer lc ON lc.sid = vcro.customerSid
) t GROUP BY t.openid
) tt WHERE tt.num>1

View File

@@ -0,0 +1,87 @@
-- 微信用户数-日
SELECT
COUNT(1) 日增加微信用户数
FROM lpk_customer lc
WHERE lc.createTime>='2024-01-30' AND lc.createTime<'2024-01-31'
-- 微信用户数-累计
SELECT
COUNT(1) 微信用户总数
FROM lpk_customer lc
-- 购买人数-日 指定日期线上下单加上绑定个人卡和企业卡的用户数(同一用户记一条)
SELECT COUNT(1) FROM (
SELECT
oo.openId openid
FROM ord_order oo
WHERE oo.payStatus=4 AND oo.payTime>='2024-01-30' AND oo.payTime<'2024-01-31'
UNION
SELECT
lc.wxMpOpenid openid
FROM emp_card ec
LEFT JOIN lpk_customer lc ON lc.sid = ec.customerSid
WHERE ec.customerSid IS NOT NULL AND ec.customerSid <> ''
AND ec.bindDate>='2024-01-30' AND ec.bindDate<'2024-01-31'
UNION
SELECT
lc.wxMpOpenid openid
FROM lpk_giftcard lg
LEFT JOIN lpk_customer lc ON lc.sid = lg.customerSid
WHERE lg.customerSid IS NOT NULL AND lg.customerSid <> ''
AND lg.bindDate>='2024-01-30' AND lg.bindDate<'2024-01-31'
) t1
-- 购买人数-累计 线上下单加上绑定个人卡和企业卡的用户数(同一用户记一条)
SELECT COUNT(1) FROM (
SELECT
oo.openId openid
FROM ord_order oo
UNION
SELECT
lc.wxMpOpenid openid
FROM emp_card ec
LEFT JOIN lpk_customer lc ON lc.sid = ec.customerSid
WHERE ec.customerSid IS NOT NULL AND ec.customerSid <> ''
UNION
SELECT
lc.wxMpOpenid openid
FROM lpk_giftcard lg
LEFT JOIN lpk_customer lc ON lc.sid = lg.customerSid
WHERE lg.customerSid IS NOT NULL AND lg.customerSid <> ''
) t1
-- 复购用户数-累计
SELECT COUNT(1) FROM (
SELECT openid,COUNT(1) num FROM (
SELECT
oo.openId openid
FROM ord_order oo
UNION ALL
SELECT
lc.wxMpOpenid openid
FROM emp_card ec
LEFT JOIN lpk_customer lc ON lc.sid = ec.customerSid
WHERE ec.customerSid IS NOT NULL AND ec.customerSid <> ''
UNION ALL
SELECT
lc.wxMpOpenid openid
FROM lpk_giftcard lg
LEFT JOIN lpk_customer lc ON lc.sid = lg.customerSid
WHERE lg.customerSid IS NOT NULL AND lg.customerSid <> ''
) t GROUP BY openid
) tt WHERE tt.num>1
-- 两次以上提货用户数-累计
SELECT COUNT(1) FROM (
SELECT openid,COUNT(1) num FROM (
SELECT
lc.wxMpOpenid openid
FROM lpk_reserve_order lro
LEFT JOIN lpk_customer lc ON lc.sid = lro.customerSid
UNION ALL
SELECT
lc.wxMpOpenid openid
FROM vege_cellar_reserve_order vcro
LEFT JOIN lpk_customer lc ON lc.sid = vcro.customerSid
) t GROUP BY t.openid
) tt WHERE tt.num>1

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,11 @@
SELECT
lc.createTime 创建时间,
lc.wxMpOpenid 微信openid,
lc.nick 用户昵称,
lc.mobile 用户电话,
lc.realName 真实姓名,
lcb.name 推荐支行
FROM lpk_customer lc
left join lpk_customer_bank lcb on lcb.sid=lc.customerBankSid
ORDER BY lc.createTime

View File

@@ -0,0 +1,10 @@
SELECT
oo.payTime 支付时间,
oo.meet 支付金额,
oo.openId 微信Openid,
lc.nick 用户昵称,
lc.mobile 用户电话
FROM ord_order oo
LEFT JOIN lpk_customer lc ON lc.sid=oo.userSid
WHERE oo.payStatus=4
ORDER BY oo.payTime

220
docs/databases/统计.sql Normal file
View File

@@ -0,0 +1,220 @@
-- 指定日期线上支付信息
SELECT
oo.payTime 支付时间,
oo.meet 支付金额,
oo.openId 微信Openid,
lc.nick 用户昵称,
lc.mobile 用户电话
FROM ord_order oo
LEFT JOIN lpk_customer lc ON lc.sid=oo.userSid
WHERE oo.payStatus=4 AND oo.payTime>='2024-01-30' AND oo.payTime<'2024-01-31';
-- 指定日期线上支付信息含商品信息
SELECT
oo.outTradeNo 订单编号,
oo.payTime 支付时间,
oo.meet 支付金额,
oo.openId 微信Openid,
lc.nick 用户昵称,
lc.mobile 用户电话,
ood.goodsName 商品名,
ood.partNumber 份数,
ood.numofPart 每份斤数
FROM ord_order oo
LEFT JOIN lpk_customer lc ON lc.sid=oo.userSid
LEFT JOIN ord_order_detail ood ON ood.orderSid=oo.sid
WHERE oo.payStatus=4 AND oo.payTime>='2024-01-30' AND oo.payTime<'2024-01-31';
-- 指定日期绑卡信息
SELECT
vr.createTime 绑卡时间,
CASE
WHEN vr.cardtype = 0 THEN '个人卡'
WHEN vr.cardtype = 1 THEN '企业卡'
END 卡类型,
vr.cardCode 卡编码,
vr.customerSid 客户sid,
lc.wxMpOpenid 微信OpenID,
lc.nick 客户昵称,
lc.mobile 客户手机号,
lcb.name 客户所属支行
FROM vege_replenish vr
LEFT JOIN lpk_customer lc ON lc.sid=vr.customerSid
LEFT JOIN lpk_customer_bank lcb ON lcb.sid=lc.customerBankSid
WHERE (cardtype=0 OR cardtype=1)
and vr.createTime>='2024-01-30' AND vr.createTime<'2024-01-31';
-- 指定日期绑卡信息含商品信息
SELECT
vr.createTime 绑卡时间,
CASE
WHEN vr.cardtype = 0 THEN '个人卡'
WHEN vr.cardtype = 1 THEN '企业卡'
END 卡类型,
vr.cardCode 卡编码,
vr.customerSid 客户sid,
lc.wxMpOpenid 微信OpenID,
lc.nick 客户昵称,
lc.mobile 客户手机号,
lcb.name 客户所属支行,
vrd.goodsName 商品名,
vrd.goodsNumber 商品数量
FROM vege_replenish vr
LEFT JOIN lpk_customer lc ON lc.sid=vr.customerSid
LEFT JOIN lpk_customer_bank lcb ON lcb.sid=lc.customerBankSid
LEFT JOIN vege_replenish_detail vrd ON vrd.orderSid=vr.sid
WHERE (cardtype=0 OR cardtype=1)
AND vr.createTime>='2024-01-30' AND vr.createTime<'2024-01-31';
-- 预约提货信息
select
date_format(vo.reserveDate,'%Y-%m-%d') 预约日期,
vo.customerSid 客户SID,
lc.wxMpOpenid 微信OpenID,
vo.storeSid 提货点SID,
max(ls.name) 提货点名称,
max(ls.linker) 提货点联系人,
max(ls.phone) 提货点联系电话,
max(ls.address) 提货点地址,
max(vo.affiliation) 菜窖类别编号,
max(pb.name) 菜窖类别,
max(vo.userName) 提货人名,
max(vo.userPhone) 提货电话,
max(lb.sid) 支行SID,
max(lb.name) 支行名,
max(lb.linker) 支行联系人,
max(lb.linkPhone) 支行电话,
max(lb.address) 支行地址,
max(lcb.name) 客户所属支行
from vege_cellar_reserve_order vo
LEFT JOIN lpk_store ls ON ls.sid=vo.storeSid
LEFT JOIN lpk_bank lb ON lb.sid=ls.bankSid
left join pms_brand pb on pb.id=vo.affiliation
LEFT JOIN lpk_customer lc ON lc.sid=vo.customerSid
LEFT JOIN lpk_customer_bank lcb ON lcb.sid = lc.customerBankSid
WHERE vo.reserveDate>='2024-01-30' AND vo.reserveDate<'2024-01-31'
GROUP BY vo.reserveDate,vo.storeSid,vo.customerSid ;
-- 预约提货信息含商品
select
date_format(vo.reserveDate,'%Y-%m-%d') 预约日期,
vo.customerSid 客户SID,
vo.storeSid 提货点SID,
max(ls.name) 提货点名称,
max(ls.linker) 提货点联系人,
max(ls.phone) 提货点联系电话,
max(ls.address) 提货点地址,
max(vo.affiliation) 菜窖类别编号,
max(pb.name) 菜窖类别,
max(vo.userName) 提货人名,
max(vo.userPhone) 提货电话,
max(lb.sid) 支行SID,
max(lb.name) 支行名,
max(lb.linker) 支行联系人,
max(lb.linkPhone) 支行电话,
max(lb.address) 支行地址,
vd.goodsSid 商品SID,
max(vd.goodsName) 商品名,
sum(vd.goodsNumber) 商品数,
max(lcb.name) 客户所属支行
from vege_cellar_reserve_order vo
LEFT JOIN lpk_store ls ON ls.sid=vo.storeSid
LEFT JOIN lpk_bank lb ON lb.sid=ls.bankSid
left join vege_cellar_reserve_details vd on vo.sid=vd.orderSid
left join lpk_goods lg on vd.goodsSid=lg.sid
left join pms_brand pb on pb.id=vo.affiliation
LEFT JOIN lpk_customer lc ON lc.sid=vo.customerSid
LEFT JOIN lpk_customer_bank lcb ON lcb.sid = lc.customerBankSid
WHERE vo.reserveDate>='2024-01-30' AND vo.reserveDate<'2024-01-31'
GROUP BY vo.reserveDate,vo.storeSid,vo.customerSid,vd.goodsSid ;
-- 微信用户数-日
SELECT
COUNT(1) 日增加微信用户数
FROM lpk_customer lc
WHERE lc.createTime>='2024-01-30' AND lc.createTime<'2024-01-31'
-- 微信用户数-累计
SELECT
COUNT(1) 微信用户总数
FROM lpk_customer lc
-- 购买人数-日 指定日期线上下单加上绑定个人卡和企业卡的用户数(同一用户记一条)
SELECT COUNT(1) FROM (
SELECT
oo.openId openid
FROM ord_order oo
WHERE oo.payStatus=4 AND oo.payTime>='2024-01-30' AND oo.payTime<'2024-01-31'
UNION
SELECT
lc.wxMpOpenid openid
FROM emp_card ec
LEFT JOIN lpk_customer lc ON lc.sid = ec.customerSid
WHERE ec.customerSid IS NOT NULL AND ec.customerSid <> ''
AND ec.bindDate>='2024-01-30' AND ec.bindDate<'2024-01-31'
UNION
SELECT
lc.wxMpOpenid openid
FROM lpk_giftcard lg
LEFT JOIN lpk_customer lc ON lc.sid = lg.customerSid
WHERE lg.customerSid IS NOT NULL AND lg.customerSid <> ''
AND lg.bindDate>='2024-01-30' AND lg.bindDate<'2024-01-31'
) t1
-- 购买人数-累计 线上下单加上绑定个人卡和企业卡的用户数(同一用户记一条) 2433
SELECT COUNT(1) FROM (
SELECT
oo.openId openid
FROM ord_order oo
UNION
SELECT
lc.wxMpOpenid openid
FROM emp_card ec
LEFT JOIN lpk_customer lc ON lc.sid = ec.customerSid
WHERE ec.customerSid IS NOT NULL AND ec.customerSid <> ''
UNION
SELECT
lc.wxMpOpenid openid
FROM lpk_giftcard lg
LEFT JOIN lpk_customer lc ON lc.sid = lg.customerSid
WHERE lg.customerSid IS NOT NULL AND lg.customerSid <> ''
) t1
-- 复购用户数-累计
SELECT COUNT(1) FROM (
SELECT openid,COUNT(1) num FROM (
SELECT
oo.openId openid
FROM ord_order oo
UNION ALL
SELECT
lc.wxMpOpenid openid
FROM emp_card ec
LEFT JOIN lpk_customer lc ON lc.sid = ec.customerSid
WHERE ec.customerSid IS NOT NULL AND ec.customerSid <> ''
UNION ALL
SELECT
lc.wxMpOpenid openid
FROM lpk_giftcard lg
LEFT JOIN lpk_customer lc ON lc.sid = lg.customerSid
WHERE lg.customerSid IS NOT NULL AND lg.customerSid <> ''
) t GROUP BY openid
) tt WHERE tt.num>1
-- 两次以上提货用户数-累计
SELECT COUNT(1) FROM (
SELECT openid,COUNT(1) num FROM (
SELECT
lc.wxMpOpenid openid
FROM lpk_reserve_order lro
LEFT JOIN lpk_customer lc ON lc.sid = lro.customerSid
UNION ALL
SELECT
lc.wxMpOpenid openid
FROM vege_cellar_reserve_order vcro
LEFT JOIN lpk_customer lc ON lc.sid = vcro.customerSid
) t GROUP BY t.openid
) tt WHERE tt.num>1

View File

@@ -0,0 +1,62 @@
SELECT
r.wxMpOpenid,
d.CODE,
e.NAME AS goodsName,
s.goodsNumber AS goodsNumber,
CASE
WHEN r.wxMpOpenid IS NOT NULL
then '家庭菜窖'
END type
FROM
lpk_giftcard d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN lpk_giftbag_goods s ON s.giftbagSid = d.giftbagSid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE
customerSid IS NOT NULL
AND customerSid != ''
UNION
SELECT
r.wxMpOpenid,
d.CODE,
e.NAME AS goodsName,
s.goodsNumber AS goodsNumber,
CASE
WHEN r.wxMpOpenid IS NOT NULL
then '企业菜窖'
END type
FROM
emp_card d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN lpk_giftbag_goods s ON s.giftbagSid = d.giftbagSid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE
customerSid IS NOT NULL
AND customerSid != ''
UNION
SELECT
r.wxMpOpenid,
d.CODE,
e.NAME AS goodsName,
s.goodsNumber AS goodsNumber,
CASE
WHEN r.wxMpOpenid IS NOT NULL
then '购买的家庭菜窖'
END type
FROM
emp_card_gift d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN emp_card_gift_goods s ON s.empCardGiftSid = d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE
customerSid IS NOT NULL
AND customerSid != ''
AND isSenior = '1'
GROUP BY
CODE,
NAME
ORDER BY
wxMpOpenid,
CODE

View File

@@ -0,0 +1,29 @@
SELECT
vc.customerSid 客户sid,
lc.wxMpOpenid OpenID,
lc.nick 客户昵称,
lc.mobile 客户电话,
pb.name 菜窖类型,
lg.name 商品名称,
vc.goodsNumber 商品数量
FROM vegetable_cellar vc
LEFT JOIN lpk_customer lc ON lc.sid=vc.customerSid
LEFT JOIN lpk_goods lg ON lg.sid=vc.goodsSid
LEFT JOIN pms_brand pb ON pb.id = vc.affiliation
WHERE lc.mobile='18632141515'
SELECT
lc.nick 客户昵称,
lc.mobile 客户电话,
tcg.bindDate 记录时间,
tcg.serialNumber 卡序列号,
tcg.goodsName 商品名,
tcg.goodsNumber 商品数量,
tcg.cardtype 卡类型
from tmp_cust_goods tcg
LEFT JOIN lpk_customer lc ON lc.sid=tcg.customerSid
WHERE lc.mobile='18632141515'

View File

@@ -0,0 +1,159 @@
SELECT
*
FROM vege_cellar_reserve_order vcro
LEFT JOIN vege_cellar_reserve_details vcrd ON vcrd.orderSid=vcro.sid
WHERE date(vcro.reserveDate)='2024-02-02'
AND vcro.userPhone='13932147290'
13315167779 - c92992b9-6392-4d25-ac5d-f89f20578ab0
-- 个人卡
SELECT
r.wxMpOpenid,
d.customerSid,
d.bindDate,
d.giftbagSid,
d.serialNumber,
d.code,
s.goodsSid,
s.goodsNumber,
e.NAME AS goodsName,
'个人卡' cardtype
FROM lpk_giftcard d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN lpk_giftbag_goods s ON s.giftbagSid=d.giftbagSid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid='e337fbdd-7676-4f9a-a766-8c8a0115564f'
-- 企业卡
SELECT
r.wxMpOpenid,
d.customerSid,
d.bindDate,
d.giftbagSid,
d.serialNumber,
d.code,
s.goodsSid,
s.goodsNumber,
e.NAME AS goodsName,
'企业卡' cardtype
FROM emp_card d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN lpk_giftbag_goods s ON s.giftbagSid=d.giftbagSid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid='e337fbdd-7676-4f9a-a766-8c8a0115564f'
-- 购买卡
SELECT
oo.payTime,
oo.totalTee,
oo.openId,
lc.nick,
lc.mobile,
ood.goodsName,
ood.partNumber
FROM ord_order oo
LEFT JOIN lpk_customer lc ON lc.sid = oo.userSid
LEFT JOIN ord_order_detail ood ON ood.orderSid=oo.sid
LEFT JOIN lpk_goods e ON e.sid = ood.goodsSid
WHERE oo.payStatus=4
AND oo.userSid='e337fbdd-7676-4f9a-a766-8c8a0115564f'
-- 转赠卡(旧数据)
SELECT
r.wxMpOpenid,
d.customerSid,
d.bindDate,
d.sid,
d.serialNumber,
d.code,
s.goodsSid,
s.goodsNumber,
e.NAME AS goodsName,
'转赠卡' cardtype
FROM emp_card_gift d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN emp_card_gift_goods s ON s.empCardGiftSid=d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid='e337fbdd-7676-4f9a-a766-8c8a0115564f' AND d.isSenior = '2'
-- 转赠记录
SELECT
tr.recipientTime,
lc.wxMpOpenid,
lc.nick,
lc.mobile,
lg.name,
trgd.goodsNumber
FROM transfer_records tr
LEFT JOIN lpk_customer lc ON lc.sid = tr.recipientSid
LEFT JOIN transfer_records_goods_details trgd ON trgd.orderSid=tr.sid
LEFT JOIN lpk_goods lg ON lg.sid = trgd.goodsSid
WHERE tr.recipientSid ='e337fbdd-7676-4f9a-a766-8c8a0115564f'
-- 预约提货,(旧数据)
SELECT
r.wxMpOpenid,
d.customerSid,
d.reserveDate,
d.sid,
d.storeSid,
d.cardCode,
s.goodsSid,
-s.goodsNumber AS goodsNumber,
e.NAME AS goodsName,
d.cardType cardtype
FROM lpk_reserve_order d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN lpk_reserve_order_goods s ON s.orderSid=d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid='e337fbdd-7676-4f9a-a766-8c8a0115564f'
-- 预约单
SELECT
r.wxMpOpenid,
d.customerSid,
d.reserveDate,
d.sid,
s.goodsSid,
-s.goodsNumber AS goodsNumber,
e.NAME AS goodsName
FROM vege_cellar_reserve_order d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN vege_cellar_reserve_details s ON s.orderSid=d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid='e337fbdd-7676-4f9a-a766-8c8a0115564f'
-- 赠出的卡,数量为负值
SELECT
r.wxMpOpenid,
d.empCardCustomerSid,
d.grantDate,
d.sid,
d.serialNumber,
d.code,
s.goodsSid,
-s.goodsNumber AS goodsNumber,
e.NAME AS goodsName,
'赠出' cardtype
FROM emp_card_gift d
LEFT JOIN lpk_customer r ON r.sid = d.empCardCustomerSid
LEFT JOIN emp_card_gift_goods s ON s.empCardGiftSid=d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.empCardCustomerSid='e337fbdd-7676-4f9a-a766-8c8a0115564f' AND d.isSenior = '2'
-- 赠出记录
SELECT
tr.recipientTime,
lc.wxMpOpenid,
lc.nick,
lc.mobile,
lg.name,
trgd.goodsNumber
FROM transfer_records tr
LEFT JOIN lpk_customer lc ON lc.sid = tr.customerSid
LEFT JOIN transfer_records_goods_details trgd ON trgd.orderSid=tr.sid
LEFT JOIN lpk_goods lg ON lg.sid = trgd.goodsSid
WHERE tr.customerSid ='e337fbdd-7676-4f9a-a766-8c8a0115564f'

19
docs/info.txt Normal file
View File

@@ -0,0 +1,19 @@
小程序id wx4724e3a3c27f36b5
登录邮箱 lzh@yxtsoft.com
汇融惠享
AppID(小程序ID) wx4724e3a3c27f36b5
AppSecret(小程序密钥) 971fd3b8aa7b08ce3e8a5f3e502b1a8d
汇融云眼
AppID(小程序ID) wx11565021714ba796
AppSecret(小程序密钥) eb511fbb5f864cdabc3d044b639814c9
家庭菜窖
云菜窖
惠享云窖
https://supervise.yxtsoft.com/lpkapi?code=12344564534523
code 后面 可以改

Binary file not shown.

View File

@@ -0,0 +1 @@
把“导出订单_2024_02_02_08_39_07”对应的数据放置到“批量订单发货导入模板”里,这个功能有可能未来会经常用,现在是手动上报,未来应该是走接口上报。

View File

@@ -0,0 +1,179 @@
2024-02-01 15:13:34
20
o81zC67mJFwaMBPxrgYpFuDGNNSY
惠享客户0003851
18033776066
桃园支行
SELECT
lc.wxMpOpenid,
lc.nick,
lc.mobile,
lc.sid
FROM lpk_customer lc
WHERE lc.mobile='18033776066'
;
"wxMpOpenid" "nick" "mobile" "sid"
"o81zC67mJFwaMBPxrgYpFuDGNNsY" "惠享客户0003851" "18033776066" "e43901e8-4185-4a45-8ccb-e077c6e38e1e"
SELECT
lc.wxMpOpenid,
lc.nick,
lc.mobile,
lg.name,
vc.goodsNumber
from vegetable_cellar vc
LEFT JOIN lpk_customer lc ON lc.sid=vc.customerSid
LEFT JOIN lpk_goods lg ON lg.sid=vc.goodsSid
WHERE
vc.customerSid='e43901e8-4185-4a45-8ccb-e077c6e38e1e'
-- 个人卡
SELECT
r.wxMpOpenid,
d.customerSid,
d.bindDate,
d.giftbagSid,
d.serialNumber,
d.code,
s.goodsSid,
s.goodsNumber,
e.NAME AS goodsName,
'个人卡' cardtype
FROM lpk_giftcard d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN lpk_giftbag_goods s ON s.giftbagSid=d.giftbagSid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid='e43901e8-4185-4a45-8ccb-e077c6e38e1e'
-- 企业卡
SELECT
r.wxMpOpenid,
d.customerSid,
d.bindDate,
d.giftbagSid,
d.serialNumber,
d.code,
s.goodsSid,
s.goodsNumber,
e.NAME AS goodsName,
'企业卡' cardtype
FROM emp_card d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN lpk_giftbag_goods s ON s.giftbagSid=d.giftbagSid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid='e43901e8-4185-4a45-8ccb-e077c6e38e1e'
-- 购买卡
SELECT
oo.payTime,
oo.totalTee,
oo.openId,
lc.nick,
lc.mobile,
ood.goodsName,
ood.partNumber
FROM ord_order oo
LEFT JOIN lpk_customer lc ON lc.sid = oo.userSid
LEFT JOIN ord_order_detail ood ON ood.orderSid=oo.sid
LEFT JOIN lpk_goods e ON e.sid = ood.goodsSid
WHERE oo.payStatus=4
AND oo.userSid='e43901e8-4185-4a45-8ccb-e077c6e38e1e'
-- 转赠卡(旧数据)
SELECT
r.wxMpOpenid,
d.customerSid,
d.bindDate,
d.sid,
d.serialNumber,
d.code,
s.goodsSid,
s.goodsNumber,
e.NAME AS goodsName,
'转赠卡' cardtype
FROM emp_card_gift d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN emp_card_gift_goods s ON s.empCardGiftSid=d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid='e43901e8-4185-4a45-8ccb-e077c6e38e1e' AND d.isSenior = '2'
-- 转赠记录
SELECT
tr.recipientTime,
lc.wxMpOpenid,
lc.nick,
lc.mobile,
lg.name,
trgd.goodsNumber
FROM transfer_records tr
LEFT JOIN lpk_customer lc ON lc.sid = tr.recipientSid
LEFT JOIN transfer_records_goods_details trgd ON trgd.orderSid=tr.sid
LEFT JOIN lpk_goods lg ON lg.sid = trgd.goodsSid
WHERE tr.recipientSid ='e43901e8-4185-4a45-8ccb-e077c6e38e1e'
-- 预约提货,(旧数据)
SELECT
r.wxMpOpenid,
d.customerSid,
d.reserveDate,
d.sid,
d.storeSid,
d.cardCode,
s.goodsSid,
-s.goodsNumber AS goodsNumber,
e.NAME AS goodsName,
d.cardType cardtype
FROM lpk_reserve_order d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN lpk_reserve_order_goods s ON s.orderSid=d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid='e43901e8-4185-4a45-8ccb-e077c6e38e1e'
-- 预约单
SELECT
r.wxMpOpenid,
d.customerSid,
d.reserveDate,
d.sid,
s.goodsSid,
-s.goodsNumber AS goodsNumber,
e.NAME AS goodsName
FROM vege_cellar_reserve_order d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN vege_cellar_reserve_details s ON s.orderSid=d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid='e43901e8-4185-4a45-8ccb-e077c6e38e1e'
-- 赠出的卡,数量为负值
SELECT
r.wxMpOpenid,
d.empCardCustomerSid,
d.grantDate,
d.sid,
d.serialNumber,
d.code,
s.goodsSid,
-s.goodsNumber AS goodsNumber,
e.NAME AS goodsName,
'赠出' cardtype
FROM emp_card_gift d
LEFT JOIN lpk_customer r ON r.sid = d.empCardCustomerSid
LEFT JOIN emp_card_gift_goods s ON s.empCardGiftSid=d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.empCardCustomerSid='e43901e8-4185-4a45-8ccb-e077c6e38e1e' AND d.isSenior = '2'
-- 赠出记录
SELECT
tr.createTime,
lc.wxMpOpenid,
lc.nick,
lc.mobile,
lg.name,
-trgd.goodsNumber
FROM transfer_records tr
LEFT JOIN lpk_customer lc ON lc.sid = tr.customerSid
LEFT JOIN transfer_records_goods_details trgd ON trgd.orderSid=tr.sid
LEFT JOIN lpk_goods lg ON lg.sid = trgd.goodsSid
WHERE tr.customerSid ='e43901e8-4185-4a45-8ccb-e077c6e38e1e'

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 KiB

View File

@@ -0,0 +1,105 @@
-- 转赠记录
SELECT
tr.createTime,
tr.customerSid,
lc.wxMpOpenid,
lc.nick,
lc.mobile,
tr.recipientTime,
tr.recipientSid,
lcr.wxMpOpenid,
lcr.nick,
lcr.mobile,
tr.state
FROM transfer_records tr
LEFT JOIN lpk_customer lc ON lc.sid = tr.customerSid
LEFT JOIN lpk_customer lcr ON lcr.sid = tr.recipientSid
-- 预约记录(旧)
SELECT
lro.createTime,
lro.reserveDate,
ls.name,
lro.userName,
lro.userPhone,
lro.customerSid,
lc.wxMpOpenid,
lc.nick,
lc.mobile
FROM lpk_reserve_order lro
LEFT JOIN lpk_store ls ON ls.sid = lro.storeSid
LEFT JOIN lpk_customer lc ON lc.sid = lro.customerSid
-- 预约记录(新)
SELECT
vcro.createTime,
vcro.reserveDate,
vcro.storeName,
vcro.userName,
vcro.userPhone,
vcro.customerSid,
lc.wxMpOpenid,
lc.nick,
lc.mobile
FROM vege_cellar_reserve_order vcro
LEFT JOIN lpk_customer lc ON lc.sid = vcro.customerSid
--线上购买
SELECT
oo.payTime 支付时间,
oo.meet 支付金额,
oo.openId 微信Openid,
lc.nick 用户昵称,
lc.mobile 用户电话
FROM ord_order oo
LEFT JOIN lpk_customer lc ON lc.sid=oo.userSid
WHERE oo.payStatus=4
-- 购买人数-累计 线上下单加上绑定个人卡和企业卡的用户数(同一用户记一条)
SELECT COUNT(1) FROM (
SELECT
oo.openId openid
FROM ord_order oo WHERE oo.payStatus=4
UNION
SELECT
lc.wxMpOpenid openid
FROM emp_card ec
LEFT JOIN lpk_customer lc ON lc.sid = ec.customerSid
WHERE ec.customerSid IS NOT NULL AND ec.customerSid <> ''
UNION
SELECT
lc.wxMpOpenid openid
FROM lpk_giftcard lg
LEFT JOIN lpk_customer lc ON lc.sid = lg.customerSid
WHERE lg.customerSid IS NOT NULL AND lg.customerSid <> ''
) t1
-- 个人卡绑卡记录
SELECT
lg.serialNumber,
lg.bindDate,
lg.customerSid,
lc.wxMpOpenid,
lc.nick,
lc.mobile,
lcb.name
FROM lpk_giftcard lg
LEFT JOIN lpk_customer lc ON lc.sid = lg.customerSid
LEFT JOIN lpk_customer_bank lcb ON lcb.sid = lc.customerBankSid
WHERE lg.customerSid IS NOT NULL AND lg.customerSid <> ''
-- 企业卡绑卡记录
SELECT
lg.serialNumber,
lg.bindDate,
lg.customerSid,
lc.wxMpOpenid,
lc.nick,
lc.mobile,
lcb.name
FROM emp_card lg
LEFT JOIN lpk_customer lc ON lc.sid = lg.customerSid
LEFT JOIN lpk_customer_bank lcb ON lcb.sid = lc.customerBankSid
WHERE lg.customerSid IS NOT NULL AND lg.customerSid <> ''

View File

@@ -0,0 +1,235 @@
惠享云菜窖
家庭菜窖70001457
70001457
提货码20240109155151547430
提货密码: 825239
曹路颖
SELECT
lgc.bindDate,
lgc.serialNumber,
lgc.code,
lgc.customerSid,
lc.wxMpOpenid,
lc.nick,
lc.mobile,
lg.name,
lgg.goodsNumber
FROM lpk_giftcard lgc
LEFT JOIN lpk_giftbag_goods lgg ON lgg.giftbagSid=lgc.giftbagSid
LEFT JOIN lpk_goods lg ON lg.sid=lgg.goodsSid
LEFT JOIN lpk_customer lc ON lc.sid=lgc.customerSid
WHERE lgc.code='20240109155151547430'
;
"bindDate" "serialNumber" "code" "customerSid" "wxMpOpenid" "nick" "mobile" "name" "goodsNumber"
"2024-01-21 10:47:33" "70001457" "20240109155151547430" "4225d713-f0d7-4ed9-93f9-92511ebef52c" "o81zC69vqMWg1p0iccj2Rup5LJ7I" "惠享客户000716" \N "张北土豆(限购200斤)" "6"
"2024-01-21 10:47:33" "70001457" "20240109155151547430" "4225d713-f0d7-4ed9-93f9-92511ebef52c" "o81zC69vqMWg1p0iccj2Rup5LJ7I" "惠享客户000716" \N "沙窝萝卜" "1"
"2024-01-21 10:47:33" "70001457" "20240109155151547430" "4225d713-f0d7-4ed9-93f9-92511ebef52c" "o81zC69vqMWg1p0iccj2Rup5LJ7I" "惠享客户000716" \N "纯红薯粉条" "2"
"2024-01-21 10:47:33" "70001457" "20240109155151547430" "4225d713-f0d7-4ed9-93f9-92511ebef52c" "o81zC69vqMWg1p0iccj2Rup5LJ7I" "惠享客户000716" \N "北方白菜(限购200斤)" "8"
"2024-01-21 10:47:33" "70001457" "20240109155151547430" "4225d713-f0d7-4ed9-93f9-92511ebef52c" "o81zC69vqMWg1p0iccj2Rup5LJ7I" "惠享客户000716" \N "泥坑藕" "1"
"2024-01-21 10:47:33" "70001457" "20240109155151547430" "4225d713-f0d7-4ed9-93f9-92511ebef52c" "o81zC69vqMWg1p0iccj2Rup5LJ7I" "惠享客户000716" \N "西瓜红蜜薯" "4"
"2024-01-21 10:47:33" "70001457" "20240109155151547430" "4225d713-f0d7-4ed9-93f9-92511ebef52c" "o81zC69vqMWg1p0iccj2Rup5LJ7I" "惠享客户000716" \N "52度良作红薯" "1"
SELECT
lc.wxMpOpenid,
lc.nick,
lc.mobile,
lg.name,
vc.goodsNumber
from vegetable_cellar vc
LEFT JOIN lpk_customer lc ON lc.sid=vc.customerSid
LEFT JOIN lpk_goods lg ON lg.sid=vc.goodsSid
WHERE
vc.customerSid='4225d713-f0d7-4ed9-93f9-92511ebef52c'
"wxMpOpenid" "nick" "mobile" "name" "goodsNumber"
"o81zC69vqMWg1p0iccj2Rup5LJ7I" "惠享客户000716" \N "张北土豆(限购200斤)" "3"
"o81zC69vqMWg1p0iccj2Rup5LJ7I" "惠享客户000716" \N "北方白菜(限购200斤)" "5"
"o81zC69vqMWg1p0iccj2Rup5LJ7I" "惠享客户000716" \N "泥坑藕" "2"
"o81zC69vqMWg1p0iccj2Rup5LJ7I" "惠享客户000716" \N "西瓜红蜜薯" "3"
-- 个人卡
SELECT
r.wxMpOpenid,
d.customerSid,
d.bindDate,
d.giftbagSid,
d.serialNumber,
d.code,
s.goodsSid,
s.goodsNumber,
e.NAME AS goodsName,
'个人卡' cardtype
FROM lpk_giftcard d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN lpk_giftbag_goods s ON s.giftbagSid=d.giftbagSid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid='4225d713-f0d7-4ed9-93f9-92511ebef52c'
"wxMpOpenid" "customerSid" "bindDate" "giftbagSid" "serialNumber" "code" "goodsSid" "goodsNumber" "goodsName" "cardtype"
"o81zC69vqMWg1p0iccj2Rup5LJ7I" "4225d713-f0d7-4ed9-93f9-92511ebef52c" "2024-01-21 10:47:33" "50ee9567-174e-4114-8127-e75884808598" "70001457" "20240109155151547430" "61873ef1-2262-4cc5-8ee5-c266c16b15bf" "6" "张北土豆(限购200斤)" "个人卡"
"o81zC69vqMWg1p0iccj2Rup5LJ7I" "4225d713-f0d7-4ed9-93f9-92511ebef52c" "2024-01-29 09:55:45" "99b39d43-382b-4053-8842-cd3b9714a17e" "70004401" "20240124143210729431" "61873ef1-2262-4cc5-8ee5-c266c16b15bf" "5" "张北土豆(限购200斤)" "个人卡"
"o81zC69vqMWg1p0iccj2Rup5LJ7I" "4225d713-f0d7-4ed9-93f9-92511ebef52c" "2024-01-21 10:47:33" "50ee9567-174e-4114-8127-e75884808598" "70001457" "20240109155151547430" "99b2dd79-5773-44c3-9a6e-a67c763ee245" "1" "沙窝萝卜" "个人卡"
"o81zC69vqMWg1p0iccj2Rup5LJ7I" "4225d713-f0d7-4ed9-93f9-92511ebef52c" "2024-01-29 09:55:45" "99b39d43-382b-4053-8842-cd3b9714a17e" "70004401" "20240124143210729431" "99b2dd79-5773-44c3-9a6e-a67c763ee245" "2" "沙窝萝卜" "个人卡"
"o81zC69vqMWg1p0iccj2Rup5LJ7I" "4225d713-f0d7-4ed9-93f9-92511ebef52c" "2024-01-21 10:47:33" "50ee9567-174e-4114-8127-e75884808598" "70001457" "20240109155151547430" "93773d0a-d749-42dc-b03a-63a9a0f6c6ff" "2" "纯红薯粉条" "个人卡"
"o81zC69vqMWg1p0iccj2Rup5LJ7I" "4225d713-f0d7-4ed9-93f9-92511ebef52c" "2024-01-21 10:47:33" "50ee9567-174e-4114-8127-e75884808598" "70001457" "20240109155151547430" "d3821a05-a28e-4d13-84b9-904211f97542" "8" "北方白菜(限购200斤)" "个人卡"
"o81zC69vqMWg1p0iccj2Rup5LJ7I" "4225d713-f0d7-4ed9-93f9-92511ebef52c" "2024-01-29 09:55:45" "99b39d43-382b-4053-8842-cd3b9714a17e" "70004401" "20240124143210729431" "d3821a05-a28e-4d13-84b9-904211f97542" "7" "北方白菜(限购200斤)" "个人卡"
"o81zC69vqMWg1p0iccj2Rup5LJ7I" "4225d713-f0d7-4ed9-93f9-92511ebef52c" "2024-01-21 10:47:33" "50ee9567-174e-4114-8127-e75884808598" "70001457" "20240109155151547430" "cc88a7d2-4a7b-42fe-8958-292cd421a3e5" "1" "泥坑藕" "个人卡"
"o81zC69vqMWg1p0iccj2Rup5LJ7I" "4225d713-f0d7-4ed9-93f9-92511ebef52c" "2024-01-29 09:55:45" "99b39d43-382b-4053-8842-cd3b9714a17e" "70004401" "20240124143210729431" "cc88a7d2-4a7b-42fe-8958-292cd421a3e5" "2" "泥坑藕" "个人卡"
"o81zC69vqMWg1p0iccj2Rup5LJ7I" "4225d713-f0d7-4ed9-93f9-92511ebef52c" "2024-01-29 09:55:45" "99b39d43-382b-4053-8842-cd3b9714a17e" "70004401" "20240124143210729431" "b67167a1-d6f1-4e17-80b3-f1aac7e4e4fc" "1" "玉田包尖白菜" "个人卡"
"o81zC69vqMWg1p0iccj2Rup5LJ7I" "4225d713-f0d7-4ed9-93f9-92511ebef52c" "2024-01-21 10:47:33" "50ee9567-174e-4114-8127-e75884808598" "70001457" "20240109155151547430" "88743284-b3b8-489f-9a96-720c23d74587" "4" "西瓜红蜜薯" "个人卡"
"o81zC69vqMWg1p0iccj2Rup5LJ7I" "4225d713-f0d7-4ed9-93f9-92511ebef52c" "2024-01-29 09:55:45" "99b39d43-382b-4053-8842-cd3b9714a17e" "70004401" "20240124143210729431" "88743284-b3b8-489f-9a96-720c23d74587" "5" "西瓜红蜜薯" "个人卡"
"o81zC69vqMWg1p0iccj2Rup5LJ7I" "4225d713-f0d7-4ed9-93f9-92511ebef52c" "2024-01-21 10:47:33" "50ee9567-174e-4114-8127-e75884808598" "70001457" "20240109155151547430" "26442a48-23c1-4cfd-a156-bad7a94cc141" "1" "52度良作红薯" "个人卡"
-- 企业卡
SELECT
r.wxMpOpenid,
d.customerSid,
d.bindDate,
d.giftbagSid,
d.serialNumber,
d.code,
s.goodsSid,
s.goodsNumber,
e.NAME AS goodsName,
'企业卡' cardtype
FROM emp_card d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN lpk_giftbag_goods s ON s.giftbagSid=d.giftbagSid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid='4225d713-f0d7-4ed9-93f9-92511ebef52c'
-- 购买卡
SELECT
oo.payTime,
oo.totalTee,
oo.openId,
lc.nick,
lc.mobile,
ood.goodsName,
ood.partNumber
FROM ord_order oo
LEFT JOIN lpk_customer lc ON lc.sid = oo.userSid
LEFT JOIN ord_order_detail ood ON ood.orderSid=oo.sid
LEFT JOIN lpk_goods e ON e.sid = ood.goodsSid
WHERE oo.payStatus=4
AND oo.userSid='4225d713-f0d7-4ed9-93f9-92511ebef52c'
-- 转赠卡(旧数据)
SELECT
r.wxMpOpenid,
d.customerSid,
d.bindDate,
d.sid,
d.serialNumber,
d.code,
s.goodsSid,
s.goodsNumber,
e.NAME AS goodsName,
'转赠卡' cardtype
FROM emp_card_gift d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN emp_card_gift_goods s ON s.empCardGiftSid=d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid='4225d713-f0d7-4ed9-93f9-92511ebef52c' AND d.isSenior = '2'
-- 转赠记录
SELECT
tr.recipientTime,
lc.wxMpOpenid,
lc.nick,
lc.mobile,
lg.name,
trgd.goodsNumber
FROM transfer_records tr
LEFT JOIN lpk_customer lc ON lc.sid = tr.recipientSid
LEFT JOIN transfer_records_goods_details trgd ON trgd.orderSid=tr.sid
LEFT JOIN lpk_goods lg ON lg.sid = trgd.goodsSid
WHERE tr.recipientSid ='4225d713-f0d7-4ed9-93f9-92511ebef52c'
-- 预约提货,(旧数据)
SELECT
r.wxMpOpenid,
d.customerSid,
d.reserveDate,
d.sid,
d.storeSid,
d.cardCode,
s.goodsSid,
-s.goodsNumber AS goodsNumber,
e.NAME AS goodsName,
d.cardType cardtype
FROM lpk_reserve_order d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN lpk_reserve_order_goods s ON s.orderSid=d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid='4225d713-f0d7-4ed9-93f9-92511ebef52c'
-- 预约单
SELECT
r.wxMpOpenid,
d.customerSid,
d.reserveDate,
d.sid,
s.goodsSid,
-s.goodsNumber AS goodsNumber,
e.NAME AS goodsName
FROM vege_cellar_reserve_order d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN vege_cellar_reserve_details s ON s.orderSid=d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid='4225d713-f0d7-4ed9-93f9-92511ebef52c'
"wxMpOpenid" "customerSid" "reserveDate" "sid" "goodsSid" "goodsNumber" "goodsName"
"o81zC69vqMWg1p0iccj2Rup5LJ7I" "4225d713-f0d7-4ed9-93f9-92511ebef52c" "2024-01-30 00:00:00" "7e2bf790-8204-4346-a92a-627a11668212" "61873ef1-2262-4cc5-8ee5-c266c16b15bf" "-1" "张北土豆(限购200斤)"
"o81zC69vqMWg1p0iccj2Rup5LJ7I" "4225d713-f0d7-4ed9-93f9-92511ebef52c" "2024-01-30 00:00:00" "1e76d9a3-5e6f-497d-8763-aaaaa2d62fac" "61873ef1-2262-4cc5-8ee5-c266c16b15bf" "-1" "张北土豆(限购200斤)"
"o81zC69vqMWg1p0iccj2Rup5LJ7I" "4225d713-f0d7-4ed9-93f9-92511ebef52c" "2024-01-30 00:00:00" "7e2bf790-8204-4346-a92a-627a11668212" "99b2dd79-5773-44c3-9a6e-a67c763ee245" "-1" "沙窝萝卜"
"o81zC69vqMWg1p0iccj2Rup5LJ7I" "4225d713-f0d7-4ed9-93f9-92511ebef52c" "2024-01-30 00:00:00" "1e76d9a3-5e6f-497d-8763-aaaaa2d62fac" "99b2dd79-5773-44c3-9a6e-a67c763ee245" "-1" "沙窝萝卜"
"o81zC69vqMWg1p0iccj2Rup5LJ7I" "4225d713-f0d7-4ed9-93f9-92511ebef52c" "2024-01-30 00:00:00" "1e76d9a3-5e6f-497d-8763-aaaaa2d62fac" "93773d0a-d749-42dc-b03a-63a9a0f6c6ff" "-1" "纯红薯粉条"
"o81zC69vqMWg1p0iccj2Rup5LJ7I" "4225d713-f0d7-4ed9-93f9-92511ebef52c" "2024-01-30 00:00:00" "7e2bf790-8204-4346-a92a-627a11668212" "d3821a05-a28e-4d13-84b9-904211f97542" "-1" "北方白菜(限购200斤)"
"o81zC69vqMWg1p0iccj2Rup5LJ7I" "4225d713-f0d7-4ed9-93f9-92511ebef52c" "2024-01-30 00:00:00" "1e76d9a3-5e6f-497d-8763-aaaaa2d62fac" "d3821a05-a28e-4d13-84b9-904211f97542" "-1" "北方白菜(限购200斤)"
"o81zC69vqMWg1p0iccj2Rup5LJ7I" "4225d713-f0d7-4ed9-93f9-92511ebef52c" "2024-01-30 00:00:00" "370c0232-192b-4c7d-bcbf-5f4329e26c8a" "b67167a1-d6f1-4e17-80b3-f1aac7e4e4fc" "-1" "玉田包尖白菜"
"o81zC69vqMWg1p0iccj2Rup5LJ7I" "4225d713-f0d7-4ed9-93f9-92511ebef52c" "2024-01-30 00:00:00" "7e2bf790-8204-4346-a92a-627a11668212" "88743284-b3b8-489f-9a96-720c23d74587" "-1" "西瓜红蜜薯"
"o81zC69vqMWg1p0iccj2Rup5LJ7I" "4225d713-f0d7-4ed9-93f9-92511ebef52c" "2024-01-30 00:00:00" "1e76d9a3-5e6f-497d-8763-aaaaa2d62fac" "88743284-b3b8-489f-9a96-720c23d74587" "-1" "西瓜红蜜薯"
-- 赠出的卡,数量为负值
SELECT
r.wxMpOpenid,
d.empCardCustomerSid,
d.grantDate,
d.sid,
d.serialNumber,
d.code,
s.goodsSid,
-s.goodsNumber AS goodsNumber,
e.NAME AS goodsName,
'赠出' cardtype
FROM emp_card_gift d
LEFT JOIN lpk_customer r ON r.sid = d.empCardCustomerSid
LEFT JOIN emp_card_gift_goods s ON s.empCardGiftSid=d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.empCardCustomerSid='4225d713-f0d7-4ed9-93f9-92511ebef52c' AND d.isSenior = '2'
-- 赠出记录
SELECT
tr.recipientTime,
lc.wxMpOpenid,
lc.nick,
lc.mobile,
lg.name,
-trgd.goodsNumber
FROM transfer_records tr
LEFT JOIN lpk_customer lc ON lc.sid = tr.customerSid
LEFT JOIN transfer_records_goods_details trgd ON trgd.orderSid=tr.sid
LEFT JOIN lpk_goods lg ON lg.sid = trgd.goodsSid
WHERE tr.customerSid ='4225d713-f0d7-4ed9-93f9-92511ebef52c'
"recipientTime" "wxMpOpenid" "nick" "mobile" "name" "-trgd.goodsNumber"
"2024-02-02 14:14:00" "o81zC69vqMWg1p0iccj2Rup5LJ7I" "惠享客户000716" \N "张北土豆(限购200斤)" "-6"
"2024-02-02 14:14:00" "o81zC69vqMWg1p0iccj2Rup5LJ7I" "惠享客户000716" \N "沙窝萝卜" "-1"
"2024-02-02 14:14:00" "o81zC69vqMWg1p0iccj2Rup5LJ7I" "惠享客户000716" \N "纯红薯粉条" "-1"
"2024-02-02 14:14:00" "o81zC69vqMWg1p0iccj2Rup5LJ7I" "惠享客户000716" \N "北方白菜(限购200斤)" "-8"
"2024-02-02 14:46:51" "o81zC69vqMWg1p0iccj2Rup5LJ7I" "惠享客户000716" \N "泥坑藕" "-1"
"2024-02-02 14:14:00" "o81zC69vqMWg1p0iccj2Rup5LJ7I" "惠享客户000716" \N "西瓜红蜜薯" "-4"
"2024-02-02 14:14:00" "o81zC69vqMWg1p0iccj2Rup5LJ7I" "惠享客户000716" \N "52度良作红薯" "-1"

Binary file not shown.

View File

@@ -0,0 +1,50 @@
惠享云菜窖
家庭菜窖70001856
70001856
提货编码:20240110163815340236
惠享云菜窖
家庭菜窖70001457
70001457
提货码20240109155151547430
提货密码: 825239
曹路颖
SELECT
*
FROM lpk_giftcard lg
WHERE lg.code='20240110163815340236'
;
-- 05d52aa8-e9f1-424d-8b86-f4b79a26d19c
SELECT
lg.name ,
lgg.goodsNumber
FROM lpk_giftbag_goods lgg
LEFT JOIN lpk_goods lg ON lg.sid=lgg.goodsSid
WHERE lgg.giftbagSid='786df8d0-c227-436f-8a6f-7a9b3f08ffe2'
;
select * FROM lpk_customer lc WHERE lc.sid='05d52aa8-e9f1-424d-8b86-f4b79a26d19c'
-- o81zC65-HevUo6HuN2sB7nSBCkDs
select * FROM lpk_customer lc WHERE lc.wxMpOpenid='o81zC65-HevUo6HuN2sB7nSBCkDs'
select * from vegetable_cellar where customerSid='05d52aa8-e9f1-424d-8b86-f4b79a26d19c'
SELECT
lc.wxMpOpenid,
lc.nick,
lc.mobile,
lg.name,
vc.goodsNumber
from vegetable_cellar vc
LEFT JOIN lpk_customer lc ON lc.sid=vc.customerSid
LEFT JOIN lpk_goods lg ON lg.sid=vc.goodsSid
WHERE
vc.customerSid='05d52aa8-e9f1-424d-8b86-f4b79a26d19c'

View File

@@ -0,0 +1,63 @@
-- 个人卡已绑卡数据
SELECT
lg.createTime 卡生成时间,
lg.serialNumber 卡序号,
lg.bindDate 绑卡时间,
lc.wxMpOpenid 客户微信,
lc.nick 客户昵称,
lc.mobile 客户手机号,
lcb.name 支行名称,
lgs.name 商品名称,
lgg.goodsNumber 商品数量
FROM lpk_giftcard lg
LEFT JOIN lpk_customer lc ON lc.sid = lg.customerSid
LEFT JOIN lpk_customer_bank lcb ON lcb.sid = lc.customerBankSid
LEFT JOIN lpk_giftbag_goods lgg ON lgg.giftbagSid=lg.giftbagSid
LEFT JOIN lpk_goods lgs ON lgs.sid = lgg.goodsSid
WHERE lg.customerSid IS NOT NULL AND lg.customerSid <> ''
ORDER BY lg.serialNumber
-- 个人卡未绑卡数据
SELECT
lg.createTime 卡生成时间,
lg.serialNumber 卡序号,
lgs.name 商品名称,
lgg.goodsNumber 商品数量
FROM lpk_giftcard lg
LEFT JOIN lpk_giftbag_goods lgg ON lgg.giftbagSid=lg.giftbagSid
LEFT JOIN lpk_goods lgs ON lgs.sid = lgg.goodsSid
WHERE (lg.customerSid IS NULL OR lg.customerSid = '')
ORDER BY lg.serialNumber
-- 企业卡已绑卡数据
SELECT
ec.createTime 卡生成时间,
ec.serialNumber 卡序号,
ec.bindDate 绑卡时间,
lc.wxMpOpenid 客户微信,
lc.nick 客户昵称,
lc.mobile 客户手机号,
lcb.name 支行名称,
lgs.name 商品名称,
lgg.goodsNumber 商品数量
FROM emp_card ec
LEFT JOIN lpk_customer lc ON lc.sid = ec.customerSid
LEFT JOIN lpk_customer_bank lcb ON lcb.sid = lc.customerBankSid
LEFT JOIN lpk_giftbag_goods lgg ON lgg.giftbagSid=ec.giftbagSid
LEFT JOIN lpk_goods lgs ON lgs.sid = lgg.goodsSid
WHERE (ec.customerSid IS NOT NULL AND ec.customerSid <> '')
ORDER BY ec.serialNumber
-- 企业卡未绑卡数据
SELECT
ec.createTime 卡生成时间,
ec.serialNumber 卡序号,
lgs.name 商品名称,
lgg.goodsNumber 商品数量
FROM emp_card ec
LEFT JOIN lpk_giftbag_goods lgg ON lgg.giftbagSid=ec.giftbagSid
LEFT JOIN lpk_goods lgs ON lgs.sid = lgg.goodsSid
WHERE (ec.customerSid IS NULL OR ec.customerSid = '')
ORDER BY ec.serialNumber

View File

@@ -0,0 +1,236 @@
-- 个人卡
CREATE TABLE ztmp_lpk_giftcard(
SELECT
*
FROM lpk_giftcard
);
CREATE TABLE `ztmp_cardno` (
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
`cardnumber` VARCHAR(50) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB ;
SELECT COUNT(1) FROM ztmp_cardno; -- 4894
SELECT COUNT(1) FROM ztmp_lpk_giftcard; -- 17520
delete from ztmp_lpk_giftcard where serialNumber>='00000001' and serialNumber<='00000015'; -- 15
SELECT COUNT(1) FROM ztmp_lpk_giftcard; -- 17505
delete from ztmp_lpk_giftcard where serialNumber>='01000001' and serialNumber<='01001000'; -- 1000
SELECT COUNT(1) FROM ztmp_lpk_giftcard; -- 16505
delete from ztmp_lpk_giftcard where serialNumber>='02000001' and serialNumber<='02001000'; -- 1000
SELECT COUNT(1) FROM ztmp_lpk_giftcard; -- 15505
delete from ztmp_lpk_giftcard where serialNumber>='03000001' and serialNumber<='03001000'; -- 1000
SELECT COUNT(1) FROM ztmp_lpk_giftcard; -- 14505
delete from ztmp_lpk_giftcard where serialNumber>='04000001' and serialNumber<='04001000'; -- 1000
SELECT COUNT(1) FROM ztmp_lpk_giftcard; -- 13505
delete from ztmp_lpk_giftcard where serialNumber>='05000001' and serialNumber<='05001000'; -- 1000
SELECT COUNT(1) FROM ztmp_lpk_giftcard; -- 12505
delete from ztmp_lpk_giftcard where serialNumber>='06000001' and serialNumber<='06001000'; -- 1000
SELECT COUNT(1) FROM ztmp_lpk_giftcard; -- 11505
delete from ztmp_lpk_giftcard where serialNumber>='07000001' and serialNumber<='07001000'; -- 1000
SELECT COUNT(1) FROM ztmp_lpk_giftcard; -- 10505
delete from ztmp_lpk_giftcard where serialNumber>='08000001' and serialNumber<='08001000'; -- 1000
SELECT COUNT(1) FROM ztmp_lpk_giftcard; -- 9505
delete from ztmp_lpk_giftcard where serialNumber in (select cardnumber from ztmp_cardno); -- 4,867 4894
SELECT COUNT(1) FROM ztmp_lpk_giftcard; -- 4638
-- 个人卡已绑卡数据
SELECT
count(1)
FROM ztmp_lpk_giftcard lg
WHERE lg.customerSid IS NOT NULL AND lg.customerSid <> ''
ORDER BY lg.serialNumber; -- 433
SELECT
lg.createTime 卡生成时间,
lg.serialNumber 卡序号,
lg.bindDate 绑卡时间,
lc.wxMpOpenid 客户微信,
lc.nick 客户昵称,
lc.mobile 客户手机号,
lcb.name 支行名称,
lgs.name 商品名称,
lgg.goodsNumber 商品数量
FROM ztmp_lpk_giftcard lg
LEFT JOIN lpk_customer lc ON lc.sid = lg.customerSid
LEFT JOIN lpk_customer_bank lcb ON lcb.sid = lc.customerBankSid
LEFT JOIN lpk_giftbag_goods lgg ON lgg.giftbagSid=lg.giftbagSid
LEFT JOIN lpk_goods lgs ON lgs.sid = lgg.goodsSid
WHERE lg.customerSid IS NOT NULL AND lg.customerSid <> ''
ORDER BY lg.serialNumber;
-- 个人卡未绑卡数据
SELECT
count(1)
FROM ztmp_lpk_giftcard lg
WHERE (lg.customerSid IS NULL OR lg.customerSid = '')
ORDER BY lg.serialNumber; -- 4205
SELECT
lg.createTime 卡生成时间,
lg.serialNumber 卡序号,
lgs.name 商品名称,
lgg.goodsNumber 商品数量
FROM ztmp_lpk_giftcard lg
LEFT JOIN lpk_giftbag_goods lgg ON lgg.giftbagSid=lg.giftbagSid
LEFT JOIN lpk_goods lgs ON lgs.sid = lgg.goodsSid
WHERE (lg.customerSid IS NULL OR lg.customerSid = '')
ORDER BY lg.serialNumber
update lpk_giftcard set isEnable=2 WHERE serialNumber IN(
select cardnumber from ztmp_cardno
); -- 4,824
update lpk_giftcard set isEnable=1 WHERE serialNumber IN(
select cardnumber from ztmp_cardno
); --4,867
update lpk_giftcard set isEnable=2 WHERE serialNumber IN(
select serialNumber from ztmp_lpk_giftcard
); -- 2,932
-- 预约提货,(旧数据)
SELECT
lc.wxMpOpenid 客户微信,
lro.customerSid 客户SID,
lc.nick 客户昵称,
lc.mobile 客户电话,
lcb.name 客户所属支行,
lro.reserveDate 预约日期,
ls.name 提货点,
lro.userName 提货人名,
lro.userPhone 提货人电话,
-lrog.goodsNumber AS 商品数量,
lg.NAME AS 商品名
FROM lpk_reserve_order lro
LEFT JOIN lpk_customer lc ON lc.sid = lro.customerSid
LEFT JOIN lpk_customer_bank lcb ON lc.customerBankSid = lcb.sid
LEFT JOIN lpk_store ls ON lro.storeSid = ls.sid
LEFT JOIN lpk_reserve_order_goods lrog ON lrog.orderSid=lro.sid
LEFT JOIN lpk_goods lg ON lg.sid = lrog.goodsSid
WHERE lc.wxMpOpenid='微信OpenID'
order by lro.reserveDate ;
-- 预约单
SELECT
lc.wxMpOpenid 客户微信,
lro.customerSid 客户SID,
lc.nick 客户昵称,
lc.mobile 客户电话,
lcb.name 客户所属支行,
lro.reserveDate 预约日期,
ls.name 提货点,
lro.userName 提货人名,
lro.userPhone 提货人电话,
-lrog.goodsNumber AS 商品数量,
lg.NAME AS 商品名
FROM vege_cellar_reserve_order lro
LEFT JOIN lpk_customer lc ON lc.sid = lro.customerSid
LEFT JOIN lpk_customer_bank lcb ON lc.customerBankSid = lcb.sid
LEFT JOIN lpk_store ls ON lro.storeSid = ls.sid
LEFT JOIN vege_cellar_reserve_details lrog ON lrog.orderSid=lro.sid
LEFT JOIN lpk_goods lg ON lg.sid = lrog.goodsSid
WHERE lc.wxMpOpenid='微信OpenID'
order by lro.reserveDate ;
SELECT
tr.createTime 转赠时间,
lc.wxMpOpenid 转赠人微信,
lc.nick 转赠人昵称,
lc.mobile 转赠人电话,
lg.name 转赠商品名称,
-trgd.goodsNumber 转赠商品数量,
tr.recipientTime 接收时间,
lcr.nick 接收人昵称,
lcr.mobile 接收人电话,
lcr.wxMpOpenid 接收人微信
FROM transfer_records tr
LEFT JOIN lpk_customer lc ON lc.sid = tr.customerSid
LEFT JOIN lpk_customer lcr ON lcr.sid = tr.recipientSid
LEFT JOIN transfer_records_goods_details trgd ON trgd.orderSid=tr.sid
LEFT JOIN lpk_goods lg ON lg.sid = trgd.goodsSid
WHERE lc.wxMpOpenid='微信OpenID'
SELECT
lg.createTime 卡生成时间,
lg.serialNumber 卡序号,
lg.bindDate 绑卡时间,
lc.wxMpOpenid 客户微信,
lc.nick 客户昵称,
lc.mobile 客户手机号,
lcb.name 支行名称,
lgs.name 商品名称,
lgg.goodsNumber 商品数量
FROM lpk_giftcard lg
LEFT JOIN lpk_customer lc ON lc.sid = lg.customerSid
LEFT JOIN lpk_customer_bank lcb ON lcb.sid = lc.customerBankSid
LEFT JOIN lpk_giftbag_goods lgg ON lgg.giftbagSid=lg.giftbagSid
LEFT JOIN lpk_goods lgs ON lgs.sid = lgg.goodsSid
WHERE lg.customerSid IS NOT NULL AND lg.customerSid <> '' AND lg.bindDate>'2024-03-18 09:00:00'
ORDER BY lg.serialNumber;
SELECT
lg.*
FROM lpk_giftcard lg
WHERE lg.customerSid IS NOT NULL AND lg.customerSid <> '' AND lg.bindDate>'2024-03-18 09:00:00'
ORDER BY lg.serialNumber; -- 35
"id" "sid" "createTime" "remarks" "isEnable" "recordSid" "giftbagSid" "serialNumber" "code" "codeKey" "state" "grantName" "grantDate" "customerSid" "customerMobile" "recordId" "bankSid" "grantRecordSid" "bindDate" "isItInvalid" "isReservation" "isTransfer"
"13723" "d660104b-e96d-49e9-863b-3093f523145b" "2024-01-09 10:56:45" \N "2" "3c77f9f6-8c4d-4c79-b78b-1e5e7068a184" "af05dede-4162-4bd0-b68c-61e8e4ccd825" "70001165" "20240109105644698414" "122313" "3" \N \N "a5bc2fb7-648d-4b9d-931f-7c01f14dcdb6" \N \N \N \N "2024-03-18 12:21:34" "0" "0" "0"
"14187" "986f08f7-4d90-481a-aefb-41f2286ff2b5" "2024-01-10 14:56:35" \N "2" "8de38a46-958f-4f1d-a807-9cc56094f141" "8ff462fe-c16a-4ac3-af45-24e9cb654fa9" "70001629" "20240110145635151676" "994550" "3" \N \N "a5bc2fb7-648d-4b9d-931f-7c01f14dcdb6" \N \N \N \N "2024-03-18 14:13:45" "0" "0" "0"
"14198" "102f04fb-e167-4497-afd0-90db6b944de2" "2024-01-10 14:56:35" \N "2" "b5c236e1-42a1-46ac-9f29-d98332c4780d" "d49a48f0-cfef-43bd-818f-a39b58a3339d" "70001640" "20240110145635197571" "909463" "3" \N \N "a5bc2fb7-648d-4b9d-931f-7c01f14dcdb6" \N \N \N \N "2024-03-18 11:17:18" "0" "0" "0"
"14206" "b9ae5cf7-48f1-4e40-a56e-047af8aa9314" "2024-01-10 14:56:35" \N "2" "42b2b16f-3592-4536-812e-283ef0fb4d7c" "421a074b-2aed-4ec3-a152-2a0b07d370da" "70001648" "20240110145635253900" "771293" "3" \N \N "a5bc2fb7-648d-4b9d-931f-7c01f14dcdb6" \N \N \N \N "2024-03-18 11:06:12" "0" "0" "0"
"14207" "4062d23d-630d-4f7f-a995-7e84aa305b5e" "2024-01-10 14:56:35" \N "2" "b14347d0-9141-4474-abd1-60b773716d7f" "ef8511a3-c6da-46cb-a096-26ddc6361d33" "70001649" "20240110145635788180" "440520" "3" \N \N "a5bc2fb7-648d-4b9d-931f-7c01f14dcdb6" \N \N \N \N "2024-03-18 11:13:41" "0" "0" "0"
"14208" "1f5e1289-7532-4d73-854b-34ac3f9334a1" "2024-01-10 14:56:35" \N "2" "09a67d3f-63bb-43d3-8c1d-f3505749606a" "3626e1e1-bd2e-477f-a55d-b99b4ab1c40a" "70001650" "20240110145635629811" "533195" "3" \N \N "a5bc2fb7-648d-4b9d-931f-7c01f14dcdb6" \N \N \N \N "2024-03-18 11:14:51" "0" "0" "0"
"14209" "2534cf20-8398-42bf-bbec-260c9a54dd0f" "2024-01-10 14:56:35" \N "2" "113ea876-0701-4016-953c-6e928320a574" "752476bb-7804-4e9e-b924-3d3b9a7f82a5" "70001651" "20240110145635352810" "637594" "3" \N \N "a5bc2fb7-648d-4b9d-931f-7c01f14dcdb6" \N \N \N \N "2024-03-18 11:15:15" "0" "0" "0"
"14210" "ab0d8312-110c-4b3f-84ef-af6775483c35" "2024-01-10 14:56:35" \N "2" "a33a7692-57c3-4d9a-8780-556293947376" "5c055932-5358-4c89-8fc6-8a88c251c9e4" "70001652" "20240110145635462611" "233562" "3" \N \N "a5bc2fb7-648d-4b9d-931f-7c01f14dcdb6" \N \N \N \N "2024-03-18 11:15:43" "0" "0" "0"
"14219" "f58dd614-e36c-42dc-b1c1-20917ec7d667" "2024-01-10 14:56:35" \N "2" "c3971c65-2009-4254-a5b3-0ebbb4dd43f4" "30be4a70-2c0a-4c5f-abf3-e1ac06b53a60" "70001661" "20240110145635965238" "750279" "3" \N \N "a5bc2fb7-648d-4b9d-931f-7c01f14dcdb6" \N \N \N \N "2024-03-18 11:18:45" "0" "0" "0"
"14220" "a35e2b10-8820-457b-8a9a-4e48ea87b49c" "2024-01-10 14:56:35" \N "2" "4ba0f810-bc3a-4abe-966d-7436c707678c" "ad9c2d7c-9dfd-42a2-84a1-2873173f24fe" "70001662" "20240110145635534629" "414138" "3" \N \N "a5bc2fb7-648d-4b9d-931f-7c01f14dcdb6" \N \N \N \N "2024-03-18 11:19:15" "0" "0" "0"
"14233" "6145ec42-46d0-4b2b-96c4-033e8e49c93d" "2024-01-10 14:56:35" \N "2" "82d6866e-9223-4ce2-9c5f-431adf92f864" "13fc3f92-2356-4a60-8202-314160f83303" "70001675" "20240110145635201244" "319831" "3" \N \N "a5bc2fb7-648d-4b9d-931f-7c01f14dcdb6" \N \N \N \N "2024-03-18 11:20:22" "0" "0" "0"
"14234" "788e8ffa-7f1d-4f14-93e2-24bc4c228341" "2024-01-10 14:56:35" \N "2" "f9ab85e6-8d6d-4036-bc2d-83f54a89de26" "6aea8eb3-a40b-411b-8e51-4248c2e604d8" "70001676" "20240110145635709602" "357097" "3" \N \N "a5bc2fb7-648d-4b9d-931f-7c01f14dcdb6" \N \N \N \N "2024-03-18 11:20:38" "0" "0" "0"
"14242" "2b98430e-f853-4d45-a129-47befa286230" "2024-01-10 14:56:35" \N "2" "d4fefbff-78f7-47a1-ac20-4ddf5d0d5724" "90973dab-fc3a-46ba-ab36-63cab7cc2f76" "70001684" "20240110145635784255" "469191" "3" \N \N "a5bc2fb7-648d-4b9d-931f-7c01f14dcdb6" \N \N \N \N "2024-03-18 11:21:42" "0" "0" "0"
"14243" "b407642c-5639-47d0-ab1e-e73964c5c27e" "2024-01-10 14:56:36" \N "2" "825e090b-b718-4363-b91c-717a7b280431" "30d6b353-1c58-46bf-ab23-bae169015335" "70001685" "20240110145635646983" "144228" "3" \N \N "a5bc2fb7-648d-4b9d-931f-7c01f14dcdb6" \N \N \N \N "2024-03-18 11:22:02" "0" "0" "0"
"14244" "17664a42-5bb7-4899-b210-f1903015ead3" "2024-01-10 14:56:36" \N "2" "eacf1f68-6f16-4ebc-9072-83917fd519bb" "38c37e23-b156-4f37-b2ec-7da26cffcc9d" "70001686" "20240110145635482813" "326448" "3" \N \N "a5bc2fb7-648d-4b9d-931f-7c01f14dcdb6" \N \N \N \N "2024-03-18 11:22:31" "0" "0" "0"
"14245" "f3eb7db8-b411-43e5-b7bc-74c357561dff" "2024-01-10 14:56:36" \N "2" "e1dd3ad3-9e6f-47c1-ae7d-f20138b503ea" "7f26e1a7-6442-478e-9154-9d53f01a20de" "70001687" "20240110145635213502" "932270" "3" \N \N "a5bc2fb7-648d-4b9d-931f-7c01f14dcdb6" \N \N \N \N "2024-03-18 11:22:46" "0" "0" "0"
"14252" "da2dabe6-ce5e-4690-b2cf-730b42a5370b" "2024-01-10 14:56:36" \N "2" "f371bb69-12ae-4681-845b-e931cd5ff354" "c4171255-010b-40d7-a98d-79e4eb8923c7" "70001694" "20240110145635565759" "125144" "3" \N \N "a5bc2fb7-648d-4b9d-931f-7c01f14dcdb6" \N \N \N \N "2024-03-18 11:24:00" "0" "0" "0"
"14254" "432c3c25-9a34-4781-b6aa-f225da554546" "2024-01-10 14:56:36" \N "2" "2fcbdab5-eef1-4924-ba14-c3503dbc6e71" "3f791ae4-7756-4075-b3b0-ecfcfc67dd6a" "70001696" "20240110145635802407" "315379" "3" \N \N "a5bc2fb7-648d-4b9d-931f-7c01f14dcdb6" \N \N \N \N "2024-03-18 11:24:12" "0" "0" "0"
"14375" "92fb7833-9565-4aa4-9404-d556867948c9" "2024-01-10 14:56:36" \N "2" "8da69e4a-4fef-46eb-b90a-e182ee850956" "1d6954ea-2943-45a9-8029-2b4a874390ed" "70001817" "20240110145636552792" "649332" "3" \N \N "a5bc2fb7-648d-4b9d-931f-7c01f14dcdb6" \N \N \N \N "2024-03-18 12:31:33" "0" "0" "0"
"14376" "ae2b1337-e04c-4383-9303-1042728690ed" "2024-01-10 14:56:36" \N "2" "7a1c9bb9-0419-4296-b446-7115134a8c96" "a8298d00-36d5-43e3-9e85-553480a4e377" "70001818" "20240110145636731410" "427867" "3" \N \N "a5bc2fb7-648d-4b9d-931f-7c01f14dcdb6" \N \N \N \N "2024-03-18 12:36:16" "0" "0" "0"
"14377" "1bf43a91-d52d-47cf-9e4e-4e8c3a7131f6" "2024-01-10 14:56:36" \N "2" "7b27db7f-e10f-4093-b815-a9b882dc66b5" "158d4cc0-c2ac-4853-b118-39f97ce4cf68" "70001819" "20240110145636223054" "907321" "3" \N \N "a5bc2fb7-648d-4b9d-931f-7c01f14dcdb6" \N \N \N \N "2024-03-18 12:36:29" "0" "0" "0"
"14378" "2996bcba-b0b1-49e0-b2dc-bdd07e77f4ac" "2024-01-10 14:56:36" \N "2" "876b510d-b382-42b4-8cd1-bab87823dccd" "aa08b366-e5bf-44f9-85f8-0c457787b212" "70001820" "20240110145636640772" "605351" "3" \N \N "a5bc2fb7-648d-4b9d-931f-7c01f14dcdb6" \N \N \N \N "2024-03-18 12:36:41" "0" "0" "0"
"14379" "69992ba7-35fb-4b39-8263-e0e75237cea7" "2024-01-10 14:56:36" \N "2" "741a9440-4372-4cbc-9298-24f480cd70ab" "8d1491d6-d2ce-4a9a-8e7f-2fd66ceb3495" "70001821" "20240110145636976791" "302541" "3" \N \N "a5bc2fb7-648d-4b9d-931f-7c01f14dcdb6" \N \N \N \N "2024-03-18 12:36:55" "0" "0" "0"
"14380" "c0b8bab6-81b3-4f0a-83e5-1e91990b5b82" "2024-01-10 14:56:36" \N "2" "2790bee5-a7eb-4569-ac1b-aff557f214ba" "f4e78e00-f8e2-45d6-b9a6-3f6870c78ebf" "70001822" "20240110145636602667" "714436" "3" \N \N "a5bc2fb7-648d-4b9d-931f-7c01f14dcdb6" \N \N \N \N "2024-03-18 12:37:08" "0" "0" "0"
"14381" "5783c5bb-8131-45dc-b1e9-27e50ad6ff0b" "2024-01-10 14:56:36" \N "2" "b158d0b6-b3bb-4564-b1b3-9204fd9d2f7c" "e9c96335-3ca6-460e-95a3-a6e55f43ec8a" "70001823" "20240110145636970749" "499029" "3" \N \N "a5bc2fb7-648d-4b9d-931f-7c01f14dcdb6" \N \N \N \N "2024-03-18 12:38:02" "0" "0" "0"
"14382" "95cdc259-7a46-48bb-87a1-a8cd6f4a5c9e" "2024-01-10 14:56:36" \N "2" "96a81500-c025-41fe-9102-3f46c8289472" "0654257f-a2e7-459b-bf85-e5747d4a38b3" "70001824" "20240110145636322447" "951077" "3" \N \N "a5bc2fb7-648d-4b9d-931f-7c01f14dcdb6" \N \N \N \N "2024-03-18 12:38:15" "0" "0" "0"
"14383" "90ef7938-c4f5-4f22-95b1-b9236db51742" "2024-01-10 14:56:36" \N "2" "45f5208c-8b3e-40d0-86b5-63db97466d70" "5036c0cc-a6c6-4458-80d7-3e2a0618757a" "70001825" "20240110145636484872" "655164" "3" \N \N "a5bc2fb7-648d-4b9d-931f-7c01f14dcdb6" \N \N \N \N "2024-03-18 12:38:25" "0" "0" "0"
"14384" "9251283a-5d13-43cf-b5b5-21e118c86459" "2024-01-10 14:56:36" \N "2" "f85a4958-4bb1-4307-b8fe-1d1572fcd504" "7b5b9f15-84d6-406c-aa91-41f0fac4a989" "70001826" "20240110145636340429" "156515" "3" \N \N "a5bc2fb7-648d-4b9d-931f-7c01f14dcdb6" \N \N \N \N "2024-03-18 12:38:40" "0" "0" "0"
"14385" "55291a74-3014-4ef0-bc0e-5f7888ef5f24" "2024-01-10 14:56:36" \N "2" "861bc22c-2823-440b-970d-3f151f345230" "0e11f602-81f6-496c-8de4-ae69ced74265" "70001827" "20240110145636579293" "230614" "3" \N \N "a5bc2fb7-648d-4b9d-931f-7c01f14dcdb6" \N \N \N \N "2024-03-18 12:38:50" "0" "0" "0"
"14386" "5888675a-9684-43d4-83da-5629157d0aad" "2024-01-10 14:56:36" \N "2" "9d54ada1-7aaa-43e6-8776-bc82332cebb7" "db1d7e49-49f8-480b-8840-4528393e0a4d" "70001828" "20240110145636617632" "888300" "3" \N \N "a5bc2fb7-648d-4b9d-931f-7c01f14dcdb6" \N \N \N \N "2024-03-18 12:39:02" "0" "0" "0"
"14387" "02188cd0-cdb4-4060-93ce-b99eb6a5f87e" "2024-01-10 14:56:36" \N "2" "07b80714-b140-4036-a968-1b801fd4f237" "9fe0b18e-7bbf-4601-a072-c86088c43407" "70001829" "20240110145636443526" "407278" "3" \N \N "a5bc2fb7-648d-4b9d-931f-7c01f14dcdb6" \N \N \N \N "2024-03-18 12:39:13" "0" "0" "0"
"14388" "7cfc3315-445e-49a5-873e-10ac7c43c607" "2024-01-10 14:56:36" \N "2" "74071d9c-e633-4424-807f-835f9bd687b7" "b15c0e4b-6b2e-4097-a698-eeb691f5bd77" "70001830" "20240110145636138127" "718336" "3" \N \N "a5bc2fb7-648d-4b9d-931f-7c01f14dcdb6" \N \N \N \N "2024-03-18 12:39:28" "0" "0" "0"
"17058" "0f5d624f-073a-42b4-8ebf-90505830fbb9" "2024-01-19 19:32:22" \N "1" "ec42c92b-d244-4720-87e8-3a36490398a6" "6f661c70-f9d9-4c94-9246-74fdf928ab97" "70004222" "20240119193222687375" "242360" "3" \N \N "51862395-f62d-442a-92fd-da80ecbee380" \N \N \N \N "2024-03-18 16:56:45" "0" "0" "0"
"17059" "1892a5cc-eb34-40b2-b20d-e9a3f3e3910b" "2024-01-19 19:32:22" \N "1" "7efadcd9-f7d3-4453-9186-eebdc9cb6a21" "a543265a-426a-4f0e-9425-39a989ce47c3" "70004223" "20240119193222675177" "861835" "3" \N \N "51862395-f62d-442a-92fd-da80ecbee380" \N \N \N \N "2024-03-18 16:59:06" "0" "0" "0"
"17060" "898793a8-2fcc-4357-a628-e1f4a9601979" "2024-01-19 19:32:22" \N "1" "e8fd8ead-e840-4885-903d-6b93952cbd71" "69b4a7ba-d39b-4fe8-95a7-a0f317944226" "70004224" "20240119193222148233" "410658" "3" \N \N "51862395-f62d-442a-92fd-da80ecbee380" \N \N \N \N "2024-03-18 16:59:27" "0" "0" "0"

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,239 @@
客户绑定支行 客户电话 客户姓名 卡号 粉条 整包白菜 整包土豆 北方白菜 张北土豆 绑卡时间 客户微信OpenID 客户SID 客户昵称
留营支行 15130120263 路春红 66004063 100 2023/12/25 13:09 o81zC69RY2vclV6I_j58PYaec-fM 47547f4b-160f-45f0-9d03-d303420ff7b9 惠享客户000188
SELECT
lc.wxMpOpenid,
lc.nick,
lc.mobile,
lc.sid
FROM lpk_customer lc
WHERE lc.mobile='15130120263'
;
"wxMpOpenid" "nick" "mobile" "sid"
"o81zC69RY2vclV6I_j58PYaec-fM" "惠享客户000188" "15130120263" "47547f4b-160f-45f0-9d03-d303420ff7b9"
SELECT
lc.wxMpOpenid,
lc.nick,
lc.mobile,
lg.name,
vc.goodsNumber
from vegetable_cellar vc
LEFT JOIN lpk_customer lc ON lc.sid=vc.customerSid
LEFT JOIN lpk_goods lg ON lg.sid=vc.goodsSid
WHERE
vc.customerSid='47547f4b-160f-45f0-9d03-d303420ff7b9'
"wxMpOpenid" "nick" "mobile" "name" "goodsNumber"
"o81zC69RY2vclV6I_j58PYaec-fM" "惠享客户000188" "15130120263" "纯红薯粉条" "80"
"o81zC69RY2vclV6I_j58PYaec-fM" "惠享客户000188" "15130120263" "惠享52度红薯" "23"
-- 个人卡
SELECT
r.wxMpOpenid,
d.customerSid,
d.bindDate,
d.giftbagSid,
d.serialNumber,
d.code,
s.goodsSid,
s.goodsNumber,
e.NAME AS goodsName,
'个人卡' cardtype
FROM lpk_giftcard d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN lpk_giftbag_goods s ON s.giftbagSid=d.giftbagSid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid='47547f4b-160f-45f0-9d03-d303420ff7b9'
-- 企业卡
SELECT
r.wxMpOpenid,
d.customerSid,
d.bindDate,
d.giftbagSid,
d.serialNumber,
d.code,
s.goodsSid,
s.goodsNumber,
e.NAME AS goodsName,
'企业卡' cardtype
FROM emp_card d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN lpk_giftbag_goods s ON s.giftbagSid=d.giftbagSid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid='47547f4b-160f-45f0-9d03-d303420ff7b9'
-- 购买卡
SELECT
oo.payTime,
oo.totalTee,
oo.openId,
lc.nick,
lc.mobile,
ood.goodsName,
ood.partNumber
FROM ord_order oo
LEFT JOIN lpk_customer lc ON lc.sid = oo.userSid
LEFT JOIN ord_order_detail ood ON ood.orderSid=oo.sid
LEFT JOIN lpk_goods e ON e.sid = ood.goodsSid
WHERE oo.payStatus=4
AND oo.userSid='47547f4b-160f-45f0-9d03-d303420ff7b9'
-- 转赠卡(旧数据)
SELECT
r.wxMpOpenid,
d.customerSid,
d.bindDate,
d.sid,
d.serialNumber,
d.code,
s.goodsSid,
s.goodsNumber,
e.NAME AS goodsName,
'转赠卡' cardtype
FROM emp_card_gift d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN emp_card_gift_goods s ON s.empCardGiftSid=d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid='47547f4b-160f-45f0-9d03-d303420ff7b9' AND d.isSenior = '2'
-- 转赠记录
SELECT
tr.recipientTime,
lc.wxMpOpenid,
lc.nick,
lc.mobile,
lg.name,
trgd.goodsNumber
FROM transfer_records tr
LEFT JOIN lpk_customer lc ON lc.sid = tr.recipientSid
LEFT JOIN transfer_records_goods_details trgd ON trgd.orderSid=tr.sid
LEFT JOIN lpk_goods lg ON lg.sid = trgd.goodsSid
WHERE tr.recipientSid ='47547f4b-160f-45f0-9d03-d303420ff7b9'
-- 预约提货,(旧数据)
SELECT
r.wxMpOpenid,
d.customerSid,
d.reserveDate,
d.sid,
d.storeSid,
d.cardCode,
s.goodsSid,
-s.goodsNumber AS goodsNumber,
e.NAME AS goodsName,
d.cardType cardtype
FROM lpk_reserve_order d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN lpk_reserve_order_goods s ON s.orderSid=d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid='47547f4b-160f-45f0-9d03-d303420ff7b9'
-- 预约单
SELECT
r.wxMpOpenid,
d.customerSid,
d.reserveDate,
d.sid,
s.goodsSid,
-s.goodsNumber AS goodsNumber,
e.NAME AS goodsName
FROM vege_cellar_reserve_order d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN vege_cellar_reserve_details s ON s.orderSid=d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid='47547f4b-160f-45f0-9d03-d303420ff7b9'
-- 赠出的卡,数量为负值
SELECT
r.wxMpOpenid,
d.empCardCustomerSid,
d.grantDate,
d.sid,
d.serialNumber,
d.code,
s.goodsSid,
-s.goodsNumber AS goodsNumber,
e.NAME AS goodsName,
'赠出' cardtype
FROM emp_card_gift d
LEFT JOIN lpk_customer r ON r.sid = d.empCardCustomerSid
LEFT JOIN emp_card_gift_goods s ON s.empCardGiftSid=d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.empCardCustomerSid='47547f4b-160f-45f0-9d03-d303420ff7b9' AND d.isSenior = '2'
-- 赠出记录
SELECT
tr.createTime,
lc.wxMpOpenid,
lc.nick,
lc.mobile,
lg.name,
-trgd.goodsNumber
FROM transfer_records tr
LEFT JOIN lpk_customer lc ON lc.sid = tr.customerSid
LEFT JOIN transfer_records_goods_details trgd ON trgd.orderSid=tr.sid
LEFT JOIN lpk_goods lg ON lg.sid = trgd.goodsSid
WHERE tr.customerSid ='47547f4b-160f-45f0-9d03-d303420ff7b9'
-- 预约提货,(旧数据)
SELECT
r.wxMpOpenid 微信openid,
d.customerSid 客户SID,
d.reserveDate 预约日期,
d.userName 提货人姓名,
d.userPhone 提货人电话,
d.storeSid 提货点SID,
ls.name 提货点名称,
s.goodsSid 商品SID,
-s.goodsNumber AS 商品数量,
e.NAME AS 商品名称
FROM lpk_reserve_order d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN lpk_reserve_order_goods s ON s.orderSid=d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
LEFT JOIN lpk_store ls ON ls.sid = d.storeSid
WHERE d.customerSid='47547f4b-160f-45f0-9d03-d303420ff7b9'
union all
SELECT
r.wxMpOpenid 微信openid,
d.customerSid 客户SID,
d.reserveDate 预约日期,
d.userName 提货人姓名,
d.userPhone 提货人电话,
d.storeSid 提货点SID,
d.storeName 提货点名称,
s.goodsSid 商品SID,
-s.goodsNumber AS 商品数量,
e.NAME AS 商品名称
FROM vege_cellar_reserve_order d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN vege_cellar_reserve_details s ON s.orderSid=d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid='47547f4b-160f-45f0-9d03-d303420ff7b9'
ORDER BY 预约日期
SELECT
tr.createTime 转赠时间,
lc.wxMpOpenid 转赠人微信,
lc.nick 转赠人昵称,
lc.mobile 转赠人电话,
lg.name 转赠商品名称,
-trgd.goodsNumber 转赠商品数量,
tr.recipientTime 接收时间,
lcr.nick 接收人昵称,
lcr.mobile 接收人电话,
lcr.wxMpOpenid 接收人微信
FROM transfer_records tr
LEFT JOIN lpk_customer lc ON lc.sid = tr.customerSid
LEFT JOIN lpk_customer lcr ON lcr.sid = tr.recipientSid
LEFT JOIN transfer_records_goods_details trgd ON trgd.orderSid=tr.sid
LEFT JOIN lpk_goods lg ON lg.sid = trgd.goodsSid
WHERE tr.customerSid ='47547f4b-160f-45f0-9d03-d303420ff7b9'

View File

@@ -0,0 +1,217 @@
客户绑定支行 客户电话 客户姓名 卡号 粉条 整包白菜 整包土豆 北方白菜 张北土豆 绑卡时间 客户微信OpenID 客户SID 客户昵称
裕西分理处 18031266678 普天 70001069 1 2024/1/15 12:42 o81zC69REd8ziAN9LhqUlxBs0cYA 96b4ef58-ea26-4c2e-86cb-27a38c6ec1b5 彩虹糖
SELECT
lc.wxMpOpenid,
lc.nick,
lc.mobile,
lc.sid
FROM lpk_customer lc
WHERE lc.mobile='18031266678'
;
"wxMpOpenid" "nick" "mobile" "sid"
"o81zC69REd8ziAN9LhqUlxBs0cYA" "彩虹糖" "18031266678" "96b4ef58-ea26-4c2e-86cb-27a38c6ec1b5"
SELECT
lc.wxMpOpenid,
lc.nick,
lc.mobile,
lg.name,
vc.goodsNumber
from vegetable_cellar vc
LEFT JOIN lpk_customer lc ON lc.sid=vc.customerSid
LEFT JOIN lpk_goods lg ON lg.sid=vc.goodsSid
WHERE
vc.customerSid='96b4ef58-ea26-4c2e-86cb-27a38c6ec1b5'
"wxMpOpenid" "nick" "mobile" "name" "goodsNumber"
"o81zC69REd8ziAN9LhqUlxBs0cYA" "彩虹糖" "18031266678" "西瓜红蜜薯" "125"
"o81zC69REd8ziAN9LhqUlxBs0cYA" "彩虹糖" "18031266678" "惠享52度红薯" "2"
-- 个人卡
SELECT
r.wxMpOpenid,
d.customerSid,
d.bindDate,
d.giftbagSid,
d.serialNumber,
d.code,
s.goodsSid,
s.goodsNumber,
e.NAME AS goodsName,
'个人卡' cardtype
FROM lpk_giftcard d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN lpk_giftbag_goods s ON s.giftbagSid=d.giftbagSid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid='96b4ef58-ea26-4c2e-86cb-27a38c6ec1b5'
-- 企业卡
SELECT
r.wxMpOpenid,
d.customerSid,
d.bindDate,
d.giftbagSid,
d.serialNumber,
d.code,
s.goodsSid,
s.goodsNumber,
e.NAME AS goodsName,
'企业卡' cardtype
FROM emp_card d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN lpk_giftbag_goods s ON s.giftbagSid=d.giftbagSid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid='96b4ef58-ea26-4c2e-86cb-27a38c6ec1b5'
-- 购买卡
SELECT
oo.payTime,
oo.totalTee,
oo.openId,
lc.nick,
lc.mobile,
ood.goodsName,
ood.partNumber
FROM ord_order oo
LEFT JOIN lpk_customer lc ON lc.sid = oo.userSid
LEFT JOIN ord_order_detail ood ON ood.orderSid=oo.sid
LEFT JOIN lpk_goods e ON e.sid = ood.goodsSid
WHERE oo.payStatus=4
AND oo.userSid='96b4ef58-ea26-4c2e-86cb-27a38c6ec1b5'
-- 转赠卡(旧数据)
SELECT
r.wxMpOpenid,
d.customerSid,
d.bindDate,
d.sid,
d.serialNumber,
d.code,
s.goodsSid,
s.goodsNumber,
e.NAME AS goodsName,
'转赠卡' cardtype
FROM emp_card_gift d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN emp_card_gift_goods s ON s.empCardGiftSid=d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid='96b4ef58-ea26-4c2e-86cb-27a38c6ec1b5' AND d.isSenior = '2'
-- 转赠记录
SELECT
tr.recipientTime,
lc.wxMpOpenid,
lc.nick,
lc.mobile,
lg.name,
trgd.goodsNumber
FROM transfer_records tr
LEFT JOIN lpk_customer lc ON lc.sid = tr.recipientSid
LEFT JOIN transfer_records_goods_details trgd ON trgd.orderSid=tr.sid
LEFT JOIN lpk_goods lg ON lg.sid = trgd.goodsSid
WHERE tr.recipientSid ='96b4ef58-ea26-4c2e-86cb-27a38c6ec1b5'
-- 预约提货,(旧数据)
SELECT
r.wxMpOpenid,
d.customerSid,
d.reserveDate,
d.sid,
d.storeSid,
d.cardCode,
s.goodsSid,
-s.goodsNumber AS goodsNumber,
e.NAME AS goodsName,
d.cardType cardtype
FROM lpk_reserve_order d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN lpk_reserve_order_goods s ON s.orderSid=d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid='96b4ef58-ea26-4c2e-86cb-27a38c6ec1b5'
-- 预约单
SELECT
r.wxMpOpenid,
d.customerSid,
d.reserveDate,
d.sid,
s.goodsSid,
-s.goodsNumber AS goodsNumber,
e.NAME AS goodsName
FROM vege_cellar_reserve_order d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN vege_cellar_reserve_details s ON s.orderSid=d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid='96b4ef58-ea26-4c2e-86cb-27a38c6ec1b5'
-- 赠出的卡,数量为负值
SELECT
r.wxMpOpenid,
d.empCardCustomerSid,
d.grantDate,
d.sid,
d.serialNumber,
d.code,
s.goodsSid,
-s.goodsNumber AS goodsNumber,
e.NAME AS goodsName,
'赠出' cardtype
FROM emp_card_gift d
LEFT JOIN lpk_customer r ON r.sid = d.empCardCustomerSid
LEFT JOIN emp_card_gift_goods s ON s.empCardGiftSid=d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.empCardCustomerSid='96b4ef58-ea26-4c2e-86cb-27a38c6ec1b5' AND d.isSenior = '2'
-- 赠出记录
SELECT
tr.createTime,
lc.wxMpOpenid,
lc.nick,
lc.mobile,
lg.name,
-trgd.goodsNumber
FROM transfer_records tr
LEFT JOIN lpk_customer lc ON lc.sid = tr.customerSid
LEFT JOIN transfer_records_goods_details trgd ON trgd.orderSid=tr.sid
LEFT JOIN lpk_goods lg ON lg.sid = trgd.goodsSid
WHERE tr.customerSid ='96b4ef58-ea26-4c2e-86cb-27a38c6ec1b5'
-- 预约提货,(旧数据)
SELECT
r.wxMpOpenid 微信openid,
d.customerSid 客户SID,
d.reserveDate 预约日期,
d.userName 提货人姓名,
d.userPhone 提货人电话,
d.storeSid 提货点SID,
ls.name 提货点名称,
s.goodsSid 商品SID,
-s.goodsNumber AS 商品数量,
e.NAME AS 商品名称
FROM lpk_reserve_order d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN lpk_reserve_order_goods s ON s.orderSid=d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
LEFT JOIN lpk_store ls ON ls.sid = d.storeSid
WHERE d.customerSid='96b4ef58-ea26-4c2e-86cb-27a38c6ec1b5'
union all
SELECT
r.wxMpOpenid 微信openid,
d.customerSid 客户SID,
d.reserveDate 预约日期,
d.userName 提货人姓名,
d.userPhone 提货人电话,
d.storeSid 提货点SID,
d.storeName 提货点名称,
s.goodsSid 商品SID,
-s.goodsNumber AS 商品数量,
e.NAME AS 商品名称
FROM vege_cellar_reserve_order d
LEFT JOIN lpk_customer r ON r.sid = d.customerSid
LEFT JOIN vege_cellar_reserve_details s ON s.orderSid=d.sid
LEFT JOIN lpk_goods e ON e.sid = s.goodsSid
WHERE d.customerSid='96b4ef58-ea26-4c2e-86cb-27a38c6ec1b5'
ORDER BY 预约日期

View File

@@ -0,0 +1,28 @@
SELECT
oo.payTime,
oo.totalTee,
oo.openId,
lc.nick,
lc.mobile,
ood.goodsName,
ood.partNumber
FROM ord_order oo
LEFT JOIN lpk_customer lc ON lc.sid = oo.userSid
LEFT JOIN ord_order_detail ood ON ood.orderSid=oo.sid
LEFT JOIN lpk_goods e ON e.sid = ood.goodsSid
WHERE oo.payStatus=4
SELECT
oo.outTradeNo 订单编号,
oo.payTime 支付时间,
oo.totalTee 金额,
oo.openId 支付人微信,
lc.nick 支付人昵称,
lc.mobile 支付人电话
FROM ord_order oo
LEFT JOIN lpk_customer lc ON lc.sid = oo.userSid
WHERE oo.payStatus=4
ORDER BY oo.payTime

Binary file not shown.

177
ordermall/pom.xml Normal file
View File

@@ -0,0 +1,177 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>ordermall-biz</artifactId>
<groupId>com.yxt.ordermall</groupId>
<version>2.0.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.yxt.ordermall</groupId>
<artifactId>ordermall</artifactId>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId>
<version>3.3.2</version>
</dependency>
<dependency>
<groupId>com.yxt</groupId>
<artifactId>yxt-common-base</artifactId>
<version>0.0.1</version>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<!--mysql-->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-annotation</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.yxt</groupId>
<artifactId>yxt-common-base</artifactId>
<version>0.0.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<!--mysql-->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-annotation</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- Sa-Token 权限认证,在线文档:https://sa-token.cc -->
<dependency>
<groupId>cn.dev33</groupId>
<artifactId>sa-token-spring-boot-starter</artifactId>
<version>1.37.0</version>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.8.23</version>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-core</artifactId>
<version>5.8.23</version>
</dependency>
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>core</artifactId>
<version>3.5.2</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.9.2</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.8.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.5.6</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*Mapper.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.*</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</build>
</project>

View File

@@ -45,6 +45,19 @@ mybatis-plus:
# group: yxt-supervise-gf
# name-server: 127.0.0.1:9876
#hystrix的超时时间
hystrix:
command:
default:
execution:
timeout:
enabled: true
isolation:
thread:
timeoutInMilliseconds: 60000
#ribbon的超时时间
ribbon:
ReadTimeout: 60000
ConnectTimeout: 60000

92
ordermallGateway/pom.xml Normal file
View File

@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>ordermall-biz</artifactId>
<groupId>com.yxt.ordermall</groupId>
<version>2.0.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.yxt.ordermall</groupId>
<artifactId>ordermallGateway</artifactId>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>0.9.0</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-gateway</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
</dependency>
<!--引入redis-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
<exclusions>
<exclusion>
<groupId>io.lettuce</groupId>
<artifactId>lettuce-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.5.6</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.yml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</build>
</project>

410
pom.xml Normal file
View File

@@ -0,0 +1,410 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.yxt</groupId>
<artifactId>yxt-parent</artifactId>
<version>0.0.1</version>
<relativePath/>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>ordermall-biz</artifactId>
<packaging>pom</packaging>
<modules>
<module>ordermallGateway</module>
<module>ordermall</module>
</modules>
<groupId>com.yxt.ordermall</groupId>
<version>2.0.1</version>
<properties>
<!-- 使用的JAVA版本号 -->
<java.version>1.8</java.version>
<!-- 项目构建编码 -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- 项目输出编码 -->
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<!-- Spring相关组件 -->
<!-- SpringBoot 依赖配置 -->
<spring-boot.version>2.2.9.RELEASE</spring-boot.version>
<!-- SpringCloud 微服务 -->
<spring-cloud.version>Hoxton.SR6</spring-cloud.version>
<!-- SpringCloud Alibaba 微服务 -->
<spring-cloud-alibaba.version>2.2.1.RELEASE</spring-cloud-alibaba.version>
<!-- nacos客户端 -->
<nacos.version>1.3.0</nacos.version>
<!-- 公共的基础组件 -->
<!-- io常用工具类 -->
<commons.io.version>2.5</commons.io.version>
<commons-codec.version>1.14</commons-codec.version>
<!--Bean工具 -->
<commons.beanutils.version>1.9.3</commons.beanutils.version>
<!-- 线程池工具 -->
<common-pool.version>2.6.2</common-pool.version>
<!-- mybatis,mybatis-plus已经引用
<spring-boot.mybatis>2.1.2</spring-boot.mybatis>-->
<!-- mybatis-plus -->
<mybatis-plus.version>3.4.0</mybatis-plus.version>
<!-- JSON 解析器和生成器 -->
<fastjson.version>1.2.73</fastjson.version>
<!--Token生成与解析 -->
<jjwt.version>0.9.1</jjwt.version>
<!-- 辅助组件 -->
<!-- Swagger 依赖配置 -->
<swagger.fox.version>2.9.2</swagger.fox.version>
<knife4j-Swagger>2.0.5</knife4j-Swagger>
<!-- excel工具 -->
<poi.version>3.17</poi.version>
<!-- 验证码 -->
<kaptcha.version>2.3.2</kaptcha.version>
<!-- 解析客户端操作系统、浏览器等 -->
<bitwalker.version>1.19</bitwalker.version>
<!-- velocity模板引擎 -->
<velocity.version>1.7</velocity.version>
<!-- Hutool组件 -->
<hutool.version>5.4.0</hutool.version>
<hibernate-validator.version>6.0.20.Final</hibernate-validator.version>
<lombok.version>1.18.24</lombok.version>
<jedis.version>3.1.0</jedis.version>
<java-jwt.version>3.10.1</java-jwt.version>
<redis.version>2.2.9.RELEASE</redis.version>
<poi-tl.version>1.8.1</poi-tl.version>
<poi.version>4.1.2</poi.version>
<flowable.version>6.5.0</flowable.version>
<pdfbox.version>2.0.25</pdfbox.version>
</properties>
<!-- 依赖声明 -->
<dependencyManagement>
<dependencies>
<!-- SpringBoot 依赖配置 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- SpringCloud 微服务 -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- SpringCloud Alibaba 微服务 -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
<version>${spring-cloud-alibaba.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- Alibaba Nacos 配置 -->
<dependency>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-client</artifactId>
<version>${nacos.version}</version>
</dependency>
<!--Redis配置-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
<version>${redis.version}</version>
<exclusions>
<exclusion>
<groupId>io.lettuce</groupId>
<artifactId>lettuce-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- https://mvnrepository.com/artifact/com.auth0/java-jwt -->
<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
<version>${java-jwt.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/redis.clients/jedis -->
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>${jedis.version}</version>
</dependency>
<!-- io常用工具类 -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons.io.version}</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>${commons-codec.version}</version>
</dependency>
<!--Bean工具 -->
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>${commons.beanutils.version}</version>
</dependency>
<!-- 公共资源池 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
<version>${common-pool.version}</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>${mybatis-plus.version}</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-annotation</artifactId>
<version>${mybatis-plus.version}</version>
</dependency>
<!-- JSON 解析器和生成器 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>${fastjson.version}</version>
</dependency>
<!--Token生成与解析 -->
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>${jjwt.version}</version>
</dependency>
<!-- Swagger 依赖配置 -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>${swagger.fox.version}</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>${swagger.fox.version}</version>
</dependency>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-dependencies</artifactId>
<version>${knife4j-Swagger}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- excel工具 -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>${poi.version}</version>
</dependency>
<!-- 验证码 -->
<dependency>
<groupId>com.github.penggle</groupId>
<artifactId>kaptcha</artifactId>
<version>${kaptcha.version}</version>
</dependency>
<!-- 解析客户端操作系统、浏览器等 -->
<dependency>
<groupId>eu.bitwalker</groupId>
<artifactId>UserAgentUtils</artifactId>
<version>${bitwalker.version}</version>
</dependency>
<!-- 代码生成使用模板 -->
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<version>${velocity.version}</version>
</dependency>
<!-- hutool所有模块 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>${hutool.version}</version>
</dependency>
<!-- hutool 核心,包括Bean操作、日期、各种Util等 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-core</artifactId>
<version>${hutool.version}</version>
</dependency>
<!-- hutool 基于HttpUrlConnection的Http客户端封装 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-http</artifactId>
<version>${hutool.version}</version>
</dependency>
<!-- hutool 加密解密模块,提供对称、非对称和摘要算法封装 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-crypto</artifactId>
<version>${hutool.version}</version>
</dependency>
<!-- hutool 简单缓存实现 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-cache</artifactId>
<version>${hutool.version}</version>
</dependency>
<!-- hutool 图片验证码实现 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-captcha</artifactId>
<version>${hutool.version}</version>
</dependency>
<!-- hutool 针对POI中Excel和Word的封装 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-poi</artifactId>
<version>${hutool.version}</version>
</dependency>
<!-- hutool JSON实现 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-json</artifactId>
<version>${hutool.version}</version>
</dependency>
<!-- hutool 定时任务模块,提供类Crontab表达式的定时任务 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-cron</artifactId>
<version>${hutool.version}</version>
</dependency>
<!-- hutool 系统参数调用封装(JVM信息等) -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-system</artifactId>
<version>${hutool.version}</version>
</dependency>
<!-- hutool 功能更强大的Setting配置文件和Properties封装 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-setting</artifactId>
<version>${hutool.version}</version>
</dependency>
<!-- hutool 扩展模块,对第三方封装(模板引擎、邮件、Servlet、二维码、Emoji、FTP、分词等) -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-extra</artifactId>
<version>${hutool.version}</version>
</dependency>
<!-- hutool JDK动态代理封装,提供非IOC下的切面支持 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-aop</artifactId>
<version>${hutool.version}</version>
</dependency>
<!-- hutool 布隆过滤,提供一些Hash算法的布隆过滤 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-bloomFilter</artifactId>
<version>${hutool.version}</version>
</dependency>
<!-- hutool JDBC封装后的数据操作,基于ActiveRecord思想 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-db</artifactId>
<version>${hutool.version}</version>
</dependency>
<!-- hutool 自动识别日志实现的日志门面 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-log</artifactId>
<version>${hutool.version}</version>
</dependency>
<!-- hutool 基于Java的NIO和AIO的Socket封装 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-socket</artifactId>
<version>${hutool.version}</version>
</dependency>
<!-- hutool 基于DFA模型的多关键字查找 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-dfa</artifactId>
<version>${hutool.version}</version>
</dependency>
<!-- hutool 脚本执行封装,例如Javascript -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-script</artifactId>
<version>${hutool.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>${hibernate-validator.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
<version>${lombok.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.deepoove/poi-tl -->
<dependency>
<groupId>com.deepoove</groupId>
<artifactId>poi-tl</artifactId>
<version>${poi-tl.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>${poi.version}</version>
</dependency>
<!--flowable组件-->
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-engine</artifactId>
<version>${flowable.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-spring-boot-starter-basic</artifactId>
<version>${flowable.version}</version>
<exclusions><!-- 需要排除flowable的mybatis依赖,不然会跟mybatis-plus冲突 -->
<exclusion>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>${pdfbox.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<distributionManagement>
<repository>
<id>nexus-releases</id>
<url>http://nexus3.yyundong.com/repository/yxt-mvn-releases/</url>
</repository>
<snapshotRepository>
<id>nexus-snapshots</id>
<url>http://nexus3.yyundong.com/repository/yxt-mvn-snapshot/</url>
</snapshotRepository>
</distributionManagement>
</project>