560 Commits
v4.2.5 ... v4.4

Author SHA1 Message Date
OceansDeep
e34b4172b8 !356 fix & improve
Merge pull request !356 from OceansDeep/pg
2024-09-14 03:30:15 +00:00
misworga831
30d6ab64f8 fix & improvement 2024-09-14 11:29:39 +08:00
Chopper711
2e8c40bcf3 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop 2024-09-14 11:17:44 +08:00
Chopper711
f2385c3ace fix: 订单物流费用展示问题处理 2024-09-14 11:17:37 +08:00
OceansDeep
a45355b125 !355 fix & improve
Merge pull request !355 from OceansDeep/pg
2024-09-13 17:44:17 +00:00
misworga831
b3bb771066 fix: 修复可能会出现在购物车内多促销活动多商品的清空下的促销金额分配问题 2024-09-14 01:39:19 +08:00
OceansDeep
068c6b986e !354 fix & improve
Merge pull request !354 from OceansDeep/pg
2024-09-13 09:29:15 +00:00
misworga831
18e2c89891 fix: 修复批量更新商品配送模版,没有更新sku问题 2024-09-13 17:27:39 +08:00
OceansDeep
7b485753a6 !353 fix & improve
Merge pull request !353 from OceansDeep/pg
2024-07-26 02:33:51 +00:00
misworga831
8556d27173 fix & improvement 2024-07-26 10:31:39 +08:00
chc
d677aabbf4 判断手机号是否存在,如果存在抛出异常 2024-07-24 10:37:41 +08:00
pikachu1995@126.com
aaa0748409 删除文件夹需判断,优化删除逻辑。是否文件夹下存在图片。 2024-07-18 14:28:59 +08:00
pikachu1995@126.com
57ee156798 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop 2024-07-18 13:51:44 +08:00
pikachu1995@126.com
5ae4d8b4fa 微信小程序-上传发货信息 2024-07-18 13:51:37 +08:00
OceansDeep
681327274c !352 fix & improve
Merge pull request !352 from OceansDeep/pg
2024-07-18 03:46:26 +00:00
misworga831
6ab2888fd0 fix: 修复部分情况下秒杀活动商品无法添加问题 2024-07-18 11:45:18 +08:00
pikachu1995@126.com
80a0e0e8c7 增加导出订单数据判断,升级poi版本
传递删除则使用字段内容
2024-07-07 15:55:11 +08:00
pikachu1995@126.com
80773e2d58 优化支付、短信的配置内容 2024-07-07 14:48:11 +08:00
pikachu1995@126.com
065bcc8a55 优化支付、短信的配置内容 2024-07-07 14:03:31 +08:00
pikachu1995@126.com
9398413999 添加qq群 2024-07-02 15:07:51 +08:00
pikachu1995@126.com
cf623f6756 优化店铺结算单、店铺流水生成规则。
优化分销申请逻辑,分销佣金不转入预存款
2024-07-02 14:55:19 +08:00
pikachu1995@126.com
1b316baac6 将微信支付的调用appid进行优化。 2024-06-28 09:08:32 +08:00
pikachu1995@126.com
4fc1d0e346 升级poi 版本 2024-06-27 17:13:33 +08:00
pikachu1995@126.com
159fe37120 支持店铺通过excel批量更新商品库存功能 2024-06-27 17:09:25 +08:00
pikachu1995@126.com
6f9486f065 优化订单导出功能。 2024-06-26 11:50:45 +08:00
Chopper711
94da71336a Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop 2024-06-18 09:55:21 +08:00
Chopper711
8c5ce396b2 fix: 2024-03-25被错误的修改一个问题,导致分销订单无法结算,当前 commit 修复问题并优化问题,解决可能出现的事务问题,采用一条 sql 执行 2024-06-18 09:55:15 +08:00
OceansDeep
0063820fdf !351 fix & improve
Merge pull request !351 from OceansDeep/pg
2024-06-17 10:41:51 +00:00
misworga831
fe80edebbd fix: 修复 精确发券 类型的优惠券活动重复领取问题 2024-06-17 18:41:02 +08:00
OceansDeep
6b59c1e643 !350 fix & improve
Merge pull request !350 from OceansDeep/pg
2024-06-17 09:10:44 +00:00
misworga831
1b52381c71 fix: 修复可能出现的手机号登录重复问题 2024-06-17 17:09:33 +08:00
OceansDeep
763519876e !349 fix & improve
Merge pull request !349 from OceansDeep/pg
2024-06-17 07:14:46 +00:00
misworga831
cede181bc0 fix: 生成索引时,店铺商品分类优惠券判断条件补全 2024-06-17 15:13:07 +08:00
Chopper711
cb776eb4c0 merge 2024-06-17 08:31:49 +08:00
Chopper711
8ed4f6eb3c fix: 极端情况下,结算单可能存在未能被同级的订单流水 2024-06-17 08:31:28 +08:00
OceansDeep
9cf97f3203 !348 fix & improve
Merge pull request !348 from OceansDeep/pg
2024-06-14 03:31:36 +00:00
misworga831
2a984b8c56 fix: 优化店铺优惠券商品分类生成 2024-06-14 11:27:54 +08:00
OceansDeep
22ecf48168 !347 fix & improve
Merge pull request !347 from OceansDeep/pg
2024-06-14 01:55:33 +00:00
misworga831
89422b2736 fix: 自动领取优惠券判定同时,将精准发券功能同时判定 2024-06-14 09:54:26 +08:00
Chopper711
bcd4bf4ff1 fix: 用户领取优惠券时,无法领取精准赠送的优惠券 2024-06-12 18:07:53 +08:00
OceansDeep
a263bc6301 !346 fix & improve
Merge pull request !346 from OceansDeep/pg
2024-06-04 06:44:23 +00:00
misworga831
27ae773e20 fix & improvement 2024-06-04 14:43:37 +08:00
Chopper711
085b61c2ab fix: 单个文件夹删除报错问题处理,pom.xml 配置编译运行环境指定,开发测试环境 jdk22 导致无法编译 1.8版本 jdk 问题。 2024-05-27 14:45:42 +08:00
Chopper711
c7682680ee fix:文件目录为空时无法删除文件报错 2024-05-27 10:12:50 +08:00
lele0521
a301432a87 fix: 修复判断订单是否可以售后接口异常 2024-05-27 08:53:43 +08:00
OceansDeep
526de18a42 !343 上传图片时,选择的目录为空时,生成的图片访问不了
Merge pull request !343 from imalasong/pr/1
2024-05-24 03:15:48 +00:00
OceansDeep
c940bf6cb2 !342 多了一个结束符号进行移除
Merge pull request !342 from 铉清/N/A
2024-05-24 03:15:02 +00:00
OceansDeep
a7643a6b93 !345 fix & improve
Merge pull request !345 from OceansDeep/pg
2024-05-23 07:40:45 +00:00
misworga831
24f6b9e80f fix: 修复拼单订单失败时,未付款订单没有取消问题。 2024-05-23 15:39:26 +08:00
lele0521
d349616957 fix: 过滤订单售后状态(砍价、积分、赠品订单不可进行售后) 2024-05-20 11:16:36 +08:00
imalasong
f7c9ba820d Merge remote-tracking branch 'origin/pr/1' into pr/1 2024-05-16 21:16:28 +08:00
imalasong
f99f59963a fix: 上传图片时,选择的目录为空时,生成的图片访问不了 2024-05-16 21:16:17 +08:00
imalasong
caaf9c74f3 fix: 上次图片时,选择的目录为空时,生成的图片访问不了 2024-05-16 21:14:41 +08:00
lele0521
076f47f5c4 fix: 回滚用户注销逻辑 2024-05-16 09:36:52 +08:00
lele0521
f0e4e4c2bc fix: 修改注销账号的实现方式 2024-05-16 08:56:25 +08:00
lele0521
c87fe45dfa fix: 修改注销账号的实现方式 2024-05-15 18:38:41 +08:00
lele0521
49fd03df7f fix: 修改注销账号的实现方式 2024-05-13 19:44:51 +08:00
lele0521
6deed61311 fix: 增加商家订单备注功能 2024-05-11 09:21:27 +08:00
Chopper711
6311767320 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop 2024-05-10 17:05:19 +08:00
Chopper711
2463d1b5bb 验证 TOKEN 2024-05-10 17:04:32 +08:00
chc
9d41ae3cae 分销订单立即结算功能注释,新版本逻辑必须通过定时任务处理 2024-05-07 11:13:56 +08:00
chc
2be8bf27bf 虚拟订单无法售后问题 2024-05-07 10:51:01 +08:00
铉清
2d052ffb1a 多了一个结束符号进行移除
Signed-off-by: 铉清 <13698617+xuanqings@user.noreply.gitee.com>
2024-04-19 05:17:44 +00:00
Chopper711
88ab071ac7 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop 2024-04-01 19:14:34 +08:00
Chopper711
bda72da679 fix: 足迹为空展示空信息问题,商品库存回滚数量错误问题 2024-04-01 19:14:28 +08:00
Lele
95e5ef2d33 !341 统计数据转换异常
Merge pull request !341 from Lele/dev
2024-03-29 03:29:19 +00:00
lele0521
48a294e7c6 fix: 统计数据转换异常 2024-03-29 11:28:24 +08:00
Chopper711
794fa63302 fix: 核销订单如果订单不存在则抛出异常 2024-03-28 15:36:56 +08:00
lele0521
cdb8e851a8 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop 2024-03-27 15:16:39 +08:00
lele0521
f8ee3a8d15 fix: 统计数据转换异常 2024-03-27 15:16:26 +08:00
Lele
76ab997922 !340 修复会员基本信息显示null异常
Merge pull request !340 from Lele/dev
2024-03-27 01:03:02 +00:00
lele0521
97e7a130f1 fix: 修复会员基本信息显示null异常 2024-03-26 18:50:24 +08:00
Lele
2a96ad4af7 !339 修复商城问题文档中的bug
Merge pull request !339 from Lele/dev
2024-03-25 08:32:24 +00:00
lele0521
e1aee4a744 fix: 修复商城问题文档中的bug 2024-03-25 16:29:24 +08:00
lele0521
ecfe1524d4 fix: 修复商城问题文档中的bug 2024-03-25 16:26:21 +08:00
chc
42ea2dc986 订单后台收款后返回状态不对 2024-03-22 19:07:02 +08:00
Lele
230e2e7407 !336 【交易投诉】交由商家处理报错。
Merge pull request !336 from Lele/dev
2024-03-21 08:22:49 +00:00
lele0521
92639ba309 fix: 【交易投诉】交由商家处理报错。bug修复 2024-03-21 16:21:29 +08:00
Lele
19b3225312 !335 修复添加APP版本控制异常
Merge pull request !335 from Lele/dev
2024-03-21 05:54:53 +00:00
lele0521
e56c20469d fix: APP版本控制区分APP类型 2024-03-21 13:42:58 +08:00
Lele
a28eceaf61 !334 OSS资源管理中增加店铺名称搜索条件
Merge pull request !334 from Lele/dev
2024-03-19 10:03:16 +00:00
lele0521
1925c6d33c fix: OSS资源增加按店铺筛选 2024-03-19 17:55:11 +08:00
lele0521
fcac4002b1 fix: OSS资源增加按店铺筛选 2024-03-19 17:03:55 +08:00
lele0521
ed3a2ae9fc Merge branch 'master' into dev 2024-03-19 16:39:47 +08:00
lele0521
4955d2135b fix: OSS资源增加按店铺筛选 2024-03-19 16:39:36 +08:00
chc
9f1dacc1d4 方法名修改 2024-03-11 15:35:14 +08:00
lele0521
f0765a6627 fix: 修复分销申请逻辑 2024-03-07 11:23:50 +08:00
lele0521
a31a9fdfbd fix: 修复字段错误 2024-03-07 09:22:54 +08:00
Chopper711
fd2d0724a7 fix: token 过期后图片访问抛出一个未被捕获的异常问题处理,优化一个店铺审核的提示语 2024-02-01 15:37:59 +08:00
chc
82d7389092 Merge remote-tracking branch 'origin/master' 2024-01-29 18:33:53 +08:00
chc
a53eb3cfde 售后关闭功能同步 2024-01-29 18:33:47 +08:00
Lele
bd048d725c !333 增加默认退款金额显示
Merge pull request !333 from Lele/dev
2024-01-29 06:37:37 +00:00
lele0521
8e275613e1 fix: 增加默认退款金额显示 2024-01-29 14:35:19 +08:00
Lele
fc869a34e0 !332 fix: 修复分销提现异常
Merge pull request !332 from Lele/dev
2024-01-25 10:42:13 +00:00
lele0521
48c84acb7c fix: 分销提现bug修复 2024-01-25 18:39:27 +08:00
OceansDeep
40d40a344e !331 fix & improve
Merge pull request !331 from OceansDeep/pg
2024-01-25 08:46:48 +00:00
misworga831
d31257ba76 fix: 修复促销拼团订单取消后,活动结束后,检查成团没有筛选取消后的订单返还多余库存问题 2024-01-25 16:12:33 +08:00
chc
f0a80338da Merge remote-tracking branch 'origin/master' 2024-01-25 14:02:24 +08:00
chc
6b5ca5b337 分类缓存获取 2024-01-25 14:02:18 +08:00
OceansDeep
61f9d7812d !330 fix & improve
Merge pull request !330 from OceansDeep/pg
2024-01-24 10:54:33 +00:00
misworga831
d5eeafc554 fix: 优化虚拟商品不需要填写收货地址 2024-01-24 18:53:31 +08:00
misworga831
2175433444 fix: 优化取消订单返还促销商品库存 2024-01-24 18:52:43 +08:00
pikachu1995@126.com
cfbb1a1519 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop 2024-01-24 14:54:29 +08:00
pikachu1995@126.com
1302ca6de4 优化结算单退款计算逻辑 2024-01-24 14:54:23 +08:00
chc
239b520939 Merge remote-tracking branch 'origin/master' 2024-01-24 11:32:43 +08:00
chc
56d9dbee5b 库存预警功能,预警为0不进行预警 2024-01-24 11:32:28 +08:00
OceansDeep
41decf1fa1 !329 fix & improve
Merge pull request !329 from OceansDeep/pg
2024-01-24 02:11:26 +00:00
misworga831
1d2cb5737d fix: 修复促销商品库存扣减问题 2024-01-24 10:10:43 +08:00
misworga831
a2496b267a fix: 优化商品图片获取 2024-01-24 10:10:11 +08:00
pikachu1995@126.com
178544fe2d 管理端支持下载结算单账单 2024-01-24 09:48:25 +08:00
pikachu1995@126.com
9e3b9c8f38 店铺结算单增加积分/砍价商品退款统计 2024-01-23 15:06:14 +08:00
OceansDeep
b439d8283f !328 fix & improve
Merge pull request !328 from OceansDeep/pg
2024-01-22 10:57:02 +00:00
misworga831
fb48bce38d fix: 优化商品图片地址存储结构,只保留图片地址,去除其他无效参数,优化商品图片规则,改为全部通用spu图片,可为第一个 规格项 单独设置一个图片。 2024-01-22 18:56:13 +08:00
pikachu1995@126.com
b189fbe238 腾讯COS图片路径缺少符号 2024-01-22 15:59:33 +08:00
OceansDeep
26c1c97442 !327 fix & improve
Merge pull request !327 from OceansDeep/pg
2024-01-22 02:55:04 +00:00
misworga831
ee8f5b6e1e fix: 优化商品图片地址存储结构,只保留图片地址,去除其他无效参数,优化商品图片规则,改为全部通用spu图片,可为第一个 规格项 单独设置一个图片。 2024-01-22 10:44:24 +08:00
misworga831
6755515b1f upgrade: 更新 hutool 和 mybatis plus 版本 2024-01-22 10:43:09 +08:00
Lele
074036c0b5 !326 退款状态功能增加字段
Merge pull request !326 from Lele/dev
2024-01-18 09:45:11 +00:00
lele0521
c7d0820eed Merge branch 'master' into dev
# Conflicts:
#	DB/version4.3toMASTER.sql
2024-01-18 17:42:37 +08:00
lele0521
97c0fdbf1d feat: 退款状态功能增加字段 2024-01-18 17:40:05 +08:00
chc
a962939db8 库存预警功能 2024-01-18 11:44:08 +08:00
Lele
a9802710ef !325 修复日志格式异常
Merge pull request !325 from Lele/dev
2024-01-17 10:30:54 +00:00
lele0521
aaaa0b1ebf Merge branch 'master' into dev 2024-01-17 18:06:13 +08:00
lele0521
f34d10146a fix: 修复日志异常 2024-01-17 17:07:20 +08:00
Lele
b875cbdda4 !324 补充提交部分退款售后逻辑
Merge pull request !324 from Lele/dev
2024-01-16 09:24:05 +00:00
lele0521
d80a3f7f48 fix: 补充提交部分退款售后逻辑 2024-01-16 17:18:28 +08:00
Lele
259946e78f !323 增加操作日志、新增会员昵称默认规则、增加退款状态
Merge pull request !323 from Lele/dev
2024-01-16 08:49:35 +00:00
lele0521
9c24adf77d fix: 补充提交部分退款售后逻辑 2024-01-16 16:45:27 +08:00
lele0521
4c47d4aba2 fix: 区分商家、管理端OSS资源文件夹的创建 2024-01-16 15:53:37 +08:00
lele0521
7f9061cfc5 fix: Merging dev 2024-01-16 11:29:03 +08:00
chc
085dad2107 库存预警功能回退 2024-01-16 10:10:07 +08:00
chc
055a7fffdb 首页暂不显示预警 2024-01-11 13:33:46 +08:00
chc
6cea6af59b 分包裹发货,库存预警 2024-01-11 13:33:13 +08:00
chc
6f0f8106e0 分包裹SQL 2024-01-08 19:15:07 +08:00
lele0521
c9a0ce7985 feat: 增加退款状态(部分退款、全部退款) 2024-01-05 17:29:34 +08:00
lele0521
b40533c553 feat: 增加操作日志(商品、用户、促销相关修改操作) 2024-01-04 18:10:57 +08:00
lele0521
e2fff23080 feat: 新增会员昵称默认规则 2024-01-04 17:36:39 +08:00
Chopper711
72482ee395 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop 2023-12-18 08:40:31 +08:00
Chopper711
5366034556 fix: 禁用演示站点地区维护功能费 2023-12-18 08:40:24 +08:00
OceansDeep
484e2a2318 !320 fix & improve
Merge pull request !320 from OceansDeep/pg
2023-12-05 06:23:34 +00:00
misworga831
0873fba7df fix: 优化商品参数聚合搜索 2023-12-05 14:21:55 +08:00
OceansDeep
4aa6f864f0 !319 fix & improve
Merge pull request !319 from OceansDeep/pg
2023-12-05 06:07:08 +00:00
misworga831
183b2ba30c fix: 优化商品参数聚合搜索 2023-12-05 11:48:56 +08:00
lele0521
071f15347e feat: 新增会员绑定手机号功能 2023-12-04 16:05:17 +08:00
OceansDeep
71ed58e665 !318 fix & improve
Merge pull request !318 from OceansDeep/pg
2023-11-23 03:17:21 +00:00
misworga831
50c7e20ba6 fix: 修复活动优惠券,没有生成商品促销信息问题 2023-11-23 11:16:08 +08:00
misworga831
876b801fa1 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop into pg 2023-11-21 10:15:06 +08:00
misworga831
bd42b88b71 fix: 优化商品索引不存在,搜索商品报错 2023-11-21 10:14:59 +08:00
Chopper711
b2dfb3abe2 update README.md.
Signed-off-by: Chopper711 <1814994716@qq.com>
2023-11-08 08:18:00 +00:00
Chopper711
164f726222 fix: 将订单创建消息发送节点从业务类内部调整为事务提交节点 2023-11-08 09:15:06 +08:00
misworga831
24cdf5cf00 fix: 商品评价更新后,清除sku缓存不全问题。获取有图评价过滤条件缺少状态问题 2023-11-06 17:50:24 +08:00
OceansDeep
93cb9da558 !317 fix & improve
Merge pull request !317 from OceansDeep/pg
2023-11-06 07:21:01 +00:00
misworga831
66c6bfa0fb fix: 优化自定义分词插入(修改为插入时,遇到唯一索引错误跳过) 2023-11-06 15:19:53 +08:00
Chopper711
edd93a6ad4 update README.md.
Signed-off-by: Chopper711 <1814994716@qq.com>
2023-11-03 07:05:29 +00:00
OceansDeep
ea1626a2ef !315 fix & improve
Merge pull request !315 from OceansDeep/pg
2023-10-24 08:30:44 +00:00
misworga831
1f3b7f21bb fix: 优化更新商品评价为所有Sku的评价 2023-10-24 16:29:04 +08:00
OceansDeep
e6fe055cd5 !314 fix & improve
Merge pull request !314 from OceansDeep/pg
2023-10-24 06:42:40 +00:00
misworga831
1422b6fdbc fix: 优化更新商品评价为所有Sku的评价 2023-10-24 14:41:41 +08:00
misworga831
cfb70eff8a fix: 优化特殊情况下出现的商品数据无商品分类查询报错的问题 2023-10-24 08:27:02 +08:00
misworga831
dfe6085432 fix: buyer端增加获取sku接口 2023-10-23 18:13:54 +08:00
OceansDeep
b8e8db0e36 !313 fix & improve
Merge pull request !313 from OceansDeep/pg
2023-10-23 06:22:27 +00:00
misworga831
fb2e41422b fix: 优化虚拟订单收货地址校验 2023-10-23 14:21:33 +08:00
OceansDeep
f3db8f2e45 !312 fix & improve
Merge pull request !312 from OceansDeep/pg
2023-10-23 03:55:33 +00:00
misworga831
6bc2c0adf1 fix: 优化虚拟订单收货地址校验 2023-10-23 11:54:53 +08:00
OceansDeep
df75e08d22 !311 fix & improve
Merge pull request !311 from OceansDeep/pg
2023-10-23 03:46:10 +00:00
misworga831
b2ccdad483 fix: 去除虚拟订单收货地址校验 2023-10-23 11:45:00 +08:00
misworga831
3d6eb7b4fa fix: 去除虚拟订单收货地址校验 2023-10-23 11:42:22 +08:00
Chopper711
96cfb8a8ce !305 fix bug: 小程序分享二维码,请求参数类型应为Object
Merge pull request !305 from GeekMo/master
2023-10-19 01:54:44 +00:00
OceansDeep
4a4672c80a !310 fix & improve
Merge pull request !310 from OceansDeep/pg
2023-10-18 02:54:03 +00:00
misworga831
a0c1cd1019 fix: 修复订单未完成,售后完成扣减积分问题 2023-10-18 10:53:22 +08:00
OceansDeep
ed20d1abbb !309 fix & improve
Merge pull request !309 from OceansDeep/pg
2023-10-17 09:13:33 +00:00
misworga831
0ebb9c01f8 fix: 优化售后完成扣减积分问题 2023-10-17 17:11:25 +08:00
OceansDeep
dd3176f841 !308 fix & improve
Merge pull request !308 from OceansDeep/pg
2023-10-17 01:07:36 +00:00
misworga831
a910a97719 fix: 优化更新商品索引评论条件 2023-10-17 09:05:33 +08:00
OceansDeep
cdf8ab3a3c !307 fix & improve
Merge pull request !307 from OceansDeep/pg
2023-10-17 00:27:50 +00:00
misworga831
074e4ed5b7 fix: 优化更新商品索引评论,改为实时统计spu的评论总量 2023-10-17 08:26:34 +08:00
OceansDeep
9e43d186d7 !306 fix & improve
Merge pull request !306 from OceansDeep/pg
2023-10-16 10:36:21 +00:00
misworga831
8b61d40ff8 fix: 优化部分优惠券初始化及搜索条件 2023-10-16 18:34:55 +08:00
misworga831
f9b3001eb3 fix: 优化售后搜索条件 2023-10-16 18:34:21 +08:00
misworga831
f1ec44869d Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop into pg 2023-10-16 16:40:48 +08:00
misworga831
72341acb57 fix: 优化楼层装修代码 2023-10-16 16:40:37 +08:00
misworga831
fa696e6c11 fix: 优化更新商品评论,改为实时统计评论总量 2023-10-16 16:40:20 +08:00
misworga831
b30909942a fix: 优化im搜索 2023-10-16 11:49:42 +08:00
misworga831
7c64e1f11d fix: 优化更新商品索引,销量,评论方法 2023-10-16 11:48:52 +08:00
Chopper711
d1c6988d0f fix: 定时精准发送优惠券被立即发送问题处理。自动领取优惠券时会触发精准发券全平台会员 2023-10-13 15:35:47 +08:00
misworga831
efe0bd4bad Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop into pg 2023-10-11 10:07:25 +08:00
Milo
7523481be0 小程序参数有其它非String类型的值需要设置
例如check_path:false
2023-10-05 19:15:34 +08:00
Chopper711
23182106b9 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop 2023-09-27 18:43:15 +08:00
Chopper711
515ffbcf0a fix: 下单人数统计问题处理 2023-09-27 18:43:10 +08:00
misworga831
8f52a1e2a2 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop into pg 2023-09-27 09:20:03 +08:00
misworga831
bdd9045fc1 fix: 优化商品分类、售后及拼团相关 2023-09-27 09:16:49 +08:00
pikachu1995@126.com
518616483b Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop 2023-09-26 18:51:04 +08:00
pikachu1995@126.com
817f662cb7 添加文件-文件夹 2023-09-26 18:50:52 +08:00
Chopper711
01419cde15 refactor: 增加店铺菜单维护页面 2023-09-25 11:58:08 +08:00
Chopper711
118efe0833 merge master 2023-09-25 11:05:04 +08:00
Chopper711
46911004db refactor: 虚拟订单增加取消判定,解决订单退款,待审核订单状态不变的问题。 2023-09-25 10:54:47 +08:00
pikachu1995@126.com
b87190d135 1.判断分销订单是否包含退款
2.订单货物全部退款则订单取消
2023-09-22 17:25:46 +08:00
pikachu1995@126.com
39e22f5561 订单退款,即刻扣减分销员冻结佣金 2023-09-21 18:46:32 +08:00
misworga831
02dd37c87f fix: 优化商品单位不能为空 2023-09-19 17:12:28 +08:00
misworga831
7db7afad4a fix: 优化商品单位不能为空 2023-09-19 17:09:14 +08:00
chc
25582e2958 QQ状态调整 2023-09-19 15:04:14 +08:00
misworga831
3c5609545b fix: 移除促销活动,活动起始时间小于现在时间限制 2023-09-18 16:50:46 +08:00
misworga831
061d924d46 fix: 优化弃用状态 2023-09-18 10:00:44 +08:00
misworga831
49af6777ee Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop into pg 2023-09-14 17:04:46 +08:00
misworga831
e9d9a95cb4 improve: 优化订单投诉查询 2023-09-14 17:04:30 +08:00
Chopper711
7e70e7d6cd 优化注释 2023-09-11 17:18:10 +08:00
Chopper711
ebb48c7d0f fix: 商品批量设置物流模板时,没有删除缓存问题处理 2023-08-29 16:00:29 +08:00
Chopper711
e0d464906e fix: minio缩略图需要特殊配置,这里默认不压缩处理 2023-08-28 13:01:51 +08:00
misworga831
9189a6d433 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop into pg 2023-08-25 14:06:07 +08:00
Chopper711
b3f6bad6f8 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop 2023-08-25 11:48:10 +08:00
Chopper711
105162aa89 fix: 某种不知名的情况下,微信联合登陆会报错问题处理 2023-08-25 11:48:03 +08:00
misworga831
51c4161f68 fix: 简单优化扫码登录,创建多个线程池导致的性能问题 2023-08-24 18:54:10 +08:00
OceansDeep
488d9352f3 !302 fix & improve
Merge pull request !302 from OceansDeep/pg
2023-08-24 09:02:52 +00:00
Chopper711
56b800e4ff Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop 2023-08-24 15:49:20 +08:00
Chopper711
03864ca1a9 fix: 部分sql过滤会导致一些问题处理。 2023-08-24 15:49:14 +08:00
misworga831
94c87f5645 fix: 优化商品搜索出现分类id问题 2023-08-24 14:17:21 +08:00
chc
dadf48ac25 fix: sql名称修改 2023-08-23 15:49:37 +08:00
chc
a47bfcc5fd 更新4.3版本 2023-08-23 15:37:31 +08:00
Chopper711
1798916bf9 fix: 特殊情况下,平台会同时开启多个楼层问题处理 2023-08-18 15:39:18 +08:00
Chopper711
5af1238e02 fix: minio 无法删除磁盘文件问题处理 2023-08-18 15:20:48 +08:00
Chopper711
a62db61221 improvement:调优sql关键词过滤方法 2023-08-16 16:37:58 +08:00
Chopper711
8104947aec sql 排序关键字 orderby注入风险处理 2023-08-16 13:39:57 +08:00
Chopper711
d5f9fbf99d Merge branch 'master' of github.com:lilishop/lilishop 2023-08-16 12:41:50 +08:00
Chopper711
d3910bb931 update readme 2023-08-16 11:49:34 +08:00
Chopper711
7cac57bd79 update readme 2023-08-16 11:47:40 +08:00
misworga831
07874ca210 Merge pull request #91
pg
2023-08-16 10:54:21 +08:00
chc
0267597b20 fix: 联合登录 2023-08-14 14:30:21 +08:00
Chopper711
1cc939f457 fix : 行政地区无法删除或修改,由于缓存没有被清空导致问题处理 2023-08-10 16:08:23 +08:00
Chopper711
b12245bb94 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop 2023-08-10 13:34:09 +08:00
Chopper711
006ec15000 fix:砍价商品活动结束后,点击跳转后报错信息优化 2023-08-10 13:34:07 +08:00
misworga831
4f4593e5f7 fix: 优化微信登录异常问题 2023-08-10 11:52:36 +08:00
pikachu1995@126.com
58ff71a863 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop 2023-08-04 18:23:09 +08:00
pikachu1995@126.com
7d8a31c55a APP端第三方登录 2023-08-04 18:23:03 +08:00
OceansDeep
29e6637399 !301 fix & improve
Merge pull request !301 from OceansDeep/pg
2023-08-03 08:18:06 +00:00
misworga831
d61fc41465 fix: 优化消费者部分异常处理 2023-08-03 16:16:55 +08:00
misworga831
1cc692a3c9 fix: 优化消费者部分异常处理 2023-08-03 16:13:52 +08:00
OceansDeep
a2a1bed3e0 !300 fix & improve
Merge pull request !300 from OceansDeep/pg
2023-08-03 07:58:37 +00:00
misworga831
557366a3ec fix: 优化elasticsearch 配置,解决I/O reactor问题。 2023-08-03 15:57:57 +08:00
Chopper711
80c8b4b4d4 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop 2023-08-03 12:57:08 +08:00
Chopper711
9dd6bc2d6f fix:地区修改后不生效,需要清空缓存才能得到最新的数据问题处理 2023-08-03 12:57:01 +08:00
pikachu1995@126.com
9c1db92824 腾讯云COS 使用地域标识路径 2023-07-31 15:35:15 +08:00
misworga831
e3172c28b7 Merge pull request #90
pg
2023-07-28 16:20:10 +08:00
OceansDeep
b0b3747760 !299 fix & improve
Merge pull request !299 from OceansDeep/pg
2023-07-28 08:18:04 +00:00
misworga831
e8af34995b fix: 优化elasticsearch 配置,解决I/O reactor问题。 2023-07-28 16:16:16 +08:00
Chopper711
9f17dcafbb 商品导入消息不够明确问题处理 2023-07-21 18:45:00 +08:00
Chopper711
347877cdad Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop 2023-07-21 18:30:01 +08:00
Chopper711
8f1541c338 fix:秒杀活动异常消息resultcode 修正 2023-07-21 18:29:58 +08:00
chc
89f3e8f980 fix: sku的商品视频 2023-07-20 14:23:12 +08:00
OceansDeep
e945f93032 !297 fix & improve
Merge pull request !297 from OceansDeep/pg
2023-07-19 03:11:19 +00:00
misworga831
4f9841d443 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop into pg 2023-07-19 11:10:40 +08:00
misworga831
c73204a828 fix: 增加文件上传类型,video格式支持 2023-07-19 11:10:19 +08:00
OceansDeep
b2681d443d !296 fix: 优化拼团活动流程,活动结束时间小于24小时则按照拼团结束时间延时
Merge pull request !296 from OceansDeep/pg
2023-07-17 09:57:15 +00:00
misworga831
05a1d880c5 Merge pull request #89
pg
2023-07-17 17:56:39 +08:00
misworga831
7b13ae13ad fix: 优化拼团活动流程,活动结束时间小于24小时则按照拼团结束时间延时 2023-07-17 17:55:34 +08:00
pikachu1995@126.com
ecb330cc57 fix:删除遗留引用 2023-07-13 16:04:35 +08:00
pikachu1995@126.com
af5e866853 不同的对象存储渠道有不同的图片压缩规则。 2023-07-13 16:03:38 +08:00
OceansDeep
007b145c2e !295 fix & improve
Merge pull request !295 from OceansDeep/pg
2023-06-16 09:01:20 +00:00
misworga831
201943994b fix: 修复添加管理员失败无信息提示 2023-06-16 16:21:57 +08:00
misworga831
b17f3c08b7 Merge pull request #88
pg
2023-06-13 10:51:59 +08:00
OceansDeep
c46c59e4a1 !294 fix: 修复移除@Resource后的订单每日任务,执行sql错误问题
Merge pull request !294 from OceansDeep/pg
2023-06-13 02:49:56 +00:00
misworga831
0bdb39797d fix: 修复移除@Resource后的订单每日任务,执行sql错误问题 2023-06-13 10:48:03 +08:00
Chopper711
71061ad861 fix:用户足迹的处理sql已经在逻辑中处理好了数据问题,这这里的事务在特殊情况下会导致sql异常,将非必要的事务注解去除即可。 2023-06-09 15:42:50 +08:00
Chopper711
f14875e679 fix:在redis集群中,促销库存与商品库存不在同一个槽内会导致执行异常 2023-06-09 15:27:56 +08:00
misworga831
e8a1f6a02f Merge pull request #87
pg
2023-06-07 11:08:31 +08:00
OceansDeep
036035f51b !292 fix & improve
Merge pull request !292 from OceansDeep/pg
2023-06-06 11:14:20 +00:00
misworga831
104b6c2f5d fix: 修复权限更新后,登录用户权限没有更新问题。 2023-06-06 19:13:52 +08:00
OceansDeep
7dffd7dcb9 !291 fix & improve
Merge pull request !291 from OceansDeep/pg
2023-06-06 10:07:14 +00:00
misworga831
63f1f0df21 fix: 修复权限更新后,登录用户权限没有更新问题。 2023-06-06 18:06:41 +08:00
OceansDeep
dda955219a !290 fix & improve
Merge pull request !290 from OceansDeep/pg
2023-06-06 09:27:11 +00:00
misworga831
5d6e99dc8a fix: 移除@Resource注解,修复权限更新后,登录用户权限没有更新问题。 2023-06-06 17:26:04 +08:00
Chopper711
b61a5e8f7b style: 代码扫描规范问题处理 2023-06-05 10:05:40 +08:00
Chopper711
d9018ef317 fix:邀新赠券邀请人信息写入代码被删除问题还原 2023-06-01 18:51:49 +08:00
Chopper711
9993b9bbf6 fix:虚拟成团无法成功触发问题处理 2023-05-31 15:42:17 +08:00
Chopper711
03fd9b222a !288 拼团订单延时任务优化
Merge pull request !288 from hucker520
2023-05-31 07:41:12 +00:00
Chopper711
3d7cfb1c63 fix:描述问题处理,将代码枚举注释更加接近逻辑寓意 2023-05-31 15:03:50 +08:00
Chopper711
ca6e45fb92 fix: 重复退货时,商品数量问题处理 2023-05-31 15:02:22 +08:00
Chopper711
e9950652a6 fix:缺少java引用问题处理 2023-05-31 13:43:43 +08:00
Chopper711
cddc6571f7 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop 2023-05-30 18:15:24 +08:00
Chopper711
708ba929f0 1 2023-05-30 18:15:22 +08:00
hucker520
6e820d745c 触发器参数 object 是 PintuanOrderMessage 对象,见第35行,直接转为 Pintuan 对象必为空,须要根据id重新查询
Signed-off-by: hucker520 <505169544@qq.com>
2023-05-26 09:02:41 +00:00
Chopper711
ae9e0e27ff !287 分销订单列表查询结束时间优化 from@hucker520
Merge pull request !287 from hucker520/N/A
2023-05-26 07:23:46 +00:00
hucker520
3485c5a5dd 分销订单列表查询结束日期,默认查询到当天0点,导致当天0点后的订单查询不出来,优化后成查询到结束日期当天23:59:59:999
Signed-off-by: hucker520 <505169544@qq.com>
2023-05-26 03:33:55 +00:00
misworga831
62ac16b705 Merge pull request #86
pg
2023-05-17 14:23:10 +08:00
OceansDeep
048ca0e64a !286 fix & improve
Merge pull request !286 from OceansDeep/pg
2023-05-17 06:17:41 +00:00
misworga831
d413de75d3 fix: 修复购物车商品促销价格特殊情况处理中优惠券金额为0的情况(购物车商品促销价格特殊情况处理只处理优惠券不足的情况) 2023-05-17 14:16:16 +08:00
Chopper711
4f8d4f7a74 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop 2023-05-11 11:21:34 +08:00
Chopper711
a0619abfc4 补充参考配置文档 2023-05-11 11:21:27 +08:00
OceansDeep
5e950b9766 !285 fix & improve
Merge pull request !285 from OceansDeep/pg
2023-05-10 06:53:45 +00:00
misworga831
1f02818692 fix: 优化购物车商品促销价格特殊情况处理 2023-05-10 14:50:19 +08:00
Chopper711
c0a370ad47 fix:交易投诉,交易售后,兼容设置中描述的内容:设置为0则表示不限制 2023-05-10 14:44:55 +08:00
Chopper711
a502420c5f refactor: 去除两个无效引用 2023-05-10 14:07:30 +08:00
Chopper711
b4aef1461c fix: 订单定时任务可能存在极端情况,影响其他业务流程,做一下兼容处理,以免部分数据导致订单定时任务无法处理 2023-05-10 14:03:16 +08:00
OceansDeep
54b40c35f4 !284 fix & improve
Merge pull request !284 from OceansDeep/pg
2023-05-09 06:01:31 +00:00
misworga831
a33e053bc7 fix: 特殊情况处理,如参与多个促销活动,部分商品在其他促销计算后的金额不足以满足与当前参与的促销活动的优惠金额 2023-05-09 13:59:55 +08:00
misworga831
ae93661763 fix: 优化es搜索,增加如搜索超过10000条信息的处理 2023-05-09 13:59:23 +08:00
OceansDeep
349bee7405 !283 fix & improve
Merge pull request !283 from OceansDeep/pg
2023-05-08 10:50:06 +00:00
misworga831
c286d05ad8 fix: 促销状态更新和满减活动范围商品判定 2023-05-08 18:49:37 +08:00
chc
49b2c2f7a3 fix: 导入商品增加填写验证 2023-05-08 18:35:57 +08:00
chc
b469fcfee3 Merge remote-tracking branch 'origin/master' 2023-05-08 17:59:09 +08:00
chc
5e6fde594b fix: 店铺设置是自提、楼层为空导致无法保存 2023-05-08 17:59:01 +08:00
OceansDeep
5d598d9034 !282 优化es生成索引sku取分可能为复数问题
Merge pull request !282 from OceansDeep/pg
2023-05-08 09:38:19 +00:00
misworga831
8181f2602a fix: 优化es生成索引sku取分可能为复数问题 2023-05-08 17:37:29 +08:00
misworga831
3e74697215 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop into pg 2023-05-08 16:51:01 +08:00
Chopper711
fac10debd5 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop 2023-05-06 16:32:48 +08:00
Chopper711
74941f7243 feat: 兼容提现失败场景,对失败消息持久化 2023-05-06 16:32:42 +08:00
chc
621b2e322c fix: 快递鸟抛出异常 2023-05-05 13:40:38 +08:00
pikachu1995@126.com
948b67558a 微信小程序/公众号发送消息。 2023-05-05 07:12:39 +08:00
pikachu1995@126.com
dcf48db2ac fix:用户后期通过小程序登录,保存用户手机号 2023-04-28 08:47:09 +08:00
pikachu1995@126.com
072d31e8df fix:微信小程序登录记录手机号信息 2023-04-26 05:58:56 +08:00
pikachu1995@126.com
25240f445d fix:阿里登录没有传source 2023-04-25 18:40:39 +08:00
pikachu1995@126.com
279b473793 使用手机号为唯一身份进行登录 2023-04-25 17:59:42 +08:00
pikachu1995@126.com
959e24f51b fix:使用用户openID错误 2023-04-25 14:16:36 +08:00
pikachu1995@126.com
c720d53389 fix:合并代码错误,解决小程序无法登录问题。 2023-04-25 14:01:49 +08:00
17600048398
335d3f7ff1 1.修改商品分类同步分类名称 2.修改店铺名称同步对应店铺名称场景 2023-04-25 11:31:54 +08:00
Chopper711
16608d4950 fix:售后日志注解异常抛出问题 2023-04-19 16:16:01 +08:00
Chopper711
7b6a150bd2 fix: 用户被禁用、店铺被禁用、管理员被禁用,token未被清除问题处理。 2023-04-19 12:08:47 +08:00
17600048398
1f21d80dc0 用户签到为空时 无法签到问题 2023-04-18 10:57:41 +08:00
misworga831
76c8a23721 Merge pull request #85
pg
2023-04-18 10:36:44 +08:00
misworga831
08933ad92f fix: 优化足迹搜索 2023-04-18 10:35:56 +08:00
misworga831
06d0fb5b86 Merge pull request #83
pg
2023-04-17 16:42:37 +08:00
OceansDeep
05c3c8a80c !279 fix: 优化足迹搜索
Merge pull request !279 from OceansDeep/pg
2023-04-17 07:38:52 +00:00
misworga831
41796774dc fix: 优化足迹搜索 2023-04-17 15:37:05 +08:00
Chopper711
4594752470 签到代码问题回滚 2023-04-14 18:29:51 +08:00
chc
d818b396c4 fix: 腾讯云COS问题处理 2023-04-14 11:20:54 +08:00
OceansDeep
cf7b333662 !278 fix & improve
Merge pull request !278 from OceansDeep/pg
2023-04-13 07:45:50 +00:00
misworga831
7cc0a90acf fix: 修复签到条件判定错误问题 2023-04-13 15:44:40 +08:00
misworga831
f9eed2f2ab Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop into pg 2023-04-13 15:38:02 +08:00
chc
f8ff163aee fix: 审核商铺后删除缓存 2023-04-13 15:04:32 +08:00
misworga831
38ad5bb394 fix: 优化更新促销状态流程,增加促销检查 2023-04-12 16:13:29 +08:00
misworga831
b2fb415ab5 fix: 优化足迹搜索 2023-04-12 16:12:53 +08:00
最菜的蔡
4c03676a3e !269 存在问题
Merge pull request !269 from zhaoyang0415/N/A
2023-04-11 09:03:38 +00:00
Chopper711
efce977bd6 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop 2023-04-10 18:26:43 +08:00
Chopper711
071974c74b fix:足迹保留100条 2023-04-10 18:26:39 +08:00
OceansDeep
7f202506b5 !277 fix & improve
Merge pull request !277 from OceansDeep/pg
2023-04-10 10:13:06 +00:00
misworga831
a9c9886210 fix: 优化购物车对于更新商品的检查验证 2023-04-10 14:43:47 +08:00
misworga831
e18b62da6e fix: 优化促销相关流程,修复部分促销相关bug。 2023-04-10 14:43:04 +08:00
Chopper711
59c6dedd35 merge master 2023-04-10 10:06:34 +08:00
Chopper711
a673db222e refactor:微信小程序登录兼容没有手机号的情况 2023-04-10 10:04:41 +08:00
misworga831
1cb72a5bdd Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop into pg 2023-04-10 09:58:38 +08:00
misworga831
c1e45242a7 fix: 优化编辑商品,没有清除商品缓存问题 2023-04-07 16:47:32 +08:00
misworga831
efe9a1a6e4 fix: 修复管理员修改会员收货地址无效问题 2023-04-07 16:45:50 +08:00
OceansDeep
e91f0e7ee4 !276 fix & improve
Merge pull request !276 from OceansDeep/pg
2023-04-06 02:30:29 +00:00
misworga831
3716691366 merge code 2023-04-06 10:29:47 +08:00
misworga831
675830045d fix: 修复更新es商品索引促销信息时,批量更新分页起始页错误问题 2023-04-06 10:28:54 +08:00
pikachu1995@126.com
9294f77163 微信小程序登录错误 2023-04-06 08:16:23 +08:00
pikachu1995@126.com
864701adfb wrapper 错误 2023-04-05 10:28:19 +08:00
chc
81f47a7fb6 fix: 优惠券时间查询问题 2023-04-04 17:55:47 +08:00
OceansDeep
a56ceca3c5 !275 fix: 优化生成es索引,只生成库存大于0的商品
Merge pull request !275 from OceansDeep/pg
2023-03-31 10:42:29 +00:00
misworga831
bc670d263d fix: 优化生成es索引,只生成库存大于0的商品 2023-03-31 18:23:30 +08:00
OceansDeep
36068d7197 !274 fix & improve
Merge pull request !274 from OceansDeep/pg
2023-03-31 09:15:41 +00:00
misworga831
4ebe0d4f43 fix: 优化生成es索引,只生成库存大于0的商品 2023-03-31 16:58:34 +08:00
misworga831
9f01078fe0 feat: 升级druid依赖,解决mysql一直打印日志问题 2023-03-31 16:50:53 +08:00
misworga831
b07fc790e5 fix: 优化es商品搜索返回结果。减少重复返回结果 2023-03-31 16:49:42 +08:00
misworga831
ab2bb11eee fix: 增加mac m芯片启动支持 2023-03-31 16:48:43 +08:00
Chopper711
919367162b Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop 2023-03-31 15:22:55 +08:00
Chopper711
ec4d91b37f 修改资源目录 2023-03-31 15:22:48 +08:00
misworga831
799aa8f90c Merge pull request #82
pg
2023-03-30 16:06:22 +08:00
OceansDeep
cfbd1d68ee !273 fix: 优化es日志createTime类型
Merge pull request !273 from OceansDeep/pg
2023-03-30 08:05:22 +00:00
misworga831
4cf8c4e81f Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop into pg 2023-03-30 16:02:52 +08:00
misworga831
87bde2c53f fix: 优化es日志createTime类型 2023-03-30 16:02:41 +08:00
Chopper711
2aaf677605 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop 2023-03-29 16:05:04 +08:00
Chopper711
fad7c4a39d fix: 商家修改商品价格后,购物车的商品价格不变动不提示问题。购物车sku集合引用地址修改无效导致。 2023-03-29 16:04:53 +08:00
OceansDeep
fc464c0564 !271 fix
Merge pull request !271 from OceansDeep/pg
2023-03-27 07:24:56 +00:00
misworga831
53c28359bb fix: 优化es搜索相关品牌、分类及属性为分页查询。修改全部查询可能会导致es默认返回集不能大于100m问题 2023-03-27 15:24:18 +08:00
pikachu1995@126.com
4737cc5ae8 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop 2023-03-27 11:01:21 +08:00
pikachu1995@126.com
97845bbaf5 修改订单金额不能小于等于0 2023-03-27 11:00:50 +08:00
chc
8f516f7be7 fix: 修改商品后清除商品缓存,修改Store、StoreServiceImpl的注释 2023-03-24 18:30:55 +08:00
chc
5c164f89cc fix: config/application.yml 地址更改127 2023-03-24 17:39:43 +08:00
chc
da28859398 fix: 关闭物流公司无效问题 2023-03-24 16:27:20 +08:00
Chopper711
25f8b103bf fix:代码中两次对店铺进行保存问题处理,以及店铺写入属性的无效代码去除 2023-03-23 16:54:28 +08:00
Chopper711
8b0513aece Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop 2023-03-23 16:45:21 +08:00
Chopper711
b95712aef3 fix: 店铺被拒绝后无法再次申请店铺问题修正。修改为店铺状态在申请中、开启、关闭状态时无法申请 2023-03-23 16:45:14 +08:00
17600048398
917d9437b6 分销订单佣金结算 2023-03-23 11:31:30 +08:00
zhaoyang0415
123388d059 查询店铺详情实现中管理端操作是从缓存取得,状态更新后未及时清空缓存,导致详情信息不是最新的
Signed-off-by: zhaoyang0415 <944381517@qq.com>
2023-03-23 02:33:19 +00:00
OceansDeep
226d66c22e !268 优化、修复和升级
Merge pull request !268 from OceansDeep/pg
2023-03-23 02:01:47 +00:00
misworga831
d8f09b6039 Merge pull request #81
pg
2023-03-23 10:00:18 +08:00
misworga831
fae4dcaae2 fix: 优化会员优惠券退还后,可能无法再次使用问题。优化删除商品索引,可能失败问题 2023-03-23 09:59:35 +08:00
misworga831
b957df648b Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop into pg 2023-03-23 09:56:25 +08:00
Chopper711
a21f4800ab > feat: 新功能(feature)热词过滤sql注入关键字问题, 2023-03-22 17:34:57 +08:00
misworga831
4abf2205c1 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop into pg 2023-03-21 14:39:57 +08:00
misworga831
0c652eac63 fix: hutool 依赖更新,依赖优化,获取商品详情优化 2023-03-21 14:39:53 +08:00
Chopper711
3fef330707 update README.md.
Signed-off-by: Chopper711 <1814994716@qq.com>
2023-03-21 06:26:02 +00:00
chc
c2abc4e2e4 fix: 修复IM新用户与自己对话问题 2023-03-20 12:03:34 +08:00
pikachu1995@126.com
d48e5a05a6 修改华为云obs引入版本
微信jsapi支付修改使用openID
2023-03-20 08:43:13 +08:00
chc
72471168d7 更新read me 交流群 5 2023-03-17 19:34:24 +08:00
Chopper711
08a2f7dfcd refactor:演示站点微信消息相关限制,由于出现部分微信消息被删问题 2023-03-17 08:57:01 +08:00
Chopper711
ceb61318f0 refactor:代码逻辑可能出现问题,重构代码执行顺序 2023-03-17 08:55:25 +08:00
Chopper711
11778a632a Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop 2023-03-17 08:29:18 +08:00
Chopper711
f3e11fd368 fix:店员可编辑店长问题处理 2023-03-17 08:29:15 +08:00
Chopper711
69fdd4b756 !260 修改
Merge pull request !260 from zhaoyang0415/N/A
2023-03-16 11:09:06 +00:00
Chopper711
507a6e6525 !262 修改 Merge pull request !262 from zhaoyang0415/N/A
Merge pull request !262 from zhaoyang0415/N/A
2023-03-16 11:01:29 +00:00
17600048398
82a9c6dbf7 分销金额显示错误 2023-03-15 16:28:48 +08:00
17600048398
21d66f719d 分销佣金为空时计算错误 2023-03-15 16:22:03 +08:00
misworga831
c793c47d45 fix: 优化日志搜索,关闭商品删除索引 2023-03-14 19:37:22 +08:00
Chopper711
a81faf4ba4 fix : 批量商品选择状态问题 尝试处理 2023-03-13 16:09:51 +08:00
Chopper711
e60d47163e Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop 2023-03-13 10:33:08 +08:00
Chopper711
e7215cec9e improvement: 优化日志级别问题,减少无效日志输出 2023-03-13 10:33:01 +08:00
17600048398
f7e6789e23 会员收藏功能拆分 2023-03-10 17:42:48 +08:00
17600048398
4af58aea4a 商品结算时无快递费用 2023-03-10 16:36:33 +08:00
chc
4d379d6006 fix: 聊天无法获取问题 2023-03-10 14:49:27 +08:00
Chopper711
519ccb7ddd fix: 足迹模块sql优化,增加事务控制 2023-03-10 10:38:46 +08:00
Chopper711
79ccab6869 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop 2023-03-10 09:37:34 +08:00
Chopper711
ccac5226d5 fix: httpclient 在请求后会在final中进行关闭,导致无法再次请求 2023-03-10 09:37:11 +08:00
pikachu1995@126.com
674e585eff 去除错误打印内容 2023-03-10 07:45:56 +08:00
pikachu1995@126.com
7e1b7f2725 微信小程序,添加来源 2023-03-10 07:32:30 +08:00
pikachu1995@126.com
256f2ba480 微信-公众号登录,还原内容 2023-03-10 07:25:06 +08:00
pikachu1995@126.com
72f63e7e31 修复:第三方登录(微信)重复赋值 2023-03-10 07:14:23 +08:00
pikachu1995@126.com
606f9d2ccf 添加第三方登录,判断是否为当前用户信息 2023-03-10 06:46:21 +08:00
pikachu1995@126.com
0261b7e9ab 小程序赋值unionId 2023-03-10 06:20:14 +08:00
pikachu1995@126.com
71abf32d82 Merge branch 'master' into Bulbsaur 2023-03-09 17:57:52 +08:00
Chopper711
f6030cc918 fix: 微信消息格式化问题处理,最新版本无法正常发送公众号消息问题处理。以及订单状态判定修复,之前存在消息发送状态判定错误问题 2023-03-09 16:54:47 +08:00
misworga831
f7ba021799 Merge pull request #80
pg
2023-03-09 16:45:27 +08:00
pikachu1995@126.com
f506fa86cc APP第三方信任登录通过unionid进行登录 2023-03-09 15:39:50 +08:00
Chopper711
1a0130dd1a fix:微信消息发送字符串格式化问题导致无法正确发送消息,尝试解决 2023-03-09 11:55:45 +08:00
pikachu1995@126.com
6f746e3aff 微信登录业务进行调整 2023-03-08 19:44:06 +08:00
pikachu1995@126.com
36a3a0a0e1 Merge branch 'master' into Bulbsaur 2023-03-08 18:27:39 +08:00
chc
323e1cd6eb fix: ShunfengPlugin无法创建问题 2023-03-08 18:07:14 +08:00
chc
06fb54c65c feat: 集成顺丰开放平台功能,增加商家忘记密码,手机号登录功能 2023-03-08 10:32:47 +08:00
chc
07d4a2cda9 fix: 去除无用的ImUserController,调整IM代码 2023-03-02 15:10:51 +08:00
pikachu1995@126.com
53e753c3ef 解决问题:短信发送,未调用实际发送短信方法 2023-03-02 11:00:05 +08:00
pikachu1995@126.com
8d8cffca71 第三方登录集成unionID 2023-03-02 10:45:43 +08:00
chc
352a19b91c 修改物流模板,清除商品缓存 2023-03-01 17:09:20 +08:00
pikachu1995@126.com
74972eaa37 合并master,解决冲突 2023-03-01 11:50:54 +08:00
pikachu1995@126.com
5ee07ec34d 用户提现-第三方支付提现,功能完善 2023-03-01 10:59:27 +08:00
Chopper711
61104b9cd3 fixbug:提现申请充值业务问题处理 2023-03-01 10:37:08 +08:00
zhaoyang0415
032ecc4a3e UpdateWrapper替换为QueryWrapper
Signed-off-by: zhaoyang0415 <944381517@qq.com>
2023-02-25 14:52:47 +00:00
zhaoyang0415
7337cf6fa5 修改了商品参数集合判空方式
Signed-off-by: zhaoyang0415 <944381517@qq.com>
2023-02-25 14:11:46 +00:00
pikachu1995@126.com
967852f84d 去除误提交代码 2023-02-24 14:55:29 +08:00
pikachu1995@126.com
17734e7a3d 银联支付-云闪付 2023-02-24 14:53:49 +08:00
pikachu1995@126.com
b8398ac1d1 微信、支付宝提现 2023-02-23 17:50:56 +08:00
OceansDeep
0a3696ac56 !257 优化生成索引,增加批量生成参数
Merge pull request !257 from OceansDeep/pg
2023-02-21 04:09:16 +00:00
misworga831
8e0b77c232 fix: 优化生成索引,增加批量生成参数 2023-02-21 12:08:33 +08:00
misworga831
88efc2da38 fix: 优化生成索引,修改批量生成 2023-02-21 12:04:56 +08:00
Chopper711
48f9398e72 fix:去除无效类 2023-02-17 08:09:42 +08:00
pikachu1995@126.com
b147bbef3d 解决编译错误问题。 2023-02-17 07:31:23 +08:00
pikachu1995@126.com
013e8f8f70 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop 2023-02-16 18:16:43 +08:00
pikachu1995@126.com
98907b33aa 存储新增:腾讯云、华为云
短信新增:腾讯云、华为云
物流新增:快递100
物流查询方式新增:快递查询地图轨迹
2023-02-16 18:16:37 +08:00
Chopper711
49003f4d9a refactor:当token过期,重新生成token时,authuser对象中的字段与方法参数重复,进行优化 2023-02-16 16:25:39 +08:00
Chopper711
46c869ca8a fix:jwt中长期有效标识字段赋值错误bug修复。 2023-02-16 16:24:28 +08:00
pikachu1995@126.com
f92756c103 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop 2023-02-13 16:46:04 +08:00
Chopper711
57c3fa04db update README.md.
Signed-off-by: Chopper711 <1814994716@qq.com>
2023-02-10 03:37:37 +00:00
Chopper711
30d8d34976 update README.md.
Signed-off-by: Chopper711 <1814994716@qq.com>
2023-02-10 03:35:55 +00:00
pikachu1995@126.com
c49f968d82 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop 2023-02-09 16:24:19 +08:00
misworga831
894a75beb3 Merge pull request #76
pg
2023-02-09 16:06:45 +08:00
misworga831
cb7e1cc03e fix: 优化代码结构 2023-02-08 00:56:08 +08:00
misworga831
9e1837e89c fix: 优化商品根据id搜索 2023-02-04 11:13:32 +08:00
misworga831
475f96d00a Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop 2023-02-03 17:55:54 +08:00
misworga831
96854ca00c fix: 优化商品根据id搜索 2023-02-03 17:55:38 +08:00
misworga831
0bf6aab43b fix: 增加获取购物车商品日志,修复可能出现的获取购物车空指针问题 2023-02-03 17:54:50 +08:00
chc
856aee6c18 选择自提购物车商品不取消问题 2023-02-03 17:26:08 +08:00
misworga831
0f2ed23b02 fix: 优化购物车检查数据集合操作问题 2023-02-03 15:34:00 +08:00
chc
10b4d0b16b 自提功能完善核销功能 2023-02-02 17:05:35 +08:00
chc
7f44b29fbc 电子面单报错信息问题修改 2023-02-01 17:12:50 +08:00
chc
a66c6e5504 购物车商品失效问题 2023-02-01 15:51:11 +08:00
chc
255d5a4550 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop 2023-01-31 18:03:24 +08:00
chc
6df2b92bc6 增加IM接口 2023-01-31 18:03:14 +08:00
misworga831
8c38c9e145 fix: 修复会员签到判断条件错误问题 2023-01-31 16:45:23 +08:00
Chopper711
501b9777b5 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop 2023-01-29 10:02:50 +08:00
Chopper711
8fc18458c2 冲突处理 2023-01-29 10:02:44 +08:00
chc
457793b4d2 订单选择自提提示无法配送问题 2023-01-19 17:27:21 +08:00
Chopper
4bb00bc006 删除缓存修复 2023-01-16 14:56:41 +08:00
17600048398
1a0515361e Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop 2023-01-13 17:10:27 +08:00
17600048398
2df8df1a0d im功能拆分 2023-01-13 17:10:15 +08:00
misworga831
96a9a32079 fix: 增加获取购物车商品日志,修复可能出现的获取购物车空指针问题 2023-01-13 14:37:13 +08:00
misworga831
5d6b475e09 fix: 增加获取购物车商品日志,修复可能出现的获取购物车空指针问题 2023-01-13 14:22:44 +08:00
Chopper711
cb3eca29d8 店铺更新店铺信息,缓存未同步问题处理 2023-01-13 10:07:57 +08:00
Chopper711
bdb62de868 im问题部分处理 2023-01-12 15:44:44 +08:00
misworga831
b416e56b98 Merge pull request #75
feature/pg
2023-01-11 11:38:47 +08:00
Chopper711
1728be9c36 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop 2023-01-11 11:38:12 +08:00
Chopper711
ea85710c05 优惠券活动领取周期问题 2023-01-11 11:38:01 +08:00
OceansDeep
e1af67beb3 !256 resolve issue
Merge pull request !256 from OceansDeep/feature/pg
2023-01-11 03:36:50 +00:00
Chopper711
d9de601e8a 售后数量问题梳理解决 2023-01-11 11:34:54 +08:00
paulGao
3c568a7d42 fix: 修复商品索引初始化时,店铺全品类优惠券和平台全品类优惠券没有区分问题 2023-01-11 11:32:27 +08:00
paulGao
5080cf65c7 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop into feature/pg 2023-01-10 14:34:52 +08:00
paulGao
eefca656c6 fix: 优化会员优惠券搜索 2023-01-10 14:34:48 +08:00
Chopper711
3a63f87807 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop 2023-01-10 09:25:24 +08:00
Chopper711
d71628adfe 多websocket掉线问题处理 2023-01-10 09:25:18 +08:00
chc
585fc96bca 历史足迹sql 2023-01-10 09:11:37 +08:00
chc
28b1820bfa 历史足迹sql 2023-01-10 09:11:13 +08:00
chc
85e74014b1 im和自提的SQL 2023-01-09 18:33:53 +08:00
Chopper711
cc12cecc2a merge 自提、IM功能 2023-01-09 18:00:40 +08:00
Chopper711
197a7bcc43 '秒杀活动额外适配' 2023-01-09 11:21:46 +08:00
Chopper711
613f397c33 '优惠券领取改良完成' 2023-01-05 18:02:40 +08:00
pikachu1995@126.com
a3bd0f2c0b Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop 2023-01-05 15:31:22 +08:00
paulGao
bda297b90d Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop into feature/pg 2023-01-05 14:39:33 +08:00
paulGao
8ddba831f0 feat: 增加根据促销活动搜索商品索引。增加获取优惠券领取记录。增加优惠券关闭后同时作废所有会员领取的优惠券。 2023-01-05 14:39:23 +08:00
Chopper711
5218702005 '商品索引空处理' 2023-01-03 11:52:30 +08:00
Chopper711
fbabd2f340 '快递鸟报错兼容问题' 2023-01-03 11:52:02 +08:00
chc
a38bc6b534 IM功能 2023-01-03 09:30:43 +08:00
chc
73aa36fc69 IM消息功能 2022-12-27 18:14:47 +08:00
pikachu1995@126.com
d627fca7d6 分销员 分销佣金添加默认值 2022-12-27 16:35:07 +08:00
Chopper711
06325a7ce1 '促销详情完善' 2022-12-26 19:00:13 +08:00
Chopper711
903b779ebe '价格记录详细处理' 2022-12-26 10:55:37 +08:00
Chopper711
0e3d582d13 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop 2022-12-23 15:13:08 +08:00
Chopper711
cd17f3d755 '构建促销详情模型' 2022-12-23 15:13:05 +08:00
Chopper711
8543a228fd '优惠券功能改版' 2022-12-23 14:51:06 +08:00
chc
b97c8e7fda 商品价格修改后同步到购物车 2022-12-22 18:19:52 +08:00
chc
1346614a30 站点图标与logo分开添加与展示 2022-12-22 15:17:54 +08:00
paulGao
0eec40673f Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop into feature/pg 2022-12-07 15:17:12 +08:00
Chopper711
602678e2b9 '搜索商品功能过滤关键字以及特殊字符' 2022-12-07 15:14:25 +08:00
Chopper711
d6393e39f7 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop 2022-12-07 09:49:15 +08:00
Chopper711
b3f22866b5 '店铺申请流程规范化,防止恶意攻击' 2022-12-07 09:38:10 +08:00
Chopper711
51d2880392 '增加优惠券关闭作废优惠券' 2022-12-07 09:37:50 +08:00
paulGao
ede7a37e37 fix: 修复修改商品库存时,促销商品库存没有同步修改问题 2022-12-05 17:17:05 +08:00
pikachu1995@126.com
8373303651 储存OrderVO的订单货物列表错误。 2022-12-05 11:30:32 +08:00
OceansDeep
f3ccabe253 !255 fix: 优化es价格搜索,设置超出限制,则默认搜索最大值
Merge pull request !255 from OceansDeep/feature/pg
2022-11-29 07:04:32 +00:00
paulGao
ba6bb56e81 fix: 优化es价格搜索,设置超出限制,则默认搜索最大值 2022-11-29 15:03:16 +08:00
OceansDeep
73124f016d !254 fix: 优化批发商品,没有匹配规则时,显示异常,不在默认为第一个规则
Merge pull request !254 from OceansDeep/feature/pg
2022-11-28 10:30:35 +00:00
paulGao
32ca2e4298 fix: 优化批发商品,没有匹配规则时,提示的错误信息 2022-11-28 15:47:41 +08:00
paulGao
1cc7486b0a fix: 优化批发商品,没有匹配规则时,显示异常,不在默认为第一个规则 2022-11-28 10:52:34 +08:00
paulGao
26b58442c5 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop into feature/pg 2022-11-28 10:44:33 +08:00
lilili
20de17bef1 重复签到 2022-11-27 20:13:15 +08:00
chc
54e04be768 im 2022-11-24 18:13:30 +08:00
chc
49b517f1ab im 2022-11-23 18:44:54 +08:00
chc
fc71d2d1ca Merge branch 'lili_self' of https://gitee.com/beijing_hongye_huicheng/lilishop into lili_self 2022-11-22 17:32:20 +08:00
chc
340b5b7248 im 2022-11-22 17:31:45 +08:00
chc
cfd292ef18 自提 2022-11-22 17:20:17 +08:00
paulGao
f7ea17a9cf Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop into feature/pg 2022-11-22 15:29:27 +08:00
paulGao
096ab34ae8 fix: 优化文件上传,删除冗余文件 2022-11-22 15:29:22 +08:00
Chopper711
e72b35c7eb update LICENSE.
Signed-off-by: Chopper711 <1814994716@qq.com>
2022-11-21 03:21:52 +00:00
Chopper711
9141f21cf8 LICENSE
Signed-off-by: Chopper711 <1814994716@qq.com>
2022-11-21 03:02:55 +00:00
paulGao
65d9efef94 fix: 增加店员错误信息回
2022-11-18 10:15:50 +08:00
OceansDeep
c5b19db662 !253 fix: 修复下载商品导入模版错误问题
Merge pull request !253 from OceansDeep/feature/pg
2022-11-17 10:36:42 +00:00
paulGao
f6a50cc43a fix: 修复下载商品导入模版错误问题 2022-11-17 18:36:04 +08:00
Chopper711
a13260b8c6 '楼层参数写入错误修正' 2022-11-14 09:44:53 +08:00
Chopper711
66c0200457 '商家楼层装修权限放开' 2022-11-14 09:31:20 +08:00
Chopper711
e244883165 '两个装修类合并' 2022-11-14 09:21:35 +08:00
Chopper711
92367c9020 '店铺保存模板配置问题处理' 2022-11-14 09:05:43 +08:00
Chopper711
e78ea60644 '限制演示站点部分功能' 2022-11-11 15:18:48 +08:00
Chopper711
29f73eaaa1 '楼层装修演示站点被覆盖问题处理' 2022-11-08 14:35:29 +08:00
OceansDeep
22c004a892 !250 pref: 优化es生成全部商品索引,减少数据库操作 优化文件
Merge pull request !250 from OceansDeep/feature/pg
2022-11-02 12:02:48 +00:00
paulGao
ef0507cf1d fix: 优化文件 2022-11-02 19:59:13 +08:00
paulGao
9df9e33ce1 fix: 优化代码 2022-11-02 19:54:57 +08:00
paulGao
52a2caaa6d Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop into feature/pg 2022-11-02 19:43:44 +08:00
paulGao
0b6aa9e857 fix: 优化代码 2022-11-02 19:43:38 +08:00
paulGao
3b078cfd6b pref: 优化es生成全部商品索引,减少数据库操作 2022-11-02 19:43:17 +08:00
Chopper711
67b746998f update README.md.
Signed-off-by: Chopper711 <1814994716@qq.com>
2022-10-31 03:04:13 +00:00
Chopper711
52f62f0c1d update README.md.
Signed-off-by: Chopper711 <1814994716@qq.com>
2022-10-31 03:04:01 +00:00
Chopper711
ca23b5ab33 防重复提交问题å‘处理 2022-10-28 17:58:28 +08:00
Chopper711
5a14790ec2 平台脱敏 2022-10-28 17:33:06 +08:00
Chopper711
67542eebfb 用户信息脱敏 2022-10-28 16:58:30 +08:00
Chopper711
88c62bc238 用戶信息查看脫敏字段處理 2022-10-28 16:09:26 +08:00
Chopper711
0c4ed91335 update README.md.
Signed-off-by: Chopper711 <1814994716@qq.com>
2022-10-27 07:31:48 +00:00
Chopper711
74dbb611ab update README.md.
Signed-off-by: Chopper711 <1814994716@qq.com>
2022-10-27 07:31:19 +00:00
Chopper711
07e72c7e72 !248 更新无法更新分销员待提现总金额的bug Merge pull request !248 from 隔壁老黄/tempbranch 2022-10-27 01:30:00 +00:00
chc
2c0700c10e lilishop.sql 2022-10-26 17:38:51 +08:00
Chopper711
191cee25a4 !246 fix: 限流次数不对 Merge pull request !246 from @xiaochangbai/pr/optime_lock
Merge pull request !246 from @xiaochangbai/pr/optime_lock
2022-10-26 09:26:19 +00:00
Chopper711
1b4fad72ed !249 修改xxl-job合并冲突配置文件 Merge pull request !249 from 欢哥/master
Merge pull request !249 from 欢哥/master
2022-10-26 09:13:43 +00:00
code huan
3fce0dba48 fix 修改合并冲突文件 2022-10-26 14:58:55 +08:00
chc
706346338b 获取店铺首页 2022-10-25 19:13:03 +08:00
neo0820
aee846764b 更新无法更新分销员待提现总金额的bug 2022-10-25 19:00:59 +08:00
chc
391b35ef1f sql错误 2022-10-25 18:37:12 +08:00
蔡洪呈
9364841cf4 update README.md.
Signed-off-by: 蔡洪呈 <1501738723@qq.com>
2022-10-24 08:39:35 +00:00
OceansDeep
0d7b44fe51 !247 fix: 优化生成商品索引,取消检查库存不为0 优化es商品搜索及es商品特定查询条件的分页
Merge pull request !247 from OceansDeep/feature/pg
2022-10-24 06:40:33 +00:00
paulGao
47734cfca6 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop into feature/pg 2022-10-24 14:38:08 +08:00
paulGao
a272e53519 fix: 优化es商品搜索及es商品特定查询条件的分页 2022-10-24 14:37:36 +08:00
xiaochangbai
710fe1998b fix: 限流次数不对 2022-10-21 17:36:26 +08:00
蔡洪呈
31c76c08b8 update pom.xml.
修改revision版本号

Signed-off-by: 蔡洪呈 <1501738723@qq.com>
2022-10-21 08:48:17 +00:00
paulGao
7d5e609f7b Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop into feature/pg 2022-10-18 17:47:14 +08:00
paulGao
4d2cb2d1dc fix: 优化生成商品索引,取消检查库存不为0 2022-10-18 17:46:46 +08:00
539 changed files with 17837 additions and 196947 deletions

File diff suppressed because one or more lines are too long

View File

@@ -1,2 +0,0 @@
/** 店铺--默认页面是否开启**/
ALTER TABLE li_store ADD page_show bit(1) DEFAULT NULL COMMENT '默认页面是否开启';

View File

@@ -365,8 +365,8 @@ INSERT INTO `li_menu` VALUES (1367049611578966016, 'admin', '2021-03-03 09:50:01
INSERT INTO `li_menu` VALUES (1367049712657498112, 'admin', '2021-03-03 09:50:25', b'0', 'admin', '2021-12-02 20:22:04', 'null', 'promotions/pintuan/pintuan', 'md-alert', 2, 'promotions/pintuan', '1367049214198022144', 'promotions/pintuan', 3.00, '拼团活动', 'null', '/manager/promotion/pintuan*');
INSERT INTO `li_menu` VALUES (1367050250249830400, 'admin', '2021-03-03 09:52:33', b'0', 'admin', '2021-03-22 20:38:14', 'null', 'Main', 'md-aperture', 1, 'document', '1367040599596728320', '/', 2.00, '文章管理', 'null', NULL);
INSERT INTO `li_menu` VALUES (1367050320584114176, 'admin', '2021-03-03 09:52:50', b'0', 'admin', '2021-07-27 16:05:49', NULL, 'Main', 'md-aperture', 1, 'floor', '1367040599596728320', '/', 0.00, '楼层装修', NULL, '/manager/pageData*,/manager/file*,/manager/article-category*,/manager/article*,/manager/promotion*,/manager/goods*,/manager/store*');
INSERT INTO `li_menu` VALUES (1367050530030878720, 'admin', '2021-03-03 09:53:40', b'0', 'admin', '2021-03-04 01:05:57', 'null', 'lili-floor-renovation/floorList', 'md-alert', 2, 'pcFloor', '1367050320584114176', 'pcFloor', 0.00, 'PC端', 'null', '/manager/other/pageData*');
INSERT INTO `li_menu` VALUES (1367050673312497664, 'admin', '2021-03-03 09:54:14', b'0', 'admin', '2021-03-04 01:06:04', 'null', 'lili-floor-renovation/wap/wapList', 'md-aperture', 2, 'wapList', '1367050320584114176', 'wapList', 1.00, '移动端', 'null', '/manager/other/pageData*');
INSERT INTO `li_menu` VALUES (1367050530030878720, 'admin', '2021-03-03 09:53:40', b'0', 'admin', '2021-03-04 01:05:57', 'null', 'page-decoration/floorList', 'md-alert', 2, 'pcFloor', '1367050320584114176', 'pcFloor', 0.00, 'PC端', 'null', '/manager/other/pageData*');
INSERT INTO `li_menu` VALUES (1367050673312497664, 'admin', '2021-03-03 09:54:14', b'0', 'admin', '2021-03-04 01:06:04', 'null', 'page-decoration/wap/wapList', 'md-aperture', 2, 'wapList', '1367050320584114176', 'wapList', 1.00, '移动端', 'null', '/manager/other/pageData*');
INSERT INTO `li_menu` VALUES (1367050829697122304, 'admin', '2021-03-03 09:54:51', b'0', 'admin', '2021-07-27 16:06:32', 'null', 'page/article-manage/hotWords', 'md-aperture', 2, 'hotKeyWord', '1367050250249830400', 'hotKeyWord', 0.00, '搜索热词', 'null', '/manager/hotwords*');
INSERT INTO `li_menu` VALUES (1367050939084570624, 'admin', '2021-03-03 09:55:17', b'0', 'admin', '2021-07-27 16:06:38', NULL, 'page/article-manage/ArticleCategory', 'md-aperture', 2, 'article-category', '1367050250249830400', 'article-category', 1.00, '文章分类', NULL, '/manager/other/articleCategory*');
INSERT INTO `li_menu` VALUES (1367051048232943616, 'admin', '2021-03-03 09:55:43', b'0', 'admin', '2021-07-27 16:06:42', NULL, 'page/article-manage/articleList', 'md-alert', 2, 'articleList', '1367050250249830400', 'articleList', 3.00, '文章管理', NULL, '/manager/other/article*,/manager/other/articleCategory*');

View File

@@ -1,48 +0,0 @@
/** 增加签到日期 **/
ALTER TABLE li_member_sign
ADD day int DEFAULT NULL COMMENT '签到日 ';
ALTER TABLE li_member_sign
DROP INDEX uk_member_day;
ALTER TABLE li_member_sign
add unique uk_member_day (member_id, day) COMMENT 'uk_member_day';
-- ----------------------------
-- Table structure for li_hot_words_history
-- ----------------------------
DROP TABLE IF EXISTS `li_hot_words_history`;
CREATE TABLE `li_hot_words_history`
(
`id` bigint NOT NULL COMMENT 'ID',
`create_time` datetime(6) DEFAULT NULL COMMENT '创建时间',
`keywords` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '热词',
`score` int DEFAULT NULL COMMENT '热词分数',
PRIMARY KEY (`id`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb3 COLLATE = utf8_bin COMMENT '热词历史表';
-- ----------------------------
-- Records of li_hot_words_history
-- ----------------------------
-- ----------------------------
-- Table structure for li_wholesale
-- ----------------------------
DROP TABLE IF EXISTS `li_wholesale`;
CREATE TABLE `li_wholesale`
(
`id` bigint NOT NULL,
`create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
`create_time` datetime(6) DEFAULT NULL,
`delete_flag` bit(1) DEFAULT NULL,
`update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
`update_time` datetime(6) DEFAULT NULL,
`price` decimal(10, 2) DEFAULT NULL COMMENT '价格',
`goods_id` bigint DEFAULT NULL COMMENT '商品id',
`sku_id` bigint DEFAULT NULL COMMENT '商品skuId',
`num` int DEFAULT NULL COMMENT '起购量',
PRIMARY KEY (`id`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT '批发规则表';
ALTER TABLE li_wholesale
ADD template_id bigint DEFAULT NULL COMMENT '商品模版id';

91
DB/version4.2.5to4.3.sql Normal file
View File

@@ -0,0 +1,91 @@
/** 优惠券活动增加领取周期字段 **/
ALTER TABLE li_coupon_activity ADD coupon_frequency_enum varchar(255) COMMENT '领取周期';
-- 会员优惠券标识
CREATE TABLE `li_member_coupon_sign` (
`id` bigint NOT NULL,
`coupon_activity_Id` bigint NULL DEFAULT NULL COMMENT '优惠券活动id',
`member_id` bigint NULL DEFAULT NULL COMMENT '会员id',
`invalid_time` datetime NULL DEFAULT NULL COMMENT '过期时间',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = DYNAMIC;
/**
IM聊天
*/
CREATE TABLE `li_im_talk` (
`id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '创建者',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`delete_flag` bit(1) DEFAULT NULL COMMENT '删除标志',
`update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '修改者',
`update_time` datetime(6) DEFAULT NULL COMMENT '修改时间',
`user_id1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '用户1Id',
`user_id2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '用户2Id',
`name1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '用户1名称',
`name2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '用户2名称',
`face1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '用户1头像',
`face2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '用户2头像',
`top1` bit(1) DEFAULT NULL COMMENT '用户1置顶标识',
`top2` bit(1) DEFAULT NULL COMMENT '用户2置顶标识',
`disable1` bit(1) DEFAULT NULL COMMENT '用户1禁用标识',
`disable2` bit(1) DEFAULT NULL COMMENT '用户2禁用标识',
`store_flag1` bit(1) DEFAULT NULL COMMENT '用户1店铺标识',
`store_flag2` bit(1) DEFAULT NULL COMMENT '用户2店铺标识',
`last_talk_time` datetime DEFAULT NULL COMMENT '最后聊天时间',
`last_talk_message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '最后的消息',
`last_message_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '最后消息类型',
`talk_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '聊天Id',
`tenant_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '坐席Id',
`tenant_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '坐席名称',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/**
IM消息
*/
CREATE TABLE `li_im_message` (
`id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '创建者',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`delete_flag` bit(1) DEFAULT NULL COMMENT '删除标识',
`update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '修改者',
`update_time` datetime(6) DEFAULT NULL COMMENT '修改标识',
`from_user` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '发送用户Id',
`to_user` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '接收用户Id',
`is_read` bit(1) DEFAULT NULL COMMENT '已读标识',
`message_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '聊天类型',
`text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '聊天内容',
`talk_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '聊天Id',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/**
订单增加自提信息
*/
ALTER TABLE li_order ADD `store_address_path` varchar(255) DEFAULT NULL;
ALTER TABLE li_order ADD `store_address_center` varchar(255) DEFAULT NULL;
ALTER TABLE li_order ADD `store_address_mobile` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL;
/**
店铺是否开启自提
*/
ALTER TABLE li_store ADD `self_pick_flag` bit(1) DEFAULT NULL;
/**
历史足迹增加店铺Id
*/
ALTER TABLE li_foot_print ADD `store_id` varchar(255) DEFAULT NULL COMMENT '店铺ID';
/**
用户提现申请增加字段
*/
ALTER TABLE li_member_withdraw_apply ADD `real_name` varchar(255) DEFAULT NULL;
ALTER TABLE li_member_withdraw_apply ADD `connect_number` varchar(255) DEFAULT NULL;
ALTER TABLE li_member_withdraw_apply ADD `error_message` text DEFAULT NULL;

183
DB/version4.3toMASTER.sql Normal file
View File

@@ -0,0 +1,183 @@
CREATE TABLE `li_file_directory`
(
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`create_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者',
`update_time` datetime NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者',
`delete_flag` tinyint(1) NULL DEFAULT 0 COMMENT '删除标志 true/false 删除/未删除',
`directory_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '文件目录类型',
`directory_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '拥有者名称',
`owner_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '拥有者id',
`parent_id` bigint NULL DEFAULT NULL COMMENT '父分类ID',
`level` int NULL DEFAULT NULL COMMENT '层级',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
AUTO_INCREMENT = 1698937596963311619
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_0900_ai_ci COMMENT = '文件夹'
ROW_FORMAT = DYNAMIC;
SET FOREIGN_KEY_CHECKS = 1;
ALTER TABLE li_file
ADD file_directory_id varchar(255) COMMENT '文件夹ID';
/**
订单包裹
*/
CREATE TABLE `li_order_package` (
`id` bigint NOT NULL COMMENT 'ID',
`create_by` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '创建者',
`create_time` datetime(6) DEFAULT NULL COMMENT '创建时间',
`delete_flag` bit(1) DEFAULT NULL COMMENT '是否删除',
`update_by` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '修改者',
`update_time` datetime(6) DEFAULT NULL COMMENT '修改时间',
`package_no` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '包裹单号',
`order_sn` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '订单编号',
`logistics_no` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '发货单号',
`logistics_code` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '物流公司CODE',
`logistics_name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '物流公司名称',
`consignee_mobile` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '收件人手机',
`status` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '状态',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=DYNAMIC;
/**
分包货物
*/
CREATE TABLE `li_order_package_item` (
`id` bigint NOT NULL COMMENT 'ID',
`create_by` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '创建者',
`create_time` datetime(6) DEFAULT NULL COMMENT '创建时间',
`delete_flag` bit(1) DEFAULT NULL COMMENT '是否删除',
`update_by` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '修改者',
`update_time` datetime(6) DEFAULT NULL COMMENT '修改时间',
`package_no` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '包裹单号',
`order_sn` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '订单编号',
`order_item_sn` varchar(255) COLLATE utf8mb3_bin DEFAULT NULL COMMENT '子订单编号',
`deliver_number` int DEFAULT NULL COMMENT '发货数量',
`logistics_time` datetime(6) DEFAULT NULL COMMENT '发货时间',
`goods_name` varchar(255) COLLATE utf8mb3_bin DEFAULT NULL,
`thumbnail` varchar(255) COLLATE utf8mb3_bin DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=DYNAMIC;
/*
订单货物增加发货数量
*/
ALTER TABLE li_order_item ADD `deliver_number` int DEFAULT NULL COMMENT '发货数量';
ALTER TABLE li_goods_sku ADD `alert_quantity` int DEFAULT NULL COMMENT '预警库存';
/*
sku增加预警库存
*/
ALTER TABLE li_goods_sku ADD `alert_quantity` int DEFAULT NULL COMMENT '预警库存';
/*
增加库存预警菜单
*/
INSERT INTO `lilishop`.`li_store_menu`(`id`, `create_by`, `create_time`, `delete_flag`, `update_by`, `update_time`, `description`, `front_route`, `icon`, `level`, `name`, `parent_id`, `path`, `sort_order`, `title`, `permission`) VALUES (1349237928434098177, NULL, '2022-01-11 22:35:45.000000', b'0', NULL, '2022-01-11 22:37:05', NULL, 'goods/goods-seller/alertQuantity', 'ios-american-football', 2, 'alert-goods-quantity', '1348810864748945408', 'alert-goods-quantity', '1.14', '库存预警', NULL);
/**
交易唤醒表,增加交易流水详情
*/
ALTER TABLE li_order_item ADD `is_refund` varchar(255) DEFAULT NULL COMMENT '是否退款';
/**
交易表增加订单状态字段
*/
ALTER TABLE li_order_item ADD `refund_price` decimal(10,2) DEFAULT NULL COMMENT '退款金额';
/**
结算单表,增加砍价/积分退款金额字段
*/
ALTER TABLE li_bill ADD `point_refund_settlement_price` decimal(10,2) DEFAULT NULL COMMENT '退货积分补贴返还';
ALTER TABLE li_bill ADD `kanjia_refund_settlement_price` decimal(10,2) DEFAULT NULL COMMENT '退货砍价补贴返还';
UPDATE li_bill b
SET b.point_refund_settlement_price =IFNULL((
SELECT
SUM( point_settlement_price )
FROM
li_store_flow sf
WHERE
sf.flow_type = 'REFUND'
AND sf.store_id=b.store_id
AND sf.create_time BETWEEN b.start_time
AND b.end_time),0)
UPDATE li_bill b
SET b.kanjia_refund_settlement_price =IFNULL((
SELECT
SUM( kanjia_settlement_price )
FROM
li_store_flow sf
WHERE
sf.flow_type = 'REFUND'
AND sf.store_id=b.store_id
AND sf.create_time BETWEEN b.start_time
AND b.end_time),0);
/**
交易唤醒表,增加交易流水详情
*/
ALTER TABLE li_order_item ADD `is_refund` varchar(255) DEFAULT NULL COMMENT '是否退款';
/**
交易表增加订单状态字段
*/
ALTER TABLE li_order_item ADD `refund_price` decimal(10,2) DEFAULT NULL COMMENT '退款金额';
/**
文件表增加拥有者名称
*/
ALTER TABLE li_file ADD `owner_name` varchar(255) DEFAULT NULL COMMENT '拥有者名称';
/**
初始化文件拥有者名称
*/
UPDATE li_file f JOIN li_store s ON f.owner_id = s.id
SET f.owner_name = s.store_name
WHERE user_enums = 'STORE';
UPDATE li_file f JOIN li_admin_user a ON f.owner_id = a.id
SET f.owner_name = a.nick_name
WHERE user_enums = 'MANAGER';
UPDATE li_file f JOIN li_member m ON f.owner_id = m.id
SET f.owner_name = m.nick_name
WHERE user_enums = 'MEMBER';
ALTER TABLE `li_order`
ADD COLUMN `seller_remark` varchar(255) NULL COMMENT '商家订单备注' AFTER `remark`;
ALTER TABLE `li_distribution_cash`
ADD COLUMN `name` varchar(255) NULL COMMENT '会员姓名';
ALTER TABLE `li_distribution_cash`
ADD COLUMN `id_number` varchar(255) NULL COMMENT '身份证号' ;
ALTER TABLE `li_distribution_cash`
ADD COLUMN `settlement_bank_account_name` varchar(255) NULL COMMENT '结算银行开户行名称' ;
ALTER TABLE `li_distribution_cash`
ADD COLUMN `settlement_bank_account_num` varchar(255) NULL COMMENT '结算银行开户账号' ;
ALTER TABLE `li_distribution_cash`
ADD COLUMN `settlement_bank_branch_name` varchar(255) NULL COMMENT '结算银行开户支行名称' ;
ALTER TABLE `li_distribution` ADD `distribution_order_price` decimal(10,2) DEFAULT NULL COMMENT '分销订单金额';
ALTER TABLE `li_distribution_order` ADD `refund_num` int DEFAULT NULL COMMENT '退款商品数量';
ALTER TABLE `li_store_flow` ADD `bill_time` datetime(6) DEFAULT NULL COMMENT '结算时间';
ALTER TABLE `li_store_flow` ADD `full_refund` bit(1) DEFAULT NULL COMMENT '是否全部退款';
ALTER TABLE `li_store_flow` ADD `profit_sharing_status` varchar(255) NULL COMMENT '分账状态';
ALTER TABLE `li_store_flow` ADD `profit_sharing` varchar(255) NULL COMMENT '分账详情';
INSERT INTO `lilishop`.`li_setting` (`id`, `create_by`, `create_time`, `delete_flag`, `update_by`, `update_time`, `setting_value`) VALUES ('CONNECT_SETTING', 'admin', '2024-07-07 13:55:38.686000', b'0', NULL, NULL, '{\"callbackUrl\":\"https://buyer-api.pickmall.cn\",\"pc\":\"https://pc-b2b2c.pickmall.cn\",\"wap\":\"https://m-b2b2c.pickmall.cn\"}');
UPDATE `lilishop`.`li_setting` SET `create_by` = 'admin', `create_time` = '2021-01-23 02:18:03.299000', `delete_flag` = b'0', `update_by` = 'admin', `update_time` = '2024-07-07 13:53:44.732000', `setting_value` = '{\"accessKeyId\":\"test\",\"tencentSdkAppId\":\"null\",\"registerTemplateCode\":\"SMS_205755298\",\"huaweiSender\":\"null\",\"signName\":\"lili\",\"tencentSecretId\":\"null\",\"huaweiAppKey\":\"null\",\"isTestModel\":\"true\",\"tencentSecretKey\":\"null\",\"type\":\"ALI\",\"accessSecret\":\"test\",\"tencentSignName\":\"null\",\"huaweiSignature\":\"null\",\"payPasswordTemplateCode\":\"SMS_205755301\",\"walletPasswordTemplateCode\":\"SMS_205755297\",\"findPasswordTemplateCode\":\"SMS_205755301\",\"huaweiAppSecret\":\"null\",\"loginTemplateCode\":\"SMS_205755300\"}' WHERE `id` = 'SMS_SETTING';

820
LICENSE
View File

@@ -1,6 +1,5 @@
<<<<<<< HEAD
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
@@ -8,17 +7,15 @@
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
@@ -27,44 +24,34 @@ them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
@@ -73,7 +60,7 @@ modification follow.
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
@@ -550,35 +537,45 @@ to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
@@ -636,716 +633,29 @@ the "copyright" line and a pointer to where the full notice is found.
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
GNU Affero General Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
For more information on this, and how to apply and follow the GNU AGPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
=======
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
>>>>>>> ae0c4aea12996d3d72eca7c6ccdc97922373e4d7

100
README.md
View File

@@ -1,29 +1,4 @@
## Lilishop B2B2C商城系统
#### 欢迎交流需求,交流业务,交流技术(基础问题自行解决,其他问题先看文档后提问)
#### 不用削尖脑袋往老群里加,老群活跃度较低,很多潜水党,新群相对而言活跃一些 :tw-1f606: :tw-1f606: :tw-1f606: :tw-1f606: :tw-1f606: :tw-1f606:
##### 交流 qq 1群 961316482已满
<a target="_blank" href="https://qm.qq.com/cgi-bin/qm/qr?k=BAhURE3DG2YWhQk6kRxVapbLykqMoPS8&jump_from=webapi"><img border="0" src="https://pub.idqqimg.com/wpa/images/group.png" alt="Lilishop交流群" title="Lilishop交流群">点击快捷加群</a>
##### 交流 qq 2群 875294241已满
<a target="_blank" href="https://qm.qq.com/cgi-bin/qm/qr?k=_lrekOvr5k2p5uTn5GRidI-chKEmpCX3&jump_from=webapi"><img border="0" src="https://pub.idqqimg.com/wpa/images/group.png" alt="Lilishop交流群2群" title="Lilishop交流群2群">点击快捷加群</a>
##### 交流 qq 3群 263785057
<a target="_blank" href="https://qm.qq.com/cgi-bin/qm/qr?k=VUogkDvaso4zLTFH8nxFPDRKq0EthUn1&jump_from=webapi"><img border="0" src="//pub.idqqimg.com/wpa/images/group.png" alt="Lilishop交流群3群" title="Lilishop交流群3群">点击快捷加群</a>
##### 体验 公众号/小程序/APP 体验,扫描二维码
![image-20210511171611793](https://pickmall.cn/assets/imgs/h5-qrcode.png)
[![star](https://gitee.com/beijing_hongye_huicheng/lilishop/badge/star.svg?theme=dark)](https://gitee.com/beijing_hongye_huicheng/lilishop/stargazers)
&nbsp;&nbsp;![github](https://img.shields.io/github/stars/hongyehuicheng/lilishop.svg?style=social&logo=#181717)
## Lilishop 商城系统
### 商城介绍
@@ -41,6 +16,32 @@ https://gitee.com/beijing_hongye_huicheng/lilishop-simplify
https://docs.pickmall.cn
#### 欢迎交流需求,交流业务,交流技术(基础问题自行解决,其他问题先看文档后提问)
#### 不用削尖脑袋往老群里加,老群活跃度较低,很多潜水党,新群相对而言活跃一些 :tw-1f606: :tw-1f606: :tw-1f606: :tw-1f606: :tw-1f606: :tw-1f606:
#### 开发新手或者不熟悉的同学在群内提问或新开Issue提问前请先阅读[【提问的智慧】](https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/master/README-zh_CN.md),并确保已查阅过 [【在线文档】](https://docs.pickmall.cn/) ,避免浪费大家的宝贵时间;
##### 交流 qq 1群 961316482已满
##### 交流 qq 2群 875294241已满
##### 交流 qq 3群 263785057已满
##### 交流 qq 4群 674617534已满
##### 交流 qq 5群 594675235已满
##### 交流 qq 6群 917026848已满
##### 交流 qq 7群 936344822
##### 体验 公众号/小程序/APP 体验,扫描二维码
![image-20210511171611793](https://static.pickmall.cn/images/h5-qrcode.png)
[![star](https://gitee.com/beijing_hongye_huicheng/lilishop/badge/star.svg?theme=dark)](https://gitee.com/beijing_hongye_huicheng/lilishop/stargazers)
&nbsp;&nbsp;![github](https://img.shields.io/github/stars/hongyehuicheng/lilishop.svg?style=social&logo=#181717)
#### PS **演示站点所有环境均部署master分支。如果有演示站点问题可以反馈如果演示站点没问题本地运行有问题需自行处理**
### 项目地址
gitee : https://gitee.com/beijing_hongye_huicheng
@@ -62,7 +63,7 @@ PS手机验证码为 111111
**商城 小程序/公众号/APP**:扫描二维码
![image-20210511171611793](https://pickmall.cn/assets/imgs/h5-qrcode.png)
![image-20210511171611793](https://static.pickmall.cn/images/h5-qrcode.png)
### 快速本地部署
@@ -80,25 +81,47 @@ PS手机验证码为 111111
#### 平台管理端功能
![平台管理端功能](https://pickmall.cn/assets/imgs/other/managerList1.jpg)
| 模块 <img width=80/> | 功能 |
|--------------------|-----------------------------------------------------------------|
| 首页 | 平台基础信息统计、待办事项 |
| 会员 | 会员列表、评价列表、积分历史、会员资金、会员充值 |
| 订单 | 商品订单、虚拟订单、订单售后、订单投诉、售后原因维护、收款流水、退款流水 |
| 商品 | 商品列表、商品审核、商品分类、商品品牌、商品规格、商品计量单位 |
| 促销 | 优惠券、券活动(每日&每月&每周&邀新 赠券)、秒杀活动、砍价活动、拼团活动、积分商品 |
| 店铺 | 店铺管理、店铺审核、店铺结算、店铺对账 |
| 运营 | 楼层装修、分销商管理、文章管理、意见反馈、站内信、短信、搜索热词管理 |
| 统计 | 会员统计、订单统计、流量统计、商品销量统计 |
| 设置 | 菜单管理、角色管理、部门管理、管理员管理、系统设置、行政地区管理、OSS管理、联合登陆、支付、物流公司、敏感词、验证码资源 |
#### 卖家功能
![商家端功能](https://pickmall.cn/assets/imgs/other/storeList.jpg)
| 模块 <img width=80/> | 功能 |
|----|-------------------------------|
| 首页 | 店铺基础信息统计、待办事项、店铺公告 |
| 商品 | 商品发布、商品列表、商品模板、店铺分类 |
| 订单 | 商品订单、虚拟订单、订单评价、订单投诉、退款申请、退货申请 |
| 财务 | 店铺对账、店铺结算、发票管理 |
| 促销 | 优惠券、满额优惠、秒杀、拼团 、分销商品、分校订单 |
| 统计 |单统计、流量统计、商品销量统计 |
| 设置 | 配送公司、物流模板、店铺设置、店铺自提设置、PC装修、移动端装修、店员管理、部门管理、角色管理 |
| 消息 | 站内信 |
### 商城前端功能展示
#### 商城移动端
<img src="https://pickmall.cn/assets/imgs/other/app.gif" alt="移动端功能展示" style="zoom:50%;" />
<img src="https://static.pickmall.cn/images/other/app.gif" alt="移动端功能展示" style="zoom:50%;" />
#### 平台管理端
![管理端功能展示](https://pickmall.cn/assets/imgs/other/manager.gif)
![管理端功能展示](https://static.pickmall.cn/images/other/manager.gif)
### 技术选型
@@ -168,6 +191,15 @@ PS手机验证码为 111111
### 交流群
##### 官方qq 1群 961316482已满
##### 官方qq 2群 875294241已满
##### 官网qq 3群 263785057
##### 交流 qq 1群 961316482已满
##### 交流 qq 2群 875294241已满
##### 交流 qq 3群 263785057(已满)
##### 交流 qq 4群 674617534已满
##### 交流 qq 5群 594675235已满
### 附录
有人有自己的学习视频、学习记录文档、希望宣传关联开源项目等均可以私聊仓库所有者。
类似:
清晨敲代码同学的分析: https://blog.csdn.net/vaevaevae233/category_12103567.html

View File

@@ -54,22 +54,22 @@ public class DistributionGoodsBuyerController {
@PreventDuplicateSubmissions
@ApiOperation(value = "选择分销商品")
@ApiImplicitParams({
@ApiImplicitParam(name = "distributionGoodsId", value = "分销ID", required = true, dataType = "String", paramType = "path"),
@ApiImplicitParam(name = "distributionGoodsId", value = "分销ID", required = true, dataType = "String", paramType = "path"),
@ApiImplicitParam(name = "checked", value = "是否选择", required = true, dataType = "boolean", paramType = "query")
})
@GetMapping(value = "/checked/{distributionGoodsId}")
public ResultMessage<Object> distributionCheckGoods(
@NotNull(message = "分销商品不能为空") @PathVariable("distributionGoodsId") String distributionGoodsId,Boolean checked) {
Boolean result=false;
if(checked){
result=distributionSelectedGoodsService.add(distributionGoodsId);
}else {
result=distributionSelectedGoodsService.delete(distributionGoodsId);
@NotNull(message = "分销商品不能为空") @PathVariable("distributionGoodsId") String distributionGoodsId, Boolean checked) {
Boolean result = false;
if (checked) {
result = distributionSelectedGoodsService.add(distributionGoodsId);
} else {
result = distributionSelectedGoodsService.delete(distributionGoodsId);
}
//判断操作结果
if(result){
if (result) {
return ResultUtil.success(ResultCode.SUCCESS);
}else{
} else {
throw new ServiceException(ResultCode.ERROR);
}

View File

@@ -6,6 +6,7 @@ import cn.lili.common.exception.ServiceException;
import cn.lili.common.vo.PageVO;
import cn.lili.common.vo.ResultMessage;
import cn.lili.modules.goods.entity.dos.Goods;
import cn.lili.modules.goods.entity.dos.GoodsSku;
import cn.lili.modules.goods.entity.dto.GoodsSearchParams;
import cn.lili.modules.goods.entity.vos.GoodsVO;
import cn.lili.modules.goods.service.GoodsService;
@@ -18,14 +19,13 @@ import cn.lili.modules.search.service.HotWordsService;
import cn.lili.modules.statistics.aop.PageViewPoint;
import cn.lili.modules.statistics.aop.enums.PageViewEnum;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.elasticsearch.core.SearchPage;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -102,12 +102,17 @@ public class GoodsBuyerController {
return ResultUtil.data(goodsService.queryByParams(goodsSearchParams));
}
@ApiOperation(value = "获取商品sku列表")
@GetMapping("/sku")
public ResultMessage<List<GoodsSku>> getSkuByPage(GoodsSearchParams goodsSearchParams) {
return ResultUtil.data(goodsSkuService.getGoodsSkuByList(goodsSearchParams));
}
@ApiOperation(value = "从ES中获取商品信息")
@GetMapping("/es")
public ResultMessage<SearchPage<EsGoodsIndex>> getGoodsByPageFromEs(EsGoodsSearchDTO goodsSearchParams, PageVO pageVO) {
public ResultMessage<Page<EsGoodsIndex>> getGoodsByPageFromEs(EsGoodsSearchDTO goodsSearchParams, PageVO pageVO) {
pageVO.setNotConvert(true);
SearchPage<EsGoodsIndex> esGoodsIndices = goodsSearchService.searchGoods(goodsSearchParams, pageVO);
return ResultUtil.data(esGoodsIndices);
return ResultUtil.data(goodsSearchService.searchGoodsByPage(goodsSearchParams, pageVO));
}
@ApiOperation(value = "从ES中获取相关商品品牌名称分类名称及属性")

View File

@@ -1,14 +1,17 @@
package cn.lili.controller.member;
import cn.lili.common.enums.ResultUtil;
import cn.lili.common.security.context.UserContext;
import cn.lili.common.vo.PageVO;
import cn.lili.common.vo.ResultMessage;
import cn.lili.modules.member.entity.dto.FootPrintQueryParams;
import cn.lili.modules.member.service.FootprintService;
import cn.lili.modules.search.entity.dos.EsGoodsIndex;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.apache.catalina.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -35,8 +38,9 @@ public class FootprintController {
@ApiOperation(value = "分页获取")
@GetMapping
public ResultMessage<IPage<EsGoodsIndex>> getByPage(PageVO page) {
return ResultUtil.data(footprintService.footPrintPage(page));
public ResultMessage<IPage<EsGoodsIndex>> getByPage(FootPrintQueryParams params) {
params.setMemberId(UserContext.getCurrentUser().getId());
return ResultUtil.data(footprintService.footPrintPage(params));
}
@ApiOperation(value = "根据id删除")
@@ -61,4 +65,10 @@ public class FootprintController {
return ResultUtil.data(footprintService.getFootprintNum());
}
@GetMapping("/history")
@ApiOperation(value = "获取会员的历史足迹")
public ResultMessage<IPage<EsGoodsIndex>> getMemberHistory(FootPrintQueryParams params) {
return ResultUtil.data(footprintService.footPrintPage(params));
}
}

View File

@@ -68,6 +68,8 @@ public class MemberAddressBuyerController {
@ApiOperation(value = "修改会员收件地址")
@PutMapping
public ResultMessage<MemberAddress> editShippingAddress(@Valid MemberAddress shippingAddress) {
OperationalJudgment.judgment(memberAddressService.getById(shippingAddress.getId()));
shippingAddress.setMemberId(Objects.requireNonNull(UserContext.getCurrentUser()).getId());
return ResultUtil.data(memberAddressService.updateMemberAddress(shippingAddress));
}

View File

@@ -1,96 +0,0 @@
package cn.lili.controller.member;
import cn.lili.common.enums.ResultUtil;
import cn.lili.common.vo.PageVO;
import cn.lili.common.vo.ResultMessage;
import cn.lili.modules.member.service.GoodsCollectionService;
import cn.lili.modules.member.service.StoreCollectionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.validation.constraints.NotNull;
/**
* 买家端,会员收藏接口
*
* @author Chopper
* @since 2020/11/17 2:32 下午
*/
@RestController
@Api(tags = "买家端,会员收藏接口")
@RequestMapping("/buyer/member/collection")
public class MemberCollectionController {
/**
* 会员商品收藏
*/
@Autowired
private GoodsCollectionService goodsCollectionService;
/**
* 会员店铺
*/
@Autowired
private StoreCollectionService storeCollectionService;
/**
* 商品收藏关键字
*/
private String goods="GOODS";
@ApiOperation(value = "查询会员收藏列表")
@ApiImplicitParam(name = "type", value = "类型", dataType = "String", paramType = "path", example = "GOODS:商品,STORE:店铺")
@GetMapping("/{type}")
public ResultMessage<Object> goodsList(@PathVariable String type, PageVO page) {
if (goods.equals(type)) {
return ResultUtil.data(goodsCollectionService.goodsCollection(page));
}
return ResultUtil.data(storeCollectionService.storeCollection(page));
}
@ApiOperation(value = "添加会员收藏")
@ApiImplicitParams({
@ApiImplicitParam(name = "type", value = "类型", dataType = "String", paramType = "path", example = "GOODS:商品,STORE:店铺"),
@ApiImplicitParam(name = "num", value = "", dataType = "Long", paramType = "path")
})
@PostMapping("/add/{type}/{id}")
public ResultMessage<Object> addGoodsCollection(@PathVariable String type,
@NotNull(message = "值不能为空") @PathVariable String id) {
if (goods.equals(type)) {
return ResultUtil.data(goodsCollectionService.addGoodsCollection(id));
}
return ResultUtil.data(storeCollectionService.addStoreCollection(id));
}
@ApiOperation(value = "删除会员收藏")
@ApiImplicitParams({
@ApiImplicitParam(name = "type", value = "类型", dataType = "String", paramType = "path", example = "GOODS:商品,STORE:店铺"),
@ApiImplicitParam(name = "num", value = "", dataType = "Long", paramType = "path")
})
@DeleteMapping(value = "/delete/{type}/{id}")
public ResultMessage<Object> deleteGoodsCollection(@PathVariable String type,
@NotNull(message = "值不能为空") @PathVariable String id) {
if (goods.equals(type)) {
return ResultUtil.data(goodsCollectionService.deleteGoodsCollection(id));
}
return ResultUtil.data(storeCollectionService.deleteStoreCollection(id));
}
@ApiOperation(value = "查询会员是否收藏")
@ApiImplicitParams({
@ApiImplicitParam(name = "type", value = "类型", dataType = "String", paramType = "path", example = "GOODS:商品,STORE:店铺"),
@ApiImplicitParam(name = "id", value = "", dataType = "String", paramType = "path")
})
@GetMapping(value = "/isCollection/{type}/{id}")
public ResultMessage<Boolean> isCollection(@PathVariable String type,
@NotNull(message = "值不能为空") @PathVariable String id) {
if (goods.equals(type)) {
return ResultUtil.data(this.goodsCollectionService.isCollection(id));
}
return ResultUtil.data(this.storeCollectionService.isCollection(id));
}
}

View File

@@ -0,0 +1,68 @@
package cn.lili.controller.member;
import cn.lili.common.enums.ResultUtil;
import cn.lili.common.vo.PageVO;
import cn.lili.common.vo.ResultMessage;
import cn.lili.modules.member.service.GoodsCollectionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.validation.constraints.NotNull;
/**
* 买家端,会员收藏接口
*
* @author Chopper
* @since 2020/11/17 2:32 下午
*/
@RestController
@Api(tags = "买家端,会员商品收藏接口")
@RequestMapping("/buyer/member/collection")
public class MemberCollectionGoodsController {
/**
* 会员商品收藏
*/
@Autowired
private GoodsCollectionService goodsCollectionService;
@ApiOperation(value = "查询会员收藏列表")
@GetMapping("/GOODS")
public ResultMessage<Object> goodsList(PageVO page) {
return ResultUtil.data(goodsCollectionService.goodsCollection(page));
}
@ApiOperation(value = "添加会员收藏")
@ApiImplicitParams({
@ApiImplicitParam(name = "num", value = "", dataType = "Long", paramType = "path")
})
@PostMapping("/add/GOODS/{id}")
public ResultMessage<Object> addGoodsCollection(@NotNull(message = "值不能为空") @PathVariable String id) {
return ResultUtil.data(goodsCollectionService.addGoodsCollection(id));
}
@ApiOperation(value = "删除会员收藏")
@ApiImplicitParams({
@ApiImplicitParam(name = "type", value = "类型", dataType = "String", paramType = "path", example = "GOODS:商品,STORE:店铺"),
@ApiImplicitParam(name = "num", value = "", dataType = "Long", paramType = "path")
})
@DeleteMapping(value = "/delete/GOODS/{id}")
public ResultMessage<Object> deleteGoodsCollection(@NotNull(message = "值不能为空") @PathVariable String id) {
return ResultUtil.data(goodsCollectionService.deleteGoodsCollection(id));
}
@ApiOperation(value = "查询会员是否收藏")
@ApiImplicitParams({
@ApiImplicitParam(name = "type", value = "类型", dataType = "String", paramType = "path", example = "GOODS:商品,STORE:店铺"),
@ApiImplicitParam(name = "id", value = "", dataType = "String", paramType = "path")
})
@GetMapping(value = "/isCollection/GOODS/{id}")
public ResultMessage<Boolean> isCollection(@NotNull(message = "值不能为空") @PathVariable String id) {
return ResultUtil.data(this.goodsCollectionService.isCollection(id));
}
}

View File

@@ -0,0 +1,66 @@
package cn.lili.controller.member;
import cn.lili.common.enums.ResultUtil;
import cn.lili.common.vo.PageVO;
import cn.lili.common.vo.ResultMessage;
import cn.lili.modules.member.service.StoreCollectionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.validation.constraints.NotNull;
/**
* 买家端,会员收藏接口
*
* @author Chopper
* @since 2020/11/17 2:32 下午
*/
@RestController
@Api(tags = "买家端,会员店铺收藏接口")
@RequestMapping("/buyer/member/storeCollection")
public class MemberCollectionStoreController {
/**
* 会员店铺
*/
@Autowired
private StoreCollectionService storeCollectionService;
@ApiOperation(value = "查询会员收藏列表")
@GetMapping("/STORE")
public ResultMessage<Object> goodsList(PageVO page) {
return ResultUtil.data(storeCollectionService.storeCollection(page));
}
@ApiOperation(value = "添加会员收藏")
@ApiImplicitParams({
@ApiImplicitParam(name = "num", value = "", dataType = "Long", paramType = "path")
})
@PostMapping("/add/STORE/{id}")
public ResultMessage<Object> addGoodsCollection(@NotNull(message = "值不能为空") @PathVariable String id) {
return ResultUtil.data(storeCollectionService.addStoreCollection(id));
}
@ApiOperation(value = "删除会员收藏")
@ApiImplicitParams({
@ApiImplicitParam(name = "num", value = "", dataType = "Long", paramType = "path")
})
@DeleteMapping(value = "/delete/STORE/{id}")
public ResultMessage<Object> deleteGoodsCollection(@NotNull(message = "值不能为空") @PathVariable String id) {
return ResultUtil.data(storeCollectionService.deleteStoreCollection(id));
}
@ApiOperation(value = "查询会员是否收藏")
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "", dataType = "String", paramType = "path")
})
@GetMapping(value = "/isCollection/STORE/{id}")
public ResultMessage<Boolean> isCollection(@NotNull(message = "值不能为空") @PathVariable String id) {
return ResultUtil.data(this.storeCollectionService.isCollection(id));
}
}

View File

@@ -189,20 +189,38 @@ public class CartController {
}
}
@ApiOperation(value = "选择自提地址")
@ApiImplicitParams({
@ApiImplicitParam(name = "storeAddressId", value = "自提地址id ", required = true, paramType = "query"),
@ApiImplicitParam(name = "way", value = "购物车类型 ", paramType = "query")
})
@GetMapping("/storeAddress")
public ResultMessage<Object> shippingSelfPickAddress(@NotNull(message = "自提地址ID不能为空") String storeAddressId,
String way) {
try {
cartService.shippingSelfAddress(storeAddressId, way);
return ResultUtil.success();
} catch (ServiceException se) {
log.error(ResultCode.SHIPPING_NOT_APPLY.message(), se);
throw new ServiceException(ResultCode.SHIPPING_NOT_APPLY);
} catch (Exception e) {
log.error(ResultCode.CART_ERROR.message(), e);
throw new ServiceException(ResultCode.CART_ERROR);
}
}
@ApiOperation(value = "选择配送方式")
@ApiImplicitParams({
@ApiImplicitParam(name = "shippingMethod", value = "配送方式SELF_PICK_UP(自提)," +
"LOCAL_TOWN_DELIVERY(同城配送)," +
"LOGISTICS(物流) ", required = true, paramType = "query"),
@ApiImplicitParam(name = "selleId", value = "店铺id", paramType = "query"),
@ApiImplicitParam(name = "way", value = "购物车类型 ", paramType = "query")
})
@GetMapping("/shippingMethod")
@PutMapping("/shippingMethod")
public ResultMessage<Object> shippingMethod(@NotNull(message = "配送方式不能为空") String shippingMethod,
String selleId,
String way) {
try {
cartService.shippingMethod(selleId, shippingMethod, way);
cartService.shippingMethod( shippingMethod, way);
return ResultUtil.success();
} catch (ServiceException se) {
log.error(se.getMsg(), se);
@@ -213,6 +231,21 @@ public class CartController {
}
}
@ApiOperation(value = "获取用户可选择的物流方式")
@ApiImplicitParams({
@ApiImplicitParam(name = "way", value = "购物车类型 ", paramType = "query")
})
@GetMapping("/shippingMethodList")
public ResultMessage<Object> shippingMethodList(String way) {
try {
return ResultUtil.data(cartService.shippingMethodList(way));
}
catch (Exception e) {
e.printStackTrace();
return ResultUtil.error(ResultCode.ERROR);
}
}
@ApiOperation(value = "选择发票")
@ApiImplicitParams({
@ApiImplicitParam(name = "way", value = "购物车购买CART/立即购买BUY_NOW/拼团购买PINTUAN / 积分购买POINT ", required = true, paramType = "query"),

View File

@@ -9,11 +9,14 @@ import cn.lili.common.security.OperationalJudgment;
import cn.lili.common.security.context.UserContext;
import cn.lili.common.vo.ResultMessage;
import cn.lili.modules.order.order.entity.dos.Order;
import cn.lili.modules.order.order.entity.dos.OrderPackage;
import cn.lili.modules.order.order.entity.dto.OrderSearchParams;
import cn.lili.modules.order.order.entity.enums.OrderStatusEnum;
import cn.lili.modules.order.order.entity.vo.OrderDetailVO;
import cn.lili.modules.order.order.entity.vo.OrderSimpleVO;
import cn.lili.modules.order.order.service.OrderPackageService;
import cn.lili.modules.order.order.service.OrderService;
import cn.lili.modules.system.entity.vo.Traces;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
@@ -44,6 +47,9 @@ public class OrderBuyerController {
@Autowired
private OrderService orderService;
@Autowired
private OrderPackageService orderPackageService;
@ApiOperation(value = "查询会员订单列表")
@GetMapping
public ResultMessage<IPage<OrderSimpleVO>> queryMineOrder(OrderSearchParams orderSearchParams) {
@@ -116,6 +122,16 @@ public class OrderBuyerController {
return ResultUtil.data(orderService.getTraces(orderSn));
}
@ApiOperation(value = "查询地图版物流踪迹")
@ApiImplicitParams({
@ApiImplicitParam(name = "orderSn", value = "订单编号", required = true, dataType = "String", paramType = "path")
})
@PostMapping(value = "/getMapTraces/{orderSn}")
public ResultMessage<Object> getMapTraces(@NotBlank(message = "订单编号不能为空") @PathVariable String orderSn) {
OperationalJudgment.judgment(orderService.getBySn(orderSn));
return ResultUtil.data(orderService.getMapTraces(orderSn));
}
@PreventDuplicateSubmissions
@ApiOperation(value = "开票")
@@ -128,5 +144,21 @@ public class OrderBuyerController {
return ResultUtil.data(orderService.invoice(orderSn));
}
@ApiOperation(value = "查询物流踪迹")
@ApiImplicitParams({
@ApiImplicitParam(name = "orderSn", value = "订单编号", required = true, dataType = "String", paramType = "path")
})
@GetMapping(value = "/getTracesList/{orderSn}")
public ResultMessage<Object> getTracesList(@NotBlank(message = "订单编号不能为空") @PathVariable String orderSn) {
return ResultUtil.data(orderPackageService.getOrderPackageVOList(orderSn));
}
@ApiOperation(value = "查看包裹列表")
@ApiImplicitParams({
@ApiImplicitParam(name = "orderSn", value = "订单编号", required = true, dataType = "String", paramType = "path")
})
@GetMapping(value = "/getPackage/{orderSn}")
public ResultMessage<Object> getPackage(@NotBlank(message = "订单编号不能为空") @PathVariable String orderSn) {
return ResultUtil.data(orderPackageService.getOrderPackageVOList(orderSn));
}
}

View File

@@ -10,6 +10,7 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -26,6 +27,7 @@ import javax.validation.constraints.Min;
@RestController
@Api(tags = "买家端,预存款充值记录接口")
@RequestMapping("/buyer/trade/recharge")
@Validated
public class RechargeTradeBuyerController {
@Autowired
@@ -37,7 +39,10 @@ public class RechargeTradeBuyerController {
@ApiImplicitParams({
@ApiImplicitParam(name = "price", value = "充值金额", required = true, dataType = "double", paramType = "query")
})
public ResultMessage<Recharge> create(@Max(value = 10000, message = "充值金额单次最多允许充值10000元") @Min(value = 1, message = "充值金额单次最少充值金额为1元") Double price) {
public ResultMessage<Recharge> create(
@Max(value = 10000, message = "充值金额单次最多允许充值10000元")
@Min(value = 1, message = "充值金额单次最少充值金额为1元")
Double price) {
Recharge recharge = this.rechargeService.recharge(price);
return ResultUtil.data(recharge);
}

View File

@@ -47,6 +47,16 @@ public class PageBuyerController {
return ResultUtil.data(pageDataVO);
}
@ApiOperation(value = "获取店铺首页")
@GetMapping("/getStore")
public ResultMessage<PageDataVO> getShopPage(@RequestParam String clientType,String storeId) {
PageDataDTO pageDataDTO = new PageDataDTO(PageEnum.STORE.name());
pageDataDTO.setPageClientType(clientType);
pageDataDTO.setNum(storeId);
PageDataVO pageDataVO=pageService.getPageData(pageDataDTO);
return ResultUtil.data(pageDataVO);
}
@ApiOperation(value = "获取页面数据")
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "String", paramType = "path")
@GetMapping("/get/{id}")

View File

@@ -3,6 +3,8 @@ package cn.lili.controller.passport;
import cn.lili.common.enums.ResultCode;
import cn.lili.common.enums.ResultUtil;
import cn.lili.common.exception.ServiceException;
import cn.lili.common.security.AuthUser;
import cn.lili.common.security.context.UserContext;
import cn.lili.common.security.enums.UserEnums;
import cn.lili.common.vo.ResultMessage;
import cn.lili.modules.member.entity.dos.Member;
@@ -26,7 +28,6 @@ import org.springframework.web.context.request.async.DeferredResult;
import javax.validation.constraints.NotNull;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
@@ -94,7 +95,7 @@ public class MemberBuyerController {
deferredResult.setResult(new ResponseEntity<>(ResultUtil.error(ResultCode.ERROR), HttpStatus.OK));
Thread.currentThread().interrupt();
}
}, Executors.newCachedThreadPool());
});
return deferredResult;
}
@@ -153,6 +154,32 @@ public class MemberBuyerController {
}
}
@ApiOperation(value = "绑定手机号")
@ApiImplicitParams({
@ApiImplicitParam(name = "username", value = "用户名", required = true, paramType = "query"),
@ApiImplicitParam(name = "mobile", value = "手机号", required = true, paramType = "query"),
@ApiImplicitParam(name = "code", value = "验证码", required = true, paramType = "query"),
})
@PostMapping("/bindMobile")
public ResultMessage<Object> bindMobile(@NotNull(message = "用户名不能为空") @RequestParam String username,
@NotNull(message = "手机号为空") @RequestParam String mobile,
@NotNull(message = "验证码为空") @RequestParam String code,
@RequestHeader String uuid) {
if (smsUtil.verifyCode(mobile, VerificationEnums.BIND_MOBILE, uuid, code)) {
Member member = memberService.findByUsername(username);
Member memberByMobile = memberService.findByMobile(mobile);
if (member == null) {
throw new ServiceException(ResultCode.USER_NOT_EXIST);
}
if(memberByMobile != null){
throw new ServiceException(ResultCode.USER_MOBILE_REPEATABLE_ERROR);
}
return ResultUtil.data(memberService.changeMobile(member.getId(), mobile));
} else {
throw new ServiceException(ResultCode.VERIFICATION_SMS_CHECKED_ERROR);
}
}
@ApiOperation(value = "注册用户")
@ApiImplicitParams({
@ApiImplicitParam(name = "username", value = "用户名", required = true, paramType = "query"),
@@ -249,12 +276,9 @@ public class MemberBuyerController {
}
@ApiOperation(value = "注销账号")
@ApiImplicitParams({
@ApiImplicitParam(name = "password", value = "密码", required = true, paramType = "query")
})
@PutMapping("/cancellation")
public ResultMessage<Member> cancellation(@NotNull(message = "密码不能为空") @RequestParam String password) {
memberService.cancellation(password);
public ResultMessage<Member> cancellation() {
memberService.cancellation();
return ResultUtil.success();
}
@@ -264,4 +288,18 @@ public class MemberBuyerController {
return ResultUtil.data(this.memberService.refreshToken(refreshToken));
}
@GetMapping("/getImUser")
@ApiOperation(value = "获取用户信息")
public ResultMessage<Member> getImUser() {
AuthUser authUser = UserContext.getCurrentUser();
return ResultUtil.data(memberService.getById(authUser.getId()));
}
@GetMapping("/getImUserDetail/{memberId}")
@ApiImplicitParam(name = "memberId", value = "店铺Id", required = true, dataType = "String", paramType = "path")
@ApiOperation(value = "获取用户信息")
public ResultMessage<Member> getImUserDetail(@PathVariable String memberId) {
return ResultUtil.data(memberService.getById(memberId));
}
}

View File

@@ -47,7 +47,7 @@ public class ConnectBuyerWebController {
@GetMapping("/login/web/{type}")
@ApiOperation(value = "WEB信任登录授权")
@ApiOperation(value = "WEB信任登录授权,包含PC、WAP")
@ApiImplicitParams({
@ApiImplicitParam(name = "type", value = "登录方式:QQ,微信,微信_PC",
allowableValues = "QQ,WECHAT,WECHAT_PC", paramType = "path")
@@ -75,25 +75,13 @@ public class ConnectBuyerWebController {
return connectUtil.getResult(state);
}
@GetMapping("/register/auto")
@ApiOperation(value = "WEB信任登录授权")
public ResultMessage<Token> webAuthorize() {
Token token = memberService.autoRegister();
return ResultUtil.data(token);
}
@ApiOperation(value = "unionID登录")
@ApiImplicitParams({
@ApiImplicitParam(name = "openId", value = "openid", required = true, paramType = "query"),
@ApiImplicitParam(name = "type", value = "联合类型", required = true,
allowableValues = "WECHAT,QQ,ALIPAY,WEIBO,APPLE", paramType = "query"),
@ApiImplicitParam(name = "uniAccessToken", value = "联合登陆返回的accessToken", required = true, paramType = "query")
})
@GetMapping("/app/login")
public ResultMessage<Token> unionLogin(ConnectAuthUser authUser, @RequestHeader("uuid") String uuid) {
@ApiOperation(value = "APP-unionID登录")
@PostMapping("/app/login")
public ResultMessage<Token> unionLogin(@RequestBody ConnectAuthUser authUser, @RequestHeader("uuid") String uuid) {
try {
return ResultUtil.data(connectService.appLoginCallback(authUser, uuid));
return ResultUtil.data(connectService.unionLoginCallback(authUser, uuid));
} catch (Exception e) {
e.printStackTrace();
log.error("unionID登录错误", e);
}
return null;

View File

@@ -7,11 +7,14 @@ import cn.lili.common.security.context.UserContext;
import cn.lili.common.vo.PageVO;
import cn.lili.common.vo.ResultMessage;
import cn.lili.modules.promotion.entity.dos.MemberCoupon;
import cn.lili.modules.promotion.entity.dto.CouponActivityTrigger;
import cn.lili.modules.promotion.entity.dto.search.CouponSearchParams;
import cn.lili.modules.promotion.entity.dto.search.MemberCouponSearchParams;
import cn.lili.modules.promotion.entity.enums.CouponActivityTypeEnum;
import cn.lili.modules.promotion.entity.enums.CouponGetEnum;
import cn.lili.modules.promotion.entity.enums.PromotionsStatusEnum;
import cn.lili.modules.promotion.entity.vos.CouponVO;
import cn.lili.modules.promotion.service.CouponActivityService;
import cn.lili.modules.promotion.service.CouponService;
import cn.lili.modules.promotion.service.MemberCouponService;
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -26,6 +29,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.constraints.NotNull;
import java.util.List;
import java.util.Objects;
/**
@@ -45,12 +49,39 @@ public class CouponBuyerController {
@Autowired
private CouponService couponService;
/**
* 优惠券活动
*/
@Autowired
private CouponActivityService couponActivityService;
/**
* 会员优惠券
*/
@Autowired
private MemberCouponService memberCouponService;
@GetMapping("/activity")
@ApiOperation(value = "自动领取优惠券")
public ResultMessage<List<MemberCoupon>> activity() {
if (UserContext.getCurrentUser() == null) {
return ResultUtil.success();
}
List<MemberCoupon> memberCouponList = couponActivityService.trigger(
CouponActivityTrigger.builder()
.couponActivityTypeEnum(CouponActivityTypeEnum.AUTO_COUPON)
.nickName(UserContext.getCurrentUser().getNickName())
.userId(UserContext.getCurrentUser().getId())
.build());
memberCouponList.addAll(couponActivityService.trigger(
CouponActivityTrigger.builder()
.couponActivityTypeEnum(CouponActivityTypeEnum.SPECIFY)
.nickName(UserContext.getCurrentUser().getNickName())
.userId(UserContext.getCurrentUser().getId())
.build()));
return ResultUtil.data(memberCouponList);
}
@GetMapping
@ApiOperation(value = "获取可领取优惠券列表")
public ResultMessage<IPage<CouponVO>> getCouponList(CouponSearchParams queryParam, PageVO page) {

View File

@@ -0,0 +1,53 @@
package cn.lili.controller.store;
import cn.lili.common.enums.ResultUtil;
import cn.lili.common.security.OperationalJudgment;
import cn.lili.common.security.context.UserContext;
import cn.lili.common.vo.PageVO;
import cn.lili.common.vo.ResultMessage;
import cn.lili.modules.store.entity.dos.StoreAddress;
import cn.lili.modules.store.service.StoreAddressService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Objects;
/**
* 买家端,商家地址(自提点)接口
*
* @author chc
* @since 2022/6/2114:46
*/
@RestController
@Api(tags = "买家端,商家地址(自提点)接口")
@RequestMapping("/buyer/store/address")
public class StoreAddressBuyerController {
/**
* 店铺自提点
*/
@Autowired
private StoreAddressService storeAddressService;
@ApiOperation(value = "获取商家自提点分页")
@ApiImplicitParam(name = "storeId", value = "店铺Id", required = true, dataType = "String", paramType = "path")
@GetMapping("/page/{storeId}")
public ResultMessage<IPage<StoreAddress>> get(PageVO pageVo,@PathVariable String storeId) {
return ResultUtil.data(storeAddressService.getStoreAddress(storeId, pageVo));
}
@ApiOperation(value = "获取商家自提点信息")
@ApiImplicitParam(name = "id", value = "自提点ID", required = true, paramType = "path")
@GetMapping("/{id}")
public ResultMessage<StoreAddress> get(@PathVariable String id) {
StoreAddress address = OperationalJudgment.judgment(storeAddressService.getById(id));
return ResultUtil.data(address);
}
}

View File

@@ -1,11 +1,13 @@
package cn.lili.controller.store;
import cn.lili.common.enums.ResultUtil;
import cn.lili.common.security.AuthUser;
import cn.lili.common.security.context.UserContext;
import cn.lili.common.vo.PageVO;
import cn.lili.common.vo.ResultMessage;
import cn.lili.modules.goods.entity.vos.StoreGoodsLabelVO;
import cn.lili.modules.goods.service.StoreGoodsLabelService;
import cn.lili.modules.store.entity.dos.Store;
import cn.lili.modules.store.entity.dto.StoreBankDTO;
import cn.lili.modules.store.entity.dto.StoreCompanyDTO;
import cn.lili.modules.store.entity.dto.StoreOtherInfoDTO;
@@ -57,6 +59,20 @@ public class StoreBuyerController {
return ResultUtil.data(storeService.findByConditionPage(entity, page));
}
@GetMapping("/store")
@ApiOperation(value = "im-获取店铺信息")
public ResultMessage<Store> getStoreUser() {
AuthUser authUser = UserContext.getCurrentUser();
return ResultUtil.data(storeService.getById(authUser.getStoreId()));
}
@GetMapping("/store/{storeId}")
@ApiImplicitParam(name = "storeId", value = "店铺Id", required = true, dataType = "String", paramType = "path")
@ApiOperation(value = "im-店铺ID获取店铺信息")
public ResultMessage<Store> getStoreUserDetail(@PathVariable String storeId) {
return ResultUtil.data(storeService.getById(storeId));
}
@ApiOperation(value = "通过id获取店铺信息")
@ApiImplicitParam(name = "id", value = "店铺ID", required = true, paramType = "path")
@GetMapping(value = "/get/detail/{id}")

View File

@@ -9,22 +9,28 @@ import cn.lili.common.security.context.UserContext;
import cn.lili.common.vo.ResultMessage;
import cn.lili.modules.member.entity.dos.Member;
import cn.lili.modules.member.service.MemberService;
import cn.lili.modules.system.entity.dos.Setting;
import cn.lili.modules.system.entity.dto.WithdrawalSetting;
import cn.lili.modules.system.entity.enums.SettingEnum;
import cn.lili.modules.system.entity.vo.WithdrawalSettingVO;
import cn.lili.modules.system.service.SettingService;
import cn.lili.modules.verification.entity.enums.VerificationEnums;
import cn.lili.modules.verification.service.VerificationService;
import cn.lili.modules.wallet.entity.dos.MemberWallet;
import cn.lili.modules.wallet.entity.vo.MemberWalletVO;
import cn.lili.modules.wallet.service.MemberWalletService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.google.gson.Gson;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.Pattern;
/**
@@ -36,6 +42,7 @@ import javax.validation.constraints.Pattern;
@RestController
@Api(tags = "买家端,会员余额接口")
@RequestMapping("/buyer/wallet/wallet")
@Validated
public class MemberWalletBuyerController {
/**
@@ -54,6 +61,9 @@ public class MemberWalletBuyerController {
@Autowired
private VerificationService verificationService;
@Autowired
private SettingService settingService;
@GetMapping
@ApiOperation(value = "查询会员预存款余额")
public ResultMessage<MemberWalletVO> get() {
@@ -64,6 +74,31 @@ public class MemberWalletBuyerController {
throw new ServiceException(ResultCode.USER_NOT_LOGIN);
}
@GetMapping(value = "/withdrawalSettingVO")
@ApiOperation(value = "获取提现设置VO")
public ResultMessage<Object> minPrice() {
Setting setting = settingService.get(SettingEnum.WITHDRAWAL_SETTING.name());
WithdrawalSetting withdrawalSetting = new Gson().fromJson(setting.getSettingValue(), WithdrawalSetting.class);
WithdrawalSettingVO withdrawalSettingVO = new WithdrawalSettingVO();
withdrawalSettingVO.setMinPrice(withdrawalSetting.getMinPrice());
withdrawalSettingVO.setFee(withdrawalSetting.getFee());
withdrawalSettingVO.setType(withdrawalSetting.getType());
return ResultUtil.data(withdrawalSettingVO);
}
@PreventDuplicateSubmissions
@PostMapping(value = "/withdrawal")
@ApiOperation(value = "会员中心余额提现")
@ApiImplicitParams({
@ApiImplicitParam(name = "price", value = "提现金额", required = true, dataType = "double", paramType = "query"),
@ApiImplicitParam(name = "realName", value = "真实姓名", required = true, dataType = "String", paramType = "query"),
@ApiImplicitParam(name = "connectNumber", value = "第三方登录账号", required = true, dataType = "String", paramType = "query")
})
public ResultMessage<Boolean> withdrawal(@Max(value = 9999, message = "充值金额单次最多允许提现9999元") Double price, @RequestParam String realName, @RequestParam String connectNumber) {
return ResultUtil.data(memberWalletService.applyWithdrawal(price, realName, connectNumber));
}
@PostMapping(value = "/set-password")
@ApiOperation(value = "设置支付密码")
@ApiImplicitParams({
@@ -120,15 +155,4 @@ public class MemberWalletBuyerController {
return memberWalletService.checkPassword();
}
@PreventDuplicateSubmissions
@PostMapping(value = "/withdrawal")
@ApiOperation(value = "会员中心余额提现")
@ApiImplicitParams({
@ApiImplicitParam(name = "price", value = "提现金额", required = true, dataType = "double", paramType = "query")
})
public ResultMessage<Boolean> withdrawal(@Max(value = 9999, message = "充值金额单次最多允许提现9999元") @Min(value = 1, message = "充值金额单次最少提现金额为1元") Double price) {
return ResultUtil.data(memberWalletService.applyWithdrawal(price));
}
}

View File

@@ -99,7 +99,7 @@ public class BuyerAuthenticationFilter extends BasicAuthenticationFilter {
AuthUser authUser = new Gson().fromJson(json, AuthUser.class);
//校验redis中是否有权限
if (cache.hasKey(CachePrefix.ACCESS_TOKEN.getPrefix(UserEnums.MEMBER) + jwt)) {
if (cache.hasKey(CachePrefix.ACCESS_TOKEN.getPrefix(UserEnums.MEMBER,authUser.getId()) + jwt)) {
//构造返回信息
List<GrantedAuthority> auths = new ArrayList<>();
auths.add(new SimpleGrantedAuthority("ROLE_" + authUser.getRole().name()));

View File

@@ -213,18 +213,6 @@ lili:
lbs:
key: 4BYBZ-7MT6S-PUAOA-6BNWL-FJUD7-UUFXT
sk: zhNKVrJK6UPOhqIjn8AQvG37b9sz6
#域名
domain:
pc: https://pc-b2b2c.pickmall.cn
wap: https://m-b2b2c.pickmall.cn
store: https://store-b2b2c.pickmall.cn
admin: https://admin-b2b2c.pickmall.cn
#api地址
api:
buyer: https://buyer-api.pickmall.cn
common: https://common-api.pickmall.cn
manager: https://admin-api.pickmall.cn
store: https://store-api.pickmall.cn
# jwt 细节设定
jwt-setting:
@@ -265,6 +253,8 @@ lili:
order-group: lili_order_group
member-topic: lili_member_topic
member-group: lili_member_group
store-topic: lili_store_topic
store-group: lili_store_group
other-topic: lili_other_topic
other-group: lili_other_group
notice-topic: lili_notice_topic

View File

@@ -1,15 +1,15 @@
package cn.lili.controller.common;
import cn.lili.cache.Cache;
import cn.lili.common.context.ThreadContextHolder;
import cn.lili.common.enums.ResultCode;
import cn.lili.common.enums.ResultUtil;
import cn.lili.common.exception.ServiceException;
import cn.lili.common.security.AuthUser;
import cn.lili.common.security.context.UserContext;
import cn.lili.common.security.enums.UserEnums;
import cn.lili.common.vo.PageVO;
import cn.lili.common.utils.ResponseUtil;
import cn.lili.common.vo.ResultMessage;
import cn.lili.common.vo.SearchVO;
import cn.lili.modules.file.entity.File;
import cn.lili.modules.file.entity.dto.FileOwnerDTO;
import cn.lili.modules.file.service.FileService;
@@ -43,10 +43,14 @@ public class FileController {
@ApiOperation(value = "获取自己的图片资源")
@GetMapping
@ApiImplicitParam(name = "title", value = "名称模糊匹配")
public ResultMessage<IPage<File>> getFileList(@RequestHeader String accessToken, File file, SearchVO searchVO, PageVO pageVo) {
public ResultMessage<IPage<File>> getFileList(@RequestHeader String accessToken, FileOwnerDTO fileOwnerDTO) {
AuthUser authUser = UserContext.getAuthUser(cache, accessToken);
FileOwnerDTO fileOwnerDTO = new FileOwnerDTO();
if (authUser == null) {
ResponseUtil.output(ThreadContextHolder.getHttpResponse(), 403, ResponseUtil.resultMap(false,
403, "登录已失效,请重新登录"));
return null;
}
//只有买家才写入自己id
if (authUser.getRole().equals(UserEnums.MEMBER)) {
fileOwnerDTO.setOwnerId(authUser.getId());
@@ -55,7 +59,7 @@ public class FileController {
fileOwnerDTO.setOwnerId(authUser.getStoreId());
}
fileOwnerDTO.setUserEnums(authUser.getRole().name());
return ResultUtil.data(fileService.customerPageOwner(fileOwnerDTO, file, searchVO, pageVo));
return ResultUtil.data(fileService.customerPageOwner(fileOwnerDTO));
}
@ApiOperation(value = "文件重命名")

View File

@@ -0,0 +1,70 @@
package cn.lili.controller.common;
import cn.lili.common.enums.ResultCode;
import cn.lili.common.enums.ResultUtil;
import cn.lili.common.security.context.UserContext;
import cn.lili.common.vo.ResultMessage;
import cn.lili.modules.file.entity.FileDirectory;
import cn.lili.modules.file.entity.dto.FileDirectoryDTO;
import cn.lili.modules.file.service.FileDirectoryService;
import cn.lili.modules.file.service.FileService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.List;
/**
* 文件目录管理接口
*
* @author Chopper
* @since 2020/11/26 15:41
*/
@RestController
@Api(tags = "文件目录管理接口")
@RequestMapping("/common/resource/fileDirectory")
@RequiredArgsConstructor
public class FileDirectoryController {
private final FileDirectoryService fileDirectoryService;
private final FileService fileService;
@ApiOperation(value = "获取文件目录列表")
@GetMapping
public ResultMessage<List<FileDirectoryDTO>> getSceneFileList() {
return ResultUtil.data(fileDirectoryService.getFileDirectoryList(UserContext.getCurrentUser().getId()));
}
@ApiOperation(value = "添加文件目录")
@PostMapping
public ResultMessage<FileDirectory> addSceneFileList(@RequestBody @Valid FileDirectory fileDirectory) {
fileDirectory.setDirectoryType(UserContext.getCurrentUser().getRole().name());
fileDirectory.setOwnerId(UserContext.getCurrentUser().getId());
fileDirectoryService.save(fileDirectory);
return ResultUtil.data(fileDirectory);
}
@ApiOperation(value = "修改文件目录")
@PutMapping
public ResultMessage<FileDirectory> editSceneFileList(@RequestBody @Valid FileDirectory fileDirectory) {
fileDirectory.setDirectoryType(UserContext.getCurrentUser().getRole().name());
fileDirectory.setOwnerId(UserContext.getCurrentUser().getId());
fileDirectoryService.updateById(fileDirectory);
return ResultUtil.data(fileDirectory);
}
@ApiOperation(value = "删除文件目录")
@DeleteMapping("/{id}")
public ResultMessage<Object> deleteSceneFileList(@PathVariable String id) {
//检测文件夹下是否包含图片
if(fileService.countByDirectory(id)){
return ResultUtil.error(ResultCode.FILE_DIRECTORY_NOT_EMPTY);
}
//删除目录
fileDirectoryService.removeById(id);
return ResultUtil.success();
}
}

View File

@@ -1,6 +1,7 @@
package cn.lili.controller.common;
import cn.hutool.core.text.CharSequenceUtil;
import cn.hutool.core.util.StrUtil;
import cn.lili.cache.Cache;
import cn.lili.common.enums.ResultCode;
import cn.lili.common.enums.ResultUtil;
@@ -12,7 +13,6 @@ import cn.lili.common.utils.Base64DecodeMultipartFile;
import cn.lili.common.utils.CommonUtil;
import cn.lili.common.vo.ResultMessage;
import cn.lili.modules.file.entity.File;
import cn.lili.modules.file.plugin.FilePlugin;
import cn.lili.modules.file.plugin.FilePluginFactory;
import cn.lili.modules.file.service.FileService;
import cn.lili.modules.system.entity.dos.Setting;
@@ -22,10 +22,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.InputStream;
@@ -56,24 +53,30 @@ public class UploadController {
@PostMapping(value = "/file")
public ResultMessage<Object> upload(MultipartFile file,
String base64,
@RequestHeader String accessToken) {
@RequestHeader String accessToken, @RequestParam String directoryPath) {
if(StrUtil.isBlank(directoryPath)){
directoryPath = "default";
}
AuthUser authUser = UserContext.getAuthUser(cache, accessToken);
//如果用户未登录,则无法上传图片
if (authUser == null) {
throw new ServiceException(ResultCode.USER_AUTHORITY_ERROR);
}
if (file == null) {
throw new ServiceException(ResultCode.FILE_NOT_EXIST_ERROR);
}
Setting setting = settingService.get(SettingEnum.OSS_SETTING.name());
if (setting == null || CharSequenceUtil.isBlank(setting.getSettingValue())) {
throw new ServiceException(ResultCode.OSS_NOT_EXIST);
}
if (file == null || CharSequenceUtil.isEmpty(file.getContentType())) {
if (CharSequenceUtil.isEmpty(file.getContentType())) {
throw new ServiceException(ResultCode.IMAGE_FILE_EXT_ERROR);
}
if (!CharSequenceUtil.containsAny(file.getContentType().toLowerCase(), "image")) {
if (!CharSequenceUtil.containsAny(Objects.requireNonNull(file.getContentType()).toLowerCase(), "image", "video")) {
throw new ServiceException(ResultCode.FILE_TYPE_NOT_SUPPORT);
}
@@ -87,6 +90,12 @@ public class UploadController {
try {
InputStream inputStream = file.getInputStream();
//上传至第三方云服务或服务器
String scene = UserContext.getCurrentUser().getRole().name();
if (StrUtil.equalsAny(UserContext.getCurrentUser().getRole().name(), UserEnums.MEMBER.name(), UserEnums.STORE.name(), UserEnums.SEAT.name())) {
scene = scene + "/" + authUser.getId();
}
fileKey = scene + "/" + directoryPath + "/" + fileKey;
//上传至第三方云服务或服务器
result = filePluginFactory.filePlugin().inputStreamUpload(inputStream, fileKey);
//保存数据信息至数据库
newFile.setName(file.getOriginalFilename());
@@ -99,8 +108,19 @@ public class UploadController {
//如果是店铺则记录店铺id
if (authUser.getRole().equals(UserEnums.STORE)) {
newFile.setOwnerId(authUser.getStoreId());
newFile.setOwnerName(authUser.getStoreName());
} else {
newFile.setOwnerId(authUser.getId());
newFile.setOwnerName(authUser.getNickName());
}
//存储文件目录
if (StrUtil.isNotEmpty(directoryPath)) {
if (directoryPath.indexOf("/") > 0) {
newFile.setFileDirectoryId(directoryPath.substring(directoryPath.lastIndexOf("/") + 1));
} else {
newFile.setFileDirectoryId(directoryPath);
}
}
fileService.save(newFile);
} catch (Exception e) {

View File

@@ -190,18 +190,6 @@ lili:
interfereNum: 0
#允许误差像素
faultTolerant: 3
#短信模版配置
sms:
#登录
LOGIN: SMS_205755300
#注册
REGISTER: SMS_205755298
#找回密码
FIND_USER: SMS_205755301
#设置密码
UPDATE_PASSWORD: SMS_205755297
#支付密码
WALLET_PASSWORD: SMS_205755301
system:
isTestModel: true
statistics:

View File

@@ -24,13 +24,13 @@ spring:
boot:
admin:
client:
url: http://192.168.0.116:8000
url: http://127.0.0.1:8000
cache:
type: redis
# Redis
redis:
host: 127.0.0.1
port: 6379
host: 192.168.31.100
port: 30379
password: lilishop
lettuce:
pool:
@@ -60,7 +60,7 @@ spring:
default-datasource:
type: com.alibaba.druid.pool.DruidDataSource
driverClassName: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/lilishop?useUnicode=true&characterEncoding=utf-8&useSSL=false&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
url: jdbc:mysql://192.168.31.100:30306/lilishop?useUnicode=true&characterEncoding=utf-8&useSSL=false&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: root
password: lilishop
maxActive: 50
@@ -209,21 +209,8 @@ lili:
interfereNum: 1
#允许误差像素
faultTolerant: 3
#短信模版配置
sms:
#登录
LOGIN: SMS_205755300
#注册
REGISTER: SMS_205755298
#找回密码
FIND_USER: SMS_205755301
#设置密码
UPDATE_PASSWORD: SMS_205755297
#支付密码
WALLET_PASSWORD: SMS_205755301
system:
isDemoSite: false
isTestModel: true
# 脱敏级别:
# 0不做脱敏处理
# 1管理端用户手机号等信息脱敏
@@ -241,16 +228,16 @@ lili:
sk: zhNKVrJK6UPOhqIjn8AQvG37b9sz6
#域名
domain:
pc: http://192.168.0.116:8888
wap: http://192.168.0.116:8888
seller: http://192.168.0.116:8888
admin: http://192.168.0.116:8888
pc: http://127.0.0.1:8888
wap: http://127.0.0.1:8888
seller: http://127.0.0.1:8888
admin: http://127.0.0.1:8888
#api地址
api:
buyer: https://z171l91606.51mypc.cn
base: http://192.168.0.116:8888
manager: http://192.168.0.116:8888
seller: http://192.168.0.116:8888
base: http://127.0.0.1:8888
manager: http://127.0.0.1:8888
seller: http://127.0.0.1:8888
# jwt 细节设定
jwt-setting:
@@ -269,7 +256,7 @@ lili:
data:
elasticsearch:
cluster-name: elasticsearch
cluster-nodes: 127.0.0.1:9200
cluster-nodes: 192.168.31.100:30920
index:
number-of-replicas: 0
number-of-shards: 3
@@ -280,28 +267,28 @@ lili:
# password: LiLiShopES
logstash:
server: 127.0.0.1:4560
server: 192.168.31.100:30560
rocketmq:
promotion-topic: lili_promotion_topic
promotion-group: lili_promotion_group
msg-ext-topic: lili_msg_topic
msg-ext-group: lili_msg_group
goods-topic: lili_goods_topic
goods-group: lili_goods_group
order-topic: lili_order_topic
order-group: lili_order_group
member-topic: lili_member_topic
member-group: lili_member_group
other-topic: lili_other_topic
other-group: lili_other_group
notice-topic: lili_notice_topic
notice-group: lili_notice_group
notice-send-topic: lili_send_notice_topic
notice-send-group: lili_send_notice_group
after-sale-topic: lili_after_sale_topic
after-sale-group: lili_after_sale_group
promotion-topic: shop_lili_promotion_topic
promotion-group: shop_lili_promotion_group
msg-ext-topic: shop_lili_msg_topic
msg-ext-group: shop_lili_msg_group
goods-topic: shop_lili_goods_topic
goods-group: shop_lili_goods_group
order-topic: shop_lili_order_topic
order-group: shop_lili_order_group
member-topic: shop_lili_member_topic
member-group: shop_lili_member_group
other-topic: shop_lili_other_topic
other-group: shop_lili_other_group
notice-topic: shop_lili_notice_topic
notice-group: shop_lili_notice_group
notice-send-topic: shop_lili_send_notice_topic
notice-send-group: shop_lili_send_notice_group
after-sale-topic: shop_lili_after_sale_topic
after-sale-group: shop_lili_after_sale_group
rocketmq:
name-server: 127.0.0.1:9876
name-server: 192.168.31.100:30876
isVIPChannel: false
producer:
group: lili_group
@@ -310,7 +297,7 @@ rocketmq:
xxl:
job:
admin:
addresses: http://127.0.0.1:9001/xxl-job-admin
addresses: http://192.168.31.100:30001/xxl-job-admin
executor:
appname: xxl-job-executor-lilishop
address:

View File

@@ -0,0 +1,21 @@
package cn.lili.event;
import cn.lili.modules.connect.entity.dto.ConnectAuthUser;
import cn.lili.modules.member.entity.dos.Member;
/**
* 会员联合登录消息
*
* @author Chopper
* @since 2020/11/17 7:13 下午
*/
public interface MemberConnectLoginEvent {
/**
* 会员联合登录
*
* @param member 会员
* @param authUser 第三方登录
*/
void memberConnectLogin(Member member, ConnectAuthUser authUser);
}

View File

@@ -0,0 +1,17 @@
package cn.lili.event;
import cn.lili.modules.member.entity.dos.Member;
/**
* @author chc
* @since 2022/6/2114:46
*/
public interface MemberInfoChangeEvent {
/**
* 会员信息更改消息
*
* @param member 会员信息
*/
void memberInfoChange(Member member);
}

View File

@@ -0,0 +1,18 @@
package cn.lili.event;
import cn.lili.modules.store.entity.dos.Store;
/**
* @author chc
* @since 2022/6/2114:46
*/
public interface StoreSettingChangeEvent {
/**
* 店铺信息更改消息
*
* @param store 店铺信息
*/
void storeSettingChange(Store store);
}

View File

@@ -1,23 +1,24 @@
package cn.lili.event.impl;
import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateTime;
import cn.hutool.json.JSONUtil;
import cn.lili.event.AfterSaleStatusChangeEvent;
import cn.lili.event.OrderStatusChangeEvent;
import cn.lili.modules.distribution.entity.dos.DistributionOrder;
import cn.lili.modules.distribution.entity.enums.DistributionOrderStatusEnum;
import cn.lili.modules.distribution.mapper.DistributionOrderMapper;
import cn.lili.modules.distribution.service.DistributionOrderService;
import cn.lili.modules.order.aftersale.entity.dos.AfterSale;
import cn.lili.modules.order.order.entity.dto.OrderMessage;
import cn.lili.modules.order.trade.entity.enums.AfterSaleStatusEnum;
import cn.lili.modules.system.entity.dos.Setting;
import cn.lili.modules.system.entity.dto.DistributionSetting;
import cn.lili.modules.system.entity.enums.SettingEnum;
import cn.lili.modules.system.service.SettingService;
import cn.lili.timetask.handler.EveryDayExecute;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
* 分销订单入库
*
@@ -26,26 +27,21 @@ import javax.annotation.Resource;
*/
@Slf4j
@Service
public class DistributionOrderExecute implements OrderStatusChangeEvent, EveryDayExecute, AfterSaleStatusChangeEvent {
public class DistributionOrderExecute implements OrderStatusChangeEvent, AfterSaleStatusChangeEvent {
/**
* 分销订单
*/
@Autowired
private DistributionOrderService distributionOrderService;
/**
* 分销订单持久层
*/
@Resource
private DistributionOrderMapper distributionOrderMapper;
@Override
public void orderChange(OrderMessage orderMessage) {
switch (orderMessage.getNewStatus()) {
//订单带校验/订单代发货,则记录分销信息
//订单带校验/订单代发货/待自提,则记录分销信息
case TAKE:
case STAY_PICKED_UP:
case UNDELIVERED: {
//记录分销订单
distributionOrderService.calculationDistribution(orderMessage.getOrderSn());
@@ -62,23 +58,10 @@ public class DistributionOrderExecute implements OrderStatusChangeEvent, EveryDa
}
}
@Override
public void execute() {
//计算分销提佣
distributionOrderMapper.rebate(DistributionOrderStatusEnum.WAIT_BILL.name(), new DateTime());
//修改分销订单状态
distributionOrderService.update(new LambdaUpdateWrapper<DistributionOrder>()
.eq(DistributionOrder::getDistributionOrderStatus, DistributionOrderStatusEnum.WAIT_BILL.name())
.le(DistributionOrder::getSettleCycle, new DateTime())
.set(DistributionOrder::getDistributionOrderStatus, DistributionOrderStatusEnum.WAIT_CASH.name()));
}
@Override
public void afterSaleStatusChange(AfterSale afterSale) {
if (afterSale.getServiceStatus().equals(AfterSaleStatusEnum.COMPLETE.name())) {
distributionOrderService.refundOrder(afterSale.getSn());
distributionOrderService.refundOrder(afterSale);
}
}

View File

@@ -104,7 +104,7 @@ public class FullDiscountExecute implements TradeEvent, OrderStatusChangeEvent {
searchParams.setOrderPromotionType(OrderPromotionTypeEnum.GIFT.name());
List<Order> orders = orderService.queryListByParams(searchParams);
if (orders != null && !orders.isEmpty()) {
orderService.systemCancel(orders.get(0).getSn(),"主订单取消,赠送订单字段自动取消");
orderService.systemCancel(orders.get(0).getSn(),"主订单取消,赠送订单字段自动取消",true);
}
}
}

View File

@@ -1,12 +1,22 @@
package cn.lili.event.impl;
import cn.lili.cache.Cache;
import cn.lili.cache.CachePrefix;
import cn.lili.event.GoodsCommentCompleteEvent;
import cn.lili.event.StoreSettingChangeEvent;
import cn.lili.modules.goods.entity.dos.GoodsSku;
import cn.lili.modules.goods.entity.dto.GoodsSearchParams;
import cn.lili.modules.goods.service.GoodsService;
import cn.lili.modules.goods.service.GoodsSkuService;
import cn.lili.modules.member.entity.dos.MemberEvaluation;
import cn.lili.modules.store.entity.dos.Store;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
* 商品SKU变化
*
@@ -14,7 +24,7 @@ import org.springframework.stereotype.Service;
* @since 2020-07-03 11:20
*/
@Service
public class GoodsSkuExecute implements GoodsCommentCompleteEvent {
public class GoodsSkuExecute implements GoodsCommentCompleteEvent, StoreSettingChangeEvent {
/**
* 商品
@@ -22,9 +32,26 @@ public class GoodsSkuExecute implements GoodsCommentCompleteEvent {
@Autowired
private GoodsSkuService goodsSkuService;
@Autowired
private GoodsService goodsService;
@Autowired
private Cache cache;
@Override
public void goodsComment(MemberEvaluation memberEvaluation) {
goodsSkuService.updateGoodsSkuCommentNum(memberEvaluation.getSkuId());
goodsService.updateGoodsCommentNum(memberEvaluation.getGoodsId(), memberEvaluation.getSkuId());
}
@Override
public void storeSettingChange(Store store) {
//修改数据后,清除商品索引
GoodsSearchParams goodsSearchParams = new GoodsSearchParams();
goodsSearchParams.setStoreId(store.getId());
List<String> goodsSkuKeys = new ArrayList<>();
for (GoodsSku goodsSku : goodsSkuService.getGoodsSkuByList(goodsSearchParams)) {
goodsSkuKeys.add(CachePrefix.GOODS_SKU.getPrefix()+goodsSku.getId());
}
cache.multiDel(goodsSkuKeys);
}
}

View File

@@ -0,0 +1,60 @@
package cn.lili.event.impl;
import cn.lili.event.MemberInfoChangeEvent;
import cn.lili.event.StoreSettingChangeEvent;
import cn.lili.modules.im.entity.dos.ImTalk;
import cn.lili.modules.im.service.ImTalkService;
import cn.lili.modules.member.entity.dos.Member;
import cn.lili.modules.store.entity.dos.Store;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Im对话消息
*
* @author chc
* @since 2022/6/2114:46
*/
@Service
public class ImTalkExecute implements MemberInfoChangeEvent, StoreSettingChangeEvent {
@Autowired
private ImTalkService imTalkService;
@Override
public void memberInfoChange(Member member) {
//当与UserId1相等时
List<ImTalk> imTalkList1 = imTalkService.list(new LambdaQueryWrapper<ImTalk>().eq(ImTalk::getUserId1, member.getId()));
for (ImTalk imTalk : imTalkList1) {
imTalk.setName1(member.getNickName());
imTalk.setFace1(member.getFace());
}
imTalkService.updateBatchById(imTalkList1);
List<ImTalk> imTalkList2 = imTalkService.list(new LambdaQueryWrapper<ImTalk>().eq(ImTalk::getUserId2, member.getId()));
for (ImTalk imTalk : imTalkList2) {
imTalk.setName2(member.getNickName());
imTalk.setFace2(member.getFace());
}
imTalkService.updateBatchById(imTalkList2);
}
@Override
public void storeSettingChange(Store store) {
//当与UserId1相等时
List<ImTalk> imTalkList1 = imTalkService.list(new LambdaQueryWrapper<ImTalk>().eq(ImTalk::getUserId1, store.getId()));
for (ImTalk imTalk : imTalkList1) {
imTalk.setName1(store.getStoreName());
imTalk.setFace1(store.getStoreLogo());
}
imTalkService.updateBatchById(imTalkList1);
List<ImTalk> imTalkList2 = imTalkService.list(new LambdaQueryWrapper<ImTalk>().eq(ImTalk::getUserId2, store.getId()));
for (ImTalk imTalk : imTalkList2) {
imTalk.setName2(store.getStoreName());
imTalk.setFace2(store.getStoreLogo());
}
imTalkService.updateBatchById(imTalkList2);
}
}

View File

@@ -1,25 +1,58 @@
package cn.lili.event.impl;
import cn.hutool.core.util.StrUtil;
import cn.lili.common.enums.ClientTypeEnum;
import cn.lili.event.MemberConnectLoginEvent;
import cn.lili.event.MemberLoginEvent;
import cn.lili.modules.connect.entity.dto.ConnectAuthUser;
import cn.lili.modules.connect.entity.enums.ConnectEnum;
import cn.lili.modules.connect.entity.enums.SourceEnum;
import cn.lili.modules.connect.service.ConnectService;
import cn.lili.modules.member.entity.dos.Member;
import cn.lili.modules.member.service.MemberService;
import cn.lili.modules.system.service.SettingService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* 会员自身业务
* 会员登录,会员第三方登录
*
* @author Chopper
* @version v1.0
* 2022-01-11 11:08
*/
@Slf4j
@Service
public class MemberExecute implements MemberLoginEvent {
public class MemberExecute implements MemberLoginEvent, MemberConnectLoginEvent {
@Autowired
private MemberService memberService;
@Autowired
private ConnectService connectService;
@Autowired
private SettingService settingService;
@Override
public void memberLogin(Member member) {
memberService.updateMemberLoginTime(member.getId());
}
@Override
public void memberConnectLogin(Member member, ConnectAuthUser authUser) {
//保存UnionID
if (StrUtil.isNotBlank(authUser.getToken().getUnionId())) {
connectService.loginBindUser(member.getId(), authUser.getToken().getUnionId(), authUser.getSource().name());
}
//保存OpenID
if (StrUtil.isNotBlank(authUser.getUuid())) {
SourceEnum sourceEnum = SourceEnum.getSourceEnum(authUser.getSource(), authUser.getType());
connectService.loginBindUser(member.getId(), authUser.getUuid(), sourceEnum.name());
}
//保存手机号,判断用户是否存手机号,如果不存在则保存手机号
if (StrUtil.isNotBlank(authUser.getPhone())&&StrUtil.isBlank(member.getMobile())) {
memberService.changeMobile(member.getId(),member.getMobile());
}
}
}

View File

@@ -15,6 +15,7 @@ import cn.lili.modules.order.aftersale.entity.dos.AfterSale;
import cn.lili.modules.order.order.entity.dos.Order;
import cn.lili.modules.order.order.entity.dto.OrderMessage;
import cn.lili.modules.order.order.entity.enums.OrderPromotionTypeEnum;
import cn.lili.modules.order.order.entity.enums.OrderStatusEnum;
import cn.lili.modules.order.order.entity.enums.PayStatusEnum;
import cn.lili.modules.order.order.service.OrderService;
import cn.lili.modules.order.trade.entity.enums.AfterSaleStatusEnum;
@@ -134,12 +135,16 @@ public class MemberPointExecute implements MemberRegisterEvent, GoodsCommentComp
@Override
public void afterSaleStatusChange(AfterSale afterSale) {
if (afterSale.getServiceStatus().equals(AfterSaleStatusEnum.COMPLETE.name())) {
Order order = orderService.getBySn(afterSale.getOrderSn());
//获取积分设置
PointSetting pointSetting = getPointSetting();
if (pointSetting.getConsumer() == 0 || !OrderStatusEnum.COMPLETED.name().equals(order.getOrderStatus())) {
return;
}
//计算扣除积分数量
Double point = CurrencyUtil.mul(pointSetting.getMoney(), afterSale.getActualRefundPrice(), 0);
Double point = CurrencyUtil.mul(pointSetting.getConsumer(), afterSale.getActualRefundPrice(), 0);
//扣除会员积分
memberService.updateMemberPoint(point.longValue(), PointTypeEnum.REDUCE.name(), afterSale.getMemberId(), "会员退款,回退积分" + point + "");
memberService.updateMemberPoint(point.longValue(), PointTypeEnum.REDUCE.name(), afterSale.getMemberId(), "会员退款,回退消费赠送积分" + point + "");
}
}

View File

@@ -1,8 +1,11 @@
package cn.lili.event.impl;
import cn.lili.event.MemberRegisterEvent;
import cn.lili.modules.member.entity.dos.Member;
import cn.lili.event.MemberWithdrawalEvent;
import cn.lili.modules.wallet.entity.dto.MemberWalletUpdateDTO;
import cn.lili.modules.wallet.entity.dto.MemberWithdrawalMessage;
import cn.lili.modules.wallet.entity.enums.DepositServiceTypeEnum;
import cn.lili.modules.wallet.entity.enums.WithdrawStatusEnum;
import cn.lili.modules.wallet.service.MemberWalletService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -14,14 +17,35 @@ import org.springframework.stereotype.Service;
* @since 2020-07-03 11:20
*/
@Service
public class MemberWalletExecute implements MemberRegisterEvent {
public class MemberWalletExecute implements MemberWithdrawalEvent {
@Autowired
private MemberWalletService memberWalletService;
@Override
public void memberRegister(Member member) {
// 有些情况下会同时创建一个member_id的两条数据
// memberWalletService.save(member.getId(),member.getUsername());
public void memberWithdrawal(MemberWithdrawalMessage memberWithdrawalMessage) {
switch (WithdrawStatusEnum.valueOf(memberWithdrawalMessage.getStatus())) {
case VIA_AUDITING:
memberWalletService.withdrawal(memberWithdrawalMessage.getMemberWithdrawApplyId());
break;
case SUCCESS:
//提现成功扣减冻结金额
memberWalletService.reduceFrozen(
new MemberWalletUpdateDTO(memberWithdrawalMessage.getPrice(), memberWithdrawalMessage.getMemberId(), "提现成功,余额提现",
DepositServiceTypeEnum.WALLET_WITHDRAWAL.name()));
break;
case ERROR:
//需要从冻结金额扣减到余额
memberWalletService.increaseWithdrawal(new MemberWalletUpdateDTO(memberWithdrawalMessage.getPrice(),
memberWithdrawalMessage.getMemberId(), "第三方提现失败,提现金额解冻到余额", DepositServiceTypeEnum.WALLET_WITHDRAWAL.name()));
break;
case FAIL_AUDITING:
//需要从冻结金额扣减到余额
memberWalletService.increaseWithdrawal(new MemberWalletUpdateDTO(memberWithdrawalMessage.getPrice(),
memberWithdrawalMessage.getMemberId(), "审核拒绝,提现金额解冻到余额", DepositServiceTypeEnum.WALLET_WITHDRAWAL.name()));
break;
default:
break;
}
}
}

View File

@@ -16,7 +16,6 @@ import cn.lili.modules.order.order.service.OrderService;
import cn.lili.modules.order.trade.entity.enums.AfterSaleStatusEnum;
import cn.lili.modules.order.trade.entity.enums.AfterSaleTypeEnum;
import cn.lili.modules.wallet.entity.dto.MemberWithdrawalMessage;
import cn.lili.modules.wallet.entity.enums.MemberWithdrawalDestinationEnum;
import cn.lili.modules.wallet.entity.enums.WithdrawStatusEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -59,7 +58,7 @@ public class NoticeMessageExecute implements TradeEvent, OrderStatusChangeEvent,
OrderDetailVO orderDetailVO = orderService.queryDetail(orderMessage.getOrderSn());
NoticeMessageDTO noticeMessageDTO = new NoticeMessageDTO();
//如果订单状态不为空
if (orderDetailVO != null) {
if (orderDetailVO != null && orderDetailVO.getOrderItems() != null && !orderDetailVO.getOrderItems().isEmpty()) {
Map<String, String> params = new HashMap<>(2);
switch (orderMessage.getNewStatus()) {
//如果订单新的状态为已取消 则发送取消订单站内信
@@ -179,60 +178,30 @@ public class NoticeMessageExecute implements TradeEvent, OrderStatusChangeEvent,
public void memberWithdrawal(MemberWithdrawalMessage memberWithdrawalMessage) {
NoticeMessageDTO noticeMessageDTO = new NoticeMessageDTO();
noticeMessageDTO.setMemberId(memberWithdrawalMessage.getMemberId());
//如果提现状态为申请则发送申请提现站内消息
if (memberWithdrawalMessage.getStatus().equals(WithdrawStatusEnum.APPLY.name())) {
noticeMessageDTO.setNoticeMessageNodeEnum(NoticeMessageNodeEnum.WALLET_WITHDRAWAL_CREATE);
Map<String, String> params = new HashMap<>(2);
params.put("price", memberWithdrawalMessage.getPrice().toString());
noticeMessageDTO.setParameter(params);
//发送提现申请成功消息
noticeMessageService.noticeMessage(noticeMessageDTO);
}
//如果提现状态为通过则发送审核通过站内消息
if (memberWithdrawalMessage.getStatus().equals(WithdrawStatusEnum.VIA_AUDITING.name())) {
//如果提现到余额
if (memberWithdrawalMessage.getDestination().equals(MemberWithdrawalDestinationEnum.WALLET.name())) {
//组织参数
Map<String, String> params = new HashMap<>(2);
params.put("income", memberWithdrawalMessage.getPrice().toString());
noticeMessageDTO.setParameter(params);
Map<String, String> params = new HashMap<>(2);
switch (WithdrawStatusEnum.valueOf(memberWithdrawalMessage.getStatus())) {
case APPLY:
//如果提现状态为申请则发送申请提现站内消息
noticeMessageDTO.setNoticeMessageNodeEnum(NoticeMessageNodeEnum.WALLET_WITHDRAWAL_CREATE);
break;
case FAIL_AUDITING:
noticeMessageDTO.setNoticeMessageNodeEnum(NoticeMessageNodeEnum.WALLET_WITHDRAWAL_AUDIT_ERROR);
break;
case SUCCESS:
noticeMessageDTO.setNoticeMessageNodeEnum(NoticeMessageNodeEnum.WALLET_WITHDRAWAL_SUCCESS);
//发送提现成功消息
noticeMessageService.noticeMessage(noticeMessageDTO);
params.put("income", memberWithdrawalMessage.getPrice().toString());
params.put("expenditure", "0");
noticeMessageDTO.setNoticeMessageNodeEnum(NoticeMessageNodeEnum.WALLET_CHANGE);
noticeMessageDTO.setParameter(params);
//发送余额变动消息
noticeMessageService.noticeMessage(noticeMessageDTO);
}
//如果提现到微信
if (memberWithdrawalMessage.getDestination().equals(MemberWithdrawalDestinationEnum.WECHAT.name())) {
Map<String, String> params = new HashMap<>(2);
params.put("income", memberWithdrawalMessage.getPrice().toString());
noticeMessageDTO.setParameter(params);
noticeMessageDTO.setNoticeMessageNodeEnum(NoticeMessageNodeEnum.WALLET_WITHDRAWAL_WEICHAT_SUCCESS);
//发送提现成功消息
noticeMessageService.noticeMessage(noticeMessageDTO);
params.put("income", "0");
params.put("expenditure", memberWithdrawalMessage.getPrice().toString());
noticeMessageDTO.setNoticeMessageNodeEnum(NoticeMessageNodeEnum.WALLET_CHANGE);
noticeMessageDTO.setParameter(params);
//发送余额变动消息
noticeMessageService.noticeMessage(noticeMessageDTO);
}
}
//如果提现状态为拒绝则发送审核拒绝站内消息
if (memberWithdrawalMessage.getStatus().equals(WithdrawStatusEnum.FAIL_AUDITING.name())) {
noticeMessageDTO.setNoticeMessageNodeEnum(NoticeMessageNodeEnum.WALLET_WITHDRAWAL_ERROR);
Map<String, String> params = new HashMap<>(2);
params.put("price", memberWithdrawalMessage.getPrice().toString());
noticeMessageDTO.setParameter(params);
//发送提现申请成功消息
noticeMessageService.noticeMessage(noticeMessageDTO);
break;
case ERROR:
noticeMessageDTO.setNoticeMessageNodeEnum(NoticeMessageNodeEnum.WALLET_WITHDRAWAL_ERROR);
break;
case VIA_AUDITING:
noticeMessageDTO.setNoticeMessageNodeEnum(NoticeMessageNodeEnum.WALLET_WITHDRAWAL_AUDIT_SUCCESS);
default:
break;
}
params.put("price", memberWithdrawalMessage.getPrice().toString());
noticeMessageDTO.setParameter(params);
//发送提现申请消息
noticeMessageService.noticeMessage(noticeMessageDTO);
}
}

View File

@@ -1,12 +1,23 @@
package cn.lili.event.impl;
import cn.lili.common.utils.CurrencyUtil;
import cn.lili.event.AfterSaleStatusChangeEvent;
import cn.lili.event.TradeEvent;
import cn.lili.modules.order.aftersale.entity.dos.AfterSale;
import cn.lili.modules.order.cart.entity.dto.TradeDTO;
import cn.lili.modules.order.order.entity.dos.Order;
import cn.lili.modules.order.order.entity.dos.OrderItem;
import cn.lili.modules.order.order.entity.enums.RefundStatusEnum;
import cn.lili.modules.order.order.service.OrderItemService;
import cn.lili.modules.order.order.service.OrderService;
import cn.lili.modules.order.order.service.TradeService;
import cn.lili.modules.order.trade.entity.enums.AfterSaleStatusEnum;
import cn.lili.modules.payment.entity.enums.PaymentMethodEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 订单状态处理类
*
@@ -14,11 +25,15 @@ import org.springframework.stereotype.Service;
* @since 2020-07-03 11:20
**/
@Service
public class OrderStatusHandlerExecute implements TradeEvent {
public class OrderStatusHandlerExecute implements TradeEvent, AfterSaleStatusChangeEvent {
@Autowired
private TradeService tradeService;
@Autowired
private OrderItemService orderItemService;
@Autowired
private OrderService orderService;
@Override
public void orderCreate(TradeDTO tradeDTO) {
@@ -28,4 +43,35 @@ public class OrderStatusHandlerExecute implements TradeEvent {
}
}
@Override
public void afterSaleStatusChange(AfterSale afterSale) {
Order order = orderService.getBySn(afterSale.getOrderSn());
OrderItem orderItem = orderItemService.getBySn(afterSale.getOrderItemSn());
if (afterSale.getServiceStatus().equals(AfterSaleStatusEnum.COMPLETE.name())) {
if (orderItem.getReturnGoodsNumber().equals(orderItem.getNum())) {
orderItem.setIsRefund(RefundStatusEnum.ALL_REFUND.name());
} else {
orderItem.setIsRefund(RefundStatusEnum.PART_REFUND.name());
}
orderItem.setRefundPrice(CurrencyUtil.add(afterSale.getActualRefundPrice(), orderItem.getRefundPrice()));
orderItemService.updateByAfterSale(orderItem);
//循环订单货物,判断是否已经全部售后
List<OrderItem> orderItems = orderItemService.getByOrderSn(afterSale.getOrderSn());
// 总退货数量
int returnCount = 0;
// 总购买数量
int deliverCount = 0;
for (OrderItem item : orderItems) {
returnCount += item.getReturnGoodsNumber();
deliverCount += item.getNum();
}
if (returnCount == deliverCount) {
orderService.systemCancel(afterSale.getOrderSn(),"订单货物全部退款",false);
}
}
}
}

View File

@@ -8,6 +8,7 @@ import cn.lili.modules.order.order.entity.dto.OrderMessage;
import cn.lili.modules.order.order.entity.enums.OrderStatusEnum;
import cn.lili.modules.order.order.entity.enums.PayStatusEnum;
import cn.lili.modules.order.order.service.OrderService;
import cn.lili.modules.order.order.service.StoreFlowService;
import cn.lili.modules.payment.entity.RefundLog;
import cn.lili.modules.payment.kit.Payment;
import cn.lili.modules.payment.entity.enums.PaymentMethodEnum;
@@ -30,6 +31,8 @@ public class PaymentExecute implements OrderStatusChangeEvent {
*/
@Autowired
private OrderService orderService;
@Autowired
private StoreFlowService storeFlowService;
@Override
public void orderChange(OrderMessage orderMessage) {
@@ -60,6 +63,8 @@ public class PaymentExecute implements OrderStatusChangeEvent {
.refundReason("订单取消")
.build();
payment.refund(refundLog);
}
}
}

View File

@@ -1,18 +1,17 @@
package cn.lili.event.impl;
import cn.hutool.core.text.CharSequenceUtil;
import cn.lili.cache.Cache;
import cn.lili.cache.CachePrefix;
import cn.lili.event.MemberRegisterEvent;
import cn.lili.modules.member.entity.dos.Member;
import cn.lili.modules.promotion.entity.dos.CouponActivity;
import cn.lili.modules.member.service.MemberService;
import cn.lili.modules.promotion.entity.dto.CouponActivityTrigger;
import cn.lili.modules.promotion.entity.enums.CouponActivityTypeEnum;
import cn.lili.modules.promotion.entity.enums.PromotionsStatusEnum;
import cn.lili.modules.promotion.service.CouponActivityService;
import cn.lili.modules.promotion.tools.PromotionTools;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* 注册赠券活动
*
@@ -25,6 +24,12 @@ public class RegisteredCouponActivityExecute implements MemberRegisterEvent {
@Autowired
private CouponActivityService couponActivityService;
@Autowired
private MemberService memberService;
@Autowired
private Cache cache;
/**
* 获取进行中的注册赠券的优惠券活动
* 发送注册赠券
@@ -33,9 +38,22 @@ public class RegisteredCouponActivityExecute implements MemberRegisterEvent {
*/
@Override
public void memberRegister(Member member) {
List<CouponActivity> couponActivities = couponActivityService.list(new QueryWrapper<CouponActivity>()
.eq("coupon_activity_type", CouponActivityTypeEnum.REGISTERED.name())
.and(PromotionTools.queryPromotionStatus(PromotionsStatusEnum.START)));
couponActivityService.registered(couponActivities, member);
//用户注册赠券
couponActivityService.trigger(CouponActivityTrigger.builder()
.nickName(member.getNickName())
.userId(member.getId())
.couponActivityTypeEnum(CouponActivityTypeEnum.REGISTERED)
.build());
//邀请人赠券
String memberId = (String) cache.get(CachePrefix.INVITER.getPrefix() + member.getId());
if (CharSequenceUtil.isNotEmpty(memberId)) {
//邀请人
Member inviter = memberService.getById(memberId);
couponActivityService.trigger(CouponActivityTrigger.builder()
.nickName(inviter.getNickName())
.userId(inviter.getId())
.couponActivityTypeEnum(CouponActivityTypeEnum.INVITE_NEW)
.build());
}
}
}

View File

@@ -28,6 +28,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
@@ -95,7 +96,7 @@ public class StockUpdateExecute implements OrderStatusChangeEvent {
keys.add(GoodsSkuService.getStockCacheKey(orderItem.getSkuId()));
int i = -orderItem.getNum();
values.add(Integer.toString(i));
setPromotionStock(keys, values, orderItem);
setPromotionStock(keys, values, orderItem, true);
}
List<Integer> stocks = cache.multiGet(keys);
@@ -133,6 +134,7 @@ public class StockUpdateExecute implements OrderStatusChangeEvent {
keys.add(GoodsSkuService.getStockCacheKey(orderItem.getSkuId()));
int i = orderItem.getNum();
values.add(Integer.toString(i));
setPromotionStock(keys, values, orderItem, false);
}
//批量脚本执行库存回退
Boolean skuResult = stringRedisTemplate.execute(quantityScript, keys, values.toArray());
@@ -189,28 +191,33 @@ public class StockUpdateExecute implements OrderStatusChangeEvent {
//如果促销类型需要库存判定,则做对应处理
orderItems.forEach(orderItem -> {
if (orderItem.getPromotionType() != null) {
//如果此促销有库存概念,则计入
if (PromotionTypeEnum.haveStock(orderItem.getPromotionType())) {
String[] skuPromotions = orderItem.getPromotionType().split(",");
for (int i = 0; i < skuPromotions.length; i++) {
int currentIndex = i;
//如果此促销有库存概念,则计入
Arrays.stream(PromotionTypeEnum.haveStockPromotion).filter(promotionTypeEnum -> promotionTypeEnum.name().equals(skuPromotions[currentIndex]))
.findFirst()
.ifPresent(promotionTypeEnum -> {
String promotionId = orderItem.getPromotionId().split(",")[currentIndex];
String cacheKey = PromotionGoodsService.getPromotionGoodsStockCacheKey(promotionTypeEnum, promotionId, orderItem.getSkuId());
PromotionTypeEnum promotionTypeEnum = PromotionTypeEnum.valueOf(orderItem.getPromotionType());
String cacheKey = PromotionGoodsService.getPromotionGoodsStockCacheKey(promotionTypeEnum, orderItem.getPromotionId(), orderItem.getSkuId());
switch (promotionTypeEnum) {
case KANJIA:
cache.put(cacheKey, kanjiaActivityGoodsService.getKanjiaGoodsBySkuId(orderItem.getSkuId()).getStock());
return;
case POINTS_GOODS:
cache.put(cacheKey, pointsGoodsService.getPointsGoodsDetailBySkuId(orderItem.getSkuId()).getActiveStock());
return;
case SECKILL:
case PINTUAN:
cache.put(cacheKey, promotionGoodsService.getPromotionGoodsStock(promotionTypeEnum, orderItem.getPromotionId(), orderItem.getSkuId()));
return;
default:
break;
}
switch (promotionTypeEnum) {
case KANJIA:
cache.put(cacheKey, kanjiaActivityGoodsService.getKanjiaGoodsBySkuId(orderItem.getSkuId()).getStock());
return;
case POINTS_GOODS:
cache.put(cacheKey, pointsGoodsService.getPointsGoodsDetailBySkuId(orderItem.getSkuId()).getActiveStock());
return;
case SECKILL:
case PINTUAN:
cache.put(cacheKey, promotionGoodsService.getPromotionGoodsStock(promotionTypeEnum, promotionId, orderItem.getSkuId()));
return;
default:
break;
}
});
}
}
});
}
@@ -222,7 +229,7 @@ public class StockUpdateExecute implements OrderStatusChangeEvent {
* @param orderSn 失败入库订单信息
*/
private void errorOrder(String orderSn) {
orderService.systemCancel(orderSn, outOfStockMessage);
orderService.systemCancel(orderSn, outOfStockMessage, true);
}
@@ -233,16 +240,20 @@ public class StockUpdateExecute implements OrderStatusChangeEvent {
* @param values 缓存value值
* @param sku 购物车信息
*/
private void setPromotionStock(List<String> keys, List<String> values, OrderItem sku) {
private void setPromotionStock(List<String> keys, List<String> values, OrderItem sku, boolean deduction) {
if (sku.getPromotionType() != null) {
//如果此促销有库存概念,则计入
if (!PromotionTypeEnum.haveStock(sku.getPromotionType())) {
return;
String[] skuPromotions = sku.getPromotionType().split(",");
for (int i = 0; i < skuPromotions.length; i++) {
int currentIndex = i;
Arrays.stream(PromotionTypeEnum.haveStockPromotion).filter(promotionTypeEnum -> promotionTypeEnum.name().equals(skuPromotions[currentIndex]))
.findFirst()
.ifPresent(promotionTypeEnum -> {
keys.add(PromotionGoodsService.getPromotionGoodsStockCacheKey(promotionTypeEnum, sku.getPromotionId().split(",")[currentIndex], sku.getSkuId()));
int num = deduction ? -sku.getNum() : sku.getNum();
values.add(Integer.toString(num));
});
}
PromotionTypeEnum promotionTypeEnum = PromotionTypeEnum.valueOf(sku.getPromotionType());
keys.add(PromotionGoodsService.getPromotionGoodsStockCacheKey(promotionTypeEnum, sku.getPromotionId(), sku.getSkuId()));
int i = -sku.getNum();
values.add(Integer.toString(i));
}
}
@@ -277,41 +288,51 @@ public class StockUpdateExecute implements OrderStatusChangeEvent {
goodsSku.setId(orderItem.getSkuId());
goodsSku.setGoodsId(orderItem.getGoodsId());
//如果有促销信息
if (null != orderItem.getPromotionType() && null != orderItem.getPromotionId() && PromotionTypeEnum.haveStock(orderItem.getPromotionType())) {
if (null != orderItem.getPromotionType() && null != orderItem.getPromotionId()) {
//如果促销有库存信息
PromotionTypeEnum promotionTypeEnum = PromotionTypeEnum.valueOf(orderItem.getPromotionType());
String[] skuPromotions = orderItem.getPromotionType().split(",");
for (int i = 0; i < skuPromotions.length; i++) {
int currentIndex = i;
Arrays.stream(PromotionTypeEnum.haveStockPromotion).filter(promotionTypeEnum -> promotionTypeEnum.name().equals(skuPromotions[currentIndex]))
.findFirst()
.ifPresent(promotionTypeEnum -> {
//修改砍价商品库存
String promotionId = orderItem.getPromotionId().split(",")[currentIndex];
//修改砍价商品库存
if (promotionTypeEnum.equals(PromotionTypeEnum.KANJIA)) {
KanjiaActivity kanjiaActivity = kanjiaActivityService.getById(orderItem.getPromotionId());
KanjiaActivityGoodsDTO kanjiaActivityGoodsDTO = kanjiaActivityGoodsService.getKanjiaGoodsDetail(kanjiaActivity.getKanjiaActivityGoodsId());
//修改砍价商品库存
if (promotionTypeEnum.equals(PromotionTypeEnum.KANJIA)) {
KanjiaActivity kanjiaActivity = kanjiaActivityService.getById(promotionId);
KanjiaActivityGoodsDTO kanjiaActivityGoodsDTO = kanjiaActivityGoodsService.getKanjiaGoodsDetail(kanjiaActivity.getKanjiaActivityGoodsId());
Integer stock = Integer.parseInt(cache.get(PromotionGoodsService.getPromotionGoodsStockCacheKey(promotionTypeEnum, orderItem.getPromotionId(), orderItem.getSkuId())).toString());
kanjiaActivityGoodsDTO.setStock(stock);
Integer stock = Integer.parseInt(cache.get(PromotionGoodsService.getPromotionGoodsStockCacheKey(promotionTypeEnum, promotionId, orderItem.getSkuId())).toString());
kanjiaActivityGoodsDTO.setStock(stock);
kanjiaActivityGoodsService.updateById(kanjiaActivityGoodsDTO);
//修改积分商品库存
} else if (promotionTypeEnum.equals(PromotionTypeEnum.POINTS_GOODS)) {
PointsGoodsVO pointsGoodsVO = pointsGoodsService.getPointsGoodsDetail(orderItem.getPromotionId());
Integer stock = Integer.parseInt(cache.get(PromotionGoodsService.getPromotionGoodsStockCacheKey(promotionTypeEnum, orderItem.getPromotionId(), orderItem.getSkuId())).toString());
pointsGoodsVO.setActiveStock(stock);
pointsGoodsService.updateById(pointsGoodsVO);
} else {
PromotionGoodsSearchParams searchParams = new PromotionGoodsSearchParams();
searchParams.setPromotionType(promotionTypeEnum.name());
searchParams.setPromotionId(orderItem.getPromotionId());
searchParams.setSkuId(orderItem.getSkuId());
PromotionGoods pGoods = promotionGoodsService.getPromotionsGoods(searchParams);
//记录需要更新的促销库存信息
promotionKey.add(
PromotionGoodsService.getPromotionGoodsStockCacheKey(
promotionTypeEnum,
orderItem.getPromotionId(), orderItem.getSkuId())
);
if (pGoods != null) {
promotionGoods.add(pGoods);
}
kanjiaActivityGoodsService.updateById(kanjiaActivityGoodsDTO);
//修改积分商品库存
} else if (promotionTypeEnum.equals(PromotionTypeEnum.POINTS_GOODS)) {
PointsGoodsVO pointsGoodsVO = pointsGoodsService.getPointsGoodsDetail(promotionId);
Integer stock = Integer.parseInt(cache.get(PromotionGoodsService.getPromotionGoodsStockCacheKey(promotionTypeEnum, promotionId, orderItem.getSkuId())).toString());
pointsGoodsVO.setActiveStock(stock);
pointsGoodsService.updateById(pointsGoodsVO);
} else {
PromotionGoodsSearchParams searchParams = new PromotionGoodsSearchParams();
searchParams.setPromotionType(promotionTypeEnum.name());
searchParams.setPromotionId(promotionId);
searchParams.setSkuId(orderItem.getSkuId());
PromotionGoods pGoods = promotionGoodsService.getPromotionsGoods(searchParams);
//记录需要更新的促销库存信息
promotionKey.add(
PromotionGoodsService.getPromotionGoodsStockCacheKey(
promotionTypeEnum,
promotionId, orderItem.getSkuId())
);
if (pGoods != null) {
promotionGoods.add(pGoods);
}
}
});
}
}
goodsSkus.add(goodsSku);
}
@@ -322,8 +343,6 @@ public class StockUpdateExecute implements OrderStatusChangeEvent {
for (int i = 0; i < skuStocks.size(); i++) {
goodsSkus.get(i).setQuantity(Convert.toInt(skuStocks.get(i).toString()));
}
//批量修改商品库存
goodsSkuService.updateBatchById(goodsSkus);
//促销库存处理
if (!promotionKey.isEmpty()) {
@@ -336,7 +355,7 @@ public class StockUpdateExecute implements OrderStatusChangeEvent {
promotionGoodsService.updatePromotionGoodsStock(promotionGoods);
}
//商品库存包含sku库存集合批量更新商品库存相关
goodsSkuService.updateGoodsStuck(goodsSkus);
goodsSkuService.updateGoodsStock(goodsSkus);
log.info("订单确认,库存同步:商品信息--{};促销信息---{}", goodsSkus, promotionGoods);
@@ -353,6 +372,69 @@ public class StockUpdateExecute implements OrderStatusChangeEvent {
List<GoodsSku> goodsSkus = new ArrayList<>();
//sku库存key 集合
List<String> skuKeys = new ArrayList<>();
//促销商品
List<PromotionGoods> promotionGoods = new ArrayList<>();
//促销库存key 集合
List<String> promotionKey = new ArrayList<>();
//循环订单
for (OrderItem orderItem : order.getOrderItems()) {
skuKeys.add(GoodsSkuService.getStockCacheKey(orderItem.getSkuId()));
GoodsSku goodsSku = new GoodsSku();
goodsSku.setId(orderItem.getSkuId());
goodsSku.setGoodsId(orderItem.getGoodsId());
//如果有促销信息
if (null != orderItem.getPromotionType() && null != orderItem.getPromotionId()) {
//如果促销有库存信息
String[] skuPromotions = orderItem.getPromotionType().split(",");
for (int i = 0; i < skuPromotions.length; i++) {
int currentIndex = i;
Arrays.stream(PromotionTypeEnum.haveStockPromotion).filter(promotionTypeEnum -> promotionTypeEnum.name().equals(skuPromotions[currentIndex]))
.findFirst()
.ifPresent(promotionTypeEnum -> {
//修改砍价商品库存
String promotionId = orderItem.getPromotionId().split(",")[currentIndex];
//修改砍价商品库存
if (promotionTypeEnum.equals(PromotionTypeEnum.KANJIA)) {
KanjiaActivity kanjiaActivity = kanjiaActivityService.getById(promotionId);
KanjiaActivityGoodsDTO kanjiaActivityGoodsDTO = kanjiaActivityGoodsService.getKanjiaGoodsDetail(kanjiaActivity.getKanjiaActivityGoodsId());
Integer stock = Integer.parseInt(cache.get(PromotionGoodsService.getPromotionGoodsStockCacheKey(promotionTypeEnum, promotionId, orderItem.getSkuId())).toString());
kanjiaActivityGoodsDTO.setStock(stock);
kanjiaActivityGoodsService.updateById(kanjiaActivityGoodsDTO);
//修改积分商品库存
} else if (promotionTypeEnum.equals(PromotionTypeEnum.POINTS_GOODS)) {
PointsGoodsVO pointsGoodsVO = pointsGoodsService.getPointsGoodsDetail(promotionId);
Integer stock = Integer.parseInt(cache.get(PromotionGoodsService.getPromotionGoodsStockCacheKey(promotionTypeEnum, promotionId, orderItem.getSkuId())).toString());
pointsGoodsVO.setActiveStock(stock);
pointsGoodsService.updateById(pointsGoodsVO);
} else {
PromotionGoodsSearchParams searchParams = new PromotionGoodsSearchParams();
searchParams.setPromotionType(promotionTypeEnum.name());
searchParams.setPromotionId(promotionId);
searchParams.setSkuId(orderItem.getSkuId());
PromotionGoods pGoods = promotionGoodsService.getPromotionsGoods(searchParams);
//记录需要更新的促销库存信息
promotionKey.add(
PromotionGoodsService.getPromotionGoodsStockCacheKey(
promotionTypeEnum,
promotionId, orderItem.getSkuId())
);
if (pGoods != null) {
promotionGoods.add(pGoods);
}
}
});
}
}
goodsSkus.add(goodsSku);
}
//循环订单
for (OrderItem orderItem : order.getOrderItems()) {
skuKeys.add(GoodsSkuService.getStockCacheKey(orderItem.getSkuId()));
@@ -367,10 +449,19 @@ public class StockUpdateExecute implements OrderStatusChangeEvent {
for (int i = 0; i < skuStocks.size(); i++) {
goodsSkus.get(i).setQuantity(Convert.toInt(skuStocks.get(i).toString()));
}
//促销库存处理
if (!promotionKey.isEmpty()) {
List promotionStocks = cache.multiGet(promotionKey);
for (int i = 0; i < promotionKey.size(); i++) {
promotionGoods.get(i).setQuantity(Convert.toInt(promotionStocks.get(i).toString()));
Integer num = promotionGoods.get(i).getNum();
promotionGoods.get(i).setNum((num != null ? num : 0) + order.getOrder().getGoodsNum());
}
promotionGoodsService.updatePromotionGoodsStock(promotionGoods);
}
log.info("订单取消,库存还原:{}", goodsSkus);
//批量修改商品库存
goodsSkuService.updateBatchById(goodsSkus);
goodsSkuService.updateGoodsStuck(goodsSkus);
goodsSkuService.updateGoodsStock(goodsSkus);
}
}

View File

@@ -0,0 +1,206 @@
package cn.lili.event.impl;
import cn.lili.event.StoreSettingChangeEvent;
import cn.lili.modules.distribution.service.DistributionGoodsService;
import cn.lili.modules.distribution.service.DistributionOrderService;
import cn.lili.modules.goods.service.DraftGoodsService;
import cn.lili.modules.member.service.MemberEvaluationService;
import cn.lili.modules.message.service.StoreMessageService;
import cn.lili.modules.order.aftersale.service.AfterSaleService;
import cn.lili.modules.order.order.service.OrderComplaintService;
import cn.lili.modules.order.order.service.OrderService;
import cn.lili.modules.order.order.service.ReceiptService;
import cn.lili.modules.order.order.service.StoreFlowService;
import cn.lili.modules.promotion.service.*;
import cn.lili.modules.store.entity.dos.Store;
import cn.lili.modules.store.service.BillService;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @author ftyy
* @description: 店铺名称修改同步对应场景
* @date 2023/4/24
*/
@Service
public class StoreChangeEvent implements StoreSettingChangeEvent {
/**
* 优惠券活动表
*/
@Autowired
private CouponActivityService couponActivityService;
/**
* 砍价活动商品
*/
@Autowired
private KanjiaActivityGoodsService kanjiaActivityGoodsService;
/**
* 积分商品
*/
@Autowired
private PointsGoodsService pointsGoodsService;
/**
* 促销商品
*/
@Autowired
private PromotionGoodsService promotionGoodsService;
/**
* 秒杀活动活动
*/
@Autowired
private SeckillService seckillService;
/**
* 优惠券
*/
@Autowired
private CouponService couponService;
/**
* 满优惠活动
*/
@Autowired
private FullDiscountService fullDiscountService;
/**
* 拼团
*/
@Autowired
private PintuanService pintuanService;
/**
* 秒杀活动
*/
@Autowired
private SeckillApplyService seckillApplyService;
/**
* 订单
*/
@Autowired
private OrderService orderService;
/**
* 店铺流水
*/
@Autowired
private StoreFlowService storeFlowService;
/**
* 售后
*/
@Autowired
private AfterSaleService afterSaleService;
/**
* 订单投诉
*/
@Autowired
private OrderComplaintService orderComplaintService;
/**
* 发票
*/
@Autowired
private ReceiptService receiptService;
/**
* 会员优惠券
*/
@Autowired
private MemberCouponService memberCouponService;
/**
* 店铺消息
*/
@Autowired
private StoreMessageService storeMessageService;
/**
* 会员评价
*/
@Autowired
private MemberEvaluationService memberEvaluationService;
/**
* 结算单
*/
@Autowired
private BillService billService;
/**
* 分销商品
*/
@Autowired
private DistributionGoodsService distributionGoodsService;
/**
* 分销订单
*/
@Autowired
private DistributionOrderService distributionOrderService;
/**
* 草稿商品
*/
@Autowired
private DraftGoodsService draftGoodsService;
/**
* 店铺名称修改 同步更新相关店铺名称
*
* @param store 店铺信息
*/
@Override
public void storeSettingChange(Store store) {
UpdateWrapper updateWrapper = new UpdateWrapper<>()
.eq("store_id", store.getId())
.set("store_name", store.getStoreName());
//修改会员优惠券中店铺名称
memberCouponService.update(updateWrapper);
//修改优惠券活动中店铺名称
couponActivityService.update(updateWrapper);
//修改砍价活动商品中店铺名称
kanjiaActivityGoodsService.update(updateWrapper);
//修改积分商品中店铺名称
pointsGoodsService.update(updateWrapper);
//修改促销商品中店铺名称
promotionGoodsService.update(updateWrapper);
//修改秒杀活动活动中店铺名称
seckillService.update(updateWrapper);
//修改优惠券中店铺名称
couponService.update(updateWrapper);
//修改满优惠活动中店铺名称
fullDiscountService.update(updateWrapper);
//修改拼团中店铺名称
pintuanService.update(updateWrapper);
//修改秒杀活动中店铺名称
seckillApplyService.update(updateWrapper);
//修改发票中店铺名称
receiptService.update(updateWrapper);
//修改订单中的店铺名称
orderService.update(updateWrapper);
//修改店铺流水中店铺名称
storeFlowService.update(updateWrapper);
//修改售后中店铺名称
afterSaleService.update(updateWrapper);
//修改订单投诉中店铺名称
orderComplaintService.update(updateWrapper);
//修改店铺消息中的店铺名称
storeMessageService.update(updateWrapper);
//修改会员评价中店铺名称
memberEvaluationService.update(updateWrapper);
//修改结算单中店铺名称
billService.update(updateWrapper);
//修改分销订单中店铺名称
distributionOrderService.update(updateWrapper);
//修改分销商品中店铺名称
distributionGoodsService.update(updateWrapper);
//修改草稿商品中店铺名称
draftGoodsService.update(updateWrapper);
}
}

View File

@@ -31,7 +31,7 @@ public class VerificationOrderExecute implements OrderStatusChangeEvent {
@Override
public void orderChange(OrderMessage orderMessage) {
//订单状态为待核验,添加订单添加核验码
if (orderMessage.getNewStatus().equals(OrderStatusEnum.TAKE)) {
if (orderMessage.getNewStatus().equals(OrderStatusEnum.TAKE) || orderMessage.getNewStatus().equals(OrderStatusEnum.STAY_PICKED_UP)) {
//获取订单信息
Order order = orderService.getBySn(orderMessage.getOrderSn());
//获取随机数,判定是否存在
@@ -43,7 +43,7 @@ public class VerificationOrderExecute implements OrderStatusChangeEvent {
//修改虚拟订单货物可以进行售后、投诉
orderItemService.update(new LambdaUpdateWrapper<OrderItem>().eq(OrderItem::getOrderSn, orderMessage.getOrderSn())
.set(OrderItem::getAfterSaleStatus, OrderItemAfterSaleStatusEnum.NOT_APPLIED)
.set(OrderItem::getCommentStatus, OrderComplaintStatusEnum.NO_APPLY));
.set(OrderItem::getComplainStatus, OrderComplaintStatusEnum.COMPLETE));
}
}

View File

@@ -0,0 +1,48 @@
package cn.lili.event.impl;
import cn.lili.event.OrderStatusChangeEvent;
import cn.lili.modules.order.order.entity.dto.OrderMessage;
import cn.lili.modules.wechat.service.WechatMPService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service ;
/**
* 微信小程序执行器
*
* @author Chopper
* @version v1.0 2021-04-19 14:25
*/
@Slf4j
@Service
public class WechatMPExecute implements OrderStatusChangeEvent {
@Autowired
private WechatMPService wechatMPService;
/**
* 订单已发货、待提货、待核验状态 如果是微信小程序的订单则进行 订单发货信息录入
*
* @param orderMessage 订单消息
*/
@Override
public void orderChange(OrderMessage orderMessage) {
switch (orderMessage.getNewStatus()) {
case TAKE:
case STAY_PICKED_UP:
case DELIVERED:
try {
wechatMPService.uploadShippingInfo(orderMessage.getOrderSn());
} catch (Exception e) {
log.error("发货信息录入失败", e);
}
break;
default:
break;
}
}
}

View File

@@ -39,9 +39,9 @@ public class WechatMessageExecute implements OrderStatusChangeEvent, TradeEvent
public void orderChange(OrderMessage orderMessage) {
switch (orderMessage.getNewStatus()) {
case PAID:
case UNDELIVERED:
case DELIVERED:
case STAY_PICKED_UP:
case COMPLETED:
try {
wechatMessageUtil.sendWechatMessage(orderMessage.getOrderSn());

View File

@@ -8,6 +8,7 @@ import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import cn.lili.common.aop.annotation.RetryOperation;
import cn.lili.common.exception.RetryException;
import cn.lili.common.vo.PageVO;
import cn.lili.event.GoodsCommentCompleteEvent;
import cn.lili.modules.distribution.entity.dos.DistributionGoods;
import cn.lili.modules.distribution.entity.dto.DistributionGoodsSearchParams;
@@ -33,6 +34,8 @@ import cn.lili.modules.promotion.service.PromotionService;
import cn.lili.modules.search.entity.dos.EsGoodsIndex;
import cn.lili.modules.search.service.EsGoodsIndexService;
import cn.lili.rocketmq.tags.GoodsTagsEnum;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.common.message.MessageExt;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
@@ -54,6 +57,8 @@ import java.util.stream.Collectors;
@RocketMQMessageListener(topic = "${lili.data.rocketmq.goods-topic}", consumerGroup = "${lili.data.rocketmq.goods-group}")
public class GoodsMessageListener implements RocketMQListener<MessageExt> {
private static final int BATCH_SIZE = 10;
/**
* ES商品
*/
@@ -175,10 +180,8 @@ public class GoodsMessageListener implements RocketMQListener<MessageExt> {
try {
String updateIndexFieldsJsonStr = new String(messageExt.getBody());
JSONObject updateIndexFields = JSONUtil.parseObj(updateIndexFieldsJsonStr);
@SuppressWarnings("unchecked")
Map<String, Object> queryFields = updateIndexFields.get("queryFields", Map.class);
@SuppressWarnings("unchecked")
Map<String, Object> updateFields = updateIndexFields.get("updateFields", Map.class);
@SuppressWarnings("unchecked") Map<String, Object> queryFields = updateIndexFields.get("queryFields", Map.class);
@SuppressWarnings("unchecked") Map<String, Object> updateFields = updateIndexFields.get("updateFields", Map.class);
goodsIndexService.updateIndex(queryFields, updateFields);
} catch (Exception e) {
log.error("更新商品索引事件执行异常,商品信息: " + new String(messageExt.getBody()), e);
@@ -231,6 +234,12 @@ public class GoodsMessageListener implements RocketMQListener<MessageExt> {
log.error("删除店铺商品索引事件执行异常,商品信息: " + new String(messageExt.getBody()), e);
}
break;
//同步商品分类名称
case CATEGORY_GOODS_NAME:
//分类ID
String id = new String(messageExt.getBody());
goodsService.categoryGoodsName(id);
break;
//商品评价
case GOODS_COMMENT_COMPLETE:
MemberEvaluation memberEvaluation = JSONUtil.toBean(new String(messageExt.getBody()), MemberEvaluation.class);
@@ -238,10 +247,7 @@ public class GoodsMessageListener implements RocketMQListener<MessageExt> {
try {
goodsCommentCompleteEvent.goodsComment(memberEvaluation);
} catch (Exception e) {
log.error("评价{},在{}业务中,状态修改事件执行异常",
new String(messageExt.getBody()),
goodsCommentCompleteEvent.getClass().getName(),
e);
log.error("评价{},在{}业务中,状态修改事件执行异常", new String(messageExt.getBody()), goodsCommentCompleteEvent.getClass().getName(), e);
}
}
break;
@@ -260,26 +266,45 @@ public class GoodsMessageListener implements RocketMQListener<MessageExt> {
log.info("更新商品索引促销信息: {}", promotionsJsonStr);
JSONObject jsonObject = JSONUtil.parseObj(promotionsJsonStr);
// 转换为详细的促销信息(注:促销信息必须继承自 BasePromotions且必须保证派生类存在与sdk包下
BasePromotions promotions = (BasePromotions) jsonObject.get("promotions",
ClassLoaderUtil.loadClass(jsonObject.get("promotionsType").toString()));
BasePromotions promotions = (BasePromotions) jsonObject.get("promotions", ClassLoaderUtil.loadClass(jsonObject.get("promotionsType").toString()));
// 获取促销唯一key,由 促销类型 + 促销id 组成
String esPromotionKey = jsonObject.get("esPromotionKey").toString();
if (PromotionsScopeTypeEnum.PORTION_GOODS.name().equals(promotions.getScopeType())) {
PromotionGoodsSearchParams searchParams = new PromotionGoodsSearchParams();
searchParams.setPromotionId(promotions.getId());
List<PromotionGoods> promotionGoodsList = this.promotionGoodsService.listFindAll(searchParams);
List<String> skuIds = promotionGoodsList.stream().map(PromotionGoods::getSkuId).collect(Collectors.toList());
// 更新商品索引促销信息(删除原索引中相关的促销信息,更新索引中促销信息)
this.goodsIndexService.deleteEsGoodsPromotionByPromotionKey(skuIds, esPromotionKey);
this.goodsIndexService.updateEsGoodsIndexByList(promotionGoodsList, promotions, esPromotionKey);
for (int i = 0; ; i++) {
PromotionGoodsSearchParams searchParams = new PromotionGoodsSearchParams();
searchParams.setPromotionId(promotions.getId());
PageVO pageVO = new PageVO();
pageVO.setPageNumber(i);
pageVO.setPageSize(BATCH_SIZE);
Page<PromotionGoods> promotionGoodsPage = this.promotionGoodsService.pageFindAll(searchParams, pageVO);
if (promotionGoodsPage == null || promotionGoodsPage.getRecords().isEmpty()) {
break;
}
List<String> skuIds = promotionGoodsPage.getRecords().stream().map(PromotionGoods::getSkuId).collect(Collectors.toList());
// 更新商品索引促销信息(删除原索引中相关的促销信息,更新索引中促销信息)
this.goodsIndexService.deleteEsGoodsPromotionByPromotionKey(skuIds, esPromotionKey);
this.goodsIndexService.updateEsGoodsIndexByList(promotionGoodsPage.getRecords(), promotions, esPromotionKey);
}
} else if (PromotionsScopeTypeEnum.PORTION_GOODS_CATEGORY.name().equals(promotions.getScopeType())) {
GoodsSearchParams searchParams = new GoodsSearchParams();
searchParams.setCategoryPath(promotions.getScopeId());
List<GoodsSku> goodsSkuByList = this.goodsSkuService.getGoodsSkuByList(searchParams);
List<String> skuIds = goodsSkuByList.stream().map(GoodsSku::getId).collect(Collectors.toList());
// 更新商品索引促销信息(删除原索引中相关的促销信息,更新索引中促销信息)
this.goodsIndexService.deleteEsGoodsPromotionByPromotionKey(skuIds, esPromotionKey);
this.goodsIndexService.updateEsGoodsIndexPromotions(skuIds, promotions, esPromotionKey);
for (int i = 0; ; i++) {
GoodsSearchParams searchParams = new GoodsSearchParams();
searchParams.setCategoryPath(promotions.getScopeId());
searchParams.setPageNumber(i);
searchParams.setPageSize(BATCH_SIZE);
if (CharSequenceUtil.isNotEmpty(promotions.getStoreId()) && !"0".equals(promotions.getStoreId())){
searchParams.setStoreId(promotions.getStoreId());
}
IPage<GoodsSku> goodsSkuByPage = this.goodsSkuService.getGoodsSkuByPage(searchParams);
if (goodsSkuByPage == null || goodsSkuByPage.getRecords().isEmpty()) {
break;
}
List<String> skuIds = goodsSkuByPage.getRecords().stream().map(GoodsSku::getId).collect(Collectors.toList());
// 更新商品索引促销信息(删除原索引中相关的促销信息,更新索引中促销信息)
this.goodsIndexService.deleteEsGoodsPromotionByPromotionKey(skuIds, esPromotionKey);
this.goodsIndexService.updateEsGoodsIndexPromotions(skuIds, promotions, esPromotionKey);
}
} else if (PromotionsScopeTypeEnum.ALL.name().equals(promotions.getScopeType())) {
this.goodsIndexService.updateEsGoodsIndexAllByList(promotions, esPromotionKey);
}
@@ -321,26 +346,32 @@ public class GoodsMessageListener implements RocketMQListener<MessageExt> {
* @param goods 商品消息
*/
private void updateGoodsIndex(Goods goods) {
//如果商品通过审核&&并且已上架
GoodsSearchParams searchParams = new GoodsSearchParams();
searchParams.setGoodsId(goods.getId());
List<GoodsSku> goodsSkuList = this.goodsSkuService.getGoodsSkuByList(searchParams);
log.info("goods{}", goods);
log.info("goodsSkuList{}", goodsSkuList);
if (goods.getAuthFlag().equals(GoodsAuthEnum.PASS.name())
&& goods.getMarketEnable().equals(GoodsStatusEnum.UPPER.name())
&& Boolean.FALSE.equals(goods.getDeleteFlag())) {
this.generatorGoodsIndex(goods, goodsSkuList);
}
//如果商品状态值不支持es搜索那么将商品信息做下架处理
else {
for (GoodsSku goodsSku : goodsSkuList) {
EsGoodsIndex esGoodsOld = goodsIndexService.findById(goodsSku.getId());
if (esGoodsOld != null) {
goodsIndexService.deleteIndexById(goodsSku.getId());
for (int i = 1; ; i++) {
//如果商品通过审核&&并且已上架
GoodsSearchParams searchParams = new GoodsSearchParams();
searchParams.setGoodsId(goods.getId());
searchParams.setPageNumber(i);
searchParams.setPageSize(BATCH_SIZE);
searchParams.setGeQuantity(0);
IPage<GoodsSku> goodsSkuByPage = this.goodsSkuService.getGoodsSkuByPage(searchParams);
if (goodsSkuByPage == null || goodsSkuByPage.getRecords().isEmpty()) {
break;
}
log.info("goods{}", goods);
log.info("goodsSkuList{}", goodsSkuByPage.getRecords());
if (goods.getAuthFlag().equals(GoodsAuthEnum.PASS.name()) && goods.getMarketEnable().equals(GoodsStatusEnum.UPPER.name()) && Boolean.FALSE.equals(goods.getDeleteFlag())) {
this.generatorGoodsIndex(goods, goodsSkuByPage.getRecords());
} else {
//如果商品状态值不支持es搜索那么将商品信息做下架处理
for (GoodsSku goodsSku : goodsSkuByPage.getRecords()) {
EsGoodsIndex esGoodsOld = goodsIndexService.findById(goodsSku.getId());
if (esGoodsOld != null) {
goodsIndexService.deleteIndexById(goodsSku.getId());
}
}
}
}
}
/**
@@ -354,13 +385,14 @@ public class GoodsMessageListener implements RocketMQListener<MessageExt> {
List<EsGoodsIndex> esGoodsIndices = new ArrayList<>();
for (GoodsSku goodsSku : goodsSkuList) {
EsGoodsIndex goodsIndex = this.settingUpGoodsIndexData(goods, goodsSku);
goodsIndex.setSkuSource(skuSource--);
log.info("goodsSku{}", goodsSku);
//如果商品库存不为0并且es中有数据
if (goodsSku.getQuantity() > 0) {
log.info("生成商品索引 {}", goodsIndex);
esGoodsIndices.add(goodsIndex);
skuSource--;
if (skuSource <= 0) {
skuSource = 1;
}
goodsIndex.setSkuSource(skuSource);
log.info("goodsSku{}", goodsSku);
log.info("生成商品索引 {}", goodsIndex);
esGoodsIndices.add(goodsIndex);
}
this.goodsIndexService.deleteIndex(MapUtil.builder(new HashMap<String, Object>()).put("goodsId", goods.getId()).build());
this.goodsIndexService.addIndex(esGoodsIndices);
@@ -463,11 +495,9 @@ public class GoodsMessageListener implements RocketMQListener<MessageExt> {
}
int buyCount = goodsSku.getBuyCount() + goodsCompleteMessage.getBuyNum();
goodsSku.setBuyCount(buyCount);
goodsSkuService.update(goodsSku);
goodsSkuService.updateGoodsSkuBuyCount(goodsSku.getId(), buyCount);
this.goodsIndexService.updateIndex(
MapUtil.builder(new HashMap<String, Object>()).put("id", goodsCompleteMessage.getSkuId()).build(),
MapUtil.builder(new HashMap<String, Object>()).put("buyCount", buyCount).build());
this.goodsIndexService.updateIndex(MapUtil.builder(new HashMap<String, Object>()).put("id", goodsCompleteMessage.getSkuId()).build(), MapUtil.builder(new HashMap<String, Object>()).put("buyCount", buyCount).build());
} else {
log.error("商品SkuId为[" + goodsCompleteMessage.getGoodsId() + "的商品不存在,更新商品失败!");

View File

@@ -1,10 +1,9 @@
package cn.lili.listener;
import cn.hutool.json.JSONUtil;
import cn.lili.event.MemberLoginEvent;
import cn.lili.event.MemberPointChangeEvent;
import cn.lili.event.MemberRegisterEvent;
import cn.lili.event.MemberWithdrawalEvent;
import cn.lili.event.*;
import cn.lili.event.impl.ImTalkExecute;
import cn.lili.modules.connect.entity.dto.MemberConnectLoginMessage;
import cn.lili.modules.member.entity.dos.Member;
import cn.lili.modules.member.entity.dos.MemberSign;
import cn.lili.modules.member.entity.dto.MemberPointMessage;
@@ -57,7 +56,10 @@ public class MemberMessageListener implements RocketMQListener<MessageExt> {
*/
@Autowired
private List<MemberLoginEvent> memberLoginEvents;
@Autowired
private List<MemberInfoChangeEvent> memberInfoChangeEvents;
@Autowired
private List<MemberConnectLoginEvent> memberConnectLoginEvents;
@Override
public void onMessage(MessageExt messageExt) {
@@ -76,7 +78,7 @@ public class MemberMessageListener implements RocketMQListener<MessageExt> {
}
}
break;
//用户登录
case MEMBER_LOGIN:
for (MemberLoginEvent memberLoginEvent : memberLoginEvents) {
@@ -110,6 +112,20 @@ public class MemberMessageListener implements RocketMQListener<MessageExt> {
}
}
break;
//会员信息更改
case MEMBER_INFO_EDIT:
for (MemberInfoChangeEvent memberInfoChangeEvent : memberInfoChangeEvents) {
try {
Member member = JSONUtil.toBean(new String(messageExt.getBody()), Member.class);
memberInfoChangeEvent.memberInfoChange(member);
} catch (Exception e) {
log.error("会员{},在{}业务中,提现事件执行异常",
new String(messageExt.getBody()),
memberInfoChangeEvent.getClass().getName(),
e);
}
}
break;
//会员提现
case MEMBER_WITHDRAWAL:
for (MemberWithdrawalEvent memberWithdrawalEvent : memberWithdrawalEvents) {
@@ -124,6 +140,20 @@ public class MemberMessageListener implements RocketMQListener<MessageExt> {
}
}
break;
//用户第三方登录
case MEMBER_CONNECT_LOGIN:
for (MemberConnectLoginEvent memberConnectLoginEvent : memberConnectLoginEvents) {
try {
MemberConnectLoginMessage memberConnectLoginMessage = JSONUtil.toBean(new String(messageExt.getBody()), MemberConnectLoginMessage.class);
memberConnectLoginEvent.memberConnectLogin(memberConnectLoginMessage.getMember(), memberConnectLoginMessage.getConnectAuthUser());
} catch (Exception e) {
log.error("会员{},在{}业务中,状态修改事件执行异常",
new String(messageExt.getBody()),
memberConnectLoginEvent.getClass().getName(),
e);
}
}
break;
default:
break;
}

View File

@@ -0,0 +1,51 @@
package cn.lili.listener;
import cn.hutool.json.JSONUtil;
import cn.lili.event.MemberRegisterEvent;
import cn.lili.event.StoreSettingChangeEvent;
import cn.lili.modules.member.entity.dos.Member;
import cn.lili.modules.store.entity.dos.Store;
import cn.lili.rocketmq.tags.StoreTagsEnum;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.common.message.MessageExt;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* 店铺消息
* @author chc
* @since 2022/6/2114:46
*/
@Component
@Slf4j
@RocketMQMessageListener(topic = "${lili.data.rocketmq.store-topic}", consumerGroup = "${lili.data.rocketmq.store-group}")
public class StoreMessageListener implements RocketMQListener<MessageExt> {
@Autowired
private List<StoreSettingChangeEvent> storeSettingChangeEventList;
@Override
public void onMessage(MessageExt messageExt) {
switch (StoreTagsEnum.valueOf(messageExt.getTags())){
//修改店铺
case EDIT_STORE_SETTING:
for (StoreSettingChangeEvent storeSettingChangeEvent : storeSettingChangeEventList) {
try {
Store store = JSONUtil.toBean(new String(messageExt.getBody()), Store.class);
storeSettingChangeEvent.storeSettingChange(store);
} catch (Exception e) {
log.error("会员{},在{}业务中,状态修改事件执行异常",
new String(messageExt.getBody()),
storeSettingChangeEvent.getClass().getName(),
e);
}
}
break;
default:
break;
}
}
}

View File

@@ -1,60 +0,0 @@
package cn.lili.timetask.handler.impl.bill;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.lili.modules.store.entity.dto.StoreSettlementDay;
import cn.lili.modules.store.service.BillService;
import cn.lili.modules.store.service.StoreDetailService;
import cn.lili.timetask.handler.EveryDayExecute;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* 店铺结算执行
*
* @author Bulbasaur
* @since 2021/2/18 3:45 下午
*/
@Component
public class BillExecute implements EveryDayExecute {
/**
* 结算单
*/
@Autowired
private BillService billService;
/**
* 店铺详情
*/
@Autowired
private StoreDetailService storeDetailService;
/**
* 1.查询今日待结算的商家
* 2.查询商家上次结算日期,生成本次结算单
* 3.记录商家结算日
*/
@Override
public void execute() {
//获取当前天数
int day = DateUtil.date().dayOfMonth();
//获取待结算商家列表
List<StoreSettlementDay> storeList = storeDetailService.getSettlementStore(day);
//获取当前时间
DateTime endTime = DateUtil.date();
//批量商家结算
for (StoreSettlementDay storeSettlementDay : storeList) {
//生成结算单
billService.createBill(storeSettlementDay.getStoreId(), storeSettlementDay.getSettlementDay(), endTime);
//修改店铺结算时间
storeDetailService.updateSettlementDay(storeSettlementDay.getStoreId(), endTime);
}
}
}

View File

@@ -3,14 +3,12 @@ package cn.lili.timetask.handler.impl.goods;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.lili.modules.goods.mapper.GoodsMapper;
import cn.lili.modules.member.entity.dos.MemberEvaluation;
import cn.lili.modules.member.mapper.MemberEvaluationMapper;
import cn.lili.modules.goods.service.GoodsService;
import cn.lili.modules.member.service.MemberEvaluationService;
import cn.lili.timetask.handler.EveryDayExecute;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
@@ -25,13 +23,13 @@ public class GoodsExecute implements EveryDayExecute {
/**
* 会员评价
*/
@Resource
private MemberEvaluationMapper memberEvaluationMapper;
@Autowired
private MemberEvaluationService memberEvaluationService;
/**
* 商品
*/
@Resource
private GoodsMapper goodsMapper;
@Autowired
private GoodsService goodsService;
/**
* 查询已上架的商品的评价数量并赋值
@@ -40,12 +38,10 @@ public class GoodsExecute implements EveryDayExecute {
public void execute() {
//查询上次统计到本次的评价数量
List<Map<String, Object>> list = memberEvaluationMapper.memberEvaluationNum(
new QueryWrapper<MemberEvaluation>()
.between("create_time", DateUtil.yesterday(), new DateTime()));
List<Map<String, Object>> list = memberEvaluationService.memberEvaluationNum(DateUtil.yesterday(), new DateTime());
for (Map<String, Object> map : list) {
goodsMapper.addGoodsCommentNum(Convert.toInt(map.get("num").toString()), map.get("goods_id").toString());
goodsService.addGoodsCommentNum(Convert.toInt(map.get("num").toString()), map.get("goods_id").toString());
}
}

View File

@@ -54,7 +54,7 @@ public class CancelOrderTaskExecute implements EveryMinuteExecute {
List<Order> list = orderService.list(queryWrapper);
List<String> cancelSnList = list.stream().map(Order::getSn).collect(Collectors.toList());
for (String sn : cancelSnList) {
orderService.systemCancel(sn, "超时未支付自动取消");
orderService.systemCancel(sn, "超时未支付自动取消",false);
}
}
}

View File

@@ -5,34 +5,37 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.json.JSONUtil;
import cn.lili.common.enums.ResultCode;
import cn.lili.common.exception.ServiceException;
import cn.lili.modules.distribution.service.DistributionOrderService;
import cn.lili.modules.member.entity.dto.MemberEvaluationDTO;
import cn.lili.modules.member.entity.enums.EvaluationGradeEnum;
import cn.lili.modules.member.service.MemberEvaluationService;
import cn.lili.modules.order.aftersale.service.AfterSaleService;
import cn.lili.modules.order.order.entity.dos.Order;
import cn.lili.modules.order.order.entity.dos.OrderItem;
import cn.lili.modules.order.order.entity.dto.OrderItemOperationDTO;
import cn.lili.modules.order.order.entity.enums.CommentStatusEnum;
import cn.lili.modules.order.order.entity.enums.OrderComplaintStatusEnum;
import cn.lili.modules.order.order.entity.enums.OrderItemAfterSaleStatusEnum;
import cn.lili.modules.order.order.entity.enums.OrderStatusEnum;
import cn.lili.modules.order.order.mapper.OrderItemMapper;
import cn.lili.modules.order.order.service.OrderItemService;
import cn.lili.modules.order.order.service.OrderService;
import cn.lili.modules.order.order.service.StoreFlowService;
import cn.lili.modules.store.entity.dto.StoreSettlementDay;
import cn.lili.modules.store.service.BillService;
import cn.lili.modules.store.service.StoreDetailService;
import cn.lili.modules.system.entity.dos.Setting;
import cn.lili.modules.system.entity.dto.OrderSetting;
import cn.lili.modules.system.entity.enums.SettingEnum;
import cn.lili.modules.system.service.SettingService;
import cn.lili.timetask.handler.EveryDayExecute;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.List;
import java.util.stream.Collectors;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.handler.annotation.SendTo;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
/**
* @author paulG
@@ -53,8 +56,6 @@ public class OrderEveryDayTaskExecute implements EveryDayExecute {
*/
@Autowired
private OrderItemService orderItemService;
@Resource
private OrderItemMapper orderItemMapper;
/**
* 设置
*/
@@ -67,7 +68,21 @@ public class OrderEveryDayTaskExecute implements EveryDayExecute {
private MemberEvaluationService memberEvaluationService;
@Autowired
private AfterSaleService afterSaleService;
private DistributionOrderService distributionOrderService;
@Autowired
private StoreFlowService storeFlowService;
/**
* 结算单
*/
@Autowired
private BillService billService;
/**
* 店铺详情
*/
@Autowired
private StoreDetailService storeDetailService;
/**
* 执行每日任务
@@ -82,14 +97,46 @@ public class OrderEveryDayTaskExecute implements EveryDayExecute {
throw new ServiceException(ResultCode.ORDER_SETTING_ERROR);
}
//自动确认收货
completedOrder(orderSetting);
//自动好评
memberEvaluation(orderSetting);
//关闭允许售后申请
closeAfterSale(orderSetting);
//关闭允许投诉
closeComplaint(orderSetting);
try {
//自动确认收货
completedOrder(orderSetting);
} catch (Exception e) {
log.error(e.getMessage(), e);
}
try {
//自动好评
memberEvaluation(orderSetting);
} catch (Exception e) {
log.error(e.getMessage(), e);
}
try {
//关闭允许售后申请
this.closeAfterSale(orderSetting);
} catch (Exception e) {
log.error(e.getMessage(), e);
}
try {
//关闭允许投诉
closeComplaint(orderSetting);
} catch (Exception e) {
log.error(e.getMessage(), e);
}
//修改分账状态
try {
storeFlowService.updateProfitSharingStatus();
} catch (Exception e) {
log.error("修改分账状态失败", e);
}
//生成店铺结算单
try {
createBill();
} catch (Exception e) {
log.error("生成店铺结算单", e);
}
}
/**
@@ -99,7 +146,6 @@ public class OrderEveryDayTaskExecute implements EveryDayExecute {
*/
private void completedOrder(OrderSetting orderSetting) {
//订单自动收货时间 = 当前时间 - 自动收货时间天数
DateTime receiveTime = DateUtil.offsetDay(DateUtil.date(), -orderSetting.getAutoReceive());
LambdaQueryWrapper<Order> queryWrapper = new LambdaQueryWrapper<>();
@@ -109,12 +155,16 @@ public class OrderEveryDayTaskExecute implements EveryDayExecute {
queryWrapper.le(Order::getLogisticsTime, receiveTime);
List<Order> list = orderService.list(queryWrapper);
//判断是否有符合条件的订单,进行订单完成处理
if (!list.isEmpty()) {
List<String> receiveSnList = list.stream().map(Order::getSn).collect(Collectors.toList());
for (String orderSn : receiveSnList) {
orderService.systemComplete(orderSn);
try {
//判断是否有符合条件的订单,进行订单完成处理
if (!list.isEmpty()) {
List<String> receiveSnList = list.stream().map(Order::getSn).collect(Collectors.toList());
for (String orderSn : receiveSnList) {
orderService.systemComplete(orderSn);
}
}
} catch (Exception e) {
log.error(e.getMessage(), e);
}
}
@@ -128,10 +178,10 @@ public class OrderEveryDayTaskExecute implements EveryDayExecute {
DateTime receiveTime = DateUtil.offsetDay(DateUtil.date(), -orderSetting.getAutoEvaluation());
//订单完成时间 <= 订单自动好评时间
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.le("o.complete_time", receiveTime);
queryWrapper.eq("oi.comment_status", CommentStatusEnum.UNFINISHED.name());
List<OrderItem> orderItems = orderItemMapper.waitOperationOrderItem(queryWrapper);
OrderItemOperationDTO orderItemOperationDTO =
OrderItemOperationDTO.builder().receiveTime(receiveTime).commentStatus(CommentStatusEnum.UNFINISHED.name())
.build();
List<OrderItem> orderItems = orderItemService.waitOperationOrderItem(orderItemOperationDTO);
//判断是否有符合条件的订单,进行自动评价处理
if (!orderItems.isEmpty()) {
@@ -146,40 +196,31 @@ public class OrderEveryDayTaskExecute implements EveryDayExecute {
memberEvaluationDTO.setDescriptionScore(5);
memberEvaluationDTO.setServiceScore(5);
memberEvaluationService.addMemberEvaluation(memberEvaluationDTO, false);
try {
memberEvaluationService.addMemberEvaluation(memberEvaluationDTO, false);
} catch (Exception e) {
log.error(e.getMessage(), e);
}
}
}
}
/**
* 关闭允许售后申请
*
* @param orderSetting 订单设置
*/
private void closeAfterSale(OrderSetting orderSetting) {
@Transactional(rollbackFor = Exception.class)
public void closeAfterSale(OrderSetting orderSetting) {
//订单关闭售后申请时间 = 当前时间 - 自动关闭售后申请天数
DateTime receiveTime = DateUtil.offsetDay(DateUtil.date(), -orderSetting.getCloseAfterSale());
// OrderItemOperationDTO build = OrderItemOperationDTO.builder().receiveTime(receiveTime)
// .afterSaleStatus(OrderItemAfterSaleStatusEnum.NOT_APPLIED.name()).build();
// List<OrderItem> orderItems = orderItemService.waitOperationOrderItem(build);
//关闭售后订单=未售后订单+小于订单关闭售后申请时间
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.le("o.complete_time", receiveTime);
queryWrapper.eq("oi.after_sale_status", OrderItemAfterSaleStatusEnum.NOT_APPLIED.name());
List<OrderItem> orderItems = orderItemMapper.waitOperationOrderItem(queryWrapper);
//判断是否有符合条件的订单,关闭允许售后申请处理
if (!orderItems.isEmpty()) {
//获取订单货物ID
List<String> orderItemIdList = orderItems.stream().map(OrderItem::getId).collect(Collectors.toList());
//修改订单售后状态
LambdaUpdateWrapper<OrderItem> lambdaUpdateWrapper = new LambdaUpdateWrapper<OrderItem>()
.set(OrderItem::getAfterSaleStatus, OrderItemAfterSaleStatusEnum.EXPIRED.name())
.in(OrderItem::getId, orderItemIdList);
orderItemService.update(lambdaUpdateWrapper);
}
orderItemService.expiredAfterSaleStatus(receiveTime);
}
@@ -190,14 +231,17 @@ public class OrderEveryDayTaskExecute implements EveryDayExecute {
*/
private void closeComplaint(OrderSetting orderSetting) {
//为0则不限制
if (orderSetting.getCloseComplaint() == null || orderSetting.getCloseComplaint() == 0) {
return;
}
//订单关闭交易投诉申请时间 = 当前时间 - 自动关闭交易投诉申请天数
DateTime receiveTime = DateUtil.offsetDay(DateUtil.date(), -orderSetting.getCloseComplaint());
//关闭售后订单=未售后订单+小于订单关闭售后申请时间
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.le("o.complete_time", receiveTime);
queryWrapper.eq("oi.complain_status", OrderComplaintStatusEnum.NO_APPLY.name());
List<OrderItem> orderItems = orderItemMapper.waitOperationOrderItem(queryWrapper);
OrderItemOperationDTO build = OrderItemOperationDTO.builder().receiveTime(receiveTime)
.complainStatus(OrderComplaintStatusEnum.NO_APPLY.name()).build();
List<OrderItem> orderItems = orderItemService.waitOperationOrderItem(build);
//判断是否有符合条件的订单,关闭允许售后申请处理
if (!orderItems.isEmpty()) {
@@ -206,12 +250,37 @@ public class OrderEveryDayTaskExecute implements EveryDayExecute {
List<String> orderItemIdList = orderItems.stream().map(OrderItem::getId).collect(Collectors.toList());
//修改订单投诉状态
LambdaUpdateWrapper<OrderItem> lambdaUpdateWrapper = new LambdaUpdateWrapper<OrderItem>()
.set(OrderItem::getComplainStatus, OrderItemAfterSaleStatusEnum.EXPIRED.name())
.in(OrderItem::getId, orderItemIdList);
LambdaUpdateWrapper<OrderItem> lambdaUpdateWrapper =
new LambdaUpdateWrapper<OrderItem>().set(OrderItem::getComplainStatus,
OrderItemAfterSaleStatusEnum.EXPIRED.name()).in(OrderItem::getId, orderItemIdList);
orderItemService.update(lambdaUpdateWrapper);
}
}
/**
* 1.查询今日待结算的商家
* 2.查询商家上次结算日期,生成本次结算单
* 3.记录商家结算日
*/
private void createBill() {
//获取当前天数
int day = DateUtil.date().dayOfMonth();
//获取待结算商家列表
List<StoreSettlementDay> storeList = storeDetailService.getSettlementStore(day);
//获取当前时间
DateTime endTime = DateUtil.date();
//批量商家结算
for (StoreSettlementDay storeSettlementDay : storeList) {
//生成结算单
billService.createBill(storeSettlementDay.getStoreId(), storeSettlementDay.getSettlementDay(), endTime);
//修改店铺结算时间
storeDetailService.updateSettlementDay(storeSettlementDay.getStoreId(), endTime);
}
}
}

View File

@@ -0,0 +1,45 @@
package cn.lili.timetask.handler.impl.promotion;
import cn.lili.common.enums.PromotionTypeEnum;
import cn.lili.modules.promotion.entity.dos.Seckill;
import cn.lili.modules.promotion.service.MemberCouponSignService;
import cn.lili.modules.promotion.service.SeckillService;
import cn.lili.modules.promotion.tools.PromotionTools;
import cn.lili.modules.search.service.EsGoodsIndexService;
import cn.lili.modules.system.entity.dos.Setting;
import cn.lili.modules.system.entity.dto.SeckillSetting;
import cn.lili.modules.system.entity.enums.SettingEnum;
import cn.lili.modules.system.service.SettingService;
import cn.lili.timetask.handler.EveryDayExecute;
import com.google.gson.Gson;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 促销活动每日定时器
*
* @author Chopper
* @since 2021/3/18 3:23 下午
*/
@Slf4j
@Component
public class MemberCouponSignEverydayExecute implements EveryDayExecute {
@Autowired
private MemberCouponSignService memberCouponSignService;
/**
* 将已过期的促销活动置为结束
*/
@Override
public void execute() {
try {
memberCouponSignService.clean();
} catch (Exception e) {
log.error("清除领取优惠券标记异常", e);
}
}
}

View File

@@ -72,6 +72,7 @@ public class PromotionEverydayExecute implements EveryDayExecute {
log.info("生成秒杀活动设置:{}", seckillSetting);
for (int i = 1; i <= SeckillService.PRE_CREATION; i++) {
Seckill seckill = new Seckill(i, seckillSetting.getHours(), seckillSetting.getSeckillRule());
seckill.setApplyEndTime(null);
//如果已经存在促销,则不再次保存
if (seckillService.list(

View File

@@ -72,7 +72,8 @@ public class OnlineMemberStatistics implements EveryHourExecute {
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);
onlineMemberVOS.add(new OnlineMemberVO(calendar.getTime(), cache.keys(CachePrefix.ACCESS_TOKEN.getPrefix(UserEnums.MEMBER) + "*").size(), lastNum.get()));
onlineMemberVOS.add(new OnlineMemberVO(calendar.getTime(), cache.keys(CachePrefix.ACCESS_TOKEN.getPrefix(UserEnums.MEMBER) + "*").size(),
lastNum.get()));
//写入缓存
cache.put(CachePrefix.ONLINE_MEMBER.getPrefix(), onlineMemberVOS);

View File

@@ -1,9 +1,8 @@
package cn.lili.timetask.handler.impl.store;
import cn.lili.common.enums.SwitchEnum;
import cn.lili.modules.member.entity.dos.MemberEvaluation;
import cn.lili.modules.member.entity.vo.StoreRatingVO;
import cn.lili.modules.member.mapper.MemberEvaluationMapper;
import cn.lili.modules.member.service.MemberEvaluationService;
import cn.lili.modules.store.entity.dos.Store;
import cn.lili.modules.store.entity.enums.StoreStatusEnum;
import cn.lili.modules.store.service.StoreService;
@@ -14,7 +13,6 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.List;
/**
@@ -33,8 +31,8 @@ public class StoreRatingExecute implements EveryDayExecute {
/**
* 会员评价
*/
@Resource
private MemberEvaluationMapper memberEvaluationMapper;
@Autowired
private MemberEvaluationService memberEvaluationService;
@Override
@@ -43,10 +41,7 @@ public class StoreRatingExecute implements EveryDayExecute {
List<Store> storeList = storeService.list(new LambdaQueryWrapper<Store>().eq(Store::getStoreDisable, StoreStatusEnum.OPEN.name()));
for (Store store : storeList) {
//店铺所有开启的评价
LambdaQueryWrapper<MemberEvaluation> lambdaQueryWrapper = Wrappers.lambdaQuery();
lambdaQueryWrapper.eq(MemberEvaluation::getStoreId, store.getId());
lambdaQueryWrapper.eq(MemberEvaluation::getStatus, SwitchEnum.OPEN.name());
StoreRatingVO storeRatingVO = memberEvaluationMapper.getStoreRatingVO(lambdaQueryWrapper);
StoreRatingVO storeRatingVO = memberEvaluationService.getStoreRatingVO(store.getId(), SwitchEnum.OPEN.name());
if (storeRatingVO != null) {
//保存评分

View File

@@ -0,0 +1,31 @@
package cn.lili.trigger.executor;
import cn.hutool.json.JSONUtil;
import cn.lili.modules.promotion.service.CouponActivityService;
import cn.lili.trigger.TimeTriggerExecutor;
import cn.lili.trigger.message.CouponActivityMessage;
import cn.lili.trigger.model.TimeExecuteConstant;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 优惠券活动精准发圈延时触发
*
* @author Bulbasaur
* @since 2021/6/1 5:02 下午
*/
@Slf4j
@Component(TimeExecuteConstant.COUPON_ACTIVITY_EXECUTOR)
public class CouponActivityTriggerExecutor implements TimeTriggerExecutor {
@Autowired
private CouponActivityService couponActivityService;
@Override
public void execute(Object object) {
CouponActivityMessage couponActivityMessage = JSONUtil.toBean(JSONUtil.parseObj(object), CouponActivityMessage.class);
couponActivityService.specifyCoupon(couponActivityMessage.getCouponActivityId());
}
}

View File

@@ -3,6 +3,7 @@ package cn.lili.trigger.executor;
import cn.hutool.json.JSONUtil;
import cn.lili.modules.order.order.service.OrderService;
import cn.lili.modules.promotion.entity.dos.Pintuan;
import cn.lili.modules.promotion.service.PintuanService;
import cn.lili.trigger.TimeTriggerExecutor;
import cn.lili.trigger.message.PintuanOrderMessage;
import cn.lili.trigger.model.TimeExecuteConstant;
@@ -25,6 +26,8 @@ public class PromotionTimeTriggerExecutor implements TimeTriggerExecutor {
*/
@Autowired
private OrderService orderService;
@Autowired
private PintuanService pintuanService;
@Override
@@ -36,7 +39,7 @@ public class PromotionTimeTriggerExecutor implements TimeTriggerExecutor {
//拼团订单自动处理
orderService.agglomeratePintuanOrder(pintuanOrderMessage.getPintuanId(), pintuanOrderMessage.getOrderSn());
}
Pintuan pintuan = JSONUtil.toBean(JSONUtil.parseObj(object), Pintuan.class);
Pintuan pintuan = pintuanService.getById(pintuanOrderMessage.getPintuanId());
if (pintuan != null && pintuan.getId() != null) {
this.orderService.checkFictitiousOrder(pintuan.getId(), pintuan.getRequiredNum(), pintuan.getFictitious());
}

View File

@@ -260,6 +260,8 @@ lili:
order-group: lili_order_group
member-topic: lili_member_topic
member-group: lili_member_group
store-topic: lili_store_topic
store-group: lili_store_group
other-topic: lili_other_topic
other-group: lili_other_group
notice-topic: lili_notice_topic

View File

@@ -1,64 +0,0 @@
package cn.lili.buyer.test.cart;
import cn.lili.common.utils.DateUtil;
import cn.lili.timetask.handler.impl.statistics.OnlineMemberStatistics;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import java.util.Calendar;
import java.util.Random;
/**
* 订单库存扣减
*/
@ExtendWith(SpringExtension.class)
@SpringBootTest
class OnlineTest {
@Autowired
private OnlineMemberStatistics onlineMemberStatistics;
//订单支付,库存扣减单元测试
@Test
void everyHour() {
onlineMemberStatistics.execute();
}
//订单支付,库存扣减单元测试
@Test
void customSetting() {
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);
calendar.set(Calendar.HOUR_OF_DAY, calendar.get(Calendar.HOUR_OF_DAY) - 48 );
//循环填充数据
for (int i = 0; i < 48; i++) {
calendar.set(Calendar.HOUR_OF_DAY, calendar.get(Calendar.HOUR_OF_DAY) + 1);
System.out.println(DateUtil.toString(calendar.getTime(),""));
Random random = new Random();
onlineMemberStatistics.execute(calendar.getTime(), random.nextInt(1000000));
}
}
public static void main(String[] args) {
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);
calendar.set(Calendar.HOUR_OF_DAY, calendar.get(Calendar.HOUR_OF_DAY) - 48 - 1);
//循环填充数据
for (int i = 0; i < 48; i++) {
calendar.set(Calendar.HOUR_OF_DAY, calendar.get(Calendar.HOUR_OF_DAY) + 1);
System.out.println(calendar.getTime().getTime());
}
}
}

View File

@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<Diagram>
<ID>JAVA</ID>
<OriginalElement>cn.lili.controller.order.OrderComplaintBuyerController</OriginalElement>
<nodes>
<node x="-377.0" y="-206.0">cn.lili.modules.order.order.service.OrderComplaintCommunicationService</node>
<node x="-927.5" y="123.5">cn.lili.controller.order.OrderComplaintStoreController</node>
<node x="-378.0" y="607.0">cn.lili.modules.order.order.service.OrderComplaintService</node>
<node x="311.5" y="111.0">cn.lili.controller.order.OrderComplaintBuyerController</node>
<node x="-308.0" y="123.5">cn.lili.controller.order.OrderComplaintManagerController</node>
</nodes>
<notes />
<edges>
<edge source="cn.lili.controller.order.OrderComplaintStoreController" target="cn.lili.modules.order.order.service.OrderComplaintCommunicationService" relationship="TO_ONE">
<point x="278.0" y="-84.5" />
<point x="-330.0" y="38.5" />
</edge>
<edge source="cn.lili.controller.order.OrderComplaintStoreController" target="cn.lili.modules.order.order.service.OrderComplaintService" relationship="TO_ONE">
<point x="262.0" y="84.5" />
<point x="-300.0" y="-119.0" />
</edge>
<edge source="cn.lili.controller.order.OrderComplaintBuyerController" target="cn.lili.modules.order.order.service.OrderComplaintCommunicationService" relationship="TO_ONE">
<point x="-286.0" y="-73.0" />
<point x="345.0" y="38.5" />
</edge>
<edge source="cn.lili.controller.order.OrderComplaintBuyerController" target="cn.lili.modules.order.order.service.OrderComplaintService" relationship="TO_ONE">
<point x="0.0" y="73.0" />
<point x="606.5" y="726.0" />
<point x="307.5" y="0.0" />
</edge>
<edge source="cn.lili.controller.order.OrderComplaintManagerController" target="cn.lili.modules.order.order.service.OrderComplaintCommunicationService" relationship="TO_ONE">
<point x="-11.5" y="-84.5" />
<point x="0.0" y="38.5" />
</edge>
<edge source="cn.lili.controller.order.OrderComplaintManagerController" target="cn.lili.modules.order.order.service.OrderComplaintService" relationship="TO_ONE">
<point x="-57.5" y="84.5" />
<point x="0.0" y="-119.0" />
</edge>
</edges>
<settings layout="Hierarchic" zoom="1.0" showDependencies="true" x="-13.0" y="319.65625" />
<SelectedNodes />
<Categories>
<Category>Inner Classes</Category>
<Category>Methods</Category>
<Category>Properties</Category>
</Categories>
<SCOPE>All</SCOPE>
<VISIBILITY>private</VISIBILITY>
</Diagram>

View File

@@ -0,0 +1,20 @@
@startuml
'https://plantuml.com/sequence-diagram
actor user
actor seller
actor manager
user --> 平台: 申请售后
seller -> 平台: 审核售后申请
activate 平台
平台 -> 平台: 更新售后状态
return 售后审核响应
user -> 平台: 填写物流信息
seller->平台: 确认收货
activate 平台
平台 -> 平台: 自动退款
return 售后审核响应
平台 -> user: 售后结束
@enduml

View File

@@ -0,0 +1,16 @@
@startuml
'https://plantuml.com/sequence-diagram
actor user
actor seller
actor manager
user --> 平台: 申请售后
seller -> 平台: 审核售后申请
activate 平台
平台 -> 平台: 通过审核,自动退款
manager --> 平台: 审核阶段可介入操作
return 售后审核响应
user -> 平台: 查询售后结果
@enduml

21
docs/uml/Complaint.puml Normal file
View File

@@ -0,0 +1,21 @@
@startuml
'https://plantuml.com/sequence-diagram
actor user
actor seller
actor manager
activate 平台
user -> 平台: 输入原因,发起投诉
user --> 平台: 多次输出对话
seller --> 平台: 多次输出对话
manager --> 平台: 多次输出对话
manager -> 平台: 根据各方意见,仲裁投诉结果
activate 平台
平台->平台: 仲裁结果,更新状态
平台 -> seller: 根据平台仲裁结果进行处理
平台 -> user: 根据平台仲裁结果进行处理
deactivate 平台
@enduml

View File

@@ -51,7 +51,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
@@ -434,8 +433,41 @@
<artifactId>minio</artifactId>
<version>${minio.version}</version>
</dependency>
<dependency>
<groupId>com.huaweicloud</groupId>
<artifactId>esdk-obs-java</artifactId>
<version>${huaweicloud-obs.version}</version>
</dependency>
<dependency>
<groupId>com.qcloud</groupId>
<artifactId>cos_api</artifactId>
<version>${cos.version}</version>
</dependency>
<dependency>
<groupId>com.tencentcloudapi</groupId>
<artifactId>tencentcloud-sdk-java</artifactId>
<version>${tencentcloud.version}</version>
</dependency>
<dependency>
<groupId>com.github.kuaidi100-api</groupId>
<artifactId>sdk</artifactId>
<version>${kuaidi100-api.version}</version>
</dependency>
<dependency>
<groupId>com.qiyuesuo.sdk</groupId>
<artifactId>SDK</artifactId>
<version>2.1.7</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/maven-repository/SF-CSIM-EXPRESS-SDK-V2.1.7.jar</systemPath>
</dependency>
<!-- netty-resolver-dns-native-macos -->
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-resolver-dns-native-macos</artifactId>
<version>4.1.90.Final</version>
<scope>runtime</scope>
<classifier>osx-aarch_64</classifier>
</dependency>
</dependencies>

View File

@@ -208,6 +208,10 @@ public enum CachePrefix {
* 促销活动
*/
PROMOTION,
/**
* 当前优惠券活动
*/
CURRENT_COUPON_ACTIVITY,
/**
* 促销活动
*/
@@ -236,6 +240,10 @@ public enum CachePrefix {
* 积分商品缓存key前缀
*/
STORE_ID_EXCHANGE,
/**
* 会员领取标记
*/
MEMBER_COUPON_SIGN,
//================交易=================
@@ -441,6 +449,10 @@ public enum CachePrefix {
* 分销员
*/
DISTRIBUTION,
/**
* 邀请人
*/
INVITER,
/**
* 找回手机
@@ -503,12 +515,11 @@ public enum CachePrefix {
/**
* 扫码登录
*
* @param str
* @return
*/
QR_CODE_LOGIN_SESSION
;
QR_CODE_LOGIN_SESSION;
public static String removePrefix(String str) {
@@ -544,4 +555,16 @@ public enum CachePrefix {
public String getPrefix(UserEnums user) {
return "{" + this.name() + "_" + user.name() + "}_";
}
/**
* 获取缓存key值 + 用户端 +自定义前缀
* 例如三端都有用户体系需要分别登录如果用户名一致则redis中的权限可能会冲突出错
*
* @param user 角色
* @param customPrefix 自定义前缀
* @return 缓存key值
*/
public String getPrefix(UserEnums user, String customPrefix) {
return "{" + this.name() + "_" + user.name() + "}_" + customPrefix + "_";
}
}

View File

@@ -185,7 +185,7 @@ public class RedisCache implements Cache {
public Long counter(Object key) {
HyperLogLogOperations<Object, Object> operations = redisTemplate.opsForHyperLogLog();
//add 方法对应 PFADD 命令
//add 方法对应 PFCOUNT 命令
return operations.size(key);
}

View File

@@ -61,7 +61,7 @@ public class LimitInterceptor {
assert count != null;
log.info("限制请求{}, 当前请求{},缓存key{}", limitCount, count.intValue(), key);
//如果缓存里没有值,或者他的值小于限制频率
if (count.intValue() >= limitCount) {
if (count.intValue() > limitCount) {
throw new ServiceException(ResultCode.LIMIT_ERROR);
}
}

View File

@@ -18,7 +18,12 @@ public @interface PreventDuplicateSubmissions {
/**
* 过期时间
* 过期时间 默认3秒即3秒内无法重复点击。
*/
long expire() default 3;
/**
* 用户间隔离默认false。
* 如果为true则全局限制为true需要用户登录状态否则则是全局隔离
*/
boolean userIsolation() default false;
}

View File

@@ -1,9 +1,19 @@
package cn.lili.common.aop.interceptor;
/**
* 防重复提交业务
*
* @author Chopper
* @version v1.0
* 2022-01-25 09:20
*/
import cn.hutool.json.JSONUtil;
import cn.lili.cache.Cache;
import cn.lili.common.aop.annotation.PreventDuplicateSubmissions;
import cn.lili.common.enums.ResultCode;
import cn.lili.common.exception.ServiceException;
import cn.lili.common.security.AuthUser;
import cn.lili.common.security.context.UserContext;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.Aspect;
@@ -15,13 +25,6 @@ import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
/**
* 防重复提交业务
*
* @author Chopper
* @version v1.0
* 2022-01-25 09:20
*/
@Aspect
@Component
@Slf4j
@@ -35,9 +38,11 @@ public class PreventDuplicateSubmissionsInterceptor {
public void interceptor(PreventDuplicateSubmissions preventDuplicateSubmissions) {
try {
Long count = cache.incr(getParams(), preventDuplicateSubmissions.expire());
//如果超过2或者设置的参数则表示重复提交了
if (count.intValue() >= 2) {
String redisKey = getParams(preventDuplicateSubmissions.userIsolation());
Long count = cache.incr(redisKey, preventDuplicateSubmissions.expire());
log.debug("防重复提交params-{},value-{}", redisKey, count);
//如果超过0或者设置的参数则表示重复提交了
if (count.intValue() > 0) {
throw new ServiceException(ResultCode.LIMIT_ERROR);
}
}
@@ -55,12 +60,33 @@ public class PreventDuplicateSubmissionsInterceptor {
/**
* 获取表单参数
*
* @return
* @param userIsolation 用户是否隔离
* @return 计数器key
*/
private String getParams() {
private String getParams(Boolean userIsolation) {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
StringBuilder stringBuilder = new StringBuilder();
//拼接请求地址
stringBuilder.append(request.getRequestURI());
//参数不为空则拼接参数
if (!request.getParameterMap().isEmpty()) {
stringBuilder.append(JSONUtil.toJsonStr(request.getParameterMap()));
}
//用户隔离设置为开启,则选择当前用回顾
if (userIsolation) {
AuthUser authUser = UserContext.getCurrentUser();
//用户为空则发出警告但不拼接否则拼接用户id
if (authUser == null) {
log.warn("user isolation settings are on,but current user is null");
}
// 不为空则拼接用户id
else {
stringBuilder.append(authUser.getId());
}
}
//请求地址
return request.getRequestURI() + UserContext.getCurrentUser().getId() + UserContext.getCurrentUser().getUsername();
return stringBuilder.toString();
}

View File

@@ -31,7 +31,7 @@ public enum ClientTypeEnum {
*/
UNKNOWN("未知");
private final String clientName;
private String clientName;
ClientTypeEnum(String des) {
this.clientName = des;

View File

@@ -1,6 +1,11 @@
package cn.lili.common.enums;
import cn.lili.common.utils.StringUtils;
import java.util.Arrays;
import java.util.EnumSet;
/**
* 促销分类枚举
*
@@ -23,7 +28,12 @@ public enum PromotionTypeEnum {
/**
* 有促销库存的活动类型
*/
static final PromotionTypeEnum[] haveStockPromotion = new PromotionTypeEnum[]{PINTUAN, SECKILL, KANJIA, POINTS_GOODS};
public static final PromotionTypeEnum[] haveStockPromotion = new PromotionTypeEnum[]{PINTUAN, SECKILL, KANJIA, POINTS_GOODS};
/**
* 有独立促销库存的活动类型
*/
public static final PromotionTypeEnum[] haveIndependanceStockPromotion = new PromotionTypeEnum[]{SECKILL};
private final String description;
@@ -47,4 +57,28 @@ public enum PromotionTypeEnum {
return description;
}
/**
* 判断促销类型是否有效
* @param typeEnumValue
* @return
*/
public static boolean isValid(String typeEnumValue) {
if (StringUtils.isBlank(typeEnumValue)) {
return false;
}
return Arrays.stream(PromotionTypeEnum.values()).anyMatch(c -> c.name().equals(typeEnumValue));
}
/**
* 判断订单类型是否可售后
* POINTS\KANJIA 两种促销类型的订单不可进行售后
* @return true 可售后 false 不可售后
*/
public static boolean isCanAfterSale(String promotionType) {
if (!isValid(promotionType)) {
return true;
}
EnumSet<PromotionTypeEnum> noAfterSale = EnumSet.of(PromotionTypeEnum.KANJIA, PromotionTypeEnum.POINTS_GOODS);
return !noAfterSale.contains(PromotionTypeEnum.valueOf(promotionType));
}
}

View File

@@ -37,10 +37,12 @@ public enum ResultCode {
LIMIT_ERROR(1003, "访问过于频繁,请稍后再试"),
ILLEGAL_REQUEST_ERROR(1004, "非法请求,请重新刷新页面操作"),
IMAGE_FILE_EXT_ERROR(1005, "不支持图片格式"),
FILE_NOT_EXIST_ERROR(1011, "上传文件不能为空"),
FILE_TYPE_NOT_SUPPORT(1010, "不支持上传的文件类型!"),
PLATFORM_NOT_SUPPORTED_IM(1006, "平台未开启IM"),
STORE_NOT_SUPPORTED_IM(1007, "店铺未开启IM"),
UNINITIALIZED_PASSWORD(1008, "非初始化密码,无法进行初始化设置"),
FILE_DIRECTORY_NOT_EMPTY(1012, "文件夹下有文件,请删除所有文件后删除文件夹!"),
/**
* 分类
*/
@@ -80,12 +82,15 @@ public enum ResultCode {
HAVE_INVALID_SALES_MODEL(11023, "批发规则存在小于等于0的无效数据"),
MUST_HAVE_GOODS_SKU_VALUE(11024, "规格值不能为空!"),
DO_NOT_MATCH_WHOLESALE(11025, "批发商品购买数量不能低于起拍量!"),
GOODS_NOT_ERROR(11026, "商品不存在"),
GOODS_PARAMS_ERROR(11013, "商品参数错误,刷新后重试"),
PHYSICAL_GOODS_NEED_TEMP(11014, "实物商品需选择配送模板"),
VIRTUAL_GOODS_NOT_NEED_TEMP(11015, "虚拟商品无需选择配送模板"),
GOODS_NOT_EXIST_STORE(11017, "当前用户无权操作此商品"),
GOODS_TYPE_ERROR(11016, "需选择商品类型"),
GOODS_STOCK_IMPORT_ERROR(11018, "导入商品库存失败,请检查表格数据"),
/**
* 参数
@@ -146,6 +151,8 @@ public enum ResultCode {
CLERK_ALREADY_EXIT_ERROR(20030, "店员已经存在"),
CLERK_DISABLED_ERROR(20031, "店员已禁用"),
CLERK_CURRENT_SUPPER(20032, "无法删除当前登录店员"),
CANT_EDIT_CLERK_SHOPKEEPER(20033, "无法在店员管理编辑店员信息"),
USER_MOBILE_REPEATABLE_ERROR(20034, "该手机号已存在"),
/**
* 权限
*/
@@ -169,6 +176,7 @@ public enum ResultCode {
DISTRIBUTION_RETREAT_ERROR(22004, "分销员清退失败"),
DISTRIBUTION_CASH_NOT_EXIST(22005, "分销员提现记录不存在"),
DISTRIBUTION_GOODS_DOUBLE(22006, "不能重复添加分销商品"),
DISTRIBUTION_EDIT_ERROR(22007, "修改分销员失败"),
/**
* 购物车
@@ -191,6 +199,7 @@ public enum ResultCode {
ORDER_NOT_USER(31007, "非当前会员的订单"),
ORDER_TAKE_ERROR(31008, "当前订单无法核销"),
MEMBER_ADDRESS_NOT_EXIST(31009, "订单无收货地址,请先配置收货地址"),
STORE_ADDRESS_NOT_EXIST(31009, "订单没有自提地址,请先选择自提地址"),
ORDER_DELIVER_NUM_ERROR(31010, "没有待发货的订单"),
ORDER_NOT_SUPPORT_DISTRIBUTION(31011, "购物车中包含不支持配送的商品,请重新选择收货地址,或者重新选择商品"),
ORDER_NOT_EXIST_VALID(31041, "购物车中无有效商品,请检查购物车内商品,或者重新选择商品"),
@@ -198,6 +207,9 @@ public enum ResultCode {
ORDER_BATCH_DELIVER_ERROR(31013, "批量发货,文件读取失败"),
ORDER_ITEM_NOT_EXIST(31014, "当前订单项不存在!"),
POINT_NOT_ENOUGH(31015, "当前会员积分不足购买当前积分商品!"),
ORDER_LABEL_ORDER_ERROR(31016, "订单不能打印电子面单"),
ORDER_PRICE_ERROR(31017,"订单金额不能小于等于0"),
ORDER_PACKAGE_NOT_EXIST(31017, "当前订单包裹不存在!"),
/**
@@ -216,7 +228,7 @@ public enum ResultCode {
PAY_POINT_ENOUGH(32010, "积分不足,不能兑换"),
PAY_NOT_EXIST_ORDER(32011, "支付订单不存在"),
CAN_NOT_RECHARGE_WALLET(32012, "不能使用余额进行充值"),
RECHARGE_PRICE_ERROR(32013, "充值金额错误"),
/**
* 售后
@@ -252,9 +264,10 @@ public enum ResultCode {
WALLET_WITHDRAWAL_FROZEN_AMOUNT_INSUFFICIENT(34006, "冻结金额不足,无法处理提现申请请求!"),
WALLET_ERROR_INSUFFICIENT(34003, "零钱提现失败!"),
WALLET_REMARK_ERROR(34004, "请填写审核备注!"),
WALLET_EXIT_ERROR(34000, "钱包已存在,无法重复创建"),
WALLET_APPLY_ERROR(34005, "提现申请异常!"),
WALLET_EXIT_ERROR(34005, "钱包已存在,无法重复创建"),
WALLET_APPLY_ERROR(34006, "提现申请异常!"),
WALLET_APPLY_MIN_PRICE_ERROR(34007, "提现最低提现金额错误!"),
WALLET_WITHDRAWAL_AMOUNT_ERROR(34008, "申请提现金额异常!"),
/**
* 评价
*/
@@ -278,6 +291,7 @@ public enum ResultCode {
PROMOTION_ACTIVITY_GOODS_ERROR(40009, "当前活动已经开始无法添加商品"),
PROMOTION_ACTIVITY_ERROR(400010, "当前促销活动不存在"),
PROMOTION_LOG_EXIST(40011, "活动已参加,已发重复参加"),
APPLY_END_TIME_ERROR(40012, "参与截至时间不能小于当前时间,不能大于活动开始时间"),
/**
* 优惠券
@@ -299,6 +313,7 @@ public enum ResultCode {
COUPON_SCOPE_ERROR(41014, "指定商品范围关联id无效"),
COUPON_MEMBER_NOT_EXIST(41015, "没有当前会员优惠券"),
COUPON_MEMBER_STATUS_ERROR(41016, "当前会员优惠券已过期/作废无法变更状态!"),
COUPON_RANGE_ERROR(41017, "优惠券使用时间范围错误"),
SPECIAL_CANT_USE(41019, "特殊商品不能使用优惠券,不能使用"),
@@ -306,7 +321,7 @@ public enum ResultCode {
COUPON_DELETE_ERROR(41021, "删除优惠券失败"),
COUPON_ACTIVITY_NOT_EXIST(41022, "当前优惠券活动不存在"),
COUPON_ACTIVITY_SAVE_ERROR(41023, "保存优惠券活动失败"),
COUPON_ACTIVITY_MAX_NUM(41024, "优惠券活动赠券数量最多为3"),
COUPON_ACTIVITY_MAX_NUM(41024, "优惠券活动赠券数量最多为5"),
COUPON_DO_NOT_RECEIVER(41030, "当前优惠券不允许主动领取"),
@@ -371,6 +386,7 @@ public enum ResultCode {
COUPON_ACTIVITY_ITEM_ERROR(46003, "优惠券活动必须指定优惠券,不能为空"),
COUPON_ACTIVITY_ITEM_MUST_NUM_ERROR(46004, "优惠券活动最多指定10个优惠券"),
COUPON_ACTIVITY_ITEM_NUM_ERROR(46005, "赠券数量必须大于0"),
COUPON_ACTIVITY_ITEM_NUM_MAX_VALUE_2(46006, "赠券数量最大为2"),
/**
* 其他促销
@@ -405,7 +421,10 @@ public enum ResultCode {
STORE_NOT_OPEN(50004, "该会员未开通店铺"),
STORE_NOT_LOGIN_ERROR(50005, "未登录店铺"),
STORE_CLOSE_ERROR(50006, "店铺关闭,请联系管理员"),
STORE_DELIVER_GOODS_ADDRESS(50007,"请填写商家发货地址"),
FREIGHT_TEMPLATE_NOT_EXIST(50010, "当前模版不存在"),
STORE_STATUS_ERROR(50011, "店铺在申请中或审核中,请勿重复操作"),
STORE_DELIVER_ADDRESS_EXIST(50012,"请填写发货地址"),
/**
* 结算单
@@ -441,6 +460,7 @@ public enum ResultCode {
ALIPAY_EXCEPTION(70003, "支付宝支付错误,请稍后重试"),
ALIPAY_PARAMS_EXCEPTION(70004, "支付宝参数异常"),
LOGISTICS_NOT_SETTING(70005, "您还未配置快递查询"),
LOGISTICS_CHECK_SETTING(70005, "操作失败,请检查您的快递鸟配置"),
ORDER_SETTING_ERROR(70006, "系统订单配置异常"),
ALI_SMS_SETTING_ERROR(70007, "您还未配置阿里云短信"),
SMS_SIGN_EXIST_ERROR(70008, "短信签名已存在"),
@@ -480,6 +500,15 @@ public enum ResultCode {
WECHAT_MP_MESSAGE_TMPL_ERROR(80306, "未能获取到微信模版消息id"),
WECHAT_ERROR(80307, "微信接口异常"),
APP_VERSION_EXIST(80307, "APP版本已存在"),
APP_VERSION_PARAM_ERROR(80308, "添加APP版本参数异常"),
// 未选择APP类型
APP_VERSION_TYPE_ERROR(80308, "请选择有效的APP类型"),
/**
* IM
*/
IM_MESSAGE_ADD_ERROR(80400,"IM消息发送错误"),
IM_MESSAGE_EDIT_ERROR(80400,"IM消息更新错误"),
/**
* 其他
@@ -490,8 +519,10 @@ public enum ResultCode {
CONNECT_NOT_EXIST(90000, "登录方式不存在!"),
ELASTICSEARCH_INDEX_INIT_ERROR(90003, "索引初始化失败!"),
PURCHASE_ORDER_DEADLINE_ERROR(90004, "供求单,已超过报名截止时间"),
USER_ADD_ERROR(90005, "用户添加失败"),
INDEX_BUILDING(90005, "索引正在生成");
private final Integer code;
private final String message;

View File

@@ -16,6 +16,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.ConstraintViolationException;
import java.util.List;
import java.util.stream.Collectors;
/**
* 异常处理
@@ -59,6 +60,18 @@ public class GlobalControllerExceptionHandler {
message += ":" + serviceException.getMsg();
}
// 对一些特殊异常处理不再打印error级别的日志
assert serviceException.getResultCode() != null;
if (serviceException.getResultCode().equals(ResultCode.DEMO_SITE_EXCEPTION)) {
log.debug("[DEMO_SITE_EXCEPTION]:{}", serviceException.getResultCode().message(), e);
return ResultUtil.error(code, message);
}
if (serviceException.getResultCode().equals(ResultCode.USER_AUTH_EXPIRED)) {
log.debug("403 :{}", serviceException.getResultCode().message(), e);
return ResultUtil.error(code, message);
}
log.error("全局异常[ServiceException]:{}-{}", serviceException.getResultCode().code(), serviceException.getResultCode().message(), e);
return ResultUtil.error(code, message);
@@ -100,7 +113,8 @@ public class GlobalControllerExceptionHandler {
// protected ResponseEntity<Object> handleExceptionInternal(Exception ex, Object body, HttpHeaders headers, HttpStatus status, WebRequest request) {
// if (ex instanceof MethodArgumentNotValidException) {
// MethodArgumentNotValidException exception = (MethodArgumentNotValidException) ex;
// return new ResponseEntity<>(new ResultUtil<>().setErrorMsg(exception.getBindingResult().getAllErrors().get(0).getDefaultMessage()), status);
// return new ResponseEntity<>(new ResultUtil<>().setErrorMsg(exception.getBindingResult().getAllErrors().get(0).getDefaultMessage()),
// status);
// }
// if (ex instanceof MethodArgumentTypeMismatchException) {
// MethodArgumentTypeMismatchException exception = (MethodArgumentTypeMismatchException) ex;
@@ -126,10 +140,18 @@ public class GlobalControllerExceptionHandler {
BindException exception = (BindException) e;
List<FieldError> fieldErrors = exception.getBindingResult().getFieldErrors();
for (FieldError error : fieldErrors) {
return ResultUtil.error(ResultCode.PARAMS_ERROR.code(), error.getDefaultMessage());
// 错误消息处理
try {
if (!fieldErrors.isEmpty()) {
return ResultUtil.error(ResultCode.PARAMS_ERROR.code(),
fieldErrors.stream()
.map(FieldError::getDefaultMessage) // 获取每个对象的名称字段
.collect(Collectors.joining(", ")));
}
return ResultUtil.error(ResultCode.PARAMS_ERROR);
} catch (Exception ex) {
return ResultUtil.error(ResultCode.PARAMS_ERROR);
}
return ResultUtil.error(ResultCode.PARAMS_ERROR);
}
/**

View File

@@ -1,30 +0,0 @@
package cn.lili.common.fulu.core;
/**
* @Auther: chenYing
* @Date: 2019/8/26 0026 15:08
*/
public interface MethodConst {
//卡密下单接口method方法
String OPEN_API_CARD_ORDER_ADD = "fulu.order.card.add";
// 根据话费查询归属地和城市编码,面值,城市等信息
String OPEN_API_CHECK_PHONE = "fulu.mobile.info.get";
// 直充下单接口method方法
String OPEN_API_DIRECT_ORDER_ADD = "fulu.order.direct.add";
// 获取商品信息接口method方法
String OPEN_API_GOODS_GET = "fulu.goods.info.get";
// 获取商品模板信息接口method方法
String OPEN_API_GOODS_TEMPLATE_GET = "fulu.goods.template.get";
// 查单接口method方法
String OPEN_API_ORDER_GET = "fulu.order.info.get";
// 话费下单接口method方法
String OPEN_API_PHONE_ORDER_ADD = "fulu.order.mobile.add";
// 流量下单接口method方法
String OPEN_API_TRAFFIC_ORDER_ADD = "fulu.order.data.add";
// 获取用户信息接口method方法
String OPEN_API_USER_INFO_GET = "fulu.user.info.get";
//获取商品列表method方法
String OPEN_API_GOODS_LIST = "fulu.goods.list.get";
}

View File

@@ -1,58 +0,0 @@
package cn.lili.common.fulu.core.http;
import cn.lili.common.fulu.core.utils.HttpUtil;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
/**
* @Auther: chenYing
* @Date: 2019/8/19 0019 16:16
*/
public class FuluClient implements IFuluClient {
private static volatile ExecutorService executor;
private String url;
public FuluClient() {
this.url = "http://openapi.fulu.com/api/getway";
}
public FuluClient(String url) {
this.url = url;
}
/**
* 创建线程池
*/
private static void createThreadPool() {
if (executor == null) {
synchronized (FuluClient.class) {
if (executor == null) {
executor = Executors.newCachedThreadPool();
}
}
}
}
@Override
public String send(final String postData) {
String result = HttpUtil.sendPostJson(this.url, postData);
return result;
}
@Override
public Future<String> sendAsync(final String postData) {
createThreadPool();
return executor.submit(new Callable<String>() {
@Override
public String call() throws Exception {
String result = HttpUtil.sendPostJson(url, postData);
return result;
}
});
}
}

View File

@@ -1,27 +0,0 @@
package cn.lili.common.fulu.core.http;
import java.util.concurrent.Future;
/**
* @Auther: chenYing
* @Date: 2019/8/19 0019 16:15
*/
public interface IFuluClient {
/**
* 同步请求openapi2.0
*
* @param postData
* @return String
*/
String send(final String postData);
/**
* 异步请求openapi2.0
*
* @param postData
* @return Future<String>
*/
Future<String> sendAsync(final String postData);
}

View File

@@ -1,47 +0,0 @@
package cn.lili.common.fulu.core.utils;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
import java.security.Security;
/**
* @Auther: chenYing
* @Date: 2019/8/27 0027 17:38
*/
public class CardUtil {
private static final String ALGORITHM = "AES/ECB/PKCS7Padding";
private CardUtil() {
}
public static String cardDecode(String str, byte[] key) {
byte[] bytes = org.apache.commons.codec.binary.Base64.decodeBase64(str);
String result = null;
try {
Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
Cipher cipher = Cipher.getInstance(ALGORITHM, "BC");
SecretKeySpec keySpec = new SecretKeySpec(key, "AES");
cipher.init(Cipher.DECRYPT_MODE, keySpec);
byte[] decoded = cipher.doFinal(bytes);
result = new String(decoded, "UTF-8");
} catch (Exception e) {
throw new RuntimeException(e.getMessage(), e);
}
return result;
}
public static String cardEncode(String str, byte[] key) {
byte[] result = null;
try {
Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
Cipher cipher = Cipher.getInstance(ALGORITHM, "BC");
SecretKeySpec keySpec = new SecretKeySpec(key, "AES");
cipher.init(Cipher.ENCRYPT_MODE, keySpec);
result = cipher.doFinal(str.getBytes("UTF-8"));
} catch (Exception e) {
throw new RuntimeException(e.getMessage(), e);
}
return new String(org.apache.commons.codec.binary.Base64.encodeBase64(result));
}
}

View File

@@ -1,19 +0,0 @@
package cn.lili.common.fulu.core.utils;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* @Auther: chenYing
* @Date: 2019/8/19 0019 15:17
*/
public class DateFormatUtil {
private static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
private DateFormatUtil() {
}
public static String currentDateTime() {
return new SimpleDateFormat(DATE_FORMAT).format(new Date());
}
}

View File

@@ -1,206 +0,0 @@
package cn.lili.common.fulu.core.utils;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.protocol.HTTP;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.*;
import java.util.*;
/**
* @author cheny
*/
public class HttpUtil {
private static Logger log = LoggerFactory.getLogger(HttpUtil.class);
public final static int CONNECT_TIMEOUT = 10000;
public final static int READ_TIMEOUT = 10000;
private static final String ENCODING_GBK = "GBK";
/**
* POST请求json字符串形式数据
*
* @param url 请求地址
* @param param 请求的json数据
* @return response body
* @throws Exception
*/
public static String sendPostJson(String url, String param) {
return sendPostWithHeads(url, param, "application/json", null);
}
private static String sendPostWithHeads(String url, String param, String contentType, Map<String, String> heads) {
PrintWriter out = null;
BufferedReader in = null;
StringBuilder result = new StringBuilder();
HttpURLConnection conn = null;
try {
URL realUrl = new URL(url);
// 打开和URL之间的连接
conn = (HttpURLConnection) realUrl.openConnection();
// 设置通用的请求属性
conn.setRequestMethod("POST");// 提交模式
conn.setConnectTimeout(CONNECT_TIMEOUT);// 连接超时 单位毫秒
conn.setReadTimeout(READ_TIMEOUT);// 读取超时 单位毫秒
if (contentType != null && !contentType.isEmpty()) {
conn.setRequestProperty("Content-Type", contentType);
}
conn.setRequestProperty("accept", "*/*");
conn.setRequestProperty("connection", "Keep-Alive");
conn.setRequestProperty("user-agent",
"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36");
// 添加头信息
if (heads != null && !heads.isEmpty()) {
for (String key : heads.keySet()) {
conn.setRequestProperty(key, heads.get(key));
}
}
// 发送POST请求必须设置如下两行
conn.setDoOutput(true);
conn.setDoInput(true);
// 获取URLConnection对象对应的输出流
out = new PrintWriter(conn.getOutputStream());
// 发送请求参数
out.print(param);
// flush输出流的缓冲
out.flush();
// 定义BufferedReader输入流来读取URL的响应
in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8"));
String line;
while ((line = in.readLine()) != null) {
result.append(line);
}
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("send POST request exception :" + e.getMessage(), e);
} finally {
try {
if (out != null) {
out.close();
}
if (in != null) {
in.close();
}
if (conn != null) {
conn.disconnect();
}
} catch (Exception e2) {
throw new RuntimeException("close Connection exception :" + e2.getMessage(), e2);
}
}
return result.toString();
}
/**
* POST请求String字符串形式数据
*
* @param url
* @param paramXmlStr
* @return
*/
public static String sendPostXmlStr(String url, String paramXmlStr) {
String tmpparamXmlStr = "";
try {
tmpparamXmlStr = URLEncoder.encode(paramXmlStr, ENCODING_GBK);
tmpparamXmlStr = sendPostWithHeads(url, tmpparamXmlStr, "application/xml", null);
tmpparamXmlStr = URLDecoder.decode(tmpparamXmlStr,ENCODING_GBK);
}catch (Exception e){
e.printStackTrace();
log.error("post请求URL数据转码报错{}", e.getMessage());
}
return tmpparamXmlStr;
}
/**
* POST请求String字符串形式数据
*
* @param url
* @param paramXmlStr
* @return
*/
public static String sendPostXmlUrlencode(String url, String paramXmlStr) {
String tmpparamXmlStr = "";
Map<String, String> rspMap = new LinkedHashMap<>();
rspMap.put("req", paramXmlStr);
try {
tmpparamXmlStr = URLEncoder.encode(paramXmlStr, ENCODING_GBK);
tmpparamXmlStr = doPostMapParams(url, rspMap);
tmpparamXmlStr = URLDecoder.decode(tmpparamXmlStr,ENCODING_GBK);
}catch (Exception e){
e.printStackTrace();
log.error("post请求URL数据转码报错{}", e.getMessage());
}
return tmpparamXmlStr;
}
/**
* 发送POST请求
* @param url String对象为 目的地址
* @param parameters 请求参数Map类型。
* @return 远程响应结果
*/
public static String doPostMapParams(String url, Map<String, String> parameters) {
BufferedReader in = null;
try {
// 定义HttpClient
HttpClient client = new DefaultHttpClient();
// 实例化HTTP方法
HttpPost request = new HttpPost();
request.setURI(new URI(url));
//设置参数
List<NameValuePair> nvps = new ArrayList<NameValuePair>();
for (Iterator iter = parameters.keySet().iterator(); iter.hasNext();) {
String name = (String) iter.next();
String value = String.valueOf(parameters.get(name));
nvps.add(new BasicNameValuePair(name, value));
}
request.setEntity(new UrlEncodedFormEntity(nvps, HTTP.UTF_8));
HttpResponse response = client.execute(request);
int code = response.getStatusLine().getStatusCode();
if(code == 200){ //请求成功
in = new BufferedReader(new InputStreamReader(response.getEntity()
.getContent(),"UTF-8"));
StringBuffer sb = new StringBuffer("");
String line = "";
String NL = System.getProperty("line.separator");
while ((line = in.readLine()) != null) {
sb.append(line + NL);
}
in.close();
return sb.toString();
}else{
System.out.println("状态码:" + code);
return null;
}
}
catch(Exception e) {
e.printStackTrace();
return null;
}
}
}

View File

@@ -1,41 +0,0 @@
package cn.lili.common.fulu.core.utils;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
public class JSONUtil {
private static Gson gson = new Gson();
/**
* 将 JSON 字符串转为 Java 对象
*/
public static <T> T fromJSON(String json, Class<T> type) {
T obj;
try {
obj = gson.fromJson(json, type);
} catch (Exception e) {
throw new RuntimeException(e);
}
return obj;
}
/**
* json字符串转list或者map
*/
public static <T> T fromJSON(String json, TypeToken<T> typeToken) {
return gson.fromJson(json, typeToken.getType());
}
/**
* 将 Java 对象转为 JSON 字符串
*/
public static <T> String toJSON(T obj) {
String jsonStr;
try {
jsonStr = gson.toJson(obj);
} catch (Exception e) {
throw new RuntimeException(e);
}
return jsonStr;
}
}

View File

@@ -1,342 +0,0 @@
package cn.lili.common.fulu.core.utils;
import cn.lili.common.fulu.core.MethodConst;
import cn.lili.common.fulu.model.*;
import cn.lili.common.fulu.sdk.DefaultOpenApiClient;
import cn.lili.modules.store.entity.dto.FuLuConfigureDTO;
import com.alibaba.fastjson.JSON;
import com.google.gson.reflect.TypeToken;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.*;
import java.util.concurrent.*;
public class Test {
private final static String APP_KEY = "lzHi7ewuTkplx2ePX0eQzN65TIFRk1zFClcoj1Jim/MHmu0X7ZqxMtSLENhvr1xD";
private final static Logger LOGGER = LoggerFactory.getLogger(Test.class);
private final static String SYS_SECRET = "9da68b0f8bcb470e84c3d30e343727e2";
private final static String URL = "http://openapi.fulu.com/api/getway";
// private final static String APP_KEY = "i4esv1l+76l/7NQCL3QudG90Fq+YgVfFGJAWgT+7qO1Bm9o/adG/1iwO2qXsAXNB";
// private final static Logger LOGGER = LoggerFactory.getLogger(Test.class);
// private final static String SYS_SECRET = "0a091b3aa4324435aab703142518a8f7";
// private final static String URL = "http://pre.openapi.fulu.com/api/getway";
private static String repeat(String ch, int num) {
StringBuilder str = new StringBuilder();
for (int i = 0; i < num; i++) {
str.append(ch);
}
return str.toString();
}
private static void waitFor(Future<String> future) throws Exception {
while (!future.isDone()) {
TimeUnit.MILLISECONDS.sleep(500);
}
LOGGER.info("excuteAsync\n{}", future.get());
}
/**
* 卡密下单
*
* @throws Exception
*/
public static void cardOrderAddTest(FuLuConfigureDTO fuLuConfigureDTO, Integer productId, Integer buyNum,String orderSn) throws Exception {
LOGGER.info("\n卡密下单{}", repeat("=", 100));
DefaultOpenApiClient client =
new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_CARD_ORDER_ADD);
InputCardOrderDto dto = new InputCardOrderDto();
dto.setProductId(productId);
dto.setCustomerOrderNo(orderSn);
dto.setBuyNum(buyNum);
client.setBizObject(dto);
LOGGER.info("excute\n{}\n{}", client.excute(), repeat("-", 100));
dto.setCustomerOrderNo(UUID.randomUUID().toString());
waitFor(client.excuteAsync());
}
/**
* 直充下单
*
* @throws Exception
*/
public static void directOrderAddTest(FuLuConfigureDTO fuLuConfigureDTO, Integer productId, Integer buyNum,String qrCode,String orderSn) throws Exception {
LOGGER.info("\n直充下单{}", repeat("=", 100));
DefaultOpenApiClient client =
new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_DIRECT_ORDER_ADD);
InputDirectOrderDto dto = new InputDirectOrderDto();
dto.setProductId(productId);
dto.setBuyNum(buyNum);
client.setBizObject(dto);
int count = 1;
for (String chargeAccount : Arrays.asList(qrCode)) {
dto.setChargeAccount(chargeAccount);
dto.setCustomerOrderNo(orderSn);
LOGGER.info("excute\n{}\n{}", client.excute(), repeat("-", 100));
if (count++ >= 3) {
waitFor(client.excuteAsync());
} else {
LOGGER.info("excuteAsync\n{}\n{}", client.excuteAsync().get(), repeat("-", 100));
}
}
}
/**
* 手机号归属地
*
* @throws Exception
*/
public void matchPhoneProducGetTest(FuLuConfigureDTO fuLuConfigureDTO) throws Exception {
LOGGER.info("\n手机号归属地{}", repeat("=", 100));
DefaultOpenApiClient client = new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_CHECK_PHONE);
InputMatchPhoneProductListDto dto = new InputMatchPhoneProductListDto();
dto.setFaceValue(50D);
int count = 1;
for (String phone : Arrays.asList("15972368779", "13971553804")) {
dto.setPhone(phone);
client.setBizObject(dto);
LOGGER.info("excute\n{}\n{}", client.excute(), repeat("-", 100));
if (count++ >= 2) {
waitFor(client.excuteAsync());
} else {
LOGGER.info("excuteAsync\n{}\n{}", client.excuteAsync().get(), repeat("-", 100));
}
}
}
/**
* 订单查单
*
* @throws Exception
*/
public void orderInfoGetTest(FuLuConfigureDTO fuLuConfigureDTO) throws Exception {
LOGGER.info("\n订单查单{}", repeat("=", 100));
DefaultOpenApiClient client = new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_ORDER_GET);
InputOrderGetDto dto = new InputOrderGetDto();
client.setBizObject(dto);
int count = 1;
for (String customerOrderNo : Arrays
.asList("0d19f8e4-5af3-490d-a8d8-47fd457da7de", "31b6b96b-a21e-4bc4-bc0c-6e77a2ffb698")) {
dto.setCustomerOrderNo(customerOrderNo);
LOGGER.info("excute\n{}\n{}", client.excute(), repeat("-", 100));
if (count++ >= 2) {
Future<String> future = client.excuteAsync();
waitFor(future);
Map<String, String> result = JSONUtil.fromJSON(future.get(), new TypeToken<Map>() {
});
Map<String, Object> resultMap = JSONUtil.fromJSON(result.get("result"), new TypeToken<Map<String, Object>>() {
});
List<Map<String, String>> cardList = (List<Map<String, String>>) resultMap.get("cards");
StringBuilder decodeStr = new StringBuilder();
for (Map<String, String> map : cardList) {
decodeStr.append("card_number").append(map.get("card_number")).append("desc_card_number")
.append(CardUtil.cardDecode(map.get("card_number"), SYS_SECRET.getBytes("UTF-8")));
decodeStr.append(" card_pwd").append(map.get("card_pwd")).append("card_pwd")
.append(CardUtil.cardDecode(map.get("card_pwd"), SYS_SECRET.getBytes("UTF-8")));
decodeStr.append("\n");
}
System.out.println(decodeStr.toString());
System.out.println(CardUtil.cardEncode("CD10002502019061217430016421", SYS_SECRET.getBytes("UTF-8")));
} else {
LOGGER.info("excuteAsync\n{}\n{}", client.excuteAsync().get(), repeat("-", 100));
}
}
}
/**
* 话费下单
*
* @throws Exception
*/
public void phoneOrderAddTest(FuLuConfigureDTO fuLuConfigureDTO) throws Exception {
LOGGER.info("\n话费下单{}", repeat("=", 100));
DefaultOpenApiClient client =
new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_PHONE_ORDER_ADD);
InputPhoneOrderDto dto = new InputPhoneOrderDto();
dto.setChargeValue(Double.valueOf(50));
int count = 1;
for (String chargePhone : Arrays.asList("15972368779", "13971553804")) {
dto.setCustomerOrderNo(UUID.randomUUID().toString());
dto.setChargePhone(chargePhone);
client.setBizObject(dto);
LOGGER.info("excute\n{}\n{}", client.excute(), repeat("-", 100));
dto.setCustomerOrderNo(UUID.randomUUID().toString());
if (count++ >= 2) {
waitFor(client.excuteAsync());
} else {
LOGGER.info("excuteAsync\n{}\n{}", client.excuteAsync().get(), repeat("-", 100));
}
}
}
/**
* 获得商品信息
*
* @throws Exception
*/
public static Map<String, Object> productInfoGetTest(FuLuConfigureDTO fuLuConfigureDTO,String productIdS) throws Exception {
LOGGER.info("\n获得商品信息{}", repeat("=", 100));
DefaultOpenApiClient client = new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_GOODS_GET);
InputProductDto dto = new InputProductDto();
int count = 1;
Map<String, Object> maps = new HashMap();
for (String productId : Arrays.asList(productIdS)) {
dto.setProductId(productId);
client.setBizObject(dto);
maps = (Map) JSON.parse(client.excute());
LOGGER.info("excute\n{}\n{}", client.excute(), repeat("-", 100));
if (count++ >= 10) {
waitFor(client.excuteAsync());
} else {
LOGGER.info("excuteAsync\n{}\n{}", client.excuteAsync().get(), repeat("-", 100));
}
}
return maps;
}
/**
* 获得商品模板信息
*
* @throws Exception
*/
public void productTemplateGetTest(FuLuConfigureDTO fuLuConfigureDTO) throws Exception {
LOGGER.info("\n获得商品模板信息{}", repeat("=", 100));
DefaultOpenApiClient client =
new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_GOODS_TEMPLATE_GET);
InputProductTemplateDto dto = new InputProductTemplateDto();
dto.setTemplateId("e1dac0ea-dc86-4c9d-a778-c9e19203ecb8");
client.setBizObject(dto);
LOGGER.info("excute\n{}\n{}", client.excute(), repeat("-", 100));
waitFor(client.excuteAsync());
}
/**
* 流量下单
*
* @throws Exception
*/
public void trafficOrderAddTest(FuLuConfigureDTO fuLuConfigureDTO) throws Exception {
LOGGER.info("\n流量下单{}", repeat("=", 100));
DefaultOpenApiClient client =
new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_TRAFFIC_ORDER_ADD);
InputTrafficOrderDto dto = new InputTrafficOrderDto();
dto.setChargeValue(Double.valueOf(1024));
dto.setPacketKind(4);
int count = 1;
for (String chargePhone : Arrays.asList("15972368779", "13971553804")) {
client.setBizObject(dto);
dto.setChargePhone(chargePhone);
dto.setCustomerOrderNo(UUID.randomUUID().toString());
LOGGER.info("excute\n{}\n{}", client.excute(), repeat("-", 100));
dto.setCustomerOrderNo(UUID.randomUUID().toString());
if (count++ >= 2) {
waitFor(client.excuteAsync());
} else {
LOGGER.info("excuteAsync\n{}\n{}", client.excuteAsync().get(), repeat("-", 100));
}
}
}
/**
* 用户信息
*
* @throws Exception
*/
public static void userInfoGetTest(FuLuConfigureDTO fuLuConfigureDTO) throws Exception {
LOGGER.info("\n用户信息{}", repeat("=", 100));
DefaultOpenApiClient client =
new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_USER_INFO_GET);
InputUserDto dto = new InputUserDto();
client.setBizObject(dto);
LOGGER.info("excute\n{}\n{}", client.excute(), repeat("-", 100));
waitFor(client.excuteAsync());
}
/**
* 用户信息:高并发场景
*
* @throws Exception
*/
public static void userInfoGetTest2(FuLuConfigureDTO fuLuConfigureDTO) throws Exception {
LOGGER.info("\n用户信息高并发场景{}", repeat("=", 100));
Executor executor = Executors.newCachedThreadPool();
final int count = 10;
final CountDownLatch downLatch = new CountDownLatch(count);
for (int i = 0; i < count; ++i) {
executor.execute(new Runnable() {
@Override
public void run() {
try {
String name = Thread.currentThread().getName();
LOGGER.info("\n线程名{}{}", name, repeat("+", 100));
DefaultOpenApiClient client =
new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_USER_INFO_GET);
InputUserDto dto = new InputUserDto();
client.setBizObject(dto);
LOGGER.info("\n线程名{}\n{}\n{}", name, client.excute(), repeat("+", 100));
waitFor(client.excuteAsync());
} catch (Exception ex) {
LOGGER.error(ex.getMessage(), ex);
} finally {
downLatch.countDown();
}
}
});
}
downLatch.await();
}
/* 获得商品信息列表
*
* @throws Exception
*/
public static String getGoodsInfoList(FuLuConfigureDTO fuLuConfigureDTO) throws Exception {
LOGGER.info("\n获得商品信息{}", repeat("=", 100));
DefaultOpenApiClient client = new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_GOODS_LIST);
InputProductDto dto = new InputProductDto();
client.setBizObject(dto);
return client.excute().toString();
}
public static void main(String[] args) {
try {
// productInfoGetTest();
} catch (Exception e) {
e.printStackTrace();
}
}
}

View File

@@ -1,159 +0,0 @@
package cn.lili.common.fulu.model;
import cn.lili.common.fulu.core.utils.DateFormatUtil;
import cn.lili.common.fulu.core.utils.JSONUtil;
import com.google.gson.annotations.SerializedName;
import com.google.gson.reflect.TypeToken;
import java.io.Serializable;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
/**
* @Auther: chenYing
* @Date: 2019/8/19 0019 10:49
*/
public class CommonRequest implements Serializable {
private static final long serialVersionUID = 2L;
@SerializedName(value = "app_auth_token")
private String appAuthToken = "";
@SerializedName(value = "app_key")
private String appKey;
@SerializedName(value = "biz_content")
private String bizContent = "{}";
private transient Map<String, Object> bizContentMap = Collections.emptyMap();
private String charset;
private String format;
private String method;
private String sign;
@SerializedName(value = "sign_type")
private String signType;
private String timestamp;
private String version;
public CommonRequest() {
format = "json";
version = "2.0";
charset = "utf-8";
signType = "md5";
// timestamp = "2019-08-20 13:59:38";
timestamp = DateFormatUtil.currentDateTime();
}
public String getAppAuthToken() {
return appAuthToken;
}
public void setAppAuthToken(String appAuthToken) {
this.appAuthToken = appAuthToken;
}
public String getAppKey() {
return appKey;
}
public void setAppKey(String appKey) {
this.appKey = appKey;
}
public String getBizContent() {
if (!bizContentMap.isEmpty()) {
bizContent = JSONUtil.toJSON(bizContentMap);
}
return bizContent;
}
/**
* 直接将变量以json格式保存
*
* @param bizContent bizContent
*/
public void setBizContent(String bizContent) {
if (bizContent != null && !"".equals(bizContent.trim())) {
Map<String, Object> dataMap = JSONUtil.fromJSON(bizContent, new TypeToken<Map<String, Object>>() {
});
if (bizContentMap.isEmpty()) {
bizContentMap = new HashMap<String, Object>();
}
bizContentMap.putAll(dataMap);
}
}
public String getCharset() {
return charset;
}
public void setCharset(String charset) {
this.charset = charset;
}
public String getFormat() {
return format;
}
public void setFormat(String format) {
this.format = format;
}
public String getMethod() {
return method;
}
public void setMethod(String method) {
this.method = method;
}
public String getSign() {
return sign;
}
public void setSign(String sign) {
this.sign = sign;
}
public String getSignType() {
return signType;
}
public void setSignType(String signType) {
this.signType = signType;
}
public String getTimestamp() {
return timestamp;
}
public void setTimestamp(String timestamp) {
this.timestamp = timestamp;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
/**
* 以key:value形式保存程序会转换为json格式
*
* @param key key
* @param value value
*/
public void setBizContent(String key, Object value) {
if (bizContentMap.isEmpty()) {
bizContentMap = new HashMap<String, Object>();
}
bizContentMap.put(key, value);
}
protected Object getBizContentValue(String key) {
return bizContentMap.get(key);
}
}

View File

@@ -1,56 +0,0 @@
package cn.lili.common.fulu.model;
/**
* 卡密订单input dto
*
* @Auther: chenYing
* @Date: 2019/8/19 0019 15:35
*/
public class InputCardOrderDto extends CommonRequest {
public InputCardOrderDto() {
super();
setMethod("fulu.order.card.add");
}
/**
* 购买数量
*
* @return Integer
*/
public Integer getBuyNum() {
Object value = getBizContentValue("buy_num");
return value != null ? Integer.valueOf(value.toString()) : null;
}
public void setBuyNum(Integer buyNum) {
setBizContent("buy_num", buyNum);
}
/**
* 外部订单号
*
* @return String
*/
public String getCustomerOrderNo() {
Object value = getBizContentValue("customer_order_no");
return value != null ? String.valueOf(value) : null;
}
public void setCustomerOrderNo(String customerOrderNo) {
setBizContent("customer_order_no", customerOrderNo);
}
/**
* 商品编号
*
* @return Integer
*/
public Integer getProductId() {
Object value = getBizContentValue("product_id");
return value != null ? Integer.valueOf(value.toString()) : null;
}
public void setProductId(Integer productId) {
setBizContent("product_id", productId);
}
}

View File

@@ -1,213 +0,0 @@
package cn.lili.common.fulu.model;
/**
* 直充商品订单input dto
*
* @Auther: chenYing
* @Date: 2019/8/19 0019 15:39
*/
public class InputDirectOrderDto extends CommonRequest {
public InputDirectOrderDto() {
super();
setMethod("fulu.order.direct.add");
}
/**
* 购买数量
*
* @return Integer
*/
public Integer getBuyNum() {
Object value = getBizContentValue("buy_num");
return value != null ? Integer.valueOf(value.toString()) : null;
}
public void setBuyNum(Integer buyNum) {
setBizContent("buy_num", buyNum);
}
/**
* 充值账号
*
* @return String
*/
public String getChargeAccount() {
Object value = getBizContentValue("charge_account");
return value != null ? String.valueOf(value) : null;
}
public void setChargeAccount(String chargeAccount) {
setBizContent("charge_account", chargeAccount);
}
/**
* 充值游戏名称
*
* @return String
*/
public String getChargeGameName() {
Object value = getBizContentValue("charge_game_name");
return value != null ? String.valueOf(value) : null;
}
public void setChargeGameName(String chargeGameName) {
setBizContent("charge_game_name", chargeGameName);
}
/**
* 充值游戏区
*
* @return String
*/
public String getChargeGameRegion() {
Object value = getBizContentValue("charge_game_region");
return value != null ? String.valueOf(value) : null;
}
public void setChargeGameRegion(String chargeGameRegion) {
setBizContent("charge_game_region", chargeGameRegion);
}
/**
* 充值游戏角色
*
* @return String
*/
public String getChargeGameRole() {
Object value = getBizContentValue("charge_game_role");
return value != null ? String.valueOf(value) : null;
}
public void setChargeGameRole(String chargeGameRole) {
setBizContent("charge_game_role", chargeGameRole);
}
/**
* 充值游戏服
*
* @return String
*/
public String getChargeGameSrv() {
Object value = getBizContentValue("charge_game_srv");
return value != null ? String.valueOf(value) : null;
}
public void setChargeGameSrv(String chargeGameSrv) {
setBizContent("charge_game_srv", chargeGameSrv);
}
/**
* 下单真实Ip区域商品要传
*
* @return String
*/
public String getChargeIp() {
Object value = getBizContentValue("charge_ip");
return value != null ? String.valueOf(value) : null;
}
public void setChargeIp(String chargeIp) {
setBizContent("charge_ip", chargeIp);
}
/**
* 充值密码,部分游戏类要传
*
* @return String
*/
public String getChargePassword() {
Object value = getBizContentValue("charge_password");
return value != null ? String.valueOf(value) : null;
}
public void setChargePassword(String chargePassword) {
setBizContent("charge_password", chargePassword);
}
/**
* 充值类型
*
* @return String
*/
public String getChargeType() {
Object value = getBizContentValue("charge_type");
return value != null ? String.valueOf(value) : null;
}
public void setChargeType(String chargeType) {
setBizContent("charge_type", chargeType);
}
/**
* 联系QQ
*
* @return String
*/
public String getContactQq() {
Object value = getBizContentValue("contact_qq");
return value != null ? String.valueOf(value) : null;
}
public void setContactQq(String contactQq) {
setBizContent("contact_qq", contactQq);
}
/**
* 联系电话
*
* @return String
*/
public String getContactTel() {
Object value = getBizContentValue("contact_tel");
return value != null ? String.valueOf(value) : null;
}
public void setContactTel(String contactTel) {
setBizContent("contact_tel", contactTel);
}
/**
* 外部订单号
*
* @return String
*/
public String getCustomerOrderNo() {
Object value = getBizContentValue("customer_order_no");
return value != null ? String.valueOf(value) : null;
}
public void setCustomerOrderNo(String customerOrderNo) {
setBizContent("customer_order_no", customerOrderNo);
}
/**
* 商品编号
*
* @return Integer
*/
public Integer getProductId() {
Object value = getBizContentValue("product_id");
return value != null ? Integer.valueOf(value.toString()) : null;
}
public void setProductId(Integer productId) {
setBizContent("product_id", productId);
}
/**
* 剩余数量
*
* @return Integer
*/
public Integer getRemainingNumber() {
Object value = getBizContentValue("remaining_number");
return value != null ? Integer.valueOf(value.toString()) : null;
}
public void setRemainingNumber(Integer remainingNumber) {
setBizContent("remaining_number", remainingNumber);
}
}

View File

@@ -1,44 +0,0 @@
package cn.lili.common.fulu.model;
/**
* 手机号归属地input dto
*
* @Auther: chenYing
* @Date: 2019/8/19 0019 16:08
*/
public class InputMatchPhoneProductListDto extends CommonRequest {
public InputMatchPhoneProductListDto() {
super();
setMethod("fulu.mobile.info.get");
}
/**
* 面值
*
* @return Double
*/
public Double getFaceValue() {
Object value = getBizContentValue("face_value");
return value != null ? Double.valueOf(value.toString()) : null;
}
public void setFaceValue(Double faceValue) {
setBizContent("face_value", faceValue);
}
/**
* 手机号
*
* @return String
*/
public String getPhone() {
Object value = getBizContentValue("phone");
return value != null ? String.valueOf(value) : null;
}
public void setPhone(String phone) {
setBizContent("phone", phone);
}
}

View File

@@ -1,31 +0,0 @@
package cn.lili.common.fulu.model;
/**
* 订单查单input dto
*
* @Auther: chenYing
* @Date: 2019/8/19 0019 15:23
*/
public class InputOrderGetDto extends CommonRequest {
public InputOrderGetDto() {
super();
setMethod("fulu.order.info.get");
}
/**
* 外部订单号
*
* @return String
*/
public String getCustomerOrderNo() {
Object value = getBizContentValue("customer_order_no");
return value != null ? String.valueOf(value) : null;
}
public void setCustomerOrderNo(String customerOrderNo) {
setBizContent("customer_order_no", customerOrderNo);
}
}

View File

@@ -1,57 +0,0 @@
package cn.lili.common.fulu.model;
/**
* 话费订单input dto
*
* @Auther: chenYing
* @Date: 2019/8/19 0019 15:31
*/
public class InputPhoneOrderDto extends CommonRequest {
public InputPhoneOrderDto() {
super();
setMethod("fulu.order.mobile.add");
}
/**
* 充值手机号
*
* @return String
*/
public String getChargePhone() {
Object value = getBizContentValue("charge_phone");
return value != null ? String.valueOf(value) : null;
}
public void setChargePhone(String chargePhone) {
setBizContent("charge_phone", chargePhone);
}
/**
* 充值数额
*
* @return Double
*/
public Double getChargeValue() {
Object value = getBizContentValue("charge_value");
return value != null ? Double.valueOf(value.toString()) : null;
}
public void setChargeValue(Double chargeValue) {
setBizContent("charge_value", chargeValue);
}
/**
* 外部订单号
*
* @return String
*/
public String getCustomerOrderNo() {
Object value = getBizContentValue("customer_order_no");
return value != null ? String.valueOf(value) : null;
}
public void setCustomerOrderNo(String customerOrderNo) {
setBizContent("customer_order_no", customerOrderNo);
}
}

View File

@@ -1,30 +0,0 @@
package cn.lili.common.fulu.model;
/**
* 商品信息input dto
*
* @Auther: chenYing
* @Date: 2019/8/19 0019 16:04
*/
public class InputProductDto extends CommonRequest {
public InputProductDto() {
super();
setMethod("fulu.goods.info.get");
}
/**
* 商品编号
*
* @return String
*/
public String getProductId() {
Object value = getBizContentValue("product_id");
return value != null ? String.valueOf(value) : null;
}
public void setProductId(String productId) {
setBizContent("product_id", productId);
}
}

View File

@@ -1,29 +0,0 @@
package cn.lili.common.fulu.model;
/**
* 商品模板信息input dto
*
* @Auther: chenYing
* @Date: 2019/8/19 0019 16:01
*/
public class InputProductTemplateDto extends CommonRequest {
public InputProductTemplateDto() {
super();
setMethod("fulu.goods.template.get");
}
/**
* 商品模板编号
*
* @return String
*/
public String getTemplateId() {
Object value = getBizContentValue("template_id");
return value != null ? String.valueOf(value) : null;
}
public void setTemplateId(String templateId) {
setBizContent("template_id", templateId);
}
}

View File

@@ -1,72 +0,0 @@
package cn.lili.common.fulu.model;
/**
* 流量订单input dto
*
* @Auther: chenYing
* @Date: 2019/8/19 0019 13:50
*/
public class InputTrafficOrderDto extends CommonRequest {
public InputTrafficOrderDto() {
super();
setMethod("fulu.order.data.add");
}
/**
* 充值手机号
*
* @return String
*/
public String getChargePhone() {
Object value = getBizContentValue("charge_phone");
return value != null ? String.valueOf(value) : null;
}
public void setChargePhone(String chargePhone) {
setBizContent("charge_phone", chargePhone);
}
/**
* 充值数额M
*
* @return Double
*/
public Double getChargeValue() {
Object value = getBizContentValue("charge_value");
return value != null ? Double.valueOf(value.toString()) : null;
}
public void setChargeValue(Double chargeValue) {
setBizContent("charge_value", chargeValue);
}
/**
* 外部订单号
*
* @return String
*/
public String getCustomerOrderNo() {
Object value = getBizContentValue("customer_order_no");
return value != null ? String.valueOf(value) : null;
}
public void setCustomerOrderNo(String customerOrderNo) {
setBizContent("customer_order_no", customerOrderNo);
}
/**
* 流量性质 1:小时 2:日 3:7天 4:月 5:季度 6:半年 7:年
*
* @return Integer
*/
public Integer getPacketKind() {
Object value = getBizContentValue("packet_kind");
return value != null ? Integer.valueOf(value.toString()) : null;
}
public void setPacketKind(Integer packetKind) {
setBizContent("packet_kind", packetKind);
}
}

View File

@@ -1,15 +0,0 @@
package cn.lili.common.fulu.model;
/**
* 用户信息input dto
*
* @Auther: chenYing
* @Date: 2019/8/19 0019 16:06
*/
public class InputUserDto extends CommonRequest {
public InputUserDto() {
super();
setMethod("fulu.user.info.get");
}
}

View File

@@ -1,46 +0,0 @@
package cn.lili.common.fulu.model.response;
/**
* 响应对象
*
* @Auther: chenYing
* @Date: 2019/8/19 0019 15:06
*/
public class DefaultClientResponse {
private String code;
private String message;
private String result;
private String sign;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getResult() {
return result;
}
public void setResult(String result) {
this.result = result;
}
public String getSign() {
return sign;
}
public void setSign(String sign) {
this.sign = sign;
}
}

View File

@@ -1,129 +0,0 @@
package cn.lili.common.fulu.sdk;
import cn.lili.common.fulu.core.http.FuluClient;
import cn.lili.common.fulu.core.http.IFuluClient;
import cn.lili.common.fulu.core.utils.JSONUtil;
import cn.lili.common.fulu.model.CommonRequest;
import org.apache.commons.codec.digest.DigestUtils;
import java.util.Arrays;
import java.util.concurrent.Future;
/**
* 默认OpenApi客户请求实现
*
* @Auther: chenYing
* @Date: 2019/8/19 0019 16:45
*/
public class DefaultOpenApiClient implements IDefaultOpenApiClient {
/**
* 商户AppKey
*/
private String appKey;
/**
* 业务参数
*/
private CommonRequest bizContent;
/**
* http请求
*/
private IFuluClient fuluClient;
/**
* 方法
*/
private String method;
/**
* 应用秘钥
*/
private String sysSecret;
// public DefaultOpenApiClient(String url, String appKey, String sysSecret) {
// this.appKey = appKey;
// this.sysSecret = sysSecret;
//
// if (url == null || "".equals(url.trim())) {
// this.fuluClient = new FuluClient();
// } else {
// this.fuluClient = new FuluClient(url);
// }
// }
/**
* 如果url没改变可以使用这个构造
*
* @param appKey appKey
* @param sysSecret sysSecret
*/
// public DefaultOpenApiClient(String appKey, String sysSecret) {
// this.appKey = appKey;
// this.fuluClient = new FuluClient();
// this.sysSecret = sysSecret;
// }
/**
* 使用public void setBizContent(String bizContent)此方法method不能为空必填
* 或者使用其它构造调用fulu.sup.open.api.model.CommonRequest的setMethod也可以
*
* @param url url
* @param appKey appKey
* @param sysSecret sysSecret
* @param method method
*/
public DefaultOpenApiClient(String url, String appKey, String sysSecret, String method) {
this.appKey = appKey;
this.sysSecret = sysSecret;
this.method = method;
if (url == null || "".equals(url.trim())) {
this.fuluClient = new FuluClient();
} else {
this.fuluClient = new FuluClient(url);
}
}
@Override
public String excute() {
doSign();
return fuluClient.send(JSONUtil.toJSON(this.bizContent));
}
@Override
public Future<String> excuteAsync() {
doSign();
return fuluClient.sendAsync(JSONUtil.toJSON(this.bizContent));
}
@Override
public void setBizContent(String bizContent) {
this.bizContent = new CommonRequest();
this.bizContent.setBizContent(bizContent);
this.bizContent.setAppKey(this.appKey);
this.bizContent.setMethod(this.method);
}
@Override
public void setBizObject(CommonRequest bizModel) {
this.bizContent = bizModel;
this.bizContent.setAppKey(this.appKey);
if (method != null && !"".equals(method)) {
this.bizContent.setMethod(this.method);
}
}
private void doSign() {
if (bizContent.getMethod() == null || "".equals(bizContent.getMethod().trim())) {
throw new RuntimeException("param \"method\" can not blank!");
}
this.bizContent.setSign(null);
this.bizContent.getBizContent();
String json = JSONUtil.toJSON(this.bizContent);
char[] charArray = json.toCharArray();
Arrays.sort(charArray);
String signStr = new String(charArray);
signStr = String.format("%s%s", signStr, sysSecret);
this.bizContent.setSign(DigestUtils.md5Hex(signStr));
}
}

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