初始化

This commit is contained in:
2024-12-25 09:46:50 +08:00
commit 58c9128365
837 changed files with 127860 additions and 0 deletions

3
README.md Normal file
View File

@@ -0,0 +1,3 @@
# yxt-yythmall-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.

133
pom.xml Normal file
View File

@@ -0,0 +1,133 @@
<?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>yxt-yyth</artifactId>
<groupId>com.yxt.yythmall</groupId>
<version>2.0.1</version>
<dependencies>
<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>com.alibaba</groupId>
<artifactId>easyexcel</artifactId>
<version>3.3.2</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

@@ -0,0 +1,24 @@
package com.yxt.yythmall;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.scheduling.annotation.EnableScheduling;
/**
* @author dimengzhe
*/
@SpringBootApplication(scanBasePackages = {
"com.yxt.yythmall.config",
"com.yxt.common.base.config",
"com.yxt.yythmall"
})
// 启用自带定时任务
@EnableScheduling
@EnableFeignClients(basePackages = {})
public class YxtYythmallApplication {
public static void main(String[] args) {
SpringApplication.run(YxtYythmallApplication.class, args);
}
}

View File

@@ -0,0 +1,41 @@
package com.yxt.yythmall.adminapi;
import com.yxt.common.core.result.ResultBean;
import com.yxt.yythmall.adminapi.vo.PmsBrandVo;
import com.yxt.yythmall.adminapi.vo.PmsProductCategoryVo;
import com.yxt.yythmall.adminservice.AdminMallService;
import com.yxt.yythmall.api.lpkbank.LpkBank;
import com.yxt.yythmall.api.lpkstore.LpkStore;
import com.yxt.yythmall.biz.lpkbank.LpkBankService;
import com.yxt.yythmall.biz.lpkstore.LpkStoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController("com.yxt.yythmall.adminapi.AdminBankRest")
@RequestMapping("/adminapi/bank")
public class AdminBankRest {
@Autowired
private LpkBankService lpkBankService;
@Autowired
private LpkStoreService lpkStoreService;
@GetMapping(value = "/listBankAll")
public ResultBean<List<LpkBank>> listBankAll() {
ResultBean rb = ResultBean.fireFail();
List<LpkBank> list = lpkBankService.listAllBank();
return rb.success().setData(list);
}
@GetMapping(value = "/listStoreOfBank")
public ResultBean<List<LpkStore>> listStoreOfBank(@RequestParam(name = "bankSid", required = false) String bankSid) {
ResultBean rb = ResultBean.fireFail();
List<LpkStore> list = lpkStoreService.listStoreOfBank(bankSid);
return rb.success().setData(list);
}
}

View File

@@ -0,0 +1,33 @@
package com.yxt.yythmall.adminapi;
import com.yxt.common.core.result.ResultBean;
import com.yxt.yythmall.adminapi.vo.PmsBrandVo;
import com.yxt.yythmall.adminapi.vo.PmsProductCategoryVo;
import com.yxt.yythmall.adminservice.AdminMallService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController("com.yxt.yythmall.adminapi.AdminMallRest")
@RequestMapping("/adminapi/mall")
public class AdminMallRest {
@Autowired
private AdminMallService adminMallService;
@GetMapping(value = "/listAllBrand")
public ResultBean<List<PmsBrandVo>> listAllBrand() {
ResultBean rb = ResultBean.fireFail();
List<PmsBrandVo> list = adminMallService.listBrand();
return rb.success().setData(list);
}
@GetMapping(value = "/listAllCategory")
public ResultBean<List<PmsBrandVo>> listAllCategory() {
ResultBean rb = ResultBean.fireFail();
List<PmsProductCategoryVo> list = adminMallService.listAllCategory();
return rb.success().setData(list);
}
}

View File

@@ -0,0 +1,128 @@
package com.yxt.yythmall.adminapi;
import com.alibaba.excel.EasyExcel;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.yythmall.api.lpkreserveorder.LpkReserveOrderQuery;
import com.yxt.yythmall.biz.vegecallerreserveorder.*;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.List;
import java.util.Map;
@RestController("com.yxt.yythmall.adminapi.AdminReserveRest")
@RequestMapping("/adminapi/reserve")
public class AdminReserveRest {
@Autowired
private VegeCellarReserveOrderService vegeCellarReserveOrderService;
@ApiOperation("精确到客户的预约单列表")
@PostMapping("/pageOfCustomer")
public ResultBean<IPage<ReserveOrderVo>> pageOfCustomer(@RequestBody PagerQuery<LpkReserveOrderQuery> pq) {
return vegeCellarReserveOrderService.pageOfCustomer(pq);
}
@PostMapping("/expExcelOfCustomer")
public void expExcelOfCustomer(@RequestBody LpkReserveOrderQuery pq, HttpServletResponse response) throws IOException {
// 这里注意 有同学反应使用swagger 会导致各种问题,请直接用浏览器或者用postman
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setCharacterEncoding("utf-8");
// 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系
String fileName = URLEncoder.encode("预约单明细", "UTF-8").replaceAll("\\+", "%20");
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
// Map<String, List<ReserveCustomerExcel>> map = vegeCellarReserveOrderService.mapForExcelCustomer(pq);
List<ReserveCustomerExcel> list = vegeCellarReserveOrderService.listForExcelCustomer(pq);
EasyExcel.write(response.getOutputStream(), ReserveCustomerExcel.class).sheet("预约单明细").doWrite(list);
// try (ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream(), ReserveCustomerExcel.class).build()) {
// AtomicInteger i= new AtomicInteger();
// map.forEach((key,val) ->{
// WriteSheet writeSheet = EasyExcel.writerSheet(i.get(),key).build();
// i.getAndIncrement();
// excelWriter.write(val, writeSheet);
// });
// }
}
@ApiOperation("精确到客户的预约单列表")
@PostMapping("/pageOfStore")
public ResultBean<IPage<ReserveOrderVo>> pageOfStore(@RequestBody PagerQuery<LpkReserveOrderQuery> pq) {
return vegeCellarReserveOrderService.pageOfStore(pq);
}
@PostMapping("/expExcelOfStore")
public void expExcelOfStore(@RequestBody LpkReserveOrderQuery pq, HttpServletResponse response) throws IOException {
// 这里注意 有同学反应使用swagger 会导致各种问题,请直接用浏览器或者用postman
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setCharacterEncoding("utf-8");
// 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系
String fileName = URLEncoder.encode("提货点配货单", "UTF-8").replaceAll("\\+", "%20");
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
// Map<String, List<ReserveStoreExcel>> map = vegeCellarReserveOrderService.mapForExcelStore(pq);
List<ReserveStoreExcel> list = vegeCellarReserveOrderService.listForExcelStore(pq);
EasyExcel.write(response.getOutputStream(), ReserveStoreExcel.class).sheet("网点配货单").doWrite(list);
// try (ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream(), ReserveStoreExcel.class).build()) {
// AtomicInteger i= new AtomicInteger();
// map.forEach((key,val) ->{
// WriteSheet writeSheet = EasyExcel.writerSheet(i.get(),key).build();
// i.getAndIncrement();
// excelWriter.write(val, writeSheet);
// });
// }
}
@ApiOperation("精确到客户的预约单列表")
@PostMapping("/pageOfBank")
public ResultBean<IPage<ReserveOrderVo>> pageOfBank(@RequestBody PagerQuery<LpkReserveOrderQuery> pq) {
return vegeCellarReserveOrderService.pageOfBank(pq);
}
@PostMapping("/expExcelOfBank")
public void expExcelOfBank(@RequestBody LpkReserveOrderQuery pq, HttpServletResponse response) throws IOException {
// 这里注意 有同学反应使用swagger 会导致各种问题,请直接用浏览器或者用postman
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setCharacterEncoding("utf-8");
// 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系
String fileName = URLEncoder.encode("支行配货单", "UTF-8").replaceAll("\\+", "%20");
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
Map<String, List<ReserveBankExcel>> map = vegeCellarReserveOrderService.mapForExcelBank(pq);
List<ReserveBankExcel> list = vegeCellarReserveOrderService.listForExcelBank(pq);
EasyExcel.write(response.getOutputStream(), ReserveBankExcel.class).sheet("支行配货单").doWrite(list);
// try (ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream(), ReserveBankExcel.class).build()) {
// AtomicInteger i= new AtomicInteger();
// map.forEach((key,val) ->{
// WriteSheet writeSheet = EasyExcel.writerSheet(i.get(),key).build();
// i.getAndIncrement();
// excelWriter.write(val, writeSheet);
// });
// }
}
@ApiOperation("精确到客户的预约单列表")
@PostMapping("/pageOfAll")
public ResultBean<IPage<ReserveOrderVo>> pageOfAll(@RequestBody PagerQuery<LpkReserveOrderQuery> pq) {
return vegeCellarReserveOrderService.pageOfAll(pq);
}
@PostMapping("/expExcelOfAll")
public void expExcelOfAll(@RequestBody LpkReserveOrderQuery pq, HttpServletResponse response) throws IOException {
// 这里注意 有同学反应使用swagger 会导致各种问题,请直接用浏览器或者用postman
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setCharacterEncoding("utf-8");
// 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系
String fileName = URLEncoder.encode("提货点配货单", "UTF-8").replaceAll("\\+", "%20");
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
List<ReserveAllExcel> list = vegeCellarReserveOrderService.listForExcelAll(pq);
EasyExcel.write(response.getOutputStream(), ReserveAllExcel.class).sheet("总配货明细").doWrite(list);
}
}

View File

@@ -0,0 +1,52 @@
package com.yxt.yythmall.adminapi;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.yythmall.biz.appletbanner.AppletBanner;
import com.yxt.yythmall.biz.appletbanner.AppletBannerQuery;
import com.yxt.yythmall.biz.appletbanner.AppletBannerService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@RestController("com.yxt.yythmall.adminapi.BannerRest")
@RequestMapping("/adminapi/banner")
public class BannerRest {
@Autowired
private AppletBannerService appletBannerService;
@ApiOperation("分页列表")
@PostMapping("/pageList")
public ResultBean<IPage<AppletBanner>> pageList(@RequestBody PagerQuery<AppletBannerQuery> pq) {
ResultBean rb = ResultBean.fireFail();
IPage<AppletBanner> page = appletBannerService.pageList(pq);
return rb.success().setData(page);
}
@ApiOperation("修改或保存")
@PostMapping("/saveOrUpdate")
public ResultBean saveOrUpdate(@RequestBody AppletBanner dto) {
ResultBean rb = ResultBean.fireFail();
appletBannerService.doSaveOrUpdate(dto);
return rb.success();
}
@ApiOperation("初始化")
@GetMapping("/noticeInit/{sid}")
public ResultBean<AppletBanner> noticeInit(@PathVariable("sid") String sid) {
ResultBean rb = ResultBean.fireFail();
AppletBanner ab = appletBannerService.fetchBySid(sid);
return rb.success().setData(ab);
}
@ApiOperation("是否显示")
@GetMapping("/isDisplayed/{sid}/{state}")
public ResultBean isDisplayed(@PathVariable("sid") String sid, @PathVariable("state") String state) {
ResultBean rb = ResultBean.fireFail();
appletBannerService.updateShowState(sid, state);
return rb.success().setMsg("更改成功!");
}
}

View File

@@ -0,0 +1,24 @@
package com.yxt.yythmall.adminapi;
import com.yxt.common.core.result.ResultBean;
import com.yxt.yythmall.adminapi.ordertools.OrdertoolsService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@RestController("com.yxt.yythmall.adminapi.OrdertoolsRest")
@RequestMapping("/adminapi/ordertools")
public class OrdertoolsRest {
@Autowired
private OrdertoolsService ordertoolsService;
@ApiOperation("上传和导出")
@PostMapping("/uploadExcelFile")
public ResultBean uploadExcelFile(@RequestParam("file") MultipartFile file) {
ResultBean rb = ResultBean.fireFail();
String fileUrl = ordertoolsService.uploadAndResetData(file);
return rb.success().setData(fileUrl);
}
}

View File

@@ -0,0 +1,69 @@
package com.yxt.yythmall.adminapi.ordertools;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.builder.ExcelReaderBuilder;
import com.alibaba.excel.read.listener.ReadListener;
import com.yxt.common.base.config.component.FileUploadComponent;
import com.yxt.common.core.result.FileUploadResult;
import com.yxt.common.core.result.ResultBean;
import com.yxt.yythmall.biz.ordorder.OrdOrderService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import java.util.ArrayList;
import java.util.List;
@Service
public class OrdertoolsService {
@Autowired
private FileUploadComponent fileUploadComponent;
@Autowired
private OrdOrderService ordOrderService;
public String uploadAndResetData(MultipartFile file) {
ResultBean<FileUploadResult> fub = fileUploadComponent.uploadFile(file, "zfdd");
String filePath = fub.getData().getFilePath();
String fp = fileUploadComponent.getUploadPath() + filePath;
String outFilePath = "zfdd/fhd" + System.currentTimeMillis() + ".xlsx";
String outFileName = fileUploadComponent.getUploadPath() + outFilePath;
String outFileUrl = fileUploadComponent.getUrlPrefix() + outFilePath;
List<WxOrderIn> inList = new ArrayList<>();
ExcelReaderBuilder read = EasyExcel.read(fp, WxOrderIn.class, createReadListener(inList));
read.sheet().doRead();
List<ToImportOrderExcel> toList = new ArrayList<>();
inList.forEach(inObj -> {
ToImportOrderExcel toObj = new ToImportOrderExcel();
toObj.setTranOrderNo(inObj.getTranOrderNo());
toObj.setMerchantOrderNo(inObj.getMerchantOrderNo());
toObj.setMerchantNo(inObj.getMerchantNo());
toObj.setGoodsNames(ordOrderService.orderGoodsNames(inObj.getMerchantOrderNo()));
toList.add(toObj);
});
EasyExcel.write(outFileName, ToImportOrderExcel.class).sheet("发货单").doWrite(toList);
return outFileUrl;
}
private ReadListener<WxOrderIn> createReadListener(List<WxOrderIn> inList) {
return new ReadListener<WxOrderIn>() {
@Override
public void invoke(WxOrderIn obj, AnalysisContext analysisContext) {
inList.add(obj);
}
@Override
public void doAfterAllAnalysed(AnalysisContext analysisContext) {
}
};
}
}

View File

@@ -0,0 +1,44 @@
package com.yxt.yythmall.adminapi.ordertools;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
@EqualsAndHashCode
public class ToImportOrderExcel {
@ColumnWidth(20)
@ExcelProperty(value = "交易单号",index = 0)
private String tranOrderNo; // 交易单号
@ColumnWidth(20)
@ExcelProperty(value = "商户单号",index = 1)
private String merchantOrderNo; // 商户单号
@ColumnWidth(20)
@ExcelProperty(value = "商户号",index = 2)
private String merchantNo;// 商户号
@ColumnWidth(20)
@ExcelProperty(value = "发货方式",index = 3)
private String modeOfDespatch = "用户自提";// 发货方式
@ColumnWidth(20)
@ExcelProperty(value = "发货模式",index = 4)
private String deliveryMode = "统一发货";// 发货模式
@ColumnWidth(20)
@ExcelProperty(value = "快递公司",index = 5)
private String kdgs = ""; // 快递公司
@ColumnWidth(20)
@ExcelProperty(value = "快递单号(多个快递单使用;分隔)",index = 6)
private String kddh = ""; // 快递单号(多个快递单使用;分隔)
@ColumnWidth(20)
@ExcelProperty(value = "是否完成发货",index = 7)
private String sfwcfh = ""; // 是否完成发货
@ColumnWidth(20)
@ExcelProperty(value = "是否重新发货",index = 8)
private String sfcxfh = ""; // 是否重新发货
@ColumnWidth(20)
@ExcelProperty(value = "商品信息",index = 9)
private String goodsNames; // 商品信息
}

View File

@@ -0,0 +1,12 @@
package com.yxt.yythmall.adminapi.ordertools;
import lombok.Data;
@Data
public class WxOrderIn {
private String tranTime; // 支付时间
private String tranOrderNo; // 交易单号
private String merchantOrderNo; // 商户单号
private String merchantNo;// 商户号
private String status; // 状态
}

View File

@@ -0,0 +1,31 @@
package com.yxt.yythmall.adminapi.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
@Data
public class PmsBrandVo {
private Long id;
private String name;
private Integer sort;
/**
* 起始销售数量
*/
private Integer qssl;
/**
* 订购协议
*/
private String dgxy;
/**
* 品牌logo
*/
private String logo;
/**
* 专区大图
*/
private String bigPic;
}

View File

@@ -0,0 +1,25 @@
package com.yxt.yythmall.adminapi.vo;
import lombok.Data;
@Data
public class PmsProductCategoryVo {
private Long id;
private Long parentId;
private String name;
private Integer level;
private Integer sort;
/**
* 图标
*/
private String icon;
private String keywords;
/**
* 描述
*/
private String description;
}

View File

@@ -0,0 +1,20 @@
package com.yxt.yythmall.adminservice;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yxt.yythmall.adminapi.vo.PmsBrandVo;
import com.yxt.yythmall.adminapi.vo.PmsProductCategoryVo;
import com.yxt.yythmall.api.lpkgoods.LpkGoods;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@Mapper
public interface AdminMallMapper extends BaseMapper<LpkGoods> {
@Select("select * from pms_brand ")
List<PmsBrandVo> listBrand();
@Select("select * from pms_product_category where parent_id=0 ")
List<PmsProductCategoryVo> listAllCategory();
}

View File

@@ -0,0 +1,22 @@
package com.yxt.yythmall.adminservice;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yxt.yythmall.adminapi.vo.PmsBrandVo;
import com.yxt.yythmall.adminapi.vo.PmsProductCategoryVo;
import com.yxt.yythmall.api.lpkgoods.LpkGoods;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class AdminMallService extends ServiceImpl<AdminMallMapper, LpkGoods> {
public List<PmsBrandVo> listBrand() {
return baseMapper.listBrand();
}
public List<PmsProductCategoryVo> listAllCategory() {
return baseMapper.listAllCategory();
}
}

View File

@@ -0,0 +1,35 @@
package com.yxt.yythmall.api.appletgiftbag;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.util.Date;
import java.util.UUID;
/**
* @author wangpengfei
* @date 2023/11/21 15:06
*/
@ApiModel(value = "礼包信息", description = "礼包信息")
@TableName("applet_giftbag")
@Data
public class AppletGiftBag {
private String id;
private String sid = UUID.randomUUID().toString();
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
private String remarks;
private String isEnable;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date dateStart;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date dateEnd;
private String name;
private String price;
private String iconUrl;
private String isGrounding;
private String isRecommend;
private String preferentialPrice;
}

View File

@@ -0,0 +1,26 @@
package com.yxt.yythmall.api.appletgiftbag;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* @author wangpengfei
* @date 2024/1/6 15:39
*/
@Data
public class AppletGiftBagDetailVo {
private String sid;
private String name;
private String dateStart;
private String dateEnd;
private String price;
private String iconUrl;
private String isEnable;
private String isGrounding;
private String isRecommend;
private String remark;
private String count;
private List<GiftBagGoods> goods = new ArrayList<>();
}

View File

@@ -0,0 +1,30 @@
package com.yxt.yythmall.api.appletgiftbag;
import com.yxt.common.core.dto.Dto;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* @author wangpengfei
* @date 2023/11/21 15:13
*/
@ApiModel(value = "礼包信息 数据传输对象", description = "礼包信息 数据传输对象")
@Data
public class AppletGiftBagDto implements Dto {
private String sid;
private String remarks;
private String dateStart;
private String dateEnd;
private String name;
private String price;
private String iconUrl;
private String isGrounding;
private String isRecommend;
private String preferentialPrice;
//商品sid
private List<GiftBagGoods> goods = new ArrayList<>();
}

View File

@@ -0,0 +1,27 @@
package com.yxt.yythmall.api.appletgiftbag;
import com.yxt.common.core.vo.Vo;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* @author Administrator
* @description
* @date 2023/11/22 11:15
*/
@Data
public class AppletGiftBagInitVo implements Vo {
private String sid;
private String remarks;
private String dateStart;
private String dateEnd;
private String name;
private String price;
private String iconUrl;
private String isRecommend;
private String preferentialPrice;
//商品sid
private List<GiftBagGoods> goods = new ArrayList<>();
}

View File

@@ -0,0 +1,15 @@
package com.yxt.yythmall.api.appletgiftbag;
import com.yxt.common.core.query.Query;
import io.swagger.annotations.ApiModel;
import lombok.Data;
/**
* @author wangpengfei
* @date 2023/11/21 15:31
*/
@ApiModel(value = "礼包信息 查询条件", description = "礼包信息 查询条件")
@Data
public class AppletGiftBagQuery implements Query {
private String name;
}

View File

@@ -0,0 +1,45 @@
package com.yxt.yythmall.api.appletgiftbag;
import com.yxt.common.core.vo.Vo;
import com.yxt.yythmall.api.newcomerrecorecord.NewcomerRecoRecordVo;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.text.DecimalFormat;
import java.util.List;
/**
* @author wangpengfei
* @date 2023/11/21 15:12
*/
@Data
@ApiModel(value = "礼包信息 视图数据对象", description = "礼包信息 视图数据对象")
@NoArgsConstructor
public class AppletGiftBagVo implements Vo {
private String sid;
private String name;//
private String dateStart;
private String dateEnd;
private String price;//礼包总价格
private String prefPrice;//优惠价格
private String iconUrl;//图片
private String isEnable;
private String isGrounding;
private String isRecommend;//是否推荐 1 推荐 0 默认
private String remarks;
private String count;//
private String goodsSid;
private String weight="0";//重量
private List<GiftBagGoods> giftBagGoods;
private List<RecommendRecord> recordList;
private List<NewcomerRecoRecordVo> newcomerRecoRecordVos;
public String getPrice() {
DecimalFormat decimalFormat = new DecimalFormat("#0.00");
if(null==price){
price="0";
}
return price=decimalFormat.format(Double.valueOf(price));
}
}

View File

@@ -0,0 +1,90 @@
package com.yxt.yythmall.api.appletgiftbag;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.StrUtil;
import com.yxt.common.base.utils.StringUtils;
import lombok.Data;
import java.text.DecimalFormat;
/**
* @author Administrator
* @description
* @date 2023/11/22 11:08
*/
@Data
public class GiftBagGoods {
private String goodsSid;
private String goodsNumber = "0";//份数
private String name; //商品名
private String unitName; //单位
private String price; //商品单价
private String iconUrl;//图片
private String remark; //备注
private String weight; //每份的重量
private String jPrice; //每斤单价
private String specificationUnit; //规格单位
private String totalValue; //总价值
private String spec; //总价值
private String count="0"; //总价值
private String mefenPrice;
// public String getJPrice() {
//
// if (StringUtils.isBlank(jPrice)) {
// jPrice = "0";
// }
// DecimalFormat decimalFormat = new DecimalFormat("#0.00");
// return decimalFormat.format(Double.valueOf(jPrice));
// }
public String getMefenPrice() {
double dj = 0.0;
if (StrUtil.isNotBlank(price)) {
try {
dj = Double.parseDouble(price);
} catch (Exception e) {
e.printStackTrace();
}
}
int js = 1;
if (StrUtil.isNotBlank(weight)) {
try {
js = Integer.parseInt(weight);
} catch (Exception e) {
e.printStackTrace();
}
}
double mfjg = dj * js;
return NumberUtil.decimalFormatMoney(mfjg);
}
public String getSubtotal() {
double dj = 0.0;
if (StrUtil.isNotBlank(price)) {
try {
dj = Double.parseDouble(price);
} catch (Exception e) {
e.printStackTrace();
}
}
int js = 1;
if (StrUtil.isNotBlank(weight)) {
try {
js = Integer.parseInt(weight);
} catch (Exception e) {
e.printStackTrace();
}
}
int fs = 1;
if (StrUtil.isNotBlank(goodsNumber)) {
try {
fs = Integer.parseInt(goodsNumber);
} catch (Exception e) {
e.printStackTrace();
}
}
double mfjg = dj * js * fs;
return NumberUtil.decimalFormatMoney(mfjg);
}
}

View File

@@ -0,0 +1,71 @@
package com.yxt.yythmall.api.appletgiftbag;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.StrUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
/**
* @author wangpengfei
* @date 2024/1/16 12:07
*/
@Data
public class GiftBagGoodss {
private String goodsSid;
private String goodsNumber = "0";//份数
private String name; //商品名
private String unitName; //单位
private String price; //商品单价
private String iconUrl;//图片
private String remark; //备注
private String weight; //每份的重量
private String jPrice; //每斤单价
private String specificationUnit; //规格单位
private String prefPrice;//优惠价格
private String bagPrice;//礼包价格
private String totalValue; //总价值
private String spec; //总价值
private String count="0"; //总价值
private String mefenPrice="0";
private boolean showCart=false;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date periodValidity;
private String state="0";
private String remarks;
public String getSubtotal() {
double dj = 0.0;
if (StrUtil.isNotBlank(price)) {
try {
dj = Double.parseDouble(price);
} catch (Exception e) {
e.printStackTrace();
}
}
int js = 1;
if (StrUtil.isNotBlank(weight)) {
try {
js = Integer.parseInt(weight);
} catch (Exception e) {
e.printStackTrace();
}
}
int fs = 1;
if (StrUtil.isNotBlank(goodsNumber)) {
try {
fs = Integer.parseInt(goodsNumber);
} catch (Exception e) {
e.printStackTrace();
}
}
double mfjg = dj * js * fs;
int m=(int)mfjg;
// return NumberUtil.decimalFormatMoney(mfjg);
return String.valueOf(m);
}
}

View File

@@ -0,0 +1,16 @@
package com.yxt.yythmall.api.appletgiftbag;
import lombok.Data;
import java.util.List;
/**
* @author wangpengfei
* @date 2024/1/17 10:18
*/
@Data
public class GoodsV {
private String weight;
private String price;
private List<GiftBagGoodss> giftBagGoodssList;
}

View File

@@ -0,0 +1,28 @@
package com.yxt.yythmall.api.appletgiftbag;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
/**
* @author wangpengfei
* @date 2024/1/18 8:50
*/
@Data
public class MyGoodsVo {
private String goodsSid;
private String name; //商品名
private String goodsNumber ;//份数
private String residue ;//剩余
private String iconUrl;//图片
private String weight; //每份的重量
private String remark; //备注
private String type; //0 百姓菜窖 1 精品菜窖 2 企业菜窖
private String specificationUnit; //规格单位
private String unitName; //份
private String count="0";
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date periodValidity;
private String state="0";//商品过期状态 0未过期 1已过期
}

View File

@@ -0,0 +1,12 @@
package com.yxt.yythmall.api.appletgiftbag;
import lombok.Data;
/**
* @author wangpengfei
* @date 2024/1/11 9:29
*/
@Data
public class RecommendRecord {
private String content;
}

View File

@@ -0,0 +1,29 @@
package com.yxt.yythmall.api.appletgiftbaggoods;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.util.Date;
import java.util.UUID;
/**
* @author wangpengfei
* @date 2023/11/21 15:06
*/
@ApiModel(value = "礼包包含商品信息", description = "礼包包含商品信息")
@TableName("applet_giftbag_goods")
@Data
public class AppletGiftBagGoods {
private String id;
private String sid = UUID.randomUUID().toString();
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
private String remarks;
private String giftbagSid;
private String goodsSid;
private String goodsNumber;
// private String isGrounding;
private double price;
}

View File

@@ -0,0 +1,14 @@
package com.yxt.yythmall.api.appletgiftbaggoods;
import com.yxt.common.core.dto.Dto;
import io.swagger.annotations.ApiModel;
import lombok.Data;
/**
* @author wangpengfei
* @date 2023/11/21 15:13
*/
@ApiModel(value = "礼包包含商品信息 数据传输对象", description = "礼包包含商品信息 数据传输对象")
@Data
public class AppletGiftBagGoodsDto implements Dto {
}

View File

@@ -0,0 +1,15 @@
package com.yxt.yythmall.api.appletgiftbaggoods;
import com.yxt.common.core.query.Query;
import io.swagger.annotations.ApiModel;
import lombok.Data;
/**
* @author wangpengfei
* @date 2023/11/21 15:31
*/
@ApiModel(value = "礼包包含商品信息 查询条件", description = "礼包包含商品信息 查询条件")
@Data
public class AppletGiftBagGoodsQuery implements Query {
}

View File

@@ -0,0 +1,23 @@
package com.yxt.yythmall.api.appletgiftbaggoods;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author wangpengfei
* @date 2023/11/21 15:12
*/
@Data
@ApiModel(value = "礼包包含商品信息 视图数据对象", description = "礼包包含商品信息 视图数据对象")
@NoArgsConstructor
public class AppletGiftBagGoodsVo implements Vo {
private String goodsName;
private double goodsNumber;
private String picUrl;
private String goodsSid;
private String price;
private String unitName;
private String remarks;
}

View File

@@ -0,0 +1,34 @@
package com.yxt.yythmall.api.appletnotice;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
import java.util.UUID;
/**
* @author wangpengfei
* @date 2023/12/8 9:10
*/
@Data
public class AppletNotice {
private String id;
private String sid= UUID.randomUUID().toString();
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
private String remarks;
private String isEnable;
private String title;
private String content;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date startDate;
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
private Date endDate;
private String sort;
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
private Date releaseTime;//发布时间
private String publisher;//发布人
private String isShow;
}

View File

@@ -0,0 +1,32 @@
package com.yxt.yythmall.api.appletnotice;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yxt.common.core.dto.Dto;
import lombok.Data;
import java.util.Date;
/**
* @author wangpengfei
* @date 2023/12/8 9:11
*/
@Data
public class AppletNoticeDto implements Dto {
private String id;
private String sid;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
private String remarks;
private String isEnable;
private String title;//标题
private String content;//内容
private String startDate;//开始时间
private String endDate;//结束时间
private String sort;//排序
private String releaseTime;//发布时间
private String publisher;//发布人
private String isShow;
}

View File

@@ -0,0 +1,16 @@
package com.yxt.yythmall.api.appletnotice;
import com.yxt.common.core.query.Query;
import lombok.Data;
/**
* @author wangpengfei
* @date 2023/12/8 9:11
*/
@Data
public class AppletNoticeQuery implements Query {
private String startDate; //开始时间
private String endDate; //结束时间
private String countNumber; //总数
private String name;
}

View File

@@ -0,0 +1,32 @@
package com.yxt.yythmall.api.appletnotice;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yxt.common.core.vo.Vo;
import lombok.Data;
import java.util.Date;
/**
* @author wangpengfei
* @date 2023/12/8 9:11
*/
@Data
public class AppletNoticeVo implements Vo {
private String id;
private String sid;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
private String remarks;
private String isEnable;
private String title;//标题
private String content;//内容
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date startDate;//开始时间
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date endDate;//结束时间
private String sort;//排序
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date releaseTime;//发布时间
private String publisher;//发布人
private String isShow;
}

View File

@@ -0,0 +1,25 @@
package com.yxt.yythmall.api.approvalrecords;
import lombok.Data;
import java.util.UUID;
/**
* @author wangpengfei
* @date 2023/11/30 9:27
*/
@Data
public class ApprovalRecords {
private String id;
private String sid= UUID.randomUUID().toString();
private String createTime;
private String remarks;
private String isEnable;
private String customerSid;
private String approvalOpinions;//审核意见
private String operator;//操作人
private String operatorSid;//操作人sid
private String approvalStatus;//审核状态
}

View File

@@ -0,0 +1,22 @@
package com.yxt.yythmall.api.approvalrecords;
import com.yxt.common.core.dto.Dto;
import lombok.Data;
/**
* @author wangpengfei
* @date 2023/11/30 9:27
*/
@Data
public class ApprovalRecordsDto implements Dto {
private String id;
private String sid;
private String createTime;
private String remarks;
private String isEnable;
private String customerSid;
private String approvalOpinions;//审核意见
private String operator;//操作人
private String operatorSid;//操作人sid
private String approvalStatus;//审核状态
}

View File

@@ -0,0 +1,15 @@
package com.yxt.yythmall.api.approvalrecords;
import com.yxt.common.core.query.Query;
import lombok.Data;
/**
* @author wangpengfei
* @date 2023/11/30 9:27
*/
@Data
public class ApprovalRecordsQuery implements Query {
private String shortName;
private String name;
private String reviewStatus;
}

View File

@@ -0,0 +1,23 @@
package com.yxt.yythmall.api.approvalrecords;
import com.yxt.common.core.vo.Vo;
import lombok.Data;
/**
* @author wangpengfei
* @date 2023/11/30 9:27
*/
@Data
public class ApprovalRecordsVo implements Vo {
private String id;
private String sid;
private String createTime;
private String remarks;
private String isEnable;
private String customerSid;
private String approvalOpinions;//审核意见
private String operator;//操作人
private String operatorSid;//操作人sid
private String approvalStatus;//审核状态
private String customerName;
}

View File

@@ -0,0 +1,26 @@
package com.yxt.yythmall.api.cannotreservedictionary;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.util.Date;
import java.util.UUID;
/**
* @author wangpengfei
* @date 2023/11/21 15:06
*/
@ApiModel(value = "不能预约时间字典", description = "不能预约时间字典")
@TableName("cannot_reserve_dictionary")
@Data
public class CannotReserveDictionary {
private String id;
private String sid = UUID.randomUUID().toString();
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
private String remarks;
private String unavailableTime;
}

View File

@@ -0,0 +1,23 @@
package com.yxt.yythmall.api.cannotreservedictionary;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yxt.common.core.dto.Dto;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.util.Date;
/**
* @author wangpengfei
* @date 2023/11/21 15:13
*/
@ApiModel(value = "不能预约时间字典 数据传输对象", description = "不能预约时间字典 数据传输对象")
@Data
public class CannotReserveDictionaryDto implements Dto {
private String id;
private String sid ;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
private String remarks;
private String unavailableTime;
}

View File

@@ -0,0 +1,15 @@
package com.yxt.yythmall.api.cannotreservedictionary;
import com.yxt.common.core.query.Query;
import io.swagger.annotations.ApiModel;
import lombok.Data;
/**
* @author wangpengfei
* @date 2023/11/21 15:31
*/
@ApiModel(value = "不能预约时间字典 查询条件", description = "不能预约时间字典 查询条件")
@Data
public class CannotReserveDictionaryQuery implements Query {
}

View File

@@ -0,0 +1,25 @@
package com.yxt.yythmall.api.cannotreservedictionary;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* @author wangpengfei
* @date 2023/11/21 15:12
*/
@Data
@ApiModel(value = "不能预约时间字典 视图数据对象", description = "不能预约时间字典 视图数据对象")
@NoArgsConstructor
public class CannotReserveDictionaryVo implements Vo {
private String id;
private String sid ;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
private String remarks;
private String unavailableTime;
}

View File

@@ -0,0 +1,40 @@
package com.yxt.yythmall.api.customerinvoice;
import lombok.Data;
import java.util.UUID;
/**
* @author wangpengfei
* @date 2023/11/30 9:27
*/
@Data
public class CustomerInvoice {
private String id;
private String sid= UUID.randomUUID().toString();
private String createTime;
private String remarks;
private String isEnable;
private String invoiceTypeSid;//发票类型sid
private String invoiceType;//发票类型
private String headingType;//发票类型
private String invoiceHeader;//发票抬头
private String dutyParagraph;//税号
private String bankOfDeposit;//开户行
private String bankAccount;//账号
private String enterpriseAddress;//企业地址
private String enterprisePhone;//企业电话
private String isDefault;//是否默认 1 为默认
private String customerSid;
private String email;
}

View File

@@ -0,0 +1,29 @@
package com.yxt.yythmall.api.customerinvoice;
import com.yxt.common.core.dto.Dto;
import lombok.Data;
/**
* @author wangpengfei
* @date 2023/11/30 9:27
*/
@Data
public class CustomerInvoiceDto implements Dto {
private String sid;
private String id;
private String createTime;
private String remarks;
private String isEnable;
private String invoiceTypeSid;//发票类型sid
private String invoiceType;//发票类型
private String headingType;//发票类型
private String invoiceHeader;//发票抬头
private String dutyParagraph;//税号
private String bankOfDeposit;//开户行
private String bankAccount;//账号
private String enterpriseAddress;//企业地址
private String enterprisePhone;//企业电话
private String isDefault;//是否默认 1 为默认
private String customerSid;
private String email;
}

View File

@@ -0,0 +1,14 @@
package com.yxt.yythmall.api.customerinvoice;
import com.yxt.common.core.query.Query;
import lombok.Data;
/**
* @author wangpengfei
* @date 2023/11/30 9:27
*/
@Data
public class CustomerInvoiceQuery implements Query {
private String shortName;
private String name;
}

Some files were not shown because too many files have changed in this diff Show More