Merge remote-tracking branch 'origin/master'
6
docs/databases/data_modify.sql
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
UPDATE sys_permission SET status = 1 WHERE id = 243
|
||||||
|
UPDATE sys_permission SET status = 0 WHERE id = 243
|
||||||
|
|
||||||
|
-- 菜单--系统管理
|
||||||
|
UPDATE sys_permission SET status = 0 WHERE id = 19
|
||||||
22
docs/databases/tables_create.sql
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
CREATE TABLE `app_version` (
|
||||||
|
`id` bigint(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号',
|
||||||
|
`appName` varchar(100) NOT NULL DEFAULT '汇融云链' COMMENT '应用名称',
|
||||||
|
`versionCode` int(11) NOT NULL DEFAULT '101' COMMENT '版本编码',
|
||||||
|
`versionName` varchar(100) NOT NULL DEFAULT '101' COMMENT '版本号',
|
||||||
|
`downloadUrl` varchar(1024) DEFAULT NULL COMMENT '下载地址',
|
||||||
|
`versionInfo` varchar(1024) DEFAULT NULL COMMENT '版本描述',
|
||||||
|
`isAlpha` int(11) NOT NULL DEFAULT '0' COMMENT '是否内测:0否,1是',
|
||||||
|
`fileName` varchar(1024) DEFAULT NULL COMMENT '文件名',
|
||||||
|
`forceUpdate` int(11) NOT NULL DEFAULT '1' COMMENT '是否强制升级',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
insert into app_version(versionCode,versionName,downloadUrl,versionInfo)
|
||||||
|
values (101,'101','http://mall.yyundong.com/apks/mall-101.apk','初始版本')
|
||||||
|
|
||||||
|
insert into app_version(versionCode,versionName,downloadUrl,versionInfo,fileName)
|
||||||
|
values (1002,'1.0.0.2','http://mall.yyundong.com/apks/mall-1002.apk','BUG修复,功能完善','mall-1002.apk')
|
||||||
|
|
||||||
|
insert into app_version(versionCode,versionName,downloadUrl,versionInfo,fileName)
|
||||||
|
values (1003,'1.0.0.3','http://mall.yyundong.com/apks/mall-1003.apk','登录方式切换的Bug修复;登录及退出后本地缓存数据问题的修复。','mall-1003.apk')
|
||||||
32
docs/databases/tables_modify.sql
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
|
||||||
|
alter table sms_home_new_product add `original_price` decimal(10,2) DEFAULT NULL COMMENT '市场价';
|
||||||
|
alter table sms_home_recommend_product add `original_price` decimal(10,2) DEFAULT NULL COMMENT '市场价';
|
||||||
|
|
||||||
|
update sms_home_new_product shnp set
|
||||||
|
original_price=(select pp.original_price from pms_product pp where pp.id=shnp.product_id limit 1),
|
||||||
|
price=(select pp.price from pms_product pp where pp.id=shnp.product_id limit 1)
|
||||||
|
|
||||||
|
update sms_home_recommend_product shnp set
|
||||||
|
original_price=(select pp.original_price from pms_product pp where pp.id=shnp.product_id limit 1),
|
||||||
|
price=(select pp.price from pms_product pp where pp.id=shnp.product_id limit 1)
|
||||||
|
|
||||||
|
|
||||||
|
select * from sys_message
|
||||||
|
|
||||||
|
delete from sys_message where 1=1
|
||||||
|
|
||||||
|
insert into sys_message values
|
||||||
|
(1,340,'交易物流','您有新的物流信息','您的订单商品已经到取货点,请在7日内取出。',now(),now(),0,1),
|
||||||
|
(2,340,'云链助手','该施肥了','春天已经至,已到施肥时间。。',now(),now(),0,1),
|
||||||
|
(3,341,'交易物流','您有新的物流信息','您的订单商品已经到取货点,请在7日内取出。',now(),now(),0,1),
|
||||||
|
(4,341,'云链助手','该施肥了','春天已经至,已到施肥时间。。',now(),now(),0,1);
|
||||||
|
|
||||||
|
SELECT id,user_id,code,params,content,ctime,utime,status FROM sys_message WHERE user_id = 341 ORDER BY ctime desc
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE mallplus1.sys_message MODIFY COLUMN id int(10) unsigned auto_increment NOT NULL;
|
||||||
|
ALTER TABLE mallplus1.sys_message MODIFY COLUMN status tinyint(3) unsigned DEFAULT 0 NOT NULL COMMENT '0未查看,1已查看';
|
||||||
|
ALTER TABLE mallplus1.sys_message MODIFY COLUMN utime bigint(20) unsigned NULL COMMENT '查看时间';
|
||||||
|
ALTER TABLE mallplus1.sys_message MODIFY COLUMN content text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '内容';
|
||||||
|
ALTER TABLE mallplus1.sys_message MODIFY COLUMN params varchar(5000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '参数';
|
||||||
|
ALTER TABLE mallplus1.sys_message MODIFY COLUMN code varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '消息编码';
|
||||||
BIN
docs/images/800X1280-2 加深.jpg
Normal file
|
After Width: | Height: | Size: 4.9 MiB |
BIN
docs/images/bj1.jpg
Normal file
|
After Width: | Height: | Size: 67 KiB |
BIN
docs/images/bj2.jpg
Normal file
|
After Width: | Height: | Size: 173 KiB |
BIN
docs/images/bj3.jpg
Normal file
|
After Width: | Height: | Size: 141 KiB |
BIN
docs/images/icon物流.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
docs/images/停车缴费备份.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
docs/images/园区外卖备份.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
docs/images/微信图片_20230220120104.jpg
Normal file
|
After Width: | Height: | Size: 136 KiB |
BIN
docs/images/我已审批备份 2.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
docs/images/投诉建议备份.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
docs/images/科技产业服务备份 2.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
docs/images/维保记录备份.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
docs/images/行程备份.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
docs/images/设备维修上报备份 2.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
docs/xiugai/3.1汇惠云链管理测试.zip
Normal file
170
docs/xiugai/wx20230220.txt
Normal file
@@ -0,0 +1,170 @@
|
|||||||
|
云链需要修改和完善的内容:
|
||||||
|
1。消息通知功能需要实现;
|
||||||
|
2。后台管理的菜单需要调整,顺序、菜单名称、需要隐藏的都需要调整;
|
||||||
|
3。收货地址(提货点)功能需要实现;
|
||||||
|
4。定时任务功能,可发送定时消息通知。
|
||||||
|
|
||||||
|
问题(2023-02-21)
|
||||||
|
1. APP升级功能
|
||||||
|
2. 后台管理,去掉商户入住,绑定社区
|
||||||
|
3. APP上新增收货地址,新增完后显示错误。
|
||||||
|
4. APP上收藏功能不可用
|
||||||
|
5. APP上注册成功后,需要有提示
|
||||||
|
6. APP注册成功后,直接登录,登录后跳转到登录之前的页面。
|
||||||
|
7. 优惠券领取后,应该不再显示该优惠券
|
||||||
|
8. 优惠券是否可针对某个商品或针对会员可领取
|
||||||
|
9. APP短信验证(注册、登录)
|
||||||
|
10.支付宝付款、微信付款功能
|
||||||
|
|
||||||
|
呼叫凹凸曼~,郭兴:
|
||||||
|
1. APP升级功能
|
||||||
|
2. 后台管理,去掉商户入住,绑定社区(手机端完成)
|
||||||
|
3. APP上新增收货地址,新增完后显示错误。
|
||||||
|
4. APP上收藏功能不可用
|
||||||
|
5. APP上注册成功后,需要有提示
|
||||||
|
6. APP注册成功后,直接登录,登录后跳转到登录之前的页面。(手机端完成)
|
||||||
|
7. 优惠券领取后,应该不再显示该优惠券 (手机端完成)
|
||||||
|
8. 优惠券是否可针对某个商品或针对会员可领取
|
||||||
|
9. APP短信验证(注册、登录)
|
||||||
|
10.支付宝付款、微信付款功能
|
||||||
|
|
||||||
|
聂金义:
|
||||||
|
APP升级功能最后处理
|
||||||
|
|
||||||
|
聂金义:
|
||||||
|
@popo 短信验证后台优先处理
|
||||||
|
|
||||||
|
呼叫凹凸曼~,郭兴:
|
||||||
|
@瓶旁醉卧 剩下的问题都是需要后台配合的
|
||||||
|
|
||||||
|
呼叫凹凸曼~,郭兴:
|
||||||
|
http://mall.yyundong.com/portalapi/api/
|
||||||
|
|
||||||
|
呼叫凹凸曼~,郭兴:
|
||||||
|
userInfo: 'single/home/userInfo', // 用户信息
|
||||||
|
|
||||||
|
聂金义:
|
||||||
|
@Z. 看看能把注册短信搭起来吗?
|
||||||
|
|
||||||
|
底孟哲:
|
||||||
|
有接口文档吗
|
||||||
|
|
||||||
|
底孟哲:
|
||||||
|
[图片]
|
||||||
|
|
||||||
|
底孟哲:
|
||||||
|
是这个吗?@瓶旁醉卧
|
||||||
|
|
||||||
|
聂金义:
|
||||||
|
是
|
||||||
|
|
||||||
|
聂金义:
|
||||||
|
接口文档还没有,看看把咱们的短信接口能不能放上去
|
||||||
|
|
||||||
|
聂金义:
|
||||||
|
1.后台登陆title改为“汇惠云链管理后台”。
|
||||||
|
2.去掉背景,拉大登陆框,把图标换成云链图标。
|
||||||
|
3.后台首页上面四个图改成竖的,柱状图在右侧。
|
||||||
|
4.马上注册把邀请码换成“汇融乡村振兴卡号”,验证前11位为“62350109317”,并验证共19位。注册后如果验证成功则直接成为会员。
|
||||||
|
5.商品页去掉商品关联。
|
||||||
|
6.立即升级连接页面不对。
|
||||||
|
7.领取优惠券必须是会员
|
||||||
|
|
||||||
|
聂金义:
|
||||||
|
APP
|
||||||
|
1.马上注册把邀请码换成“汇融乡村振兴卡号”,验证前11位为“62350109317”,并验证共19位。注册后如果验证成功则直接成为会员。给后台一个状态,设置为会员。
|
||||||
|
2.右上角的消息去掉,左上角扫描去掉。
|
||||||
|
3.列表页里的惠农价和市场价换价格。
|
||||||
|
|
||||||
|
聂金义:
|
||||||
|
汇融乡村振兴卡号输入有误,将无法享受惠农价。是否继续注册?
|
||||||
|
|
||||||
|
聂金义:
|
||||||
|
7.上拉显示不了更多。
|
||||||
|
8.点击升级功能,提示“已经是最新版本。”后期做。
|
||||||
|
|
||||||
|
现在有个功能需要处理一下,注册时需要判断是不是汇融用户,如果是的话做个汇融会员的标记,只有汇融会员才能领取优惠券。
|
||||||
|
|
||||||
|
5.优惠券不能对应商品。
|
||||||
|
|
||||||
|
后台
|
||||||
|
1.后台登陆title改为“汇惠云链管理后台”。
|
||||||
|
2.去掉背景,拉大登陆框,把图标换成云链图标。
|
||||||
|
3.后台首页上面四个图改成竖的,柱状图在右侧。
|
||||||
|
4.商品页去掉商品关联。
|
||||||
|
5.优惠券不能对应商品。
|
||||||
|
现在急需处理的是注册时需要判断为会员,只有会员再能领优惠券
|
||||||
|
|
||||||
|
APP
|
||||||
|
1.马上注册把邀请码换成“汇融乡村振兴卡号”,验证前11位为“62350109317”,并验证共19位。注册后如果验证成功则直接成为会员。给后台一个状态,设置为会员。汇融乡村振兴卡号输入有误,将无法享受惠农价。是否继续注册?
|
||||||
|
2.右上角的消息去掉,左上角扫描去掉。
|
||||||
|
3.列表页里的惠农价和市场价换价格。
|
||||||
|
4.市场价所有的杠都去掉。
|
||||||
|
5.商品页“市场价”改为“惠农价”。
|
||||||
|
6.优惠为负数。
|
||||||
|
7.上拉显示不了更多。
|
||||||
|
8.商户入驻、绑定社区去掉。
|
||||||
|
9.立即升级,提示“已经是最新版本。”
|
||||||
|
10.升级功能后期做。
|
||||||
|
11.优惠券必须是会员才能领取。
|
||||||
|
12.注册完提示成功,几秒后跳转。“恭喜您注册成功。(3秒)”,如果卡号验证成功“恭喜您注册成功,并成为惠农会员。(3秒)”
|
||||||
|
13.收藏不能使用(测试正常)
|
||||||
|
14.领完优惠券自动刷新,页面上不再显示。
|
||||||
|
15.地址管理里的地址即“取货点”。
|
||||||
|
16.编辑地址里所在地不能保存。
|
||||||
|
17.注册后时默认头像需要改掉。
|
||||||
|
|
||||||
|
APP
|
||||||
|
1.马上注册把邀请码换成“汇融乡村振兴卡号”,验证前11位为“62350109317”,并验证共19位。注册后如果验证成功则直接成为会员。给后台一个状态,设置为会员。汇融乡村振兴卡号输入有误,将无法享受惠农价。是否继续注册?
|
||||||
|
2.右上角的消息去掉,左上角扫描去掉。
|
||||||
|
3.列表页里的“市场价”改为“惠农价”。
|
||||||
|
4.市场价所有的杠都去掉。(完成)
|
||||||
|
5.商品页“市场价”改为“惠农价”。(完成)
|
||||||
|
6.优惠为负数。(完成)
|
||||||
|
7.上拉显示不了更多。(有时正常有时拉取不出来)
|
||||||
|
8.商户入驻、绑定社区去掉。(完成)
|
||||||
|
9.立即升级,提示“已经是最新版本。”
|
||||||
|
10.升级功能后期做。
|
||||||
|
11.优惠券必须是会员才能领取。
|
||||||
|
12.注册完提示成功,几秒后跳转。“恭喜您注册成功。(3秒)”,如果卡号验证成功“恭喜您注册成功,并成为惠农会员。(3秒)”
|
||||||
|
13.收藏不能使用(测试正常)
|
||||||
|
14.领完优惠券自动刷新,页面上不再显示。
|
||||||
|
15.地址管理里的地址即“取货点”。
|
||||||
|
16.编辑地址里所在地不能保存。
|
||||||
|
17.注册后时默认头像需要改掉。
|
||||||
|
18.点击立即使后转圈。
|
||||||
|
19.我的优惠券下方直接用日期。
|
||||||
|
|
||||||
|
1.马上注册把邀请码换成“汇融乡村振兴卡号”,验证前11位为“62350109317”,并验证共19位。注册后如果验证成功则直接成为会员。给后台一个状态,设置为会员。汇融乡村振兴卡号输入有误,将无法享受惠农价。是否继续注册?(完成)
|
||||||
|
2.右上角的消息去掉,左上角扫描去掉。(完成)
|
||||||
|
3.列表页里的“市场价”改为“惠农价”。(完成)
|
||||||
|
4.市场价所有的杠都去掉。(完成)
|
||||||
|
5.商品页“市场价”改为“惠农价”。(完成)
|
||||||
|
6.优惠为负数。(完成)
|
||||||
|
7.上拉显示不了更多。(有时正常有时拉取不出来)(完成)
|
||||||
|
8.商户入驻、绑定社区去掉。(完成)
|
||||||
|
9.立即升级,提示“已经是最新版本。”(完成)
|
||||||
|
10.升级功能后期做。
|
||||||
|
11.优惠券必须是会员才能领取。
|
||||||
|
12.注册完提示成功,几秒后跳转。“恭喜您注册成功。(3秒)”,如果卡号验证成功“恭喜您注册成功,并成为惠农会员。(3秒)”(完成)
|
||||||
|
13.收藏不能使用(测试正常)(完成)
|
||||||
|
14.领完优惠券自动刷新,页面上不再显示。(完成)
|
||||||
|
15.地址管理里的地址即“取货点”。
|
||||||
|
16.编辑地址里所在地不能保存。
|
||||||
|
17.注册后时默认头像需要改掉。
|
||||||
|
18.点击立即使后转圈。(完成)
|
||||||
|
19.我的优惠券下方直接用日期。(完成)
|
||||||
|
|
||||||
|
|
||||||
|
汇融云链APP修改与功能完善内容安排:
|
||||||
|
1。APP端,找不到注册页面了。(郭兴)
|
||||||
|
2。APP端-我的云链-地址管理,该页面,如果已经有了地址,将“新增地址”按钮隐藏(只允许有一个收货地址)。(郭兴)
|
||||||
|
3。APP端-我的云链-地址管理-新增(或编辑)地址页面,所在地与取货点需要从后台接口获取。(郭兴)
|
||||||
|
4。针对第3项,后台需要增加维护所在地与取货点的功能页面,并给APP提供对应接口。(刘战洪)
|
||||||
|
5。APP端-我的云链-地址管理-编辑地址页面,需要将保存的所在地,取货点显示出来
|
||||||
|
6。APP端消息通知的展示,后台管理有对消息通知设置与维护的功能页面。(刘战洪)
|
||||||
|
7。可以设置定时向APP端发送消息通知。(刘战洪)
|
||||||
|
8。APP端支付功能的实现,需要微信、支付宝支付。(底孟哲)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BIN
docs/xiugai/商品.docx
Normal file
51
docs/xiugai/商城问题及修改20230311.txt
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
已经完成修改
|
||||||
|
银行问题:1.确认收货页面点击确认收货系统无法正常跳转。
|
||||||
|
已修复
|
||||||
|
银行问题:2.支付方式显示错误,实际为微信支付,系统显示支付宝。
|
||||||
|
已修复
|
||||||
|
银行问题:5.登陆app无网络时不提示无网络。
|
||||||
|
已修复
|
||||||
|
银行问题:7.新注册用户默认有50余额,使用余额支付后金额不扣减。
|
||||||
|
经测试,没出现该问题
|
||||||
|
银行问题:10.后台发货未取到收货人信息。
|
||||||
|
已修复
|
||||||
|
|
||||||
|
问题:2. 管理后台,发货列表里,没有收货人手机号、地址。
|
||||||
|
已修复
|
||||||
|
问题:3. 在APP端通过微信支付的, 管理后台查看的显示支付方式是支付宝。
|
||||||
|
已修复
|
||||||
|
问题:4. 在APP端,点确认收货不能正常跳转,只能返回。
|
||||||
|
已修复
|
||||||
|
|
||||||
|
待修改
|
||||||
|
银行问题:3.后台首页可点击,跳转空白页,作用是什么?
|
||||||
|
修改后台首页的页面,去掉原界面上的内容,只显示一句“欢迎进入汇融惠家营销系统管理后台”这样的话。(郭兴)
|
||||||
|
银行问题:4.优惠券面额无法输入小数点。
|
||||||
|
修改新增优惠券界面的验证规则,设置优惠券面额可输入2位小数。(郭兴)
|
||||||
|
银行问题:8.新注册用户余额充值报错?
|
||||||
|
余额充值分别调用了支付宝和微信的支付接口,需要后台调整支付接口(需要保证支付成功后能够回调,能接收银行的回访并更改支付状态及更新对应用户余额值。需要多测试保证数据正确)。(底孟哲负责后台接口,郭兴负责手机端)
|
||||||
|
|
||||||
|
问题:1. APP端,已经过期的优惠券应该归到已失效里边。
|
||||||
|
查看优惠券列表的接口,接口返回数据时对应正确的状态。(郭兴查看手机端调用接口及显示数据参数,底孟哲调整接口数据)
|
||||||
|
|
||||||
|
|
||||||
|
不确定修改
|
||||||
|
|
||||||
|
银行问题:6.待支付的订单取消后优惠券不回退。
|
||||||
|
|
||||||
|
优化:
|
||||||
|
1.系统增加退单流程。
|
||||||
|
2.订单归集统计?对于商品待发货、已发货、已完成订单统计列表。
|
||||||
|
(1)全部提货点的商品订单统计。
|
||||||
|
(2)各个提货点的商品订单统计。
|
||||||
|
(3)各个提货点对应到人的订单统计。
|
||||||
|
3.系统发货后自动收货确认时间是多久?
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
聂总,这是商城目前的问题及修改情况。包括3部分内容。
|
||||||
|
1。 已修改的问题测试过了,还没发布新版本
|
||||||
|
2。 未修改的问题,已经有解决方案及对应负责人,还没有安排具体修改时间
|
||||||
|
3。 不确定的问题,目前没有确定是否修改和调整。没有具体修改方案及所需要的人工时间
|
||||||
BIN
docs/xiugai/汇惠云链管理测试问题.zip
Normal file
BIN
docs/xiugai/汇融云链APP问题-20230228.docx
Normal file
BIN
docs/xiugai/汇融云链APP问题-20230307.docx
Normal file
4
docs/xiugai/汇融云链APP问题-20230307.txt
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
1. APP端,已经过期的优惠券应该归到已失效里边。郭兴看下手机端展示逻辑,是否可以通过修改后台接口修改
|
||||||
|
2. 管理后台,发货列表里,没有收货人手机号、地址。郭兴看下这数据是怎么取的,刘战洪配合对接接口
|
||||||
|
3. 在APP端通过微信支付的, 管理后台查看的显示支付方式是支付宝。郭兴看下数据状态、参数是什么,刘战洪配合对接接口
|
||||||
|
4. 在APP端,点确认收货不能正常跳转,只能返回。郭兴看下是否手机端的问题,另外再把各种状态看下是否正确,比如:订单已经确认收货,再进入详情还显示待收货
|
||||||
BIN
docs/xiugai/汇融惠家营销系统疑问归集20230308(修改情况).docx
Normal file
BIN
docs/xiugai/汇融惠家营销系统疑问归集20230308(分).docx
Normal file
BIN
docs/xiugai/汇融惠家营销系统疑问归集20230308.docx
Normal file
62
docs/xiugai/营销系统问题及修改20230311(修正).txt
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
一、已经完成修改
|
||||||
|
银行提问:1.确认收货页面点击确认收货系统无法正常跳转。
|
||||||
|
已修复
|
||||||
|
银行提问:2.支付方式显示错误,实际为微信支付,系统显示支付宝。
|
||||||
|
已修复
|
||||||
|
银行提问:5.登陆app无网络时不提示无网络。
|
||||||
|
已修复
|
||||||
|
银行提问:10.后台发货未取到收货人信息。
|
||||||
|
已修复
|
||||||
|
问题:2. 管理后台,发货列表里,没有收货人手机号、地址。
|
||||||
|
已修复
|
||||||
|
问题:3. 在APP端通过微信支付的, 管理后台查看的显示支付方式是支付宝。
|
||||||
|
已修复
|
||||||
|
问题:4. 在APP端,点确认收货不能正常跳转,只能返回。
|
||||||
|
已修复
|
||||||
|
|
||||||
|
二、待修改
|
||||||
|
银行提问:3.后台首页可点击,跳转空白页,作用是什么?
|
||||||
|
后台首页显示的统计数据,将点击链接去掉(即只展示数据不需要页面跳转)。页面上展示的需要是真实数据,如果暂时无真实数据的接口,先隐藏不显示,后期完成接口后再进行展示。(郭兴)
|
||||||
|
银行提问:4.优惠券面额无法输入小数点。
|
||||||
|
修改新增优惠券界面的验证规则,设置优惠券面额可输入2位小数。(郭兴)
|
||||||
|
银行提问:8.新注册用户余额充值报错?
|
||||||
|
经过讨论与沟通,余额充值及余额支付功能的实际用途不大。可先将余额相关功能屏蔽,1、“我的云链”界面,不显示“余额”(需要对界面效果进行调整,“余额”这里可显示其他内容,不要显的太空);2、购买支付时,不显示“余额支付”选项;3、测试APP端各个界面,屏蔽“余额”相关内容。(郭兴负责手机端)
|
||||||
|
管理后台“会员列表”页面也需要屏蔽“余额”列及“余额充值”按钮。
|
||||||
|
银行提问:7.新注册用户默认有50余额,使用余额支付后金额不扣减。
|
||||||
|
经测试,没出现该问题。
|
||||||
|
针对 账号13832363123存在该问题,对账号13832363123的数据分析结果如下:
|
||||||
|
注册时间:2023-02-27 10:07:48,注册时余额为0;
|
||||||
|
余额增加:2023-02-27 15:42:16,增加方式:后台余额充值,充值金额:50。该操作为测试人员测试后台账户余额充值功能时所进行;
|
||||||
|
余额消费:2023-03-08 11:42:54,APP端订单使用余额付款0.03元,余额值减少0元,余额无变化;
|
||||||
|
余额消费:2023-03-08 11:43:31,APP端订单使用余额付款0.03元,余额值减少0元,余额无变化;
|
||||||
|
余额消费:2023-03-11 18:30:44,APP端订单使用余额付款0.03元,余额值减少0元,余额无变化;
|
||||||
|
结论:新注册用户不会有50余额,如果使用余额付款低于1元钱,余额账户无变化。
|
||||||
|
引申问题:1:需要确认已有账户再次注册(即13832363123账号已经注册成功,退出登录后再用13832363123进行注册)的情况下前后台的执行逻辑是什么?2:使用余额支付时,支付金额较小时(如:0.03元),余额值也应该进行调整(该功能优先级较低,完成其他修改后再处理)
|
||||||
|
问题:1. APP端,已经过期的优惠券应该归到已失效里边。
|
||||||
|
查看优惠券列表的接口,接口返回数据时对应正确的状态。(郭兴查看手机端调用接口及显示数据参数,底孟哲调整接口数据)
|
||||||
|
|
||||||
|
三、需要讨论后修改
|
||||||
|
银行提问:6.待支付的订单取消后优惠券不回退。
|
||||||
|
该问题需要从创建订单时使用优惠券到订单取消或失败整个流程的各个环节进行分析,确认取消支付或支付失败的情况下优惠券都正确退回。
|
||||||
|
|
||||||
|
优化:
|
||||||
|
1.系统增加退单流程。
|
||||||
|
2.订单归集统计?对于商品待发货、已发货、已完成订单统计列表。
|
||||||
|
(1)全部提货点的商品订单统计。
|
||||||
|
(2)各个提货点的商品订单统计。
|
||||||
|
(3)各个提货点对应到人的订单统计。
|
||||||
|
3.系统发货后自动收货确认时间是多久?
|
||||||
|
|
||||||
|
后台管理,发货界面加一个批量发货,具体实现逻辑再讨论,先修改问题。
|
||||||
|
|
||||||
|
商品发货以及到达取货点,现实现功能为商品发货后发送一个物流信息到用户手机APP信息界面,需要用户进入信息界面主动向服务端发起查询。需要考虑是否发达推送消息或短信通知(推送消息需集成第三方消息推送)。
|
||||||
|
|
||||||
|
因为原系统订单流程是用户下单、支付、商家发货、物流送货到用户收货地址、确认收货交易完成。
|
||||||
|
现在订单流程为用户下单、支付、商家发货、物流送货到用户指定取货点、用户到取货点取货及确认收货交易完成。
|
||||||
|
需要对订单流程进行完整测试,各个环节状态的改变,对用户的通知等都需要再考虑完善。
|
||||||
|
|
||||||
|
四、修改原则
|
||||||
|
1. 现有功能不可以报错,功能可以简化但不可以出错、不可以有缺陷;
|
||||||
|
2. 首先考虑手机端APP的稳定性,后期功能完善和调整,通过后台操作或接口来实现,避免手机端APP的升级;
|
||||||
|
3. 业务流程需要完整,能够形成完整的闭环,不可以有操作过程中有断开无法连贯的情况。
|
||||||
|
|
||||||
13
docs/xiugai/营销系统问题及修改20230313.txt
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
1。优惠券面额无法输入小数点。
|
||||||
|
修改新增优惠券界面的验证规则,设置优惠券面额可输入2位小数。(郭兴)
|
||||||
|
2。需要确认已有账户再次注册(即13832363123账号已经注册成功,退出登录后再用13832363123进行注册)的情况下前后台的执行逻辑是什么?
|
||||||
|
3。APP端,已经过期的优惠券应该归到已失效里边。
|
||||||
|
查看优惠券列表的接口,接口返回数据时对应正确的状态。(郭兴查看手机端调用接口及显示数据参数,底孟哲调整接口数据)
|
||||||
|
4。管理后台的订单列表页面,点击“查询搜索”报错。
|
||||||
|
5。管理后台的会员列表页面。查询功能不起作用
|
||||||
|
6。待支付的订单取消后优惠券不回退。
|
||||||
|
|
||||||
|
需要对订单流程进行完整测试,各个环节状态的改变。
|
||||||
|
|
||||||
|
系统发货后自动收货确认时间是2天;订单完成时间是5天;
|
||||||
76
docs/安卓APP证书/key-info.txt
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
打包参数:
|
||||||
|
Android包名:com.yxt.mall
|
||||||
|
使用自有证书:yxtmallapp.keystore
|
||||||
|
证书别名:yxtmallapp
|
||||||
|
证书私钥密码:123456
|
||||||
|
证书文件:yxtmallapp.keystore
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
C:\opt\jdk1.8.0_261\bin\keytool -genkey -alias yxtmallapp -keyalg RSA -keysize 2048 -validity 36500 -keystore yxtmallapp.keystore
|
||||||
|
密码:123456
|
||||||
|
|
||||||
|
C:\opt\jdk1.8.0_261\bin\keytool -list -v -keystore yxtmallapp.keystore
|
||||||
|
输入密钥库口令:
|
||||||
|
密钥库类型: jks
|
||||||
|
密钥库提供方: SUN
|
||||||
|
|
||||||
|
您的密钥库包含 1 个条目
|
||||||
|
|
||||||
|
别名: yxtmallapp
|
||||||
|
创建日期: 2023-2-27
|
||||||
|
条目类型: PrivateKeyEntry
|
||||||
|
证书链长度: 1
|
||||||
|
证书[1]:
|
||||||
|
所有者: CN=liu, OU=yxt, O=yxt, L=sjz, ST=hebei, C=CN
|
||||||
|
发布者: CN=liu, OU=yxt, O=yxt, L=sjz, ST=hebei, C=CN
|
||||||
|
序列号: 388e0f61
|
||||||
|
有效期为 Mon Feb 27 09:58:50 CST 2023 至 Wed Feb 03 09:58:50 CST 2123
|
||||||
|
证书指纹:
|
||||||
|
MD5: 0B:3E:40:4F:68:72:34:BF:98:1B:9D:34:3A:2C:59:A9
|
||||||
|
SHA1: A7:D7:83:32:8C:59:02:57:8D:2E:CB:16:BB:5B:3B:74:35:DA:67:08
|
||||||
|
SHA256: 0F:3B:5F:DC:03:DB:78:2B:35:60:69:95:73:40:72:A6:AC:96:F0:C8:D1:18:6E:1D:3F:BF:F8:21:BB:AE:85:1B
|
||||||
|
签名算法名称: SHA256withRSA
|
||||||
|
主体公共密钥算法: 2048 位 RSA 密钥
|
||||||
|
版本: 3
|
||||||
|
|
||||||
|
扩展:
|
||||||
|
|
||||||
|
#1: ObjectId: 2.5.29.14 Criticality=false
|
||||||
|
SubjectKeyIdentifier [
|
||||||
|
KeyIdentifier [
|
||||||
|
0000: 6E FA C5 DA 91 A2 65 22 17 E9 DE 1B 72 8B 22 CB n.....e"....r.".
|
||||||
|
0010: A9 81 5C 3A ..\:
|
||||||
|
]
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*******************************************
|
||||||
|
*******************************************
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Warning:
|
||||||
|
JKS 密钥库使用专用格式。建议使用 "keytool -importkeystore -srckeystore yxtmallapp.keystore -destkeystore yxtmallapp.keystore -deststoretype pkcs12" 迁移到行业标准格式 PKCS12。
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
支付宝APPID,2018082761134635
|
||||||
|
#支付宝相关配置
|
||||||
|
alipay.appId=2018082761134635
|
||||||
|
alipay.privateKey=MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCpYi38h2/25e4mNWo56mmwuwa7QbBbPdgH00rsmPI/+0JkYhda2uZDvtrFXWMLzVJ2ioh9pamcfUbb2LcFgLIJ0KJyTia4sVMHmbk9l8wPf9mE4aOYN8ix6olzkm9ZhDGVekx2niW/hf6bpjnh92+I4EZo4xsK3RAsQ9oDXPjrJzktrrerAP+5MNOY8wLRqOp0KU+bOIcsz4Wz+qD3UxP2PjXPJDvXu7NkYDndOc7G0tVnhzVahFafqAntbgQHMyJENhLl9xdbnYdiKQqZJUwfI9xlRKYk08P4YVYTL7dAGAibQJJamgqmmKo8uibDIMkLsTGNm5WzW3EErWOCl6wlAgMBAAECggEAXfyxgbdxRDHPlHn9KIfO/5a3pH5NqkNFtQnkQCaZ/TChZWwcg3iFXr/vSqaICAt1H3u9QuMCm2fUQrcczzvbDqErEnwU9lTGuqfs5qVtQIhznU1K5nLFtRtsC6oMiUJV9Rh4hzU3wu9KGPoCkkUnKW8xApBJ+Bw0FivMNCOJp4kipif0gXQFxDH14w8n4QAyG3keXYP43DPqlsjmjJm4inHajxNO012Snle5SqA5HaIrZzf9St3ctq1BzqgUaD5yyXPmPyi1sqjrK+A16R4DrbKlY2h3/mo1IIfPjYbjb/uPcHf9pDMxEFwYIZ+kkz0uUjRDNWVX3A7ldav8MvvZ/QKBgQDot2raw93blrEhld3GGY4JNxboi6UZ1guK2nDEjlnpZjDUklSlNsx82NM8g0bm76Q9A3WpuoHQoSGEIy9ElrMuNS7xj+PZe5mNyKFMBG8hKeIV3jx4OIU80aiV9OQLv6+AonavHvOLXu41OJKdoQexyz7q3lu0+i7d9KKbWd2SlwKBgQC6VJxj1KPh3kHtmm/d/5fOZUDLqxTOyexRrEUCj9hGjv5XymxULQPskKxasFKiPyn4TCp2ZOrPO1slu8IUpzaymM4DDQYtTQkbsAT/N6r9efCJTXDdTgm5iyTaILbSbqd01KEnqjmFLOSCpasvM47rARlG4IYXIXD9cXKj12AaowKBgAN7w2C079w6nDopeSFe/o5KwdAHTxhc6N1SOb/ndZcVzYNREW1LrbHsuPS97lDEo4u6Qoeg4BKUZuEIecuoCdSWPTamdb2qqPjDWQ6/Pj6b1uOG6RbPmcb4SHK+MK+wVdsyE165suGSMTSgvSkY4PmbVjzDyVGjMRJneAulQ7jPAoGAViCIDWkbu2q1xLNPJClhrSiGU94nhxI05uefGnkM+khcbo4Flr8cAjw5Ps4j1BUoPDpQolsxYkrIbd+k7VEBanpRN33MriHepOqu1J2RrwqvUXf3RIQu4JHdnenjN8+oHcuvFhuL7O/8TBtxziah2CSw318m/AgcJzpKSEtkg8sCgYB/cr6PuuQ7JpK2kYmwYMSwNvys0v31iSqFmJK6EyPRycGw9Wj/ANiGJrKuVqdnzb2LqSzdNWkKte25hSIv21satgHM2of7oFzjFB2N/hMx5o+nOQgq0zZcA6Mvn0W3GFFZ1YAep3oyrxLh9+5ELi2JGXgJafiEJvr5J3YzSGOWrw==
|
||||||
|
alipay.serverUrl=https://openapi.alipay.com/gateway.do
|
||||||
|
alipay.domain=http://2xpk7t.natappfree.cc/api
|
||||||
|
#回调地址
|
||||||
|
alipay.notifyUrl=http://2xpk7t.natappfree.cc/api/aliPay/notify_url
|
||||||
|
# 支付宝CA根证书文件路径(alipay_root_cert_path 文件绝对路径)
|
||||||
|
alipay.RootCertPath=D:\\apliay\\alipayRootCert.crt
|
||||||
|
# 支付宝公钥证书文件路径(alipay_cert_path 文件绝对路径)
|
||||||
|
alipay.ALIPAY_PUBLIC_KEY=D:\\apliay\\alipayCertPublicKey_
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BIN
docs/安卓APP证书/yxtmallapp.keystore
Normal file
BIN
docs/手册/huichuan.apk
Normal file
BIN
docs/手册/logo01.png
Normal file
|
After Width: | Height: | Size: 60 KiB |
BIN
docs/手册/xiqu.apk
Normal file
BIN
docs/手册/交付清单.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
docs/手册/惠传01.jpg
Normal file
|
After Width: | Height: | Size: 123 KiB |
BIN
docs/手册/惠传02.jpg
Normal file
|
After Width: | Height: | Size: 229 KiB |
BIN
docs/手册/惠传03.jpg
Normal file
|
After Width: | Height: | Size: 264 KiB |
BIN
docs/手册/惠传04.jpg
Normal file
|
After Width: | Height: | Size: 266 KiB |
BIN
docs/手册/戏曲01.jpg
Normal file
|
After Width: | Height: | Size: 117 KiB |
BIN
docs/手册/戏曲02.jpg
Normal file
|
After Width: | Height: | Size: 76 KiB |
BIN
docs/手册/戏曲03.jpg
Normal file
|
After Width: | Height: | Size: 260 KiB |
BIN
docs/手册/戏曲04.jpg
Normal file
|
After Width: | Height: | Size: 162 KiB |
BIN
docs/手册/汇融云链介绍与操作.pptx
Normal file
BIN
docs/测试问题文档及操作页面.zip
Normal file
@@ -42,29 +42,29 @@ public class BuildWuyeCompanyServiceImpl extends ServiceImpl<BuildWuyeCompanyMap
|
|||||||
//1 创建物业公司
|
//1 创建物业公司
|
||||||
entity.setCreateTime(new Date());
|
entity.setCreateTime(new Date());
|
||||||
wuyeCompanyMapper.insert(entity);
|
wuyeCompanyMapper.insert(entity);
|
||||||
// 2 创建物业公司账号
|
// // 2 创建物业公司账号
|
||||||
SysUser user = new SysUser();
|
// SysUser user = new SysUser();
|
||||||
user.setUsername(entity.getName());
|
// user.setUsername(entity.getName());
|
||||||
SysUser umsAdminList = userMapper.selectByUserName(entity.getName());
|
// SysUser umsAdminList = userMapper.selectByUserName(entity.getName());
|
||||||
if (umsAdminList != null) {
|
// if (umsAdminList != null) {
|
||||||
throw new ApiMallPlusException("此物业公司已存在");
|
// throw new ApiMallPlusException("此物业公司已存在");
|
||||||
}
|
// }
|
||||||
user.setStatus(1);
|
// user.setStatus(1);
|
||||||
// user.setStoreId(entity.getId());
|
// // user.setStoreId(entity.getId());
|
||||||
user.setSupplyId(0L);
|
// user.setSupplyId(0L);
|
||||||
user.setPassword(passwordEncoder.encode("123456"));
|
// user.setPassword(passwordEncoder.encode("123456"));
|
||||||
user.setCreateTime(new Date());
|
// user.setCreateTime(new Date());
|
||||||
user.setSupplyId(0L);
|
// user.setSupplyId(0L);
|
||||||
user.setNote("物业公司账户:物业公司ID=" + entity.getName() + "," + entity.getId());
|
// user.setNote("物业公司账户:物业公司ID=" + entity.getName() + "," + entity.getId());
|
||||||
user.setIcon(entity.getPic());
|
// user.setIcon(entity.getPic());
|
||||||
user.setNickName(entity.getName());
|
// user.setNickName(entity.getName());
|
||||||
userMapper.insert(user);
|
// userMapper.insert(user);
|
||||||
|
//
|
||||||
// 3 分配物业公司角色
|
// // 3 分配物业公司角色
|
||||||
SysUserRole userRole = new SysUserRole();
|
// SysUserRole userRole = new SysUserRole();
|
||||||
userRole.setAdminId(user.getId());
|
// userRole.setAdminId(user.getId());
|
||||||
userRole.setRoleId(5L);
|
// userRole.setRoleId(5L);
|
||||||
userRoleMapper.insert(userRole);
|
// userRoleMapper.insert(userRole);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,13 @@ public class CmsSubjectController {
|
|||||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
return new CommonResult().success(ICmsSubjectService.page(new Page<CmsSubject>(pageNum, pageSize), new QueryWrapper<>(entity).select(ConstansValue.sampleSubjectList)));
|
String title = entity.getTitle();
|
||||||
|
if (ValidatorUtils.notEmpty(title)) {
|
||||||
|
entity.setTitle(null);
|
||||||
|
return new CommonResult().success(ICmsSubjectService.page(new Page<CmsSubject>(pageNum, pageSize), new QueryWrapper<>(entity).like("title", title).select(ConstansValue.sampleSubjectList)));
|
||||||
|
}else {
|
||||||
|
return new CommonResult().success(ICmsSubjectService.page(new Page<CmsSubject>(pageNum, pageSize), new QueryWrapper<>(entity).select(ConstansValue.sampleSubjectList)));
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("根据条件查询所有专题表列表:%s", e.getMessage(), e);
|
log.error("根据条件查询所有专题表列表:%s", e.getMessage(), e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,12 +20,12 @@ import com.zscat.mallplus.oms.service.IOmsOrderService;
|
|||||||
import com.zscat.mallplus.oms.vo.OmsUpdateStatusParam;
|
import com.zscat.mallplus.oms.vo.OmsUpdateStatusParam;
|
||||||
import com.zscat.mallplus.util.UserUtils;
|
import com.zscat.mallplus.util.UserUtils;
|
||||||
import com.zscat.mallplus.utils.CommonResult;
|
import com.zscat.mallplus.utils.CommonResult;
|
||||||
import com.zscat.mallplus.utils.InterfaceUrl;
|
|
||||||
import com.zscat.mallplus.utils.ValidatorUtils;
|
import com.zscat.mallplus.utils.ValidatorUtils;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.annotations.ApiParam;
|
import io.swagger.annotations.ApiParam;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@@ -33,6 +33,7 @@ import javax.annotation.Resource;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.security.PublicKey;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -54,6 +55,26 @@ public class OmsOrderReturnApplyController {
|
|||||||
@Resource
|
@Resource
|
||||||
private IOmsOrderService IOmsOrderService;
|
private IOmsOrderService IOmsOrderService;
|
||||||
|
|
||||||
|
@Value("${alipay.domain}")
|
||||||
|
private String DOMAIN;
|
||||||
|
|
||||||
|
@Value("${alipay.appId}")
|
||||||
|
private String APPID;
|
||||||
|
|
||||||
|
@Value("${alipay.privateKey}")
|
||||||
|
private String APP_PRIVATE_KEY;
|
||||||
|
/**
|
||||||
|
* 支付宝公钥
|
||||||
|
*/
|
||||||
|
@Value("${alipay.ALIPAY_PUBLIC_KEY}")
|
||||||
|
private String ALIPAY_PUBLIC_KEY;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付宝网关
|
||||||
|
*/
|
||||||
|
@Value("${alipay.serverUrl}")
|
||||||
|
private String GATE;
|
||||||
|
|
||||||
@SysLog(MODULE = "oms", REMARK = "根据条件查询所有订单退货申请列表")
|
@SysLog(MODULE = "oms", REMARK = "根据条件查询所有订单退货申请列表")
|
||||||
@ApiOperation("根据条件查询所有订单退货申请列表")
|
@ApiOperation("根据条件查询所有订单退货申请列表")
|
||||||
@GetMapping(value = "/list")
|
@GetMapping(value = "/list")
|
||||||
@@ -193,7 +214,8 @@ public class OmsOrderReturnApplyController {
|
|||||||
*/
|
*/
|
||||||
public String queryPayment(String Out_Trade_No) {
|
public String queryPayment(String Out_Trade_No) {
|
||||||
//填写自己创建的app的对应参数
|
//填写自己创建的app的对应参数
|
||||||
AlipayClient alipayClient = new DefaultAlipayClient(InterfaceUrl.serverUrl, InterfaceUrl.appId, InterfaceUrl.privateKey, "json", "utf-8", InterfaceUrl.publicKey, "RSA2");
|
// AlipayClient alipayClient = new DefaultAlipayClient(InterfaceUrl.serverUrl, InterfaceUrl.appId, InterfaceUrl.privateKey, "json", "utf-8", InterfaceUrl.publicKey, "RSA2");
|
||||||
|
AlipayClient alipayClient = new DefaultAlipayClient(GATE, APPID, APP_PRIVATE_KEY, "json", "utf-8", ALIPAY_PUBLIC_KEY, "RSA2");
|
||||||
|
|
||||||
AlipayTradeQueryRequest alipay_request = new AlipayTradeQueryRequest();
|
AlipayTradeQueryRequest alipay_request = new AlipayTradeQueryRequest();
|
||||||
AlipayTradeQueryModel model = new AlipayTradeQueryModel();
|
AlipayTradeQueryModel model = new AlipayTradeQueryModel();
|
||||||
@@ -221,7 +243,8 @@ public class OmsOrderReturnApplyController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String alipayRefund(String out_trade_no, String trade_no, String refund_amount) {
|
public String alipayRefund(String out_trade_no, String trade_no, String refund_amount) {
|
||||||
AlipayClient alipayClient = new DefaultAlipayClient(InterfaceUrl.serverUrl, InterfaceUrl.appId, InterfaceUrl.privateKey, "json", "utf-8", InterfaceUrl.publicKey, "RSA2");
|
// AlipayClient alipayClient = new DefaultAlipayClient(InterfaceUrl.serverUrl, InterfaceUrl.appId, InterfaceUrl.privateKey, "json", "utf-8", InterfaceUrl.publicKey, "RSA2");
|
||||||
|
AlipayClient alipayClient = new DefaultAlipayClient(GATE, APPID, APP_PRIVATE_KEY, "json", "utf-8", ALIPAY_PUBLIC_KEY, "RSA2");
|
||||||
//订单编号 支付宝交易号不为空
|
//订单编号 支付宝交易号不为空
|
||||||
if (out_trade_no != null && trade_no != null) {
|
if (out_trade_no != null && trade_no != null) {
|
||||||
AlipayTradeRefundRequest alipay_request = new AlipayTradeRefundRequest();
|
AlipayTradeRefundRequest alipay_request = new AlipayTradeRefundRequest();
|
||||||
|
|||||||
@@ -329,7 +329,7 @@ public class PmsProductServiceImpl extends ServiceImpl<PmsProductMapper, PmsProd
|
|||||||
@Override
|
@Override
|
||||||
public List<PmsProduct> list(String keyword) {
|
public List<PmsProduct> list(String keyword) {
|
||||||
QueryWrapper queryWrapper = new QueryWrapper();
|
QueryWrapper queryWrapper = new QueryWrapper();
|
||||||
queryWrapper.eq("delete_status", 0);
|
queryWrapper.eq("delete_status", 1);
|
||||||
|
|
||||||
if (!StringUtils.isEmpty(keyword)) {
|
if (!StringUtils.isEmpty(keyword)) {
|
||||||
queryWrapper.like("name", keyword);
|
queryWrapper.like("name", keyword);
|
||||||
|
|||||||
@@ -1,9 +1,23 @@
|
|||||||
package com.zscat.mallplus.ums.controller;
|
package com.zscat.mallplus.ums.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.zscat.mallplus.annotation.SysLog;
|
||||||
|
import com.zscat.mallplus.ums.entity.SysMessage;
|
||||||
|
import com.zscat.mallplus.ums.entity.UmsMember;
|
||||||
|
import com.zscat.mallplus.ums.service.ISysMessageService;
|
||||||
|
import com.zscat.mallplus.ums.vo.SysMessageSendSelectVo;
|
||||||
|
import com.zscat.mallplus.utils.CommonResult;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 站内信 前端控制器
|
* 站内信 前端控制器
|
||||||
@@ -16,5 +30,49 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
@RequestMapping("/ums/sysMessage")
|
@RequestMapping("/ums/sysMessage")
|
||||||
public class SysMessageController {
|
public class SysMessageController {
|
||||||
|
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(SysMessageController.class);
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ISysMessageService messageService;
|
||||||
|
|
||||||
|
@PostMapping(value = "/sendToOne")
|
||||||
|
public Object sendToOne(@RequestBody SysMessage entity) {
|
||||||
|
try {
|
||||||
|
if (messageService.sendToOne(entity)) {
|
||||||
|
return new CommonResult().success();
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("向指定会员 {} 发信息失败:{}", entity.getUserId(), e.getMessage());
|
||||||
|
return new CommonResult().failed();
|
||||||
|
}
|
||||||
|
return new CommonResult().failed();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping(value = "/sendToAll")
|
||||||
|
public Object sendToAll(@RequestBody SysMessage entity) {
|
||||||
|
try {
|
||||||
|
if (messageService.sendToAll(entity)) {
|
||||||
|
return new CommonResult().success();
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("向所有会员发信息失败:{}", e.getMessage());
|
||||||
|
return new CommonResult().failed();
|
||||||
|
}
|
||||||
|
return new CommonResult().failed();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping(value = "/sendToSelect")
|
||||||
|
public Object sendToSelect(@RequestBody SysMessageSendSelectVo vo) {
|
||||||
|
try {
|
||||||
|
if (messageService.sendToSelect(vo)) {
|
||||||
|
return new CommonResult().success();
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("向所选会员发信息失败:{}", e.getMessage());
|
||||||
|
return new CommonResult().failed();
|
||||||
|
}
|
||||||
|
return new CommonResult().failed();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ public class UmsMemberController {
|
|||||||
@SysLog(MODULE = "ums", REMARK = "删除会员表")
|
@SysLog(MODULE = "ums", REMARK = "删除会员表")
|
||||||
@ApiOperation("删除会员表")
|
@ApiOperation("删除会员表")
|
||||||
@GetMapping(value = "/delete/{id}")
|
@GetMapping(value = "/delete/{id}")
|
||||||
@PreAuthorize("hasAuthority('ums:UmsMember:delete')")
|
// @PreAuthorize("hasAuthority('ums:UmsMember:delete')")
|
||||||
public Object deleteUmsMember(@ApiParam("会员表id") @PathVariable Long id) {
|
public Object deleteUmsMember(@ApiParam("会员表id") @PathVariable Long id) {
|
||||||
try {
|
try {
|
||||||
if (ValidatorUtils.empty(id)) {
|
if (ValidatorUtils.empty(id)) {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.zscat.mallplus.ums.service;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.zscat.mallplus.ums.entity.SysMessage;
|
import com.zscat.mallplus.ums.entity.SysMessage;
|
||||||
|
import com.zscat.mallplus.ums.vo.SysMessageSendSelectVo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -13,4 +14,11 @@ import com.zscat.mallplus.ums.entity.SysMessage;
|
|||||||
*/
|
*/
|
||||||
public interface ISysMessageService extends IService<SysMessage> {
|
public interface ISysMessageService extends IService<SysMessage> {
|
||||||
|
|
||||||
|
boolean sendToOne(SysMessage entity);
|
||||||
|
|
||||||
|
boolean sendToAll(SysMessage entity);
|
||||||
|
|
||||||
|
boolean sendToSelect(SysMessageSendSelectVo vo);
|
||||||
|
|
||||||
|
boolean sendOrderDeliver(String orderNo,Integer userId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||||||
import com.zscat.mallplus.ums.entity.UmsMember;
|
import com.zscat.mallplus.ums.entity.UmsMember;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -19,4 +20,6 @@ public interface IUmsMemberService extends IService<UmsMember> {
|
|||||||
void updataMemberOrderInfo();
|
void updataMemberOrderInfo();
|
||||||
|
|
||||||
Map memberMonthStatic( String date);
|
Map memberMonthStatic( String date);
|
||||||
|
|
||||||
|
List<UmsMember> listAll();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,10 +2,17 @@ package com.zscat.mallplus.ums.service.impl;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.zscat.mallplus.ums.entity.SysMessage;
|
import com.zscat.mallplus.ums.entity.SysMessage;
|
||||||
|
import com.zscat.mallplus.ums.entity.UmsMember;
|
||||||
import com.zscat.mallplus.ums.mapper.SysMessageMapper;
|
import com.zscat.mallplus.ums.mapper.SysMessageMapper;
|
||||||
import com.zscat.mallplus.ums.service.ISysMessageService;
|
import com.zscat.mallplus.ums.service.ISysMessageService;
|
||||||
|
import com.zscat.mallplus.ums.service.IUmsMemberService;
|
||||||
|
import com.zscat.mallplus.ums.vo.SysMessageSendSelectVo;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 站内信 服务实现类
|
* 站内信 服务实现类
|
||||||
@@ -17,4 +24,51 @@ import org.springframework.stereotype.Service;
|
|||||||
@Service
|
@Service
|
||||||
public class SysMessageServiceImpl extends ServiceImpl<SysMessageMapper, SysMessage> implements ISysMessageService {
|
public class SysMessageServiceImpl extends ServiceImpl<SysMessageMapper, SysMessage> implements ISysMessageService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IUmsMemberService memberService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean sendToOne(SysMessage entity) {
|
||||||
|
entity.setId(null);
|
||||||
|
return this.save(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean sendToAll(SysMessage entity) {
|
||||||
|
List<UmsMember> memberList = memberService.listAll();
|
||||||
|
// List<SysMessage> messList = new ArrayList<>();
|
||||||
|
for (UmsMember member : memberList) {
|
||||||
|
// SysMessage
|
||||||
|
entity.setId(null);
|
||||||
|
Integer id = Math.toIntExact(member.getId());
|
||||||
|
entity.setUserId(id);
|
||||||
|
// messList.add(en)
|
||||||
|
this.save(entity);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean sendToSelect(SysMessageSendSelectVo vo) {
|
||||||
|
SysMessage entity = vo.getSysMessage();
|
||||||
|
List<Integer> userIdList = vo.getUserIdList();
|
||||||
|
for (Integer memberId : userIdList) {
|
||||||
|
entity.setId(null);
|
||||||
|
entity.setUserId(memberId);
|
||||||
|
this.save(entity);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean sendOrderDeliver(String orderNo, Integer userId) {
|
||||||
|
SysMessage entity = new SysMessage();
|
||||||
|
entity.setId(null);
|
||||||
|
entity.setCode("交易物流");
|
||||||
|
entity.setParams("货物已发出");
|
||||||
|
entity.setContent("你的订单号码为:"+orderNo+" 的货物已经发出,请您留意物流信息!");
|
||||||
|
entity.setUserId(userId);
|
||||||
|
this.save(entity);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,4 +58,9 @@ public class UmsMemberServiceImpl extends ServiceImpl<UmsMemberMapper, UmsMember
|
|||||||
public Map memberMonthStatic(@Param("date") String date){
|
public Map memberMonthStatic(@Param("date") String date){
|
||||||
return memberMapper.memberMonthStatic(date);
|
return memberMapper.memberMonthStatic(date);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<UmsMember> listAll() {
|
||||||
|
return baseMapper.selectList(new QueryWrapper<UmsMember>());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package com.zscat.mallplus.ums.vo;
|
||||||
|
|
||||||
|
import com.zscat.mallplus.ums.entity.SysMessage;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class SysMessageSendSelectVo {
|
||||||
|
|
||||||
|
private List<Integer> userIdList = new ArrayList<>();
|
||||||
|
|
||||||
|
private SysMessage sysMessage;
|
||||||
|
|
||||||
|
public List<Integer> getUserIdList() {
|
||||||
|
return userIdList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserIdList(List<Integer> userIdList) {
|
||||||
|
this.userIdList = userIdList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SysMessage getSysMessage() {
|
||||||
|
return sysMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSysMessage(SysMessage sysMessage) {
|
||||||
|
this.sysMessage = sysMessage;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -18,8 +18,8 @@ spring.redis.pool.min-idle=0
|
|||||||
# \u8FDE\u63A5\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09
|
# \u8FDE\u63A5\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09
|
||||||
spring.redis.timeout=0
|
spring.redis.timeout=0
|
||||||
#===redis end===
|
#===redis end===
|
||||||
#spring.datasource.url=jdbc:mysql://localhost:3306/mallplus1?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&useTimezone=true&serverTimezone=GMT%2B8
|
|
||||||
spring.datasource.url=jdbc:mysql://8.130.39.13:3306/mallplus1?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&useTimezone=true&serverTimezone=GMT%2B8
|
spring.datasource.url=jdbc:mysql://8.130.39.13:3306/mallplus1?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&useTimezone=true&serverTimezone=GMT%2B8
|
||||||
|
#spring.datasource.url=jdbc:mysql://127.0.0.1:3306/mallplus1?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&useTimezone=true&serverTimezone=GMT%2B8
|
||||||
spring.datasource.username=root
|
spring.datasource.username=root
|
||||||
#spring.datasource.password=root
|
#spring.datasource.password=root
|
||||||
spring.datasource.password=1LAiGz$t1*Iw
|
spring.datasource.password=1LAiGz$t1*Iw
|
||||||
@@ -58,3 +58,18 @@ mybatis-plus.global-config.refresh=true
|
|||||||
mybatis-plus.configuration.map-underscore-to-camel-case=true
|
mybatis-plus.configuration.map-underscore-to-camel-case=true
|
||||||
mybatis-plus.configuration.cache-enabled=false
|
mybatis-plus.configuration.cache-enabled=false
|
||||||
|
|
||||||
|
#支付宝相关配置
|
||||||
|
alipay.appId=2018082761134635
|
||||||
|
alipay.privateKey=MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCpYi38h2/25e4mNWo56mmwuwa7QbBbPdgH00rsmPI/+0JkYhda2uZDvtrFXWMLzVJ2ioh9pamcfUbb2LcFgLIJ0KJyTia4sVMHmbk9l8wPf9mE4aOYN8ix6olzkm9ZhDGVekx2niW/hf6bpjnh92+I4EZo4xsK3RAsQ9oDXPjrJzktrrerAP+5MNOY8wLRqOp0KU+bOIcsz4Wz+qD3UxP2PjXPJDvXu7NkYDndOc7G0tVnhzVahFafqAntbgQHMyJENhLl9xdbnYdiKQqZJUwfI9xlRKYk08P4YVYTL7dAGAibQJJamgqmmKo8uibDIMkLsTGNm5WzW3EErWOCl6wlAgMBAAECggEAXfyxgbdxRDHPlHn9KIfO/5a3pH5NqkNFtQnkQCaZ/TChZWwcg3iFXr/vSqaICAt1H3u9QuMCm2fUQrcczzvbDqErEnwU9lTGuqfs5qVtQIhznU1K5nLFtRtsC6oMiUJV9Rh4hzU3wu9KGPoCkkUnKW8xApBJ+Bw0FivMNCOJp4kipif0gXQFxDH14w8n4QAyG3keXYP43DPqlsjmjJm4inHajxNO012Snle5SqA5HaIrZzf9St3ctq1BzqgUaD5yyXPmPyi1sqjrK+A16R4DrbKlY2h3/mo1IIfPjYbjb/uPcHf9pDMxEFwYIZ+kkz0uUjRDNWVX3A7ldav8MvvZ/QKBgQDot2raw93blrEhld3GGY4JNxboi6UZ1guK2nDEjlnpZjDUklSlNsx82NM8g0bm76Q9A3WpuoHQoSGEIy9ElrMuNS7xj+PZe5mNyKFMBG8hKeIV3jx4OIU80aiV9OQLv6+AonavHvOLXu41OJKdoQexyz7q3lu0+i7d9KKbWd2SlwKBgQC6VJxj1KPh3kHtmm/d/5fOZUDLqxTOyexRrEUCj9hGjv5XymxULQPskKxasFKiPyn4TCp2ZOrPO1slu8IUpzaymM4DDQYtTQkbsAT/N6r9efCJTXDdTgm5iyTaILbSbqd01KEnqjmFLOSCpasvM47rARlG4IYXIXD9cXKj12AaowKBgAN7w2C079w6nDopeSFe/o5KwdAHTxhc6N1SOb/ndZcVzYNREW1LrbHsuPS97lDEo4u6Qoeg4BKUZuEIecuoCdSWPTamdb2qqPjDWQ6/Pj6b1uOG6RbPmcb4SHK+MK+wVdsyE165suGSMTSgvSkY4PmbVjzDyVGjMRJneAulQ7jPAoGAViCIDWkbu2q1xLNPJClhrSiGU94nhxI05uefGnkM+khcbo4Flr8cAjw5Ps4j1BUoPDpQolsxYkrIbd+k7VEBanpRN33MriHepOqu1J2RrwqvUXf3RIQu4JHdnenjN8+oHcuvFhuL7O/8TBtxziah2CSw318m/AgcJzpKSEtkg8sCgYB/cr6PuuQ7JpK2kYmwYMSwNvys0v31iSqFmJK6EyPRycGw9Wj/ANiGJrKuVqdnzb2LqSzdNWkKte25hSIv21satgHM2of7oFzjFB2N/hMx5o+nOQgq0zZcA6Mvn0W3GFFZ1YAep3oyrxLh9+5ELi2JGXgJafiEJvr5J3YzSGOWrw==
|
||||||
|
alipay.serverUrl=https://openapi.alipay.com/gateway.do
|
||||||
|
alipay.domain=http://192.168.1.107:8111/api
|
||||||
|
#回调地址
|
||||||
|
alipay.notifyUrl=http://192.168.1.107:8111/api/aliPay/notify_url
|
||||||
|
# 支付宝CA根证书文件路径(alipay_root_cert_path 文件绝对路径)
|
||||||
|
alipay.RootCertPath=D:\\apliay\\alipayRootCert.crt
|
||||||
|
# 支付宝公钥证书文件路径(alipay_cert_path 文件绝对路径)
|
||||||
|
alipay.ALIPAY_PUBLIC_KEY=D:\\apliay\\alipayCertPublicKey_RSA2.crt
|
||||||
|
# 应用公钥证书路径(app_cert_path 文件绝对路径)
|
||||||
|
alipay.CertPath=D:\\apliay\\appCertPublicKey_2018082761134635.crt
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -72,3 +72,16 @@ wx.uniformorder=https://api.mch.weixin.qq.com/pay/unifiedorder
|
|||||||
wx.userMessage=https://api.weixin.qq.com/sns/userinfo?access_token=%s&openid=%s&lang=zh_CN
|
wx.userMessage=https://api.weixin.qq.com/sns/userinfo?access_token=%s&openid=%s&lang=zh_CN
|
||||||
wx.webAccessTokenhttps=https://api.weixin.qq.com/sns/jscode2session?appid=%s&secret=%s&js_code=%s&grant_type=authorization_code
|
wx.webAccessTokenhttps=https://api.weixin.qq.com/sns/jscode2session?appid=%s&secret=%s&js_code=%s&grant_type=authorization_code
|
||||||
wx.templateId=nAt_DYLLwYXkIhtDb5nyEm0ynrt98OK3Z3MmeUooPz4
|
wx.templateId=nAt_DYLLwYXkIhtDb5nyEm0ynrt98OK3Z3MmeUooPz4
|
||||||
|
|
||||||
|
alipay.appId=2018082761134635
|
||||||
|
alipay.privateKey=MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCpYi38h2/25e4mNWo56mmwuwa7QbBbPdgH00rsmPI/+0JkYhda2uZDvtrFXWMLzVJ2ioh9pamcfUbb2LcFgLIJ0KJyTia4sVMHmbk9l8wPf9mE4aOYN8ix6olzkm9ZhDGVekx2niW/hf6bpjnh92+I4EZo4xsK3RAsQ9oDXPjrJzktrrerAP+5MNOY8wLRqOp0KU+bOIcsz4Wz+qD3UxP2PjXPJDvXu7NkYDndOc7G0tVnhzVahFafqAntbgQHMyJENhLl9xdbnYdiKQqZJUwfI9xlRKYk08P4YVYTL7dAGAibQJJamgqmmKo8uibDIMkLsTGNm5WzW3EErWOCl6wlAgMBAAECggEAXfyxgbdxRDHPlHn9KIfO/5a3pH5NqkNFtQnkQCaZ/TChZWwcg3iFXr/vSqaICAt1H3u9QuMCm2fUQrcczzvbDqErEnwU9lTGuqfs5qVtQIhznU1K5nLFtRtsC6oMiUJV9Rh4hzU3wu9KGPoCkkUnKW8xApBJ+Bw0FivMNCOJp4kipif0gXQFxDH14w8n4QAyG3keXYP43DPqlsjmjJm4inHajxNO012Snle5SqA5HaIrZzf9St3ctq1BzqgUaD5yyXPmPyi1sqjrK+A16R4DrbKlY2h3/mo1IIfPjYbjb/uPcHf9pDMxEFwYIZ+kkz0uUjRDNWVX3A7ldav8MvvZ/QKBgQDot2raw93blrEhld3GGY4JNxboi6UZ1guK2nDEjlnpZjDUklSlNsx82NM8g0bm76Q9A3WpuoHQoSGEIy9ElrMuNS7xj+PZe5mNyKFMBG8hKeIV3jx4OIU80aiV9OQLv6+AonavHvOLXu41OJKdoQexyz7q3lu0+i7d9KKbWd2SlwKBgQC6VJxj1KPh3kHtmm/d/5fOZUDLqxTOyexRrEUCj9hGjv5XymxULQPskKxasFKiPyn4TCp2ZOrPO1slu8IUpzaymM4DDQYtTQkbsAT/N6r9efCJTXDdTgm5iyTaILbSbqd01KEnqjmFLOSCpasvM47rARlG4IYXIXD9cXKj12AaowKBgAN7w2C079w6nDopeSFe/o5KwdAHTxhc6N1SOb/ndZcVzYNREW1LrbHsuPS97lDEo4u6Qoeg4BKUZuEIecuoCdSWPTamdb2qqPjDWQ6/Pj6b1uOG6RbPmcb4SHK+MK+wVdsyE165suGSMTSgvSkY4PmbVjzDyVGjMRJneAulQ7jPAoGAViCIDWkbu2q1xLNPJClhrSiGU94nhxI05uefGnkM+khcbo4Flr8cAjw5Ps4j1BUoPDpQolsxYkrIbd+k7VEBanpRN33MriHepOqu1J2RrwqvUXf3RIQu4JHdnenjN8+oHcuvFhuL7O/8TBtxziah2CSw318m/AgcJzpKSEtkg8sCgYB/cr6PuuQ7JpK2kYmwYMSwNvys0v31iSqFmJK6EyPRycGw9Wj/ANiGJrKuVqdnzb2LqSzdNWkKte25hSIv21satgHM2of7oFzjFB2N/hMx5o+nOQgq0zZcA6Mvn0W3GFFZ1YAep3oyrxLh9+5ELi2JGXgJafiEJvr5J3YzSGOWrw==
|
||||||
|
alipay.serverUrl=https://openapi.alipay.com/gateway.do
|
||||||
|
alipay.domain=https://mall.yyundong.com/portalapi/api
|
||||||
|
#回调地址
|
||||||
|
alipay.notifyUrl=https://mall.yyundong.com/portalapi/api/aliPay/notify_url
|
||||||
|
# 支付宝CA根证书文件路径(alipay_root_cert_path 文件绝对路径)
|
||||||
|
alipay.RootCertPath=D:\\apliay\\alipayRootCert.crt
|
||||||
|
# 支付宝公钥证书文件路径(alipay_cert_path 文件绝对路径)
|
||||||
|
alipay.ALIPAY_PUBLIC_KEY=D:\\apliay\\alipayCertPublicKey_RSA2.crt
|
||||||
|
# 应用公钥证书路径(app_cert_path 文件绝对路径)
|
||||||
|
alipay.CertPath=D:\\apliay\\appCertPublicKey_2018082761134635.crt
|
||||||
|
|||||||
@@ -232,11 +232,11 @@ public class AllEnum {
|
|||||||
/**
|
/**
|
||||||
* 微信小程序
|
* 微信小程序
|
||||||
*/
|
*/
|
||||||
weixinAppletPay(1, "weixinAppletPay"),
|
weixinAppletPay(2, "weixinAppletPay"),
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
alipay(2, "alipay"),
|
alipay(1, "alipay"),
|
||||||
/**
|
/**
|
||||||
* 余额支付
|
* 余额支付
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ public class ConstansValue {
|
|||||||
" original_price,\n" +
|
" original_price,\n" +
|
||||||
" weight \n" +
|
" weight \n" +
|
||||||
" ";
|
" ";
|
||||||
public static final String sampleOrderList = "id,member_id, order_sn, create_time, member_username, total_amount, pay_amount,status, order_type,pay_type,source_type,goods_id,goods_name,delivery_sn,delivery_company";
|
public static final String sampleOrderList = "id,member_id, order_sn, create_time, member_username, total_amount, pay_amount,status, order_type,pay_type,source_type,goods_id,goods_name,delivery_sn,delivery_company,receiver_name,receiver_phone,receiver_detail_address,receiver_region";
|
||||||
|
|
||||||
public static final String sampleSubjectList = "id, category_id, title, pic, product_count, recommend_status, create_time, collect_count, read_count, comment_count, album_pics, description, show_status, forward_count, category_name, area_id, school_id, member_id, area_name, school_name, reward, member_name, video_src, type";
|
public static final String sampleSubjectList = "id, category_id, title, pic, product_count, recommend_status, create_time, collect_count, read_count, comment_count, album_pics, description, show_status, forward_count, category_name, area_id, school_id, member_id, area_name, school_name, reward, member_name, video_src, type";
|
||||||
|
|
||||||
|
|||||||
114
mallplus-mbg/src/main/java/com/zscat/mallplus/enums/SmsEnum.java
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
package com.zscat.mallplus.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author dimengzhe
|
||||||
|
* @Date 2023/2/23 9:01
|
||||||
|
* @Description
|
||||||
|
*/
|
||||||
|
public class SmsEnum {
|
||||||
|
/**
|
||||||
|
* 手机短信登录验证码时效(秒)
|
||||||
|
*/
|
||||||
|
public static final Long APP_LOGIN_CODE_TIME_LIMIT = 300L;
|
||||||
|
|
||||||
|
@Value("${redis.key.prefix.loginCode}")
|
||||||
|
private static String REDIS_KEY_PREFIX_LOGIN_CODE;
|
||||||
|
|
||||||
|
@Value("${redis.key.prefix.forgetCode}")
|
||||||
|
private static String REDIS_KEY_PREFIX_FORGET_CODE;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送验证码
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public static enum SendEnum {
|
||||||
|
/**
|
||||||
|
* 登录
|
||||||
|
*/
|
||||||
|
LOGIN("1", REDIS_KEY_PREFIX_LOGIN_CODE,"登录"),
|
||||||
|
FORGET("2", REDIS_KEY_PREFIX_FORGET_CODE,"忘记密码"),
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* code值
|
||||||
|
*/
|
||||||
|
private final String code;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private final String remarks;
|
||||||
|
/**
|
||||||
|
* 缓存识别码
|
||||||
|
*/
|
||||||
|
private final String redisKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构造器
|
||||||
|
*
|
||||||
|
* @param code code值
|
||||||
|
* @param redisKey 缓存识别码
|
||||||
|
* @param remarks 备注
|
||||||
|
*/
|
||||||
|
private SendEnum(String code, String redisKey,String remarks) {
|
||||||
|
this.code = code;
|
||||||
|
this.remarks = remarks;
|
||||||
|
this.redisKey = redisKey;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
public static enum SmsReturnEnum {
|
||||||
|
/**
|
||||||
|
* 发送短信返回参数
|
||||||
|
*/
|
||||||
|
ZERO("1", "提交成功"),
|
||||||
|
ONE("-1", "账号未注册"),
|
||||||
|
TWO("-2", "网络访问超时,请稍后再试"),
|
||||||
|
three("-3", "帐号或密码错误"),
|
||||||
|
FOUR("-4", "只支持单发"),
|
||||||
|
FIVE("-5", "余额不足,请充值"),
|
||||||
|
SIX("-6", "定时发送时间不是有效的时间格式"),
|
||||||
|
SEVEN("-7", "提交信息末尾未加签名,请添加中文的企业签名【 】或未采用gb2312编码"),
|
||||||
|
EIGHT("-8", "发送内容需在1到300字之间"),
|
||||||
|
NINE("-9", "发送号码为空"),
|
||||||
|
TEN("-10", "定时时间不能小于系统当前时间"),
|
||||||
|
ELEVEN("-11", "屏蔽手机号码"),
|
||||||
|
ONEZEROONE("-101", "调用接口速度太快"),
|
||||||
|
;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* code值
|
||||||
|
*/
|
||||||
|
private final String code;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private final String remarks;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构造器
|
||||||
|
*
|
||||||
|
* @param code code值
|
||||||
|
* @param remarks 备注
|
||||||
|
*/
|
||||||
|
private SmsReturnEnum(String code, String remarks) {
|
||||||
|
this.code = code;
|
||||||
|
this.remarks = remarks;
|
||||||
|
}
|
||||||
|
public static String getValueByKey(String code) {
|
||||||
|
SmsReturnEnum[] sysReturnEnum = values();
|
||||||
|
for (SmsReturnEnum returnEnum: sysReturnEnum) {
|
||||||
|
if (returnEnum.getCode().equals(code)) {
|
||||||
|
return returnEnum.getRemarks();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -120,7 +120,7 @@ public class OmsOrder extends BaseEntity implements Serializable {
|
|||||||
private BigDecimal discountAmount;
|
private BigDecimal discountAmount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 支付方式:0->未支付;2->支付宝;1->微信 3余额支付
|
* 支付方式:0->未支付;1->支付宝;2->微信 3余额支付
|
||||||
*/
|
*/
|
||||||
@TableField("pay_type")
|
@TableField("pay_type")
|
||||||
private Integer payType;
|
private Integer payType;
|
||||||
|
|||||||
@@ -45,4 +45,10 @@ public class SmsHomeNewProduct extends BaseEntity implements Serializable {
|
|||||||
private String pic;
|
private String pic;
|
||||||
|
|
||||||
private BigDecimal price;
|
private BigDecimal price;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 市场价
|
||||||
|
*/
|
||||||
|
@TableField("original_price")
|
||||||
|
private BigDecimal originalPrice;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,5 +43,10 @@ public class SmsHomeRecommendProduct extends BaseEntity implements Serializable
|
|||||||
private String pic;
|
private String pic;
|
||||||
|
|
||||||
private BigDecimal price;
|
private BigDecimal price;
|
||||||
|
/**
|
||||||
|
* 市场价
|
||||||
|
*/
|
||||||
|
@TableField("original_price")
|
||||||
|
private BigDecimal originalPrice;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
package com.zscat.mallplus.ums.entity;
|
package com.zscat.mallplus.ums.entity;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -47,7 +49,7 @@ public class SysMessage implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*/
|
*/
|
||||||
private Long ctime;
|
private Long ctime = System.currentTimeMillis();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查看时间
|
* 查看时间
|
||||||
@@ -57,7 +59,28 @@ public class SysMessage implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 1未查看,2已查看
|
* 1未查看,2已查看
|
||||||
*/
|
*/
|
||||||
private Boolean status;
|
private Boolean status = false;
|
||||||
|
|
||||||
|
public String getCdate() {
|
||||||
|
String cdate = "";
|
||||||
|
if (ctime != null && ctime > 0) {
|
||||||
|
cdate = DateUtil.format(new Date(ctime), "yyyy-MM-dd");
|
||||||
|
}
|
||||||
|
return cdate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUdate() {
|
||||||
|
String udate = "";
|
||||||
|
if (utime != null && utime > 0) {
|
||||||
|
udate = DateUtil.format(new Date(utime), "yyyy-MM-dd");
|
||||||
|
}
|
||||||
|
return udate;
|
||||||
|
}
|
||||||
|
|
||||||
|
// @TableField(exist = false)
|
||||||
|
// private String cdate;
|
||||||
|
// @TableField(exist = false)
|
||||||
|
// private String udate;
|
||||||
|
|
||||||
|
|
||||||
public Integer getId() {
|
public Integer getId() {
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ import java.util.Map;
|
|||||||
public interface SmsDao {
|
public interface SmsDao {
|
||||||
|
|
||||||
@Options(useGeneratedKeys = true, keyProperty = "id")
|
@Options(useGeneratedKeys = true, keyProperty = "id")
|
||||||
@Insert("insert into sys_sms(phone, signName, templateCode, params, day, createTime, updateTime) "
|
@Insert("insert into sys_sms(phone, signName, templateCode, params, day, createTime, updateTime,bizId,code,message) "
|
||||||
+ "values(#{phone}, #{signName}, #{templateCode}, #{params}, #{day}, #{createTime}, #{updateTime})")
|
+ "values(#{phone}, #{signName}, #{templateCode}, #{params}, #{day}, #{createTime}, #{updateTime},#{bizId},#{code},#{message})")
|
||||||
int save(Sms sms);
|
int save(Sms sms);
|
||||||
|
|
||||||
@Select("select * from sys_sms t where t.id = #{id}")
|
@Select("select * from sys_sms t where t.id = #{id}")
|
||||||
|
|||||||
@@ -1,25 +1,30 @@
|
|||||||
|
/*
|
||||||
package com.zscat.mallplus.utils;
|
package com.zscat.mallplus.utils;
|
||||||
|
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* Created with IntelliJ IDEA.
|
* Created with IntelliJ IDEA.
|
||||||
*
|
*
|
||||||
* @Auther: dimengzhe
|
* @Auther: dimengzhe
|
||||||
* @Date: 2020/06/19/10:40
|
* @Date: 2020/06/19/10:40
|
||||||
* @Description:地址管理
|
* @Description:地址管理
|
||||||
*/
|
*//*
|
||||||
|
|
||||||
public class InterfaceUrl {
|
public class InterfaceUrl {
|
||||||
|
|
||||||
public static String domain = "http://www.yyundong.com:8083/api";
|
// public static String domain = "http://www.yyundong.com:8083/api";
|
||||||
|
public static String domain = "http://2xpk7t.natappfree.cc/api";
|
||||||
//支付宝授权回调地址
|
//支付宝授权回调地址
|
||||||
public static String apliPayUrl = "http://www.yyundong.com:8083/api/aliPay/notify_url";
|
// public static String apliPayUrl = "http://www.yyundong.com:8083/api/aliPay/notify_url";
|
||||||
// public static String notifyUrl = "http://26077a35f5.wicp.vip:43609/api/aliPay/notify_url";
|
public static String notifyUrl = "http://2xpk7t.natappfree.cc/aliPay/notify_url";
|
||||||
//应用appId
|
//应用appId
|
||||||
public static String appId = "2018082761134635";//乒娱网
|
public static String appId = "2018082761134635";//乒娱网
|
||||||
//支付宝网关
|
//支付宝网关
|
||||||
public static String serverUrl = "https://openapi.alipay.com/gateway.do";//
|
public static String serverUrl = "https://openapi.alipay.com/gateway.do";//
|
||||||
//支付宝公钥,由支付宝生成
|
//支付宝公钥,由支付宝生成
|
||||||
public static String publicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlOOOOWg4e2deSDMRG2y5EzG7/udMfTzYkn4u/3PWIOlpcUd2ujCztqKY2HdFhIaWE4q8PCLtT5XtBWCq2IVvpCPE8HRzgSZckh6J36SnO0JG1pZe8HajUgIw+T1NM7/b2Nb4OaI5HKNsQ5ei9NlN9RvlIUSpum/nIyk/9CBvNAg8xUlHUFPaPL0WCMJ9zIwRO+aEn2kwA7JQ8AvjuPy390oil0W4fxfHonJYxuzOo6Lx369Vti5N9UmXczXUcOiVwyCveoH05chNr3r8xu5QqpD1o32cO01Zt4EA9j6aM2H09g08VzoLam2OoU3umKOV0vvX+bMmb1GwrkussSvDpQIDAQAB";
|
// public static String publicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlOOOOWg4e2deSDMRG2y5EzG7/udMfTzYkn4u/3PWIOlpcUd2ujCztqKY2HdFhIaWE4q8PCLtT5XtBWCq2IVvpCPE8HRzgSZckh6J36SnO0JG1pZe8HajUgIw+T1NM7/b2Nb4OaI5HKNsQ5ei9NlN9RvlIUSpum/nIyk/9CBvNAg8xUlHUFPaPL0WCMJ9zIwRO+aEn2kwA7JQ8AvjuPy390oil0W4fxfHonJYxuzOo6Lx369Vti5N9UmXczXUcOiVwyCveoH05chNr3r8xu5QqpD1o32cO01Zt4EA9j6aM2H09g08VzoLam2OoU3umKOV0vvX+bMmb1GwrkussSvDpQIDAQAB";
|
||||||
//开发者应用私钥,由开发者自己生成
|
//开发者应用私钥,由开发者自己生成
|
||||||
public static String privateKey = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCjI8p9Vh3QrBsa2BdTLAa9YrPGdHAo4DeYx79rlrITI4kIwy6/q/JDaXNBQgl80mUYh4Zinc0mDZ68n14zIL0f4At+EzzfxT5RIVYKZb/EEj6ijElldvijblcCAkrcoTl+oWDEKEOyyJW2UFbRIUYUZcszfi+pue1BIdvwlfxHTI77o1H6d2ApkyIHgs6zYeeauDkYYTdAjSCV7PHhTO6H6yS5uyc0rOLxUTdABA+b+ewSnTw2uvuVTTnrC7xIqjfj1fRocsNh/1KfqF4I5iMQmrRaIlujRSTQrO7kLVbYW45D+Qr4mB3TlhTGAFcTL+ovugA+66NASZmUyNsZHcBZAgMBAAECggEAao+eXHA72WoR6l7sHW/Mlzg5pY+5E3oh1rHi3yv39XhoskiL6Lcv78iZeC7ic54aWwNrTE83CXwsC5kttsfTwVZfK2L1iFUWd3gG85OyxygDsblg1932Wwpf2vgUXjkRjR1sT7TdQ5Kx9/xSORg65mf3axMpnvvLdZfgSi4uM4NJ94NzCLwH7zSWuK6CsPfl24RQlQfczRUy4GzG+wtXjDj5XLNNO6GQacQY4BUkcjCfrkUrQ9Lf2joYiXRyVNWUN1HivmfMouG37WQhUzz0CL8tF1EfooCfPhetAF5Aursve3O8l0Lno6K1auziN8g/Jfuo+efKfImzwvyo3m1n4QKBgQDjtfOWqcVP611OSTm1L1RFHCJMZN5wgOLEquO/2VC4VItV7vy0odNrLydd9Eg77VbC0IVcqunQIHjON3fFEVlj0bEVOaEN+X26oP84UNBK12QcLWvxxXQvOyaXg0hqgae5dpG5LvZHIP6b27jF3IuTG3lILZDjZsO9NcZbBr+NGwKBgQC3aD5VAUjCn+xnHIzGd0/avFYIGzqGUw2hZfFfuI3r58gRo/bjlOny7jLTxOFa+2SGggdDVm/izWut2FacNr3/GVTkcZc6ZEIXWq793vFky69PwGj24bCbplLYaCWM79HczM9sIWBl5WKmI7k1O/AIJrPteTa/Du/T+IfcATQDmwKBgQCCNjXI3eP6w3hjn/Pj6+CgdGoYjUW1x73lAGOj/Tzva0kSJstS74baL+ivDVWRDzMhy+O3DfUOEsOCCK3wfu9C6VH99Spnt1dyNUY8idnSMkEI6+BiLKs3pvd2hJgQb3vdzjOeVYB3RCLUNVz/qBIYWQmNgKDtqIId3HZE7yLyKQKBgQCq4Blq00Z55cu4CZZy9ghVL7Er3kp5iXmijLsExoqbZpg1L0E/qacJ6bk7KiwXuy5eT1j6+NZHRcHz9yJCapI70NsR927BPVWCMr/k0Uiv80FDmW1xzrXfXmfDLc0GcQ1inQMHqFUKultdlNziZxRsU7rBHnTOLtls8RmK9SgDzwKBgBnWfQNVF/BSIP/pOkudu966DwqySamzy/HrdOIq92r+OtAWqtLMq8bbIkMW1asC8+MLE81JD9fn7YmKeZTbMwxE2z5Tv1z+UUqy//79Vkj8FmlSfY0kraj9ZXjMp+Hg0kCpavOU4QFXONn2LVvrrh0tACcgJoJGRJJYuJMQeu7c";
|
public static String privateKey = "MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCpYi38h2/25e4mNWo56mmwuwa7QbBbPdgH00rsmPI/+0JkYhda2uZDvtrFXWMLzVJ2ioh9pamcfUbb2LcFgLIJ0KJyTia4sVMHmbk9l8wPf9mE4aOYN8ix6olzkm9ZhDGVekx2niW/hf6bpjnh92+I4EZo4xsK3RAsQ9oDXPjrJzktrrerAP+5MNOY8wLRqOp0KU+bOIcsz4Wz+qD3UxP2PjXPJDvXu7NkYDndOc7G0tVnhzVahFafqAntbgQHMyJENhLl9xdbnYdiKQqZJUwfI9xlRKYk08P4YVYTL7dAGAibQJJamgqmmKo8uibDIMkLsTGNm5WzW3EErWOCl6wlAgMBAAECggEAXfyxgbdxRDHPlHn9KIfO/5a3pH5NqkNFtQnkQCaZ/TChZWwcg3iFXr/vSqaICAt1H3u9QuMCm2fUQrcczzvbDqErEnwU9lTGuqfs5qVtQIhznU1K5nLFtRtsC6oMiUJV9Rh4hzU3wu9KGPoCkkUnKW8xApBJ+Bw0FivMNCOJp4kipif0gXQFxDH14w8n4QAyG3keXYP43DPqlsjmjJm4inHajxNO012Snle5SqA5HaIrZzf9St3ctq1BzqgUaD5yyXPmPyi1sqjrK+A16R4DrbKlY2h3/mo1IIfPjYbjb/uPcHf9pDMxEFwYIZ+kkz0uUjRDNWVX3A7ldav8MvvZ/QKBgQDot2raw93blrEhld3GGY4JNxboi6UZ1guK2nDEjlnpZjDUklSlNsx82NM8g0bm76Q9A3WpuoHQoSGEIy9ElrMuNS7xj+PZe5mNyKFMBG8hKeIV3jx4OIU80aiV9OQLv6+AonavHvOLXu41OJKdoQexyz7q3lu0+i7d9KKbWd2SlwKBgQC6VJxj1KPh3kHtmm/d/5fOZUDLqxTOyexRrEUCj9hGjv5XymxULQPskKxasFKiPyn4TCp2ZOrPO1slu8IUpzaymM4DDQYtTQkbsAT/N6r9efCJTXDdTgm5iyTaILbSbqd01KEnqjmFLOSCpasvM47rARlG4IYXIXD9cXKj12AaowKBgAN7w2C079w6nDopeSFe/o5KwdAHTxhc6N1SOb/ndZcVzYNREW1LrbHsuPS97lDEo4u6Qoeg4BKUZuEIecuoCdSWPTamdb2qqPjDWQ6/Pj6b1uOG6RbPmcb4SHK+MK+wVdsyE165suGSMTSgvSkY4PmbVjzDyVGjMRJneAulQ7jPAoGAViCIDWkbu2q1xLNPJClhrSiGU94nhxI05uefGnkM+khcbo4Flr8cAjw5Ps4j1BUoPDpQolsxYkrIbd+k7VEBanpRN33MriHepOqu1J2RrwqvUXf3RIQu4JHdnenjN8+oHcuvFhuL7O/8TBtxziah2CSw318m/AgcJzpKSEtkg8sCgYB/cr6PuuQ7JpK2kYmwYMSwNvys0v31iSqFmJK6EyPRycGw9Wj/ANiGJrKuVqdnzb2LqSzdNWkKte25hSIv21satgHM2of7oFzjFB2N/hMx5o+nOQgq0zZcA6Mvn0W3GFFZ1YAep3oyrxLh9+5ELi2JGXgJafiEJvr5J3YzSGOWrw==";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|||||||
@@ -6,9 +6,12 @@ import com.alipay.api.AlipayApiException;
|
|||||||
import com.alipay.api.AlipayClient;
|
import com.alipay.api.AlipayClient;
|
||||||
import com.alipay.api.DefaultAlipayClient;
|
import com.alipay.api.DefaultAlipayClient;
|
||||||
import com.alipay.api.domain.*;
|
import com.alipay.api.domain.*;
|
||||||
|
import com.alipay.api.internal.util.AlipaySignature;
|
||||||
import com.alipay.api.request.*;
|
import com.alipay.api.request.*;
|
||||||
import com.alipay.api.response.*;
|
import com.alipay.api.response.*;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
@@ -53,13 +56,32 @@ public class AliPayApi {
|
|||||||
* @throws AlipayApiException 支付宝 Api 异常
|
* @throws AlipayApiException 支付宝 Api 异常
|
||||||
*/
|
*/
|
||||||
public static AlipayTradeAppPayResponse appPayToResponse(AlipayTradeAppPayModel model, String notifyUrl, AliPayApiConfig aliPayApiConfig) throws AlipayApiException {
|
public static AlipayTradeAppPayResponse appPayToResponse(AlipayTradeAppPayModel model, String notifyUrl, AliPayApiConfig aliPayApiConfig) throws AlipayApiException {
|
||||||
AlipayTradeAppPayRequest request = new AlipayTradeAppPayRequest();
|
AlipayTradeAppPayRequest request = new AlipayTradeAppPayRequest();
|
||||||
request.setBizModel(model);
|
request.setBizModel(model);
|
||||||
request.setNotifyUrl(notifyUrl);
|
request.setNotifyUrl(notifyUrl);
|
||||||
|
request.setBizContent(model.toString());
|
||||||
AlipayTradeAppPayResponse response = aliPayApiConfig.getAliPayClient().sdkExecute(request);
|
AlipayTradeAppPayResponse response = aliPayApiConfig.getAliPayClient().sdkExecute(request);
|
||||||
System.out.println(response.getBody());
|
System.out.println(response.getBody());
|
||||||
return aliPayApiConfig.getAliPayClient().sdkExecute(request);
|
return aliPayApiConfig.getAliPayClient().sdkExecute(request);
|
||||||
}
|
}
|
||||||
|
public static AlipayTradeAppPayResponse appPayToResponse1(AlipayTradeAppPayModel model, String notifyUrl, AlipayClient alipayClient) throws AlipayApiException {
|
||||||
|
log.info("-----------支付宝支付:{}", JSONObject.toJSONString(alipayClient));
|
||||||
|
AlipayTradeAppPayRequest request = new AlipayTradeAppPayRequest();
|
||||||
|
request.setNotifyUrl(notifyUrl);
|
||||||
|
// JSONObject bizContent = new JSONObject();
|
||||||
|
// bizContent.put("out_trade_no", model.getOutTradeNo());
|
||||||
|
// bizContent.put("total_amount",model.getTotalAmount());
|
||||||
|
// bizContent.put("subject", "测试商品");
|
||||||
|
// bizContent.put("product_code", "QUICK_MSECURITY_PAY");
|
||||||
|
request.setBizModel(model);
|
||||||
|
// request.setBizContent(bizContent.toString());
|
||||||
|
AlipayTradeAppPayResponse response = alipayClient.sdkExecute(request);;
|
||||||
|
log.info("-----------支付宝同步结果--------------:{}", JSONObject.toJSONString(response));
|
||||||
|
System.out.println(response.getBody());
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WAP支付
|
* WAP支付
|
||||||
|
|||||||
@@ -26,5 +26,9 @@ public class AliPayBean {
|
|||||||
private String serverUrl;
|
private String serverUrl;
|
||||||
private String domain;
|
private String domain;
|
||||||
|
|
||||||
|
private String rootCertPath;
|
||||||
|
private String certPath;
|
||||||
|
private String alipayPublicKey;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -183,6 +183,27 @@
|
|||||||
<artifactId>okhttp</artifactId>
|
<artifactId>okhttp</artifactId>
|
||||||
<version>3.14.4</version>
|
<version>3.14.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!--发送短信-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.axis</groupId>
|
||||||
|
<artifactId>axis</artifactId>
|
||||||
|
<version>1.4</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>axis</groupId>
|
||||||
|
<artifactId>axis-jaxrpc</artifactId>
|
||||||
|
<version>1.2.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-discovery</groupId>
|
||||||
|
<artifactId>commons-discovery</artifactId>
|
||||||
|
<version>0.2</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>wsdl4j</groupId>
|
||||||
|
<artifactId>wsdl4j</artifactId>
|
||||||
|
<version>1.6.3</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
package com.zscat.mallplus.apirest;
|
||||||
|
|
||||||
|
import com.zscat.mallplus.oms.entity.OmsCartItem;
|
||||||
|
import com.zscat.mallplus.ums.entity.SysMessage;
|
||||||
|
import com.zscat.mallplus.ums.entity.UmsMember;
|
||||||
|
import com.zscat.mallplus.ums.service.ISysMessageService;
|
||||||
|
import com.zscat.mallplus.ums.service.IUmsMemberService;
|
||||||
|
import com.zscat.mallplus.utils.CommonResult;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@Api(tags = "SysMessageRest", description = "系统消息")
|
||||||
|
@RequestMapping("/api/sys/message")
|
||||||
|
public class SysMessageRest {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IUmsMemberService memberService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysMessageService messageService;
|
||||||
|
|
||||||
|
@ApiOperation("获取某个会员的消息列表")
|
||||||
|
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
||||||
|
@ResponseBody
|
||||||
|
public Object list() {
|
||||||
|
UmsMember umsMember = memberService.getNewCurrentMember();
|
||||||
|
List<SysMessage> list = new ArrayList<>();
|
||||||
|
if (umsMember != null && umsMember.getId() != null) {
|
||||||
|
list = messageService.listByUserId(umsMember.getId());
|
||||||
|
return new CommonResult().success(list);
|
||||||
|
}
|
||||||
|
return new CommonResult().success(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("获取消息内容")
|
||||||
|
@RequestMapping(value = "/info", method = RequestMethod.GET)
|
||||||
|
@ResponseBody
|
||||||
|
public Object info(@RequestParam(value = "id", required = false, defaultValue = "0") Long id) {
|
||||||
|
SysMessage mes = messageService.getById(id);
|
||||||
|
if (mes != null && !mes.getStatus()) {
|
||||||
|
mes.setStatus(true);
|
||||||
|
messageService.updateStatus(mes);
|
||||||
|
}
|
||||||
|
return new CommonResult().success(mes);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("更新")
|
||||||
|
@RequestMapping(value = "/updateStatus", method = RequestMethod.POST)
|
||||||
|
@ResponseBody
|
||||||
|
public Object updateStatus(@RequestBody SysMessage sysMessage) {
|
||||||
|
int count = messageService.updateStatus(sysMessage);
|
||||||
|
if (count > 0) {
|
||||||
|
return new CommonResult().success(count);
|
||||||
|
}
|
||||||
|
return new CommonResult().failed();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.zscat.mallplus.annotation.IgnoreAuth;
|
import com.zscat.mallplus.annotation.IgnoreAuth;
|
||||||
import com.zscat.mallplus.annotation.SysLog;
|
import com.zscat.mallplus.annotation.SysLog;
|
||||||
import com.zscat.mallplus.cms.entity.CmsSubject;
|
import com.zscat.mallplus.cms.entity.CmsSubject;
|
||||||
|
import com.zscat.mallplus.enums.SmsEnum;
|
||||||
import com.zscat.mallplus.oms.service.IOmsOrderService;
|
import com.zscat.mallplus.oms.service.IOmsOrderService;
|
||||||
import com.zscat.mallplus.oms.vo.HomeContentResult;
|
import com.zscat.mallplus.oms.vo.HomeContentResult;
|
||||||
import com.zscat.mallplus.pms.entity.PmsProduct;
|
import com.zscat.mallplus.pms.entity.PmsProduct;
|
||||||
@@ -38,6 +39,7 @@ import io.swagger.annotations.Api;
|
|||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections.map.HashedMap;
|
import org.apache.commons.collections.map.HashedMap;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.security.core.AuthenticationException;
|
import org.springframework.security.core.AuthenticationException;
|
||||||
@@ -390,13 +392,13 @@ public class BHomeController {
|
|||||||
@IgnoreAuth
|
@IgnoreAuth
|
||||||
@ApiOperation("获取验证码")
|
@ApiOperation("获取验证码")
|
||||||
@PostMapping(value = "/user.sms")
|
@PostMapping(value = "/user.sms")
|
||||||
public Object sendSmsCode(@RequestParam String phone) {
|
public Object sendSmsCode(@RequestParam("phone") String phone,@RequestParam(value = "type",required = false)String type) {
|
||||||
try {
|
try {
|
||||||
if (!PhoneUtil.checkPhone(phone)) {
|
if (!PhoneUtil.checkPhone(phone)) {
|
||||||
throw new IllegalArgumentException("手机号格式不正确");
|
throw new IllegalArgumentException("手机号格式不正确");
|
||||||
}
|
}
|
||||||
SmsCode smsCode = memberService.generateCode(phone);
|
Date date = new Date();
|
||||||
|
SmsCode smsCode = memberService.generateCode(phone,type,date);
|
||||||
return new CommonResult().success(smsCode);
|
return new CommonResult().success(smsCode);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|||||||
@@ -3,6 +3,9 @@ package com.zscat.mallplus.build.service;
|
|||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.zscat.mallplus.build.entity.BuildWuyeCompany;
|
import com.zscat.mallplus.build.entity.BuildWuyeCompany;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 服务类
|
* 服务类
|
||||||
@@ -14,4 +17,6 @@ import com.zscat.mallplus.build.entity.BuildWuyeCompany;
|
|||||||
public interface IBuildWuyeCompanyService extends IService<BuildWuyeCompany> {
|
public interface IBuildWuyeCompanyService extends IService<BuildWuyeCompany> {
|
||||||
|
|
||||||
boolean saveCompany(BuildWuyeCompany entity);
|
boolean saveCompany(BuildWuyeCompany entity);
|
||||||
|
|
||||||
|
Map<String, List<String>> nameMapWithCommunity();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,4 +53,6 @@ public interface IBuildingCommunityService extends IService<BuildingCommunity> {
|
|||||||
double latitude,
|
double latitude,
|
||||||
double longitude,
|
double longitude,
|
||||||
Integer pageSize);
|
Integer pageSize);
|
||||||
|
|
||||||
|
List<BuildingCommunity> listOfCompany(Long id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
package com.zscat.mallplus.build.service.impl;
|
package com.zscat.mallplus.build.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.zscat.mallplus.build.entity.BuildWuyeCompany;
|
import com.zscat.mallplus.build.entity.BuildWuyeCompany;
|
||||||
|
import com.zscat.mallplus.build.entity.BuildingCommunity;
|
||||||
import com.zscat.mallplus.build.mapper.BuildWuyeCompanyMapper;
|
import com.zscat.mallplus.build.mapper.BuildWuyeCompanyMapper;
|
||||||
import com.zscat.mallplus.build.service.IBuildWuyeCompanyService;
|
import com.zscat.mallplus.build.service.IBuildWuyeCompanyService;
|
||||||
|
import com.zscat.mallplus.build.service.IBuildingCommunityService;
|
||||||
import com.zscat.mallplus.exception.ApiMallPlusException;
|
import com.zscat.mallplus.exception.ApiMallPlusException;
|
||||||
import com.zscat.mallplus.sys.entity.SysUser;
|
import com.zscat.mallplus.sys.entity.SysUser;
|
||||||
import com.zscat.mallplus.sys.entity.SysUserRole;
|
import com.zscat.mallplus.sys.entity.SysUserRole;
|
||||||
@@ -14,7 +17,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.Date;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -36,6 +39,9 @@ public class BuildWuyeCompanyServiceImpl extends ServiceImpl<BuildWuyeCompanyMap
|
|||||||
@Resource
|
@Resource
|
||||||
private SysUserRoleMapper userRoleMapper;
|
private SysUserRoleMapper userRoleMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IBuildingCommunityService communityService;
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
@Override
|
@Override
|
||||||
public boolean saveCompany(BuildWuyeCompany entity) {
|
public boolean saveCompany(BuildWuyeCompany entity) {
|
||||||
@@ -67,4 +73,19 @@ public class BuildWuyeCompanyServiceImpl extends ServiceImpl<BuildWuyeCompanyMap
|
|||||||
userRoleMapper.insert(userRole);
|
userRoleMapper.insert(userRole);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, List<String>> nameMapWithCommunity() {
|
||||||
|
Map<String, List<String>> map = new HashMap<>();
|
||||||
|
List<BuildWuyeCompany> comList = this.list(new QueryWrapper<>());
|
||||||
|
comList.forEach(company -> {
|
||||||
|
List<BuildingCommunity> list = communityService.listOfCompany(company.getId());
|
||||||
|
List<String> cList = new ArrayList<>();
|
||||||
|
list.forEach(community -> {
|
||||||
|
cList.add(community.getName());
|
||||||
|
});
|
||||||
|
map.put(company.getName(), cList);
|
||||||
|
});
|
||||||
|
return map;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -169,8 +169,8 @@ public class BuildingCommunityServiceImpl extends ServiceImpl<BuildingCommunityM
|
|||||||
}
|
}
|
||||||
buildAdvs = advMapper.selectList(new QueryWrapper<BuildAdv>().eq("community_id", community.getId()));
|
buildAdvs = advMapper.selectList(new QueryWrapper<BuildAdv>().eq("community_id", community.getId()));
|
||||||
buildNotices = noticeMapper.selectList(new QueryWrapper<BuildNotice>().eq("community_id", community.getId()));
|
buildNotices = noticeMapper.selectList(new QueryWrapper<BuildNotice>().eq("community_id", community.getId()));
|
||||||
if (Double.valueOf(community.getLatitude())>0){
|
if (Double.valueOf(community.getLatitude()) > 0) {
|
||||||
List<BuildingCommunity> communityList = this.selectNearCommunity(40,Double.valueOf(community.getLatitude()),Double.valueOf(community.getLongitude()),10);
|
List<BuildingCommunity> communityList = this.selectNearCommunity(40, Double.valueOf(community.getLatitude()), Double.valueOf(community.getLongitude()), 10);
|
||||||
result.setCommunityList(communityList);
|
result.setCommunityList(communityList);
|
||||||
}
|
}
|
||||||
result.setCommunity(community);
|
result.setCommunity(community);
|
||||||
@@ -182,7 +182,14 @@ public class BuildingCommunityServiceImpl extends ServiceImpl<BuildingCommunityM
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<BuildingCommunity> selectNearCommunity(Integer distance, double latitude, double longitude, Integer pageSize) {
|
public List<BuildingCommunity> selectNearCommunity(Integer distance, double latitude, double longitude, Integer pageSize) {
|
||||||
return communityMapper.selectNearCommunity(distance,latitude,longitude,pageSize);
|
return communityMapper.selectNearCommunity(distance, latitude, longitude, pageSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<BuildingCommunity> listOfCompany(Long companyId) {
|
||||||
|
QueryWrapper<BuildingCommunity> qw = new QueryWrapper<>();
|
||||||
|
qw.eq("company_id", companyId);
|
||||||
|
return baseMapper.selectList(qw);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<ActivityVo> getActivityList() {
|
public List<ActivityVo> getActivityList() {
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package com.zscat.mallplus.config;
|
||||||
|
|
||||||
|
import org.apache.axis.client.Call;
|
||||||
|
import org.apache.axis.client.Service;
|
||||||
|
import org.apache.axis.encoding.XMLType;
|
||||||
|
|
||||||
|
import javax.xml.namespace.QName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author dimengzhe
|
||||||
|
* @Date 2023/2/22 21:38
|
||||||
|
* @Description
|
||||||
|
*/
|
||||||
|
public class SmsConfig {
|
||||||
|
|
||||||
|
static String msgSign="【汇融云链】";
|
||||||
|
public static String SendWaitWorkMsg(String mobile, String pwd,String msg) {
|
||||||
|
try {
|
||||||
|
|
||||||
|
String urlname = "http://sdk1.mb345.com/ws/LinkWS.asmx";
|
||||||
|
String soapActionURI = "http://tempuri.org/BatchSend";
|
||||||
|
Service s = new Service();
|
||||||
|
Call call = (Call) s.createCall();
|
||||||
|
call.setTimeout(new Integer(5000));
|
||||||
|
call.setUseSOAPAction(true);
|
||||||
|
call.setSOAPActionURI(soapActionURI);
|
||||||
|
// wsdl中接口名称
|
||||||
|
call.setOperationName(new QName("http://tempuri.org/", "BatchSend"));
|
||||||
|
call.setTargetEndpointAddress(urlname);
|
||||||
|
call.addParameter(new QName("http://tempuri.org/", "CorpID"), XMLType.XSD_STRING,
|
||||||
|
javax.xml.rpc.ParameterMode.IN);
|
||||||
|
call.addParameter(new QName("http://tempuri.org/", "Pwd"), XMLType.XSD_STRING,
|
||||||
|
javax.xml.rpc.ParameterMode.IN);
|
||||||
|
call.addParameter(new QName("http://tempuri.org/", "Mobile"), XMLType.XSD_STRING,
|
||||||
|
javax.xml.rpc.ParameterMode.IN);
|
||||||
|
call.addParameter(new QName("http://tempuri.org/", "Content"), XMLType.XSD_STRING,
|
||||||
|
javax.xml.rpc.ParameterMode.IN);
|
||||||
|
call.addParameter(new QName("http://tempuri.org/", "Cell"), XMLType.XSD_STRING,
|
||||||
|
javax.xml.rpc.ParameterMode.IN);
|
||||||
|
call.addParameter(new QName("http://tempuri.org/", "SendTime"), XMLType.XSD_STRING,
|
||||||
|
javax.xml.rpc.ParameterMode.IN);
|
||||||
|
String[] fn01 = {"YXT011836", "yxt_hryl230223", mobile, msg+msgSign, "", ""};
|
||||||
|
String val = (String) call.invoke(fn01);
|
||||||
|
return val;
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
return e.getMessage();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -100,9 +100,9 @@ public class AppVersionController {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/versioninfo")
|
@RequestMapping(value = "/versioninfo1")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object appVersion(HttpServletRequest request) {
|
public Object appVersion1(HttpServletRequest request) {
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
int versionCode = 1;// 版本编码
|
int versionCode = 1;// 版本编码
|
||||||
String defUrl = "";
|
String defUrl = "";
|
||||||
@@ -217,4 +217,37 @@ public class AppVersionController {
|
|||||||
return new CommonResult().success(appVersionNew);
|
return new CommonResult().success(appVersionNew);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/versioninfo")
|
||||||
|
@ResponseBody
|
||||||
|
public Object appVersion(HttpServletRequest request) {
|
||||||
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
|
int versionCode = 101;// 版本编码
|
||||||
|
String versionName = "101";// 版本号
|
||||||
|
String downloadUrl = "";// apk下载地址
|
||||||
|
String versionInfo = "";// 版本的更新描述
|
||||||
|
String fileName = "";// apk名称
|
||||||
|
int isAlpha = 0;//是否内测,0否,1是
|
||||||
|
|
||||||
|
AppVersion appVersion = new AppVersion();
|
||||||
|
appVersion.setVersionCode(versionCode);//版本编码
|
||||||
|
appVersion.setVersionName(versionName);//版本号
|
||||||
|
appVersion.setDownloadUrl(downloadUrl); //apk下载地址新
|
||||||
|
appVersion.setVersionInfo(versionInfo);//版本的更新的描述
|
||||||
|
appVersion.setFileName(fileName);//应用名称
|
||||||
|
appVersion.setForceUpdate(false);
|
||||||
|
|
||||||
|
// 查询版本记录未删除及为正式版的版本记录
|
||||||
|
AppVersion av = appVersionService.getAll();
|
||||||
|
if (null != av) {// 如果有正式版的版本记录
|
||||||
|
appVersion.setVersionCode(av.getVersionCode());//版本编码
|
||||||
|
appVersion.setVersionName(av.getVersionName());//版本号
|
||||||
|
appVersion.setDownloadUrl(av.getDownloadUrl()); //apk下载地址新
|
||||||
|
appVersion.setVersionInfo(av.getVersionInfo());//版本的更新的描述
|
||||||
|
appVersion.setFileName(av.getFileName());//应用名称
|
||||||
|
}
|
||||||
|
|
||||||
|
String appVersionNew = JsonUtils.objectToJson(appVersion);
|
||||||
|
|
||||||
|
return new CommonResult().success(appVersionNew);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1400,15 +1400,16 @@ public class OmsOrderServiceImpl extends ServiceImpl<OmsOrderMapper, OmsOrder> i
|
|||||||
@Transactional
|
@Transactional
|
||||||
public boolean closeOrder(OmsOrder order) {
|
public boolean closeOrder(OmsOrder order) {
|
||||||
releaseStock(order);
|
releaseStock(order);
|
||||||
// order.setStatus(OrderStatus.CLOSED.getValue());
|
order.setStatus(OrderStatus.CLOSED.getValue());
|
||||||
order.setStatus(OrderStatus.DELETED.getValue());
|
// order.setStatus(OrderStatus.DELETED.getValue());
|
||||||
|
|
||||||
OmsOrderOperateHistory history = new OmsOrderOperateHistory();
|
OmsOrderOperateHistory history = new OmsOrderOperateHistory();
|
||||||
history.setOrderId(order.getId());
|
history.setOrderId(order.getId());
|
||||||
history.setCreateTime(new Date());
|
history.setCreateTime(new Date());
|
||||||
history.setOperateMan("shop");
|
history.setOperateMan("shop");
|
||||||
history.setPreStatus(OrderStatus.INIT.getValue());
|
// history.setPreStatus(OrderStatus.INIT.getValue());
|
||||||
history.setOrderStatus(OrderStatus.DELETED.getValue());
|
history.setPreStatus(OrderStatus.CLOSED.getValue());
|
||||||
|
history.setOrderStatus(OrderStatus.CLOSED.getValue());
|
||||||
history.setNote("取消订单");
|
history.setNote("取消订单");
|
||||||
orderOperateHistoryService.save(history);
|
orderOperateHistoryService.save(history);
|
||||||
|
|
||||||
@@ -1426,7 +1427,8 @@ public class OmsOrderServiceImpl extends ServiceImpl<OmsOrderMapper, OmsOrder> i
|
|||||||
if (order.getStatus() != OrderStatus.DELIVERED.getValue()) {
|
if (order.getStatus() != OrderStatus.DELIVERED.getValue()) {
|
||||||
return new CommonResult().paramFailed("已发货订单才能确认收货");
|
return new CommonResult().paramFailed("已发货订单才能确认收货");
|
||||||
}
|
}
|
||||||
OmsOrderOperateHistory history = updateOrderInfo(id, order, OrderStatus.TO_COMMENT);
|
// OmsOrderOperateHistory history = updateOrderInfo(id, order, OrderStatus.TO_COMMENT);
|
||||||
|
OmsOrderOperateHistory history = updateOrderInfo(id, order, OrderStatus.TRADE_SUCCESS);
|
||||||
history.setNote("确认收货");
|
history.setNote("确认收货");
|
||||||
orderOperateHistoryService.save(history);
|
orderOperateHistoryService.save(history);
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.alipay.api.AlipayApiException;
|
import com.alipay.api.AlipayApiException;
|
||||||
import com.alipay.api.AlipayClient;
|
import com.alipay.api.AlipayClient;
|
||||||
|
import com.alipay.api.CertAlipayRequest;
|
||||||
import com.alipay.api.DefaultAlipayClient;
|
import com.alipay.api.DefaultAlipayClient;
|
||||||
import com.alipay.api.domain.*;
|
import com.alipay.api.domain.*;
|
||||||
import com.alipay.api.internal.util.AlipaySignature;
|
import com.alipay.api.internal.util.AlipaySignature;
|
||||||
@@ -35,6 +36,7 @@ import com.zscat.mallplus.utils.ValidatorUtils;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
@@ -65,10 +67,61 @@ import java.util.Map;
|
|||||||
@RequestMapping("/api/aliPay")
|
@RequestMapping("/api/aliPay")
|
||||||
public class AliPayController extends AbstractAliPayApiController {
|
public class AliPayController extends AbstractAliPayApiController {
|
||||||
private static final Logger log = LoggerFactory.getLogger(AliPayController.class);
|
private static final Logger log = LoggerFactory.getLogger(AliPayController.class);
|
||||||
|
|
||||||
|
@Value("${alipay.domain}")
|
||||||
|
private String DOMAIN;
|
||||||
|
|
||||||
|
@Value("${alipay.appId}")
|
||||||
|
private String APPID;
|
||||||
|
/**
|
||||||
|
* 支付宝公钥
|
||||||
|
*/
|
||||||
|
@Value("${alipay.ALIPAY_PUBLIC_KEY}")
|
||||||
|
private String ALIPAY_PUBLIC_KEY;
|
||||||
|
/**
|
||||||
|
* 支付宝网关
|
||||||
|
*/
|
||||||
|
@Value("${alipay.serverUrl}")
|
||||||
|
private String GATE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编码方式
|
||||||
|
*/
|
||||||
|
private String CHARSET = "utf-8";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 回调地址
|
||||||
|
*/
|
||||||
|
@Value("${alipay.notifyUrl}")
|
||||||
|
private String NOTIFY_URL;
|
||||||
|
/**
|
||||||
|
* 支付宝CA根证书文件路径(alipay_root_cert_path 文件绝对路径)
|
||||||
|
*/
|
||||||
|
@Value("${alipay.RootCertPath}")
|
||||||
|
private String RootCertPath;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用公钥证书路径(app_cert_path 文件绝对路径)
|
||||||
|
*/
|
||||||
|
@Value("${alipay.CertPath}")
|
||||||
|
private String CertPath;
|
||||||
|
|
||||||
|
private String SignType = "RSA2";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用私钥
|
||||||
|
*/
|
||||||
|
@Value("${alipay.privateKey}")
|
||||||
|
private String APP_PRIVATE_KEY;
|
||||||
|
|
||||||
|
|
||||||
String domain = "";
|
String domain = "";
|
||||||
String privateKey = "";
|
String privateKey = "";
|
||||||
|
//支付宝公钥
|
||||||
String publicKey = "";
|
String publicKey = "";
|
||||||
|
//支付宝支付业务:app_id
|
||||||
String appId = "";
|
String appId = "";
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IOmsOrderService orderService;
|
private IOmsOrderService orderService;
|
||||||
@Resource
|
@Resource
|
||||||
@@ -91,10 +144,10 @@ public class AliPayController extends AbstractAliPayApiController {
|
|||||||
aliPayApiConfig = AliPayApiConfig.builder()
|
aliPayApiConfig = AliPayApiConfig.builder()
|
||||||
.setAppId(aliPayBean.getAppId())
|
.setAppId(aliPayBean.getAppId())
|
||||||
.setAliPayPublicKey(aliPayBean.getPublicKey())
|
.setAliPayPublicKey(aliPayBean.getPublicKey())
|
||||||
.setCharset("UTF-8")
|
.setCharset(CHARSET)
|
||||||
.setPrivateKey(aliPayBean.getPrivateKey())
|
.setPrivateKey(aliPayBean.getPrivateKey())
|
||||||
.setServiceUrl(aliPayBean.getServerUrl())
|
.setServiceUrl(aliPayBean.getServerUrl())
|
||||||
.setSignType("RSA2")
|
.setSignType(SignType)
|
||||||
.build();
|
.build();
|
||||||
domain = aliPayBean.getDomain();
|
domain = aliPayBean.getDomain();
|
||||||
privateKey = aliPayBean.getPrivateKey();
|
privateKey = aliPayBean.getPrivateKey();
|
||||||
@@ -104,29 +157,52 @@ public class AliPayController extends AbstractAliPayApiController {
|
|||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
AliPayBean aliPayBean = new AliPayBean();
|
AliPayBean aliPayBean = new AliPayBean();
|
||||||
aliPayBean.setAppId("2018082761134635");
|
//APPID 即创建应用后生成,详情见创建应用并获取 APPID
|
||||||
aliPayBean.setDomain("http://www.yyundong.com:8083/api");
|
aliPayBean.setAppId(APPID);
|
||||||
//aliPayBean.setDomain("http://26077a35f5.wicp.vip:43609/api");
|
//gateway:支付宝网关(固定)https://openapi.alipay.com/gateway.do
|
||||||
aliPayBean.setServerUrl("https://openapi.alipay.com/gateway.do");
|
aliPayBean.setServerUrl(GATE);
|
||||||
aliPayBean.setPublicKey("MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlOOOOWg4e2deSDMRG2y5EzG7/udMfTzYkn4u/3PWIOlpcUd2ujCztqKY2HdFhIaWE4q8PCLtT5XtBWCq2IVvpCPE8HRzgSZckh6J36SnO0JG1pZe8HajUgIw+T1NM7/b2Nb4OaI5HKNsQ5ei9NlN9RvlIUSpum/nIyk/9CBvNAg8xUlHUFPaPL0WCMJ9zIwRO+aEn2kwA7JQ8AvjuPy390oil0W4fxfHonJYxuzOo6Lx369Vti5N9UmXczXUcOiVwyCveoH05chNr3r8xu5QqpD1o32cO01Zt4EA9j6aM2H09g08VzoLam2OoU3umKOV0vvX+bMmb1GwrkussSvDpQIDAQAB");
|
//开发者应用私钥,由开发者自己生成
|
||||||
aliPayBean.setPrivateKey("MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCjI8p9Vh3QrBsa2BdTLAa9YrPGdHAo4DeYx79rlrITI4kIwy6/q/JDaXNBQgl80mUYh4Zinc0mDZ68n14zIL0f4At+EzzfxT5RIVYKZb/EEj6ijElldvijblcCAkrcoTl+oWDEKEOyyJW2UFbRIUYUZcszfi+pue1BIdvwlfxHTI77o1H6d2ApkyIHgs6zYeeauDkYYTdAjSCV7PHhTO6H6yS5uyc0rOLxUTdABA+b+ewSnTw2uvuVTTnrC7xIqjfj1fRocsNh/1KfqF4I5iMQmrRaIlujRSTQrO7kLVbYW45D+Qr4mB3TlhTGAFcTL+ovugA+66NASZmUyNsZHcBZAgMBAAECggEAao+eXHA72WoR6l7sHW/Mlzg5pY+5E3oh1rHi3yv39XhoskiL6Lcv78iZeC7ic54aWwNrTE83CXwsC5kttsfTwVZfK2L1iFUWd3gG85OyxygDsblg1932Wwpf2vgUXjkRjR1sT7TdQ5Kx9/xSORg65mf3axMpnvvLdZfgSi4uM4NJ94NzCLwH7zSWuK6CsPfl24RQlQfczRUy4GzG+wtXjDj5XLNNO6GQacQY4BUkcjCfrkUrQ9Lf2joYiXRyVNWUN1HivmfMouG37WQhUzz0CL8tF1EfooCfPhetAF5Aursve3O8l0Lno6K1auziN8g/Jfuo+efKfImzwvyo3m1n4QKBgQDjtfOWqcVP611OSTm1L1RFHCJMZN5wgOLEquO/2VC4VItV7vy0odNrLydd9Eg77VbC0IVcqunQIHjON3fFEVlj0bEVOaEN+X26oP84UNBK12QcLWvxxXQvOyaXg0hqgae5dpG5LvZHIP6b27jF3IuTG3lILZDjZsO9NcZbBr+NGwKBgQC3aD5VAUjCn+xnHIzGd0/avFYIGzqGUw2hZfFfuI3r58gRo/bjlOny7jLTxOFa+2SGggdDVm/izWut2FacNr3/GVTkcZc6ZEIXWq793vFky69PwGj24bCbplLYaCWM79HczM9sIWBl5WKmI7k1O/AIJrPteTa/Du/T+IfcATQDmwKBgQCCNjXI3eP6w3hjn/Pj6+CgdGoYjUW1x73lAGOj/Tzva0kSJstS74baL+ivDVWRDzMhy+O3DfUOEsOCCK3wfu9C6VH99Spnt1dyNUY8idnSMkEI6+BiLKs3pvd2hJgQb3vdzjOeVYB3RCLUNVz/qBIYWQmNgKDtqIId3HZE7yLyKQKBgQCq4Blq00Z55cu4CZZy9ghVL7Er3kp5iXmijLsExoqbZpg1L0E/qacJ6bk7KiwXuy5eT1j6+NZHRcHz9yJCapI70NsR927BPVWCMr/k0Uiv80FDmW1xzrXfXmfDLc0GcQ1inQMHqFUKultdlNziZxRsU7rBHnTOLtls8RmK9SgDzwKBgBnWfQNVF/BSIP/pOkudu966DwqySamzy/HrdOIq92r+OtAWqtLMq8bbIkMW1asC8+MLE81JD9fn7YmKeZTbMwxE2z5Tv1z+UUqy//79Vkj8FmlSfY0kraj9ZXjMp+Hg0kCpavOU4QFXONn2LVvrrh0tACcgJoJGRJJYuJMQeu7c");
|
aliPayBean.setPrivateKey(APP_PRIVATE_KEY);
|
||||||
|
aliPayBean.setDomain(DOMAIN);
|
||||||
|
aliPayBean.setAlipayPublicKey(ALIPAY_PUBLIC_KEY);
|
||||||
|
aliPayBean.setCertPath(CertPath);
|
||||||
|
aliPayBean.setRootCertPath(RootCertPath);
|
||||||
|
|
||||||
aliPayApiConfig = AliPayApiConfig.builder()
|
aliPayApiConfig = AliPayApiConfig.builder()
|
||||||
.setAppId(aliPayBean.getAppId())
|
.setAppId(aliPayBean.getAppId())
|
||||||
.setAliPayPublicKey(aliPayBean.getPublicKey())
|
|
||||||
.setCharset("UTF-8")
|
|
||||||
.setPrivateKey(aliPayBean.getPrivateKey())
|
.setPrivateKey(aliPayBean.getPrivateKey())
|
||||||
|
.setAliPayPublicKey(aliPayBean.getAlipayPublicKey())
|
||||||
|
.setCharset(CHARSET)
|
||||||
|
.setSignType(SignType)
|
||||||
.setServiceUrl(aliPayBean.getServerUrl())
|
.setServiceUrl(aliPayBean.getServerUrl())
|
||||||
.setSignType("RSA2")
|
.setAppCertPath(aliPayBean.getCertPath())
|
||||||
|
.setAliPayPublicKey(aliPayBean.getAlipayPublicKey())
|
||||||
|
.setAliPayRootCertPath(aliPayBean.getRootCertPath())
|
||||||
.build();
|
.build();
|
||||||
domain = aliPayBean.getDomain();
|
domain = aliPayBean.getDomain();
|
||||||
privateKey = aliPayBean.getPrivateKey();
|
privateKey = aliPayBean.getPrivateKey();
|
||||||
publicKey = aliPayBean.getPublicKey();
|
publicKey = aliPayBean.getAlipayPublicKey();
|
||||||
appId = aliPayBean.getAppId();
|
appId = aliPayBean.getAppId();
|
||||||
}
|
}
|
||||||
return aliPayApiConfig;
|
return aliPayApiConfig;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public AlipayClient alipayClient() throws AlipayApiException {
|
||||||
|
CertAlipayRequest certAlipayRequest = new CertAlipayRequest();
|
||||||
|
certAlipayRequest.setServerUrl(GATE); //gateway:支付宝网关(固定)https://openapi.alipay.com/gateway.do
|
||||||
|
certAlipayRequest.setAppId(APPID); //APPID 即创建应用后生成,详情见创建应用并获取 APPID
|
||||||
|
certAlipayRequest.setPrivateKey(APP_PRIVATE_KEY); //开发者应用私钥,由开发者自己生成
|
||||||
|
certAlipayRequest.setFormat("json"); //参数返回格式,只支持 json 格式
|
||||||
|
certAlipayRequest.setCharset(CHARSET); //请求和签名使用的字符编码格式,支持 GBK和 UTF-8
|
||||||
|
certAlipayRequest.setSignType(SignType); //商户生成签名字符串所使用的签名算法类型,目前支持 RSA2 和 RSA,推荐商家使用 RSA2。
|
||||||
|
certAlipayRequest.setCertPath(CertPath); //应用公钥证书路径(app_cert_path 文件绝对路径)
|
||||||
|
certAlipayRequest.setAlipayPublicCertPath(ALIPAY_PUBLIC_KEY); //支付宝公钥证书文件路径(alipay_cert_path 文件绝对路径)
|
||||||
|
certAlipayRequest.setRootCertPath(RootCertPath); //支付宝CA根证书文件路径(alipay_root_cert_path 文件绝对路径)
|
||||||
|
AlipayClient alipayClient = new DefaultAlipayClient(certAlipayRequest);
|
||||||
|
return alipayClient;
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping("")
|
@RequestMapping("")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public String index() {
|
public String index() {
|
||||||
@@ -168,9 +244,10 @@ public class AliPayController extends AbstractAliPayApiController {
|
|||||||
model.setOutTradeNo(orderInfo.getOrderSn());
|
model.setOutTradeNo(orderInfo.getOrderSn());
|
||||||
model.setTimeoutExpress("30m");
|
model.setTimeoutExpress("30m");
|
||||||
model.setTotalAmount(orderInfo.getPayAmount().floatValue() + "");
|
model.setTotalAmount(orderInfo.getPayAmount().floatValue() + "");
|
||||||
model.setPassbackParams("callback params");
|
// model.setPassbackParams("callback params");
|
||||||
model.setProductCode("QUICK_MSECURITY_PAY");
|
model.setProductCode("QUICK_MSECURITY_PAY");
|
||||||
String order = AliPayApi.appPayToResponse(model, domain + "/aliPay/notify_url", this.getApiConfig()).getBody();
|
// String order = AliPayApi.appPayToResponse1(model, domain + "/aliPay/notify_url", this.getApiConfig()).getBody();
|
||||||
|
String order = AliPayApi.appPayToResponse1(model, DOMAIN + "/aliPay/notify_url", alipayClient()).getBody();
|
||||||
//String order = AliPayApi.appPayToResponse(model, domain, this.getApiConfig()).getBody();
|
//String order = AliPayApi.appPayToResponse(model, domain, this.getApiConfig()).getBody();
|
||||||
System.out.println(JSONObject.toJSONString(orderInfo));
|
System.out.println(JSONObject.toJSONString(orderInfo));
|
||||||
return new CommonResult().success(order);
|
return new CommonResult().success(order);
|
||||||
@@ -475,7 +552,7 @@ public class AliPayController extends AbstractAliPayApiController {
|
|||||||
public Object tradeRefund(AlipayTradeRefundModel model) {
|
public Object tradeRefund(AlipayTradeRefundModel model) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// AlipayTradeRefundModel model = new AlipayTradeRefundModel();
|
// AlipayTradeRefundModel model = new AlipayTradeRefundModel();
|
||||||
/*model.setOutTradeNo("081014283315023");
|
/*model.setOutTradeNo("081014283315023");
|
||||||
model.setTradeNo("2017081021001004200200273870");
|
model.setTradeNo("2017081021001004200200273870");
|
||||||
model.setRefundAmount("86.00");
|
model.setRefundAmount("86.00");
|
||||||
@@ -757,7 +834,8 @@ public class AliPayController extends AbstractAliPayApiController {
|
|||||||
OmsOrder orderInfo = list.get(0);
|
OmsOrder orderInfo = list.get(0);
|
||||||
orderInfo.setStatus(OrderStatus.TO_DELIVER.getValue());
|
orderInfo.setStatus(OrderStatus.TO_DELIVER.getValue());
|
||||||
orderInfo.setPaymentTime(new Date());
|
orderInfo.setPaymentTime(new Date());
|
||||||
boolean verifyResult = AlipaySignature.rsaCheckV1(params, publicKey, "UTF-8", "RSA2");
|
orderInfo.setPayType(1);
|
||||||
|
boolean verifyResult = AlipaySignature.rsaCertCheckV1(params, ALIPAY_PUBLIC_KEY, "UTF-8", "RSA2");
|
||||||
|
|
||||||
if (verifyResult) {
|
if (verifyResult) {
|
||||||
// 更新订单信息
|
// 更新订单信息
|
||||||
@@ -778,7 +856,7 @@ public class AliPayController extends AbstractAliPayApiController {
|
|||||||
orderService.recordFenxiaoMoney(omsOrderItems, memberService.getById(orderInfo.getMemberId()));
|
orderService.recordFenxiaoMoney(omsOrderItems, memberService.getById(orderInfo.getMemberId()));
|
||||||
// TODO 请在这里加上商户的业务逻辑程序代码 异步通知可能出现订单重复通知 需要做去重处理
|
// TODO 请在这里加上商户的业务逻辑程序代码 异步通知可能出现订单重复通知 需要做去重处理
|
||||||
System.out.println("notify_url 验证成功succcess");
|
System.out.println("notify_url 验证成功succcess");
|
||||||
return new CommonResult().success();
|
return new CommonResult().success("支付成功");
|
||||||
} else {
|
} else {
|
||||||
log.error("订单" + out_trade_no + "支付失败");
|
log.error("订单" + out_trade_no + "支付失败");
|
||||||
orderService.releaseStock(orderInfo);
|
orderService.releaseStock(orderInfo);
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ import com.zscat.mallplus.wxpay.model.*;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.util.ResourceUtils;
|
import org.springframework.util.ResourceUtils;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@@ -79,8 +80,19 @@ public class WxPayController extends AbstractWxPayApiController {
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private SysAppletSetMapper appletSetMapper;
|
private SysAppletSetMapper appletSetMapper;
|
||||||
private String notifyUrl = "http://java.chengguo.link:8081/api";
|
|
||||||
|
// private String notifyUrl = "http://java.chengguo.link:8081/api";
|
||||||
|
@Value("${wx.notifyUrl}")
|
||||||
|
private String notifyUrl;
|
||||||
private String refundNotifyUrl;
|
private String refundNotifyUrl;
|
||||||
|
@Value("${wx.domain}")
|
||||||
|
private String DOMAIN;
|
||||||
|
@Value("${wx.appId}")
|
||||||
|
private String APPID;
|
||||||
|
@Value("${wx.mchId}")
|
||||||
|
private String MCHID;
|
||||||
|
@Value("${wx.secret}")
|
||||||
|
private String SECRET;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public WxPayApiConfig getApiConfig() {
|
public WxPayApiConfig getApiConfig() {
|
||||||
@@ -102,10 +114,14 @@ public class WxPayController extends AbstractWxPayApiController {
|
|||||||
refundNotifyUrl = apiConfig.getDomain().concat("/wxPay/refundNotify");
|
refundNotifyUrl = apiConfig.getDomain().concat("/wxPay/refundNotify");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
WxPayBean wxPayBean = new WxPayBean();
|
WxPayBean wxPayBean = new WxPayBean();
|
||||||
wxPayBean.setAppId("wx8321531c6046c924");
|
// wxPayBean.setAppId("wx8321531c6046c924");
|
||||||
wxPayBean.setMchId("1533901051");
|
wxPayBean.setAppId(APPID);
|
||||||
wxPayBean.setDomain("http://www.yjlive.cn/api/api");
|
// wxPayBean.setMchId("1533901051");
|
||||||
wxPayBean.setPartnerKey("shen9136shen9136shen9136shen9136");
|
wxPayBean.setMchId(MCHID);
|
||||||
|
// wxPayBean.setDomain("http://www.yjlive.cn/api/api");
|
||||||
|
wxPayBean.setDomain(DOMAIN);
|
||||||
|
// wxPayBean.setPartnerKey("shen9136shen9136shen9136shen9136");
|
||||||
|
wxPayBean.setPartnerKey(SECRET);
|
||||||
apiConfig = WxPayApiConfig.builder()
|
apiConfig = WxPayApiConfig.builder()
|
||||||
.appId(wxPayBean.getAppId())
|
.appId(wxPayBean.getAppId())
|
||||||
.mchId(wxPayBean.getMchId())
|
.mchId(wxPayBean.getMchId())
|
||||||
@@ -978,6 +994,7 @@ public class WxPayController extends AbstractWxPayApiController {
|
|||||||
OmsOrder orderInfo = list.get(0);
|
OmsOrder orderInfo = list.get(0);
|
||||||
orderInfo.setStatus(OrderStatus.TO_DELIVER.getValue());
|
orderInfo.setStatus(OrderStatus.TO_DELIVER.getValue());
|
||||||
orderInfo.setPaymentTime(new Date());
|
orderInfo.setPaymentTime(new Date());
|
||||||
|
orderInfo.setPayType(2);
|
||||||
// 注意重复通知的情况,同一订单号可能收到多次通知,请注意一定先判断订单状态
|
// 注意重复通知的情况,同一订单号可能收到多次通知,请注意一定先判断订单状态
|
||||||
// 注意此处签名方式需与统一下单的签名类型一致
|
// 注意此处签名方式需与统一下单的签名类型一致
|
||||||
if (WxPayKit.verifyNotify(params, this.getApiConfig().getPartnerKey(), SignType.HMACSHA256)) {
|
if (WxPayKit.verifyNotify(params, this.getApiConfig().getPartnerKey(), SignType.HMACSHA256)) {
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ import javax.annotation.Resource;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Auther: shenzhuan
|
* @Auther: shenzhuan
|
||||||
@@ -78,6 +79,15 @@ public class SingeBuildController extends ApiBaseAction {
|
|||||||
return new CommonResult().success(communityService.allCommunity());
|
return new CommonResult().success(communityService.allCommunity());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SysLog(MODULE = "pms", REMARK = "物业及其社区")
|
||||||
|
@IgnoreAuth
|
||||||
|
@GetMapping(value = "/wuyeCompanyWithCommunity")
|
||||||
|
@ApiOperation(value = "物业及其社区")
|
||||||
|
public Object wuyeCompanyWithCommunity() {
|
||||||
|
Map<String, List<String>> map = IBuildWuyeCompanyService.nameMapWithCommunity();
|
||||||
|
return new CommonResult().success(map);
|
||||||
|
}
|
||||||
|
|
||||||
@SysLog(MODULE = "pms", REMARK = "绑定小区和房间")
|
@SysLog(MODULE = "pms", REMARK = "绑定小区和房间")
|
||||||
@IgnoreAuth
|
@IgnoreAuth
|
||||||
@PostMapping(value = "/bindCommunity")
|
@PostMapping(value = "/bindCommunity")
|
||||||
@@ -188,6 +198,7 @@ public class SingeBuildController extends ApiBaseAction {
|
|||||||
}
|
}
|
||||||
return new CommonResult().failed();
|
return new CommonResult().failed();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param entity
|
* @param entity
|
||||||
* @param pageNum
|
* @param pageNum
|
||||||
@@ -206,6 +217,7 @@ public class SingeBuildController extends ApiBaseAction {
|
|||||||
}
|
}
|
||||||
return new CommonResult().failed();
|
return new CommonResult().failed();
|
||||||
}
|
}
|
||||||
|
|
||||||
@SysLog(MODULE = "pms", REMARK = "查询团购商品列表")
|
@SysLog(MODULE = "pms", REMARK = "查询团购商品列表")
|
||||||
@IgnoreAuth
|
@IgnoreAuth
|
||||||
@ApiOperation(value = "查询带团购商品列表")
|
@ApiOperation(value = "查询带团购商品列表")
|
||||||
|
|||||||
@@ -340,6 +340,7 @@ public class SingePmsController extends ApiBaseAction {
|
|||||||
@RequestParam(value = "schoolId", required = false) Long schoolId,
|
@RequestParam(value = "schoolId", required = false) Long schoolId,
|
||||||
@RequestParam(value = "productAttributeCategoryId", required = false) Long productAttributeCategoryId,
|
@RequestParam(value = "productAttributeCategoryId", required = false) Long productAttributeCategoryId,
|
||||||
@RequestParam(value = "productCategoryId", required = false) Long productCategoryId,
|
@RequestParam(value = "productCategoryId", required = false) Long productCategoryId,
|
||||||
|
@RequestParam(value = "newStatus", required = false) Integer newStatus,
|
||||||
@RequestParam(value = "recommandStatus", required = false) Integer recommandStatus,
|
@RequestParam(value = "recommandStatus", required = false) Integer recommandStatus,
|
||||||
@RequestParam(value = "brandId", required = false) Long brandId,
|
@RequestParam(value = "brandId", required = false) Long brandId,
|
||||||
@RequestParam(value = "sort", required = false) Integer sort,
|
@RequestParam(value = "sort", required = false) Integer sort,
|
||||||
@@ -366,6 +367,9 @@ public class SingePmsController extends ApiBaseAction {
|
|||||||
if (ValidatorUtils.notEmpty(recommandStatus) && recommandStatus > 0) {
|
if (ValidatorUtils.notEmpty(recommandStatus) && recommandStatus > 0) {
|
||||||
product.setRecommandStatus(1);
|
product.setRecommandStatus(1);
|
||||||
}
|
}
|
||||||
|
if (ValidatorUtils.notEmpty(newStatus) && newStatus > 0) {
|
||||||
|
product.setNewStatus(1);
|
||||||
|
}
|
||||||
if (ValidatorUtils.notEmpty(brandId) && brandId > 0) {
|
if (ValidatorUtils.notEmpty(brandId) && brandId > 0) {
|
||||||
product.setBrandId(brandId);
|
product.setBrandId(brandId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.zscat.mallplus.annotation.IgnoreAuth;
|
import com.zscat.mallplus.annotation.IgnoreAuth;
|
||||||
import com.zscat.mallplus.annotation.SysLog;
|
import com.zscat.mallplus.annotation.SysLog;
|
||||||
import com.zscat.mallplus.config.MallplusProperties;
|
import com.zscat.mallplus.config.MallplusProperties;
|
||||||
|
import com.zscat.mallplus.enums.SmsEnum;
|
||||||
import com.zscat.mallplus.exception.Server;
|
import com.zscat.mallplus.exception.Server;
|
||||||
import com.zscat.mallplus.oms.service.IOmsOrderService;
|
import com.zscat.mallplus.oms.service.IOmsOrderService;
|
||||||
import com.zscat.mallplus.oms.vo.HomeContentResult;
|
import com.zscat.mallplus.oms.vo.HomeContentResult;
|
||||||
@@ -35,6 +36,7 @@ import com.zscat.mallplus.vo.UmsMemberInfoDetail;
|
|||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.security.core.AuthenticationException;
|
import org.springframework.security.core.AuthenticationException;
|
||||||
@@ -63,6 +65,11 @@ import java.util.Map;
|
|||||||
@RequestMapping("/api/single/home")
|
@RequestMapping("/api/single/home")
|
||||||
public class SingelHomeController {
|
public class SingelHomeController {
|
||||||
|
|
||||||
|
@Value("${redis.key.prefix.loginCode}")
|
||||||
|
private String REDIS_KEY_PREFIX_LOGIN_CODE;
|
||||||
|
|
||||||
|
@Value("${redis.key.prefix.forgetCode}")
|
||||||
|
private String REDIS_KEY_PREFIX_FORGET_CODE;
|
||||||
@Autowired
|
@Autowired
|
||||||
OssAliyunUtil aliyunOSSUtil;
|
OssAliyunUtil aliyunOSSUtil;
|
||||||
@Value("${jwt.tokenHeader}")
|
@Value("${jwt.tokenHeader}")
|
||||||
@@ -119,7 +126,9 @@ public class SingelHomeController {
|
|||||||
public Object userSampleInfo() {
|
public Object userSampleInfo() {
|
||||||
UmsMember umsMember = memberService.getNewCurrentMember();
|
UmsMember umsMember = memberService.getNewCurrentMember();
|
||||||
if (umsMember != null && umsMember.getId() != null) {
|
if (umsMember != null && umsMember.getId() != null) {
|
||||||
return new CommonResult().success(umsMember);
|
UmsMember newMember = memberService.getById(umsMember.getId());
|
||||||
|
return new CommonResult().success(newMember);
|
||||||
|
// return new CommonResult().success(umsMember);
|
||||||
}
|
}
|
||||||
return new CommonResult().fail(100);
|
return new CommonResult().fail(100);
|
||||||
}
|
}
|
||||||
@@ -338,8 +347,8 @@ public class SingelHomeController {
|
|||||||
@IgnoreAuth
|
@IgnoreAuth
|
||||||
@ApiOperation(value = "手机号 密码登录")
|
@ApiOperation(value = "手机号 密码登录")
|
||||||
@PostMapping(value = "/login")
|
@PostMapping(value = "/login")
|
||||||
public Object login(@RequestParam String phone,
|
public Object login(@RequestParam("phone") String phone,
|
||||||
@RequestParam String password) {
|
@RequestParam("password") String password) {
|
||||||
if (phone == null || "".equals(phone)) {
|
if (phone == null || "".equals(phone)) {
|
||||||
return new CommonResult().validateFailed("用户名或密码错误");
|
return new CommonResult().validateFailed("用户名或密码错误");
|
||||||
}
|
}
|
||||||
@@ -347,7 +356,6 @@ public class SingelHomeController {
|
|||||||
return new CommonResult().validateFailed("用户名或密码错误");
|
return new CommonResult().validateFailed("用户名或密码错误");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|
||||||
Map<String, Object> token = memberService.login(phone, password);
|
Map<String, Object> token = memberService.login(phone, password);
|
||||||
if (token.get("token") == null) {
|
if (token.get("token") == null) {
|
||||||
log.info("用户名或密码错误");
|
log.info("用户名或密码错误");
|
||||||
@@ -376,7 +384,6 @@ public class SingelHomeController {
|
|||||||
return new CommonResult().validateFailed("手机验证码为空");
|
return new CommonResult().validateFailed("手机验证码为空");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|
||||||
Map<String, Object> token = memberService.loginByCode(phone, authCode);
|
Map<String, Object> token = memberService.loginByCode(phone, authCode);
|
||||||
if (token.get("token") == null) {
|
if (token.get("token") == null) {
|
||||||
return new CommonResult().validateFailed("用户名或密码错误");
|
return new CommonResult().validateFailed("用户名或密码错误");
|
||||||
@@ -441,12 +448,32 @@ public class SingelHomeController {
|
|||||||
@IgnoreAuth
|
@IgnoreAuth
|
||||||
@ApiOperation("获取验证码")
|
@ApiOperation("获取验证码")
|
||||||
@PostMapping(value = "/sms/codes")
|
@PostMapping(value = "/sms/codes")
|
||||||
public Object sendSmsCode(@RequestParam String phone) {
|
public Object sendSmsCode(@RequestParam("phone") String phone,@RequestParam(value = "type")String type) {
|
||||||
try {
|
try {
|
||||||
if (!PhoneUtil.checkPhone(phone)) {
|
if (!PhoneUtil.checkPhone(phone)) {
|
||||||
throw new IllegalArgumentException("手机号格式不正确");
|
throw new IllegalArgumentException("手机号格式不正确");
|
||||||
}
|
}
|
||||||
SmsCode smsCode = memberService.generateCode(phone);
|
if(StringUtils.isBlank(type)){
|
||||||
|
return new CommonResult().failed("参数错误:type");
|
||||||
|
}
|
||||||
|
//缓存识别码
|
||||||
|
String redisKey = "";
|
||||||
|
if(SmsEnum.SendEnum.LOGIN.getCode().equals(type)){
|
||||||
|
redisKey = REDIS_KEY_PREFIX_LOGIN_CODE;
|
||||||
|
}else if(SmsEnum.SendEnum.FORGET.getCode().equals(type)){
|
||||||
|
redisKey = REDIS_KEY_PREFIX_FORGET_CODE;
|
||||||
|
}
|
||||||
|
Date date = new Date();
|
||||||
|
String codeRedis = redisService.get(redisKey + phone);
|
||||||
|
if (StringUtils.isNotEmpty(codeRedis)) {
|
||||||
|
//查看请求间隔,默认是一分钟,小于一分钟继续等待,超过一分钟发送短信
|
||||||
|
String sendTime = codeRedis.substring(4);
|
||||||
|
long diffSecond = (date.getTime() - Long.parseLong(sendTime)) / 1000;
|
||||||
|
if (diffSecond < 60) {
|
||||||
|
return new CommonResult().failed("请等待一分钟后再次重试!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SmsCode smsCode = memberService.generateCode(phone,type,date);
|
||||||
|
|
||||||
return new CommonResult().success(smsCode);
|
return new CommonResult().success(smsCode);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ package com.zscat.mallplus.ums.service;
|
|||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.zscat.mallplus.ums.entity.SysMessage;
|
import com.zscat.mallplus.ums.entity.SysMessage;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 站内信 服务类
|
* 站内信 服务类
|
||||||
@@ -13,4 +15,7 @@ import com.zscat.mallplus.ums.entity.SysMessage;
|
|||||||
*/
|
*/
|
||||||
public interface ISysMessageService extends IService<SysMessage> {
|
public interface ISysMessageService extends IService<SysMessage> {
|
||||||
|
|
||||||
|
List<SysMessage> listByUserId(Long userId);
|
||||||
|
|
||||||
|
int updateStatus(SysMessage sysMessage);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import com.zscat.mallplus.vo.AppletLoginnewParam;
|
|||||||
import com.zscat.mallplus.vo.SmsCode;
|
import com.zscat.mallplus.vo.SmsCode;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -90,7 +91,7 @@ public interface IUmsMemberService extends IService<UmsMember> {
|
|||||||
|
|
||||||
Object register(UmsMember umsMember);
|
Object register(UmsMember umsMember);
|
||||||
|
|
||||||
SmsCode generateCode(String phone);
|
SmsCode generateCode(String phone, String type, Date date);
|
||||||
|
|
||||||
Map<String, Object> loginByCode(String phone, String authCode);
|
Map<String, Object> loginByCode(String phone, String authCode);
|
||||||
|
|
||||||
|
|||||||
@@ -33,5 +33,4 @@ public interface RedisService {
|
|||||||
*/
|
*/
|
||||||
Long increment(String key, long delta);
|
Long increment(String key, long delta);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,12 @@ package com.zscat.mallplus.ums.service.impl;
|
|||||||
|
|
||||||
import com.zscat.mallplus.ums.service.RedisService;
|
import com.zscat.mallplus.ums.service.RedisService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.data.redis.core.RedisTemplate;
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
|
import org.springframework.data.redis.core.ValueOperations;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -17,6 +20,9 @@ public class RedisServiceImpl implements RedisService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private StringRedisTemplate stringRedisTemplate;
|
private StringRedisTemplate stringRedisTemplate;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RedisTemplate redisTemplate;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void set(String key, String value) {
|
public void set(String key, String value) {
|
||||||
stringRedisTemplate.opsForValue().set(key, value);
|
stringRedisTemplate.opsForValue().set(key, value);
|
||||||
@@ -41,4 +47,5 @@ public class RedisServiceImpl implements RedisService {
|
|||||||
public Long increment(String key, long delta) {
|
public Long increment(String key, long delta) {
|
||||||
return stringRedisTemplate.opsForValue().increment(key, delta);
|
return stringRedisTemplate.opsForValue().increment(key, delta);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import com.aliyuncs.dysmsapi.model.v20170525.SendSmsRequest;
|
|||||||
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
|
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
|
||||||
import com.aliyuncs.exceptions.ClientException;
|
import com.aliyuncs.exceptions.ClientException;
|
||||||
import com.aliyuncs.http.MethodType;
|
import com.aliyuncs.http.MethodType;
|
||||||
|
import com.zscat.mallplus.config.SmsConfig;
|
||||||
import com.zscat.mallplus.ums.entity.Sms;
|
import com.zscat.mallplus.ums.entity.Sms;
|
||||||
import com.zscat.mallplus.ums.mapper.SmsDao;
|
import com.zscat.mallplus.ums.mapper.SmsDao;
|
||||||
import com.zscat.mallplus.ums.service.SmsService;
|
import com.zscat.mallplus.ums.service.SmsService;
|
||||||
@@ -82,11 +83,10 @@ public class SmsServiceImpl implements SmsService {
|
|||||||
}
|
}
|
||||||
// 测试时不需要开此 add by someday end
|
// 测试时不需要开此 add by someday end
|
||||||
update(sms);
|
update(sms);
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@Override
|
@Override
|
||||||
public void save(Sms sms, Map<String, String> params) {
|
public void save(Sms sms, Map<String, String> params) {
|
||||||
if (!CollectionUtils.isEmpty(params)) {
|
if (!CollectionUtils.isEmpty(params)) {
|
||||||
@@ -96,7 +96,8 @@ public class SmsServiceImpl implements SmsService {
|
|||||||
sms.setCreateTime(new Date());
|
sms.setCreateTime(new Date());
|
||||||
sms.setUpdateTime(sms.getCreateTime());
|
sms.setUpdateTime(sms.getCreateTime());
|
||||||
sms.setDay(sms.getCreateTime());
|
sms.setDay(sms.getCreateTime());
|
||||||
|
sms.setBizId(sms.getBizId());
|
||||||
|
sms.setMessage(sms.getMessage());
|
||||||
smsDao.save(sms);
|
smsDao.save(sms);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
package com.zscat.mallplus.ums.service.impl;
|
package com.zscat.mallplus.ums.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.zscat.mallplus.ums.entity.SysMessage;
|
import com.zscat.mallplus.ums.entity.SysMessage;
|
||||||
import com.zscat.mallplus.ums.mapper.SysMessageMapper;
|
import com.zscat.mallplus.ums.mapper.SysMessageMapper;
|
||||||
import com.zscat.mallplus.ums.service.ISysMessageService;
|
import com.zscat.mallplus.ums.service.ISysMessageService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 站内信 服务实现类
|
* 站内信 服务实现类
|
||||||
@@ -17,4 +20,18 @@ import org.springframework.stereotype.Service;
|
|||||||
@Service
|
@Service
|
||||||
public class SysMessageServiceImpl extends ServiceImpl<SysMessageMapper, SysMessage> implements ISysMessageService {
|
public class SysMessageServiceImpl extends ServiceImpl<SysMessageMapper, SysMessage> implements ISysMessageService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SysMessage> listByUserId(Long userId) {
|
||||||
|
QueryWrapper<SysMessage> qw = new QueryWrapper<>();
|
||||||
|
qw.eq("user_id", userId);
|
||||||
|
qw.orderByDesc("ctime");
|
||||||
|
return baseMapper.selectList(qw);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int updateStatus(SysMessage sysMessage) {
|
||||||
|
sysMessage.setUtime(System.currentTimeMillis());
|
||||||
|
baseMapper.updateById(sysMessage);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,10 +4,13 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.zscat.mallplus.config.MallplusProperties;
|
import com.zscat.mallplus.config.MallplusProperties;
|
||||||
|
import com.zscat.mallplus.config.SmsConfig;
|
||||||
import com.zscat.mallplus.enums.AllEnum;
|
import com.zscat.mallplus.enums.AllEnum;
|
||||||
|
import com.zscat.mallplus.enums.SmsEnum;
|
||||||
import com.zscat.mallplus.exception.ApiMallPlusException;
|
import com.zscat.mallplus.exception.ApiMallPlusException;
|
||||||
import com.zscat.mallplus.oms.mapper.OmsOrderMapper;
|
import com.zscat.mallplus.oms.mapper.OmsOrderMapper;
|
||||||
import com.zscat.mallplus.oms.vo.OrderStstic;
|
import com.zscat.mallplus.oms.vo.OrderStstic;
|
||||||
|
import com.zscat.mallplus.sys.entity.SysUserVo;
|
||||||
import com.zscat.mallplus.sys.mapper.SysAreaMapper;
|
import com.zscat.mallplus.sys.mapper.SysAreaMapper;
|
||||||
import com.zscat.mallplus.ums.entity.*;
|
import com.zscat.mallplus.ums.entity.*;
|
||||||
import com.zscat.mallplus.ums.mapper.SysAppletSetMapper;
|
import com.zscat.mallplus.ums.mapper.SysAppletSetMapper;
|
||||||
@@ -24,6 +27,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import net.sf.json.JSONObject;
|
import net.sf.json.JSONObject;
|
||||||
import okhttp3.OkHttpClient;
|
import okhttp3.OkHttpClient;
|
||||||
import okhttp3.Request;
|
import okhttp3.Request;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.http.client.HttpClient;
|
import org.apache.http.client.HttpClient;
|
||||||
import org.apache.http.client.ResponseHandler;
|
import org.apache.http.client.ResponseHandler;
|
||||||
import org.apache.http.client.methods.HttpGet;
|
import org.apache.http.client.methods.HttpGet;
|
||||||
@@ -44,7 +48,6 @@ import org.springframework.security.core.userdetails.UserDetailsService;
|
|||||||
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.StringUtils;
|
|
||||||
import org.springframework.web.context.request.RequestAttributes;
|
import org.springframework.web.context.request.RequestAttributes;
|
||||||
import org.springframework.web.context.request.RequestContextHolder;
|
import org.springframework.web.context.request.RequestContextHolder;
|
||||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||||
@@ -108,6 +111,10 @@ public class UmsMemberServiceImpl extends ServiceImpl<UmsMemberMapper, UmsMember
|
|||||||
private JwtTokenUtil jwtTokenUtil;
|
private JwtTokenUtil jwtTokenUtil;
|
||||||
@Value("${redis.key.prefix.authCode}")
|
@Value("${redis.key.prefix.authCode}")
|
||||||
private String REDIS_KEY_PREFIX_AUTH_CODE;
|
private String REDIS_KEY_PREFIX_AUTH_CODE;
|
||||||
|
@Value("${redis.key.prefix.loginCode}")
|
||||||
|
private String REDIS_KEY_PREFIX_LOGIN_CODE;
|
||||||
|
@Value("${redis.key.prefix.forgetCode}")
|
||||||
|
private String REDIS_KEY_PREFIX_FORGET_CODE;
|
||||||
@Value("${authCode.expire.seconds}")
|
@Value("${authCode.expire.seconds}")
|
||||||
private Long AUTH_CODE_EXPIRE_SECONDS;
|
private Long AUTH_CODE_EXPIRE_SECONDS;
|
||||||
@Value("${jwt.tokenHead}")
|
@Value("${jwt.tokenHead}")
|
||||||
@@ -381,8 +388,15 @@ public class UmsMemberServiceImpl extends ServiceImpl<UmsMemberMapper, UmsMember
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object resetPassword(String phone, String password, String confimpassword, String authCode) {
|
public Object resetPassword(String phone, String password, String confimpassword, String authCode) {
|
||||||
if (ValidatorUtils.notEmpty(authCode) && !verifyAuthCode(authCode, phone)) {
|
/* if (ValidatorUtils.notEmpty(authCode) && !verifyAuthCode(authCode, phone)) {
|
||||||
return new CommonResult().failed("验证码错误");
|
return new CommonResult().failed("验证码错误");
|
||||||
|
}*/
|
||||||
|
String codeFromRedis = redisService.get(REDIS_KEY_PREFIX_FORGET_CODE+ phone);
|
||||||
|
if (StringUtils.isBlank(codeFromRedis)){
|
||||||
|
return new CommonResult().failed("短信验证码已失效,请重新发送");
|
||||||
|
}
|
||||||
|
if (!authCode.equals(codeFromRedis.substring(0, 4))) {
|
||||||
|
return new CommonResult().failed("短信验证码错误或已失效,请重新获取");
|
||||||
}
|
}
|
||||||
if (!password.equals(confimpassword)) {
|
if (!password.equals(confimpassword)) {
|
||||||
return new CommonResult().failed("密码不一致");
|
return new CommonResult().failed("密码不一致");
|
||||||
@@ -390,7 +404,8 @@ public class UmsMemberServiceImpl extends ServiceImpl<UmsMemberMapper, UmsMember
|
|||||||
UmsMember umsMember = new UmsMember();
|
UmsMember umsMember = new UmsMember();
|
||||||
umsMember.setPassword(passwordEncoder.encode(password));
|
umsMember.setPassword(passwordEncoder.encode(password));
|
||||||
memberMapper.update(umsMember, new QueryWrapper<UmsMember>().eq("phone", phone));
|
memberMapper.update(umsMember, new QueryWrapper<UmsMember>().eq("phone", phone));
|
||||||
return true;
|
redisService.remove(String.format(Rediskey.MEMBER, phone));
|
||||||
|
return new CommonResult().success("操作成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -412,25 +427,19 @@ public class UmsMemberServiceImpl extends ServiceImpl<UmsMemberMapper, UmsMember
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SmsCode generateCode(String phone) {
|
public SmsCode generateCode(String phone,String type,Date date) {
|
||||||
//生成流水号
|
//生成流水号
|
||||||
String uuid = UUID.randomUUID().toString();
|
String uuid = UUID.randomUUID().toString();
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
Random random = new Random();
|
Random random = new Random();
|
||||||
for (int i = 0; i < 6; i++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
sb.append(random.nextInt(10));
|
sb.append(random.nextInt(10));
|
||||||
}
|
}
|
||||||
Map<String, String> map = new HashMap<>(2);
|
Map<String, String> map = new HashMap<>(2);
|
||||||
map.put("code", sb.toString());
|
map.put("code", sb.toString());
|
||||||
map.put("phone", phone);
|
map.put("phone", phone);
|
||||||
|
|
||||||
//短信验证码缓存15分钟,
|
|
||||||
redisService.set(REDIS_KEY_PREFIX_AUTH_CODE + phone, sb.toString());
|
|
||||||
redisService.expire(REDIS_KEY_PREFIX_AUTH_CODE + phone, expireMinute * 60);
|
|
||||||
|
|
||||||
|
|
||||||
//存储sys_sms
|
//存储sys_sms
|
||||||
saveSmsAndSendCode(phone, sb.toString());
|
saveSmsAndSendCode(phone, sb.toString(),type,date);
|
||||||
SmsCode smsCode = new SmsCode();
|
SmsCode smsCode = new SmsCode();
|
||||||
smsCode.setKey(uuid);
|
smsCode.setKey(uuid);
|
||||||
return smsCode;
|
return smsCode;
|
||||||
@@ -442,33 +451,40 @@ public class UmsMemberServiceImpl extends ServiceImpl<UmsMemberMapper, UmsMember
|
|||||||
* @param phone
|
* @param phone
|
||||||
* @param code
|
* @param code
|
||||||
*/
|
*/
|
||||||
private void saveSmsAndSendCode(String phone, String code) {
|
private void saveSmsAndSendCode(String phone, String code, String type, Date date) {
|
||||||
checkTodaySendCount(phone);
|
|
||||||
|
|
||||||
Sms sms = new Sms();
|
Sms sms = new Sms();
|
||||||
sms.setPhone(phone);
|
sms.setPhone(phone);
|
||||||
sms.setParams(code);
|
sms.setParams(code);
|
||||||
Map<String, String> params = new HashMap<>();
|
Map<String, String> params = new HashMap<>();
|
||||||
params.put("code", code);
|
params.put("code", code);
|
||||||
|
String content = "";
|
||||||
|
String redisKey = "";
|
||||||
|
if (SmsEnum.SendEnum.LOGIN.getCode().equals(type)) {
|
||||||
|
content = "验证码:" + code + ",用于登录App,有效期5分钟,如非本人操作,请忽略。";
|
||||||
|
redisKey = REDIS_KEY_PREFIX_LOGIN_CODE;
|
||||||
|
}else if (SmsEnum.SendEnum.FORGET.getCode().equals(type)){
|
||||||
|
content = "验证码:" + code + ",用于修改登录密码,有效期5分钟,如非本人操作,请忽略。";
|
||||||
|
redisKey = REDIS_KEY_PREFIX_FORGET_CODE;
|
||||||
|
}
|
||||||
|
String result = SmsConfig.SendWaitWorkMsg(phone, code, content);
|
||||||
|
if ("1".equals(result)) {
|
||||||
|
//返回的信息
|
||||||
|
String resultMsg = SmsEnum.SmsReturnEnum.getValueByKey(result);
|
||||||
|
sms.setCode(sms.getCode());
|
||||||
|
sms.setBizId(result);//返回的code
|
||||||
|
sms.setMessage(resultMsg);
|
||||||
|
redisService.set(redisKey + phone, code + date.getTime());
|
||||||
|
redisService.expire(redisKey + phone, SmsEnum.APP_LOGIN_CODE_TIME_LIMIT);
|
||||||
|
log.info("发送短信结果:code:{},message:{}, 1,发送成功");
|
||||||
|
}else{
|
||||||
|
//返回的信息
|
||||||
|
String resultMsg = SmsEnum.SmsReturnEnum.getValueByKey(result);
|
||||||
|
sms.setBizId(result);//返回的code
|
||||||
|
//返回的信息
|
||||||
|
sms.setMessage(resultMsg);
|
||||||
|
LOGGER.error("发送短信失败:{}", resultMsg);
|
||||||
|
}
|
||||||
smsService.save(sms, params);
|
smsService.save(sms, params);
|
||||||
|
|
||||||
//异步调用阿里短信接口发送短信
|
|
||||||
CompletableFuture.runAsync(() -> {
|
|
||||||
try {
|
|
||||||
smsService.sendSmsMsg(sms);
|
|
||||||
} catch (Exception e) {
|
|
||||||
params.put("err", e.getMessage());
|
|
||||||
smsService.save(sms, params);
|
|
||||||
e.printStackTrace();
|
|
||||||
LOGGER.error("发送短信失败:{}", e.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
// 当天发送验证码次数+1
|
|
||||||
String countKey = countKey(phone);
|
|
||||||
redisService.increment(countKey, 1L);
|
|
||||||
redisService.expire(countKey, 1 * 3600 * 24);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -513,8 +529,19 @@ public class UmsMemberServiceImpl extends ServiceImpl<UmsMemberMapper, UmsMember
|
|||||||
//没有该用户进行添加操作
|
//没有该用户进行添加操作
|
||||||
|
|
||||||
UmsMember umsMember = new UmsMember();
|
UmsMember umsMember = new UmsMember();
|
||||||
umsMember.setMemberLevelId(9999L);
|
// umsMember.setMemberLevelId(9999L);
|
||||||
umsMember.setMemberLevelName("未开通会员");
|
// umsMember.setMemberLevelName("未开通会员");
|
||||||
|
// 验证前11位为“62350109317”,并验证共19位
|
||||||
|
String invitecode = user.getInvitecode();
|
||||||
|
if (ValidatorUtils.notEmpty(invitecode)&& invitecode.length()==19 && invitecode.startsWith("62350109317")) {
|
||||||
|
umsMember.setInvitecode(invitecode);
|
||||||
|
umsMember.setMemberLevelId(2L);
|
||||||
|
umsMember.setMemberLevelName("惠农会员");
|
||||||
|
}else{
|
||||||
|
umsMember.setInvitecode("");
|
||||||
|
umsMember.setMemberLevelId(1L);
|
||||||
|
umsMember.setMemberLevelName("普通会员");
|
||||||
|
}
|
||||||
umsMember.setUsername(user.getUsername());
|
umsMember.setUsername(user.getUsername());
|
||||||
umsMember.setNickname(user.getUsername());
|
umsMember.setNickname(user.getUsername());
|
||||||
umsMember.setSourceType(user.getSourceType());
|
umsMember.setSourceType(user.getSourceType());
|
||||||
@@ -526,27 +553,24 @@ public class UmsMemberServiceImpl extends ServiceImpl<UmsMemberMapper, UmsMember
|
|||||||
umsMember.setBuyMoney(BigDecimal.ZERO);
|
umsMember.setBuyMoney(BigDecimal.ZERO);
|
||||||
umsMember.setBlance(new BigDecimal(0));
|
umsMember.setBlance(new BigDecimal(0));
|
||||||
umsMember.setIntegration(0);
|
umsMember.setIntegration(0);
|
||||||
if (ValidatorUtils.notEmpty(user.getInvitecode())) {
|
|
||||||
umsMember.setInvitecode(user.getInvitecode());
|
|
||||||
}
|
|
||||||
String defaultIcon = mallplusProperties.getDefaultIcon();
|
String defaultIcon = mallplusProperties.getDefaultIcon();
|
||||||
umsMember.setIcon(defaultIcon);
|
umsMember.setIcon(defaultIcon);
|
||||||
memberMapper.insert(umsMember);
|
memberMapper.insert(umsMember);
|
||||||
try {
|
// try {
|
||||||
//这是要生成二维码的url
|
// //这是要生成二维码的url
|
||||||
String url = mallplusProperties.getDomain()+"/?invitecode=" + user.getId();
|
// String url = mallplusProperties.getDomain()+"/?invitecode=" + user.getId();
|
||||||
//要添加到二维码下面的文字
|
// //要添加到二维码下面的文字
|
||||||
String words = user.getUsername() + "的二维码";
|
// String words = user.getUsername() + "的二维码";
|
||||||
//调用刚才的工具类
|
// //调用刚才的工具类
|
||||||
ByteArrayResource qrCode = MatrixToImageWriter.createQrCode(url, words);
|
// ByteArrayResource qrCode = MatrixToImageWriter.createQrCode(url, words);
|
||||||
InputStream inputStream = new ByteArrayInputStream(qrCode.getByteArray());
|
// InputStream inputStream = new ByteArrayInputStream(qrCode.getByteArray());
|
||||||
UmsMember member = new UmsMember();
|
// UmsMember member = new UmsMember();
|
||||||
member.setId(umsMember.getId());
|
// member.setId(umsMember.getId());
|
||||||
member.setAvatar(aliyunOSSUtil.upload("png", inputStream));
|
// member.setAvatar(aliyunOSSUtil.upload("png", inputStream));
|
||||||
memberMapper.updateById(member);
|
// memberMapper.updateById(member);
|
||||||
} catch (Exception e) {
|
// } catch (Exception e) {
|
||||||
log.error(e.getMessage());
|
// log.error(e.getMessage());
|
||||||
}
|
// }
|
||||||
|
|
||||||
redisService.set(String.format(Rediskey.MEMBER, umsMember.getUsername()), JsonUtils.objectToJson(umsMember));
|
redisService.set(String.format(Rediskey.MEMBER, umsMember.getUsername()), JsonUtils.objectToJson(umsMember));
|
||||||
|
|
||||||
@@ -1200,15 +1224,20 @@ public class UmsMemberServiceImpl extends ServiceImpl<UmsMemberMapper, UmsMember
|
|||||||
String token = null;
|
String token = null;
|
||||||
try {
|
try {
|
||||||
UserDetails userDetails = userDetailsService.loadUserByUsername(phone);
|
UserDetails userDetails = userDetailsService.loadUserByUsername(phone);
|
||||||
|
|
||||||
//验证验证码
|
//验证验证码
|
||||||
if (!verifyAuthCode(authCode, phone)) {
|
/*if (!verifyAuthCode(authCode, phone)) {
|
||||||
throw new ApiMallPlusException("验证码错误");
|
throw new ApiMallPlusException("验证码错误");
|
||||||
|
}*/
|
||||||
|
String codeFromRedis = redisService.get(REDIS_KEY_PREFIX_LOGIN_CODE+ phone);
|
||||||
|
if (StringUtils.isBlank(codeFromRedis)){
|
||||||
|
throw new ApiMallPlusException("短信验证码已失效,请重新发送");
|
||||||
|
}
|
||||||
|
if (!authCode.equals(codeFromRedis.substring(0, 4))) {
|
||||||
|
throw new ApiMallPlusException("短信验证码错误或已失效,请重新获取");
|
||||||
}
|
}
|
||||||
UmsMember member = this.getByUsername(phone);
|
UmsMember member = this.getByUsername(phone);
|
||||||
if (member == null || member.getId() == null) {
|
if (member == null || member.getId() == null) {
|
||||||
throw new ApiMallPlusException("用户不存在");
|
throw new ApiMallPlusException("用户不存在");
|
||||||
|
|
||||||
}
|
}
|
||||||
Authentication authentication = new UsernamePasswordAuthenticationToken(
|
Authentication authentication = new UsernamePasswordAuthenticationToken(
|
||||||
userDetails, null, userDetails.getAuthorities());
|
userDetails, null, userDetails.getAuthorities());
|
||||||
|
|||||||
@@ -1,11 +1,6 @@
|
|||||||
spring.datasource.url=jdbc:mysql://8.130.39.13:3306/mallplus1?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&useTimezone=true&serverTimezone=GMT%2B8
|
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/mallplus1?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&useTimezone=true&serverTimezone=GMT%2B8
|
||||||
#spring.datasource.url=jdbc:mysql://127.0.0.1:3306/mallplus1?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&useTimezone=true&serverTimezone=GMT%2B8
|
|
||||||
spring.datasource.username=root
|
spring.datasource.username=root
|
||||||
spring.datasource.password=1LAiGz$t1*Iw
|
spring.datasource.password=root
|
||||||
#spring.datasource.password=root
|
|
||||||
#spring.datasource.url=jdbc:mysql://39.104.142.92:3306/mallplus?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&useTimezone=true&serverTimezone=GMT%2B8
|
|
||||||
#spring.datasource.username=root
|
|
||||||
#spring.datasource.password=123456
|
|
||||||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||||
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
|
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
|
||||||
spring.datasource.druid.initialSize=5
|
spring.datasource.druid.initialSize=5
|
||||||
@@ -43,13 +38,13 @@ mybatis-plus.configuration.cache-enabled=false
|
|||||||
#===mongodb end===
|
#===mongodb end===
|
||||||
#===redis start===
|
#===redis start===
|
||||||
# Redis\u6570\u636E\u5E93\u7D22\u5F15\uFF08\u9ED8\u8BA4\u4E3A0\uFF09
|
# Redis\u6570\u636E\u5E93\u7D22\u5F15\uFF08\u9ED8\u8BA4\u4E3A0\uFF09
|
||||||
spring.redis.database=4
|
spring.redis.database=0
|
||||||
# Redis\u670D\u52A1\u5668\u5730\u5740
|
# Redis\u670D\u52A1\u5668\u5730\u5740
|
||||||
spring.redis.host=127.0.0.1
|
spring.redis.host=127.0.0.1
|
||||||
# Redis\u670D\u52A1\u5668\u8FDE\u63A5\u7AEF\u53E3
|
# Redis\u670D\u52A1\u5668\u8FDE\u63A5\u7AEF\u53E3
|
||||||
spring.redis.port=6379
|
spring.redis.port=6379
|
||||||
# Redis\u670D\u52A1\u5668\u8FDE\u63A5\u5BC6\u7801\uFF08\u9ED8\u8BA4\u4E3A\u7A7A\uFF09
|
# Redis\u670D\u52A1\u5668\u8FDE\u63A5\u5BC6\u7801\uFF08\u9ED8\u8BA4\u4E3A\u7A7A\uFF09
|
||||||
spring.redis.password=
|
spring.redis.password=123456
|
||||||
# \u8FDE\u63A5\u6C60\u6700\u5927\u8FDE\u63A5\u6570\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09
|
# \u8FDE\u63A5\u6C60\u6700\u5927\u8FDE\u63A5\u6570\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09
|
||||||
spring.redis.pool.max-active=8
|
spring.redis.pool.max-active=8
|
||||||
# \u8FDE\u63A5\u6C60\u6700\u5927\u963B\u585E\u7B49\u5F85\u65F6\u95F4\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09
|
# \u8FDE\u63A5\u6C60\u6700\u5927\u963B\u585E\u7B49\u5F85\u65F6\u95F4\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09
|
||||||
@@ -62,13 +57,14 @@ spring.redis.pool.min-idle=0
|
|||||||
spring.redis.timeout=0
|
spring.redis.timeout=0
|
||||||
#===redis end===
|
#===redis end===
|
||||||
# \u5C0F\u7A0B\u5E8F
|
# \u5C0F\u7A0B\u5E8F
|
||||||
|
wx.domain=http://2wsiyd.natappfree.cc/api
|
||||||
wx.secret=381f9ea3359c0e2fc8b74c59d9d9bb11
|
wx.secret=381f9ea3359c0e2fc8b74c59d9d9bb11
|
||||||
wx.appId=wxa66597d50184d027
|
wx.appId=wxa66597d50184d027
|
||||||
wx.mchId=
|
wx.mchId=1513840821
|
||||||
wx.paySignKey=
|
wx.paySignKey=
|
||||||
wx.certName=/cert/apiclient_cert.p12
|
wx.certName=/cert/apiclient_cert.p12
|
||||||
wx.getCode=https://open.weixin.qq.com/connect/oauth2/authorize?appid=%s&redirect_uri=%s&response_type=code&scope=%s&state=STAT#wechat_redirect
|
wx.getCode=https://open.weixin.qq.com/connect/oauth2/authorize?appid=%s&redirect_uri=%s&response_type=code&scope=%s&state=STAT#wechat_redirect
|
||||||
wx.notifyUrl=http://127.0.0.1:8085/api/pay/notify
|
wx.notifyUrl=http://2wsiyd.natappfree.cc/api/pay/notify
|
||||||
wx.orderquery=https://api.mch.weixin.qq.com/pay/orderquery
|
wx.orderquery=https://api.mch.weixin.qq.com/pay/orderquery
|
||||||
wx.refundUrl=https://api.mch.weixin.qq.com/secapi/pay/refund
|
wx.refundUrl=https://api.mch.weixin.qq.com/secapi/pay/refund
|
||||||
wx.refundqueryUrl=https://api.mch.weixin.qq.com/pay/refundquery
|
wx.refundqueryUrl=https://api.mch.weixin.qq.com/pay/refundquery
|
||||||
@@ -91,3 +87,17 @@ logging.level.com.mallplus.mall.ums.mapper=debug
|
|||||||
logistics.Kdniao.EBusinessID=test1627898
|
logistics.Kdniao.EBusinessID=test1627898
|
||||||
logistics.Kdniao.AppKey=5f1463ac-7fb7-4601-9a07-a43f4ff1ce1a
|
logistics.Kdniao.AppKey=5f1463ac-7fb7-4601-9a07-a43f4ff1ce1a
|
||||||
logistics.Kdniao.ReqURL=http://sandboxapi.kdniao.com:8080/kdniaosandbox/gateway/exterfaceInvoke.json
|
logistics.Kdniao.ReqURL=http://sandboxapi.kdniao.com:8080/kdniaosandbox/gateway/exterfaceInvoke.json
|
||||||
|
|
||||||
|
#支付宝相关配置
|
||||||
|
alipay.appId=2018082761134635
|
||||||
|
alipay.privateKey=MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCpYi38h2/25e4mNWo56mmwuwa7QbBbPdgH00rsmPI/+0JkYhda2uZDvtrFXWMLzVJ2ioh9pamcfUbb2LcFgLIJ0KJyTia4sVMHmbk9l8wPf9mE4aOYN8ix6olzkm9ZhDGVekx2niW/hf6bpjnh92+I4EZo4xsK3RAsQ9oDXPjrJzktrrerAP+5MNOY8wLRqOp0KU+bOIcsz4Wz+qD3UxP2PjXPJDvXu7NkYDndOc7G0tVnhzVahFafqAntbgQHMyJENhLl9xdbnYdiKQqZJUwfI9xlRKYk08P4YVYTL7dAGAibQJJamgqmmKo8uibDIMkLsTGNm5WzW3EErWOCl6wlAgMBAAECggEAXfyxgbdxRDHPlHn9KIfO/5a3pH5NqkNFtQnkQCaZ/TChZWwcg3iFXr/vSqaICAt1H3u9QuMCm2fUQrcczzvbDqErEnwU9lTGuqfs5qVtQIhznU1K5nLFtRtsC6oMiUJV9Rh4hzU3wu9KGPoCkkUnKW8xApBJ+Bw0FivMNCOJp4kipif0gXQFxDH14w8n4QAyG3keXYP43DPqlsjmjJm4inHajxNO012Snle5SqA5HaIrZzf9St3ctq1BzqgUaD5yyXPmPyi1sqjrK+A16R4DrbKlY2h3/mo1IIfPjYbjb/uPcHf9pDMxEFwYIZ+kkz0uUjRDNWVX3A7ldav8MvvZ/QKBgQDot2raw93blrEhld3GGY4JNxboi6UZ1guK2nDEjlnpZjDUklSlNsx82NM8g0bm76Q9A3WpuoHQoSGEIy9ElrMuNS7xj+PZe5mNyKFMBG8hKeIV3jx4OIU80aiV9OQLv6+AonavHvOLXu41OJKdoQexyz7q3lu0+i7d9KKbWd2SlwKBgQC6VJxj1KPh3kHtmm/d/5fOZUDLqxTOyexRrEUCj9hGjv5XymxULQPskKxasFKiPyn4TCp2ZOrPO1slu8IUpzaymM4DDQYtTQkbsAT/N6r9efCJTXDdTgm5iyTaILbSbqd01KEnqjmFLOSCpasvM47rARlG4IYXIXD9cXKj12AaowKBgAN7w2C079w6nDopeSFe/o5KwdAHTxhc6N1SOb/ndZcVzYNREW1LrbHsuPS97lDEo4u6Qoeg4BKUZuEIecuoCdSWPTamdb2qqPjDWQ6/Pj6b1uOG6RbPmcb4SHK+MK+wVdsyE165suGSMTSgvSkY4PmbVjzDyVGjMRJneAulQ7jPAoGAViCIDWkbu2q1xLNPJClhrSiGU94nhxI05uefGnkM+khcbo4Flr8cAjw5Ps4j1BUoPDpQolsxYkrIbd+k7VEBanpRN33MriHepOqu1J2RrwqvUXf3RIQu4JHdnenjN8+oHcuvFhuL7O/8TBtxziah2CSw318m/AgcJzpKSEtkg8sCgYB/cr6PuuQ7JpK2kYmwYMSwNvys0v31iSqFmJK6EyPRycGw9Wj/ANiGJrKuVqdnzb2LqSzdNWkKte25hSIv21satgHM2of7oFzjFB2N/hMx5o+nOQgq0zZcA6Mvn0W3GFFZ1YAep3oyrxLh9+5ELi2JGXgJafiEJvr5J3YzSGOWrw==
|
||||||
|
alipay.serverUrl=https://openapi.alipay.com/gateway.do
|
||||||
|
alipay.domain=http://2wsiyd.natappfree.cc/api
|
||||||
|
#回调地址
|
||||||
|
alipay.notifyUrl=http://2wsiyd.natappfree.cc/api/aliPay/notify_url
|
||||||
|
# 支付宝CA根证书文件路径(alipay_root_cert_path 文件绝对路径)
|
||||||
|
alipay.RootCertPath=D:\\apliay\\alipayRootCert.crt
|
||||||
|
# 支付宝公钥证书文件路径(alipay_cert_path 文件绝对路径)
|
||||||
|
alipay.ALIPAY_PUBLIC_KEY=D:\\apliay\\alipayCertPublicKey_RSA2.crt
|
||||||
|
# 应用公钥证书路径(app_cert_path 文件绝对路径)
|
||||||
|
alipay.CertPath=D:\\apliay\\appCertPublicKey_2018082761134635.crt
|
||||||
|
|||||||
@@ -32,12 +32,12 @@ spring.datasource.druid.stat-view-servlet.login-username=druid
|
|||||||
spring.datasource.druid.stat-view-servlet.login-password=druid
|
spring.datasource.druid.stat-view-servlet.login-password=druid
|
||||||
|
|
||||||
# \u7CFB\u7EDF\u914D\u7F6E
|
# \u7CFB\u7EDF\u914D\u7F6E
|
||||||
mallplus.domain=http://51wangshi.com:8082
|
mallplus.domain=http://mall.yyundong.com/
|
||||||
mallplus.defaultIcon=https://mmbiz.qpic.cn/mmbiz_jpg/5oOYgozg9P2Jd9Ozn72E745xJsttQIQLIz0bKWibDeaYWJticTRyaX7HfALWsWf6TLzib0libyicV4m221fZibmibDMoQ/0?wx_fmt=jpeg
|
mallplus.defaultIcon=https://mall.yyundong.com/avatar.png
|
||||||
mallplus.name=mallplus-b2b2c
|
mallplus.name=????
|
||||||
mallplus.version=1.1.0
|
mallplus.version=1.1.0
|
||||||
mallplus.company=mallplus technology
|
mallplus.company=????
|
||||||
mallplus.subdomain=mallplus.com
|
mallplus.subdomain=mall.yyundong.com
|
||||||
mallplus.code=123456
|
mallplus.code=123456
|
||||||
mallplus.defaultPassword=123456
|
mallplus.defaultPassword=123456
|
||||||
|
|
||||||
|
|||||||
@@ -24,12 +24,12 @@ spring.datasource.druid.stat-view-servlet.reset-enable=true
|
|||||||
spring.datasource.druid.stat-view-servlet.login-username=druid
|
spring.datasource.druid.stat-view-servlet.login-username=druid
|
||||||
spring.datasource.druid.stat-view-servlet.login-password=druid
|
spring.datasource.druid.stat-view-servlet.login-password=druid
|
||||||
|
|
||||||
mallplus.domain=http://51wangshi.com:8082
|
mallplus.domain=http://mall.yyundong.com/
|
||||||
mallplus.defaultIcon=https://mmbiz.qpic.cn/mmbiz_jpg/5oOYgozg9P2Jd9Ozn72E745xJsttQIQLIz0bKWibDeaYWJticTRyaX7HfALWsWf6TLzib0libyicV4m221fZibmibDMoQ/0?wx_fmt=jpeg
|
mallplus.defaultIcon=https://mall.yyundong.com/avatar.png
|
||||||
mallplus.name=mallplus-b2b2c
|
mallplus.name=????
|
||||||
mallplus.version=1.1.0
|
mallplus.version=1.1.0
|
||||||
mallplus.company=mallplus technology
|
mallplus.company=????
|
||||||
mallplus.subdomain=mallplus.com
|
mallplus.subdomain=mall.yyundong.com
|
||||||
mallplus.code=123456
|
mallplus.code=123456
|
||||||
mallplus.defaultPassword=123456
|
mallplus.defaultPassword=123456
|
||||||
|
|
||||||
@@ -72,13 +72,14 @@ spring.redis.pool.min-idle=0
|
|||||||
spring.redis.timeout=0
|
spring.redis.timeout=0
|
||||||
#===redis end===
|
#===redis end===
|
||||||
# \u5C0F\u7A0B\u5E8F
|
# \u5C0F\u7A0B\u5E8F
|
||||||
wx.secret=12c7a7ae75571beaf4eb379d30962681
|
wx.domain=http://mall.yyundong.com/portalapi/api
|
||||||
wx.appId=wx15ade215f1447bda
|
wx.secret=381f9ea3359c0e2fc8b74c59d9d9bb11
|
||||||
wx.mchId=1388211202
|
wx.appId=wxa66597d50184d027
|
||||||
|
wx.mchId=1513840821
|
||||||
wx.paySignKey=QMRHz2NpJpNIJqhHHJQSNuNmHPnH2v9z
|
wx.paySignKey=QMRHz2NpJpNIJqhHHJQSNuNmHPnH2v9z
|
||||||
wx.certName=/cert/apiclient_cert.p12
|
wx.certName=/cert/apiclient_cert.p12
|
||||||
wx.getCode=https://open.weixin.qq.com/connect/oauth2/authorize?appid=%s&redirect_uri=%s&response_type=code&scope=%s&state=STAT#wechat_redirect
|
wx.getCode=https://open.weixin.qq.com/connect/oauth2/authorize?appid=%s&redirect_uri=%s&response_type=code&scope=%s&state=STAT#wechat_redirect
|
||||||
wx.notifyUrl=http://localhost:8085/api/pay/notify
|
wx.notifyUrl=http://mall.yyundong.com/portalapi/api/pay/notify
|
||||||
wx.orderquery=https://api.mch.weixin.qq.com/pay/orderquery
|
wx.orderquery=https://api.mch.weixin.qq.com/pay/orderquery
|
||||||
wx.refundUrl=https://api.mch.weixin.qq.com/secapi/pay/refund
|
wx.refundUrl=https://api.mch.weixin.qq.com/secapi/pay/refund
|
||||||
wx.refundqueryUrl=https://api.mch.weixin.qq.com/pay/refundquery
|
wx.refundqueryUrl=https://api.mch.weixin.qq.com/pay/refundquery
|
||||||
@@ -90,4 +91,19 @@ wx.templateId=nAt_DYLLwYXkIhtDb5nyEm0ynrt98OK3Z3MmeUooPz4
|
|||||||
|
|
||||||
logistics.Kdniao.EBusinessID=test1627898
|
logistics.Kdniao.EBusinessID=test1627898
|
||||||
logistics.Kdniao.AppKey=5f1463ac-7fb7-4601-9a07-a43f4ff1ce1a
|
logistics.Kdniao.AppKey=5f1463ac-7fb7-4601-9a07-a43f4ff1ce1a
|
||||||
logistics.Kdniao.ReqURL=http://sandboxapi.kdniao.com:8080/kdniaosandbox/gateway/exterfaceInvoke.json
|
logistics.Kdniao.ReqURL=http://sandboxapi.kdniao.com:8080/kdniaosandbox/gateway/exterfaceInvoke.json
|
||||||
|
|
||||||
|
|
||||||
|
#支付宝相关配置
|
||||||
|
alipay.appId=2018082761134635
|
||||||
|
alipay.privateKey=MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCpYi38h2/25e4mNWo56mmwuwa7QbBbPdgH00rsmPI/+0JkYhda2uZDvtrFXWMLzVJ2ioh9pamcfUbb2LcFgLIJ0KJyTia4sVMHmbk9l8wPf9mE4aOYN8ix6olzkm9ZhDGVekx2niW/hf6bpjnh92+I4EZo4xsK3RAsQ9oDXPjrJzktrrerAP+5MNOY8wLRqOp0KU+bOIcsz4Wz+qD3UxP2PjXPJDvXu7NkYDndOc7G0tVnhzVahFafqAntbgQHMyJENhLl9xdbnYdiKQqZJUwfI9xlRKYk08P4YVYTL7dAGAibQJJamgqmmKo8uibDIMkLsTGNm5WzW3EErWOCl6wlAgMBAAECggEAXfyxgbdxRDHPlHn9KIfO/5a3pH5NqkNFtQnkQCaZ/TChZWwcg3iFXr/vSqaICAt1H3u9QuMCm2fUQrcczzvbDqErEnwU9lTGuqfs5qVtQIhznU1K5nLFtRtsC6oMiUJV9Rh4hzU3wu9KGPoCkkUnKW8xApBJ+Bw0FivMNCOJp4kipif0gXQFxDH14w8n4QAyG3keXYP43DPqlsjmjJm4inHajxNO012Snle5SqA5HaIrZzf9St3ctq1BzqgUaD5yyXPmPyi1sqjrK+A16R4DrbKlY2h3/mo1IIfPjYbjb/uPcHf9pDMxEFwYIZ+kkz0uUjRDNWVX3A7ldav8MvvZ/QKBgQDot2raw93blrEhld3GGY4JNxboi6UZ1guK2nDEjlnpZjDUklSlNsx82NM8g0bm76Q9A3WpuoHQoSGEIy9ElrMuNS7xj+PZe5mNyKFMBG8hKeIV3jx4OIU80aiV9OQLv6+AonavHvOLXu41OJKdoQexyz7q3lu0+i7d9KKbWd2SlwKBgQC6VJxj1KPh3kHtmm/d/5fOZUDLqxTOyexRrEUCj9hGjv5XymxULQPskKxasFKiPyn4TCp2ZOrPO1slu8IUpzaymM4DDQYtTQkbsAT/N6r9efCJTXDdTgm5iyTaILbSbqd01KEnqjmFLOSCpasvM47rARlG4IYXIXD9cXKj12AaowKBgAN7w2C079w6nDopeSFe/o5KwdAHTxhc6N1SOb/ndZcVzYNREW1LrbHsuPS97lDEo4u6Qoeg4BKUZuEIecuoCdSWPTamdb2qqPjDWQ6/Pj6b1uOG6RbPmcb4SHK+MK+wVdsyE165suGSMTSgvSkY4PmbVjzDyVGjMRJneAulQ7jPAoGAViCIDWkbu2q1xLNPJClhrSiGU94nhxI05uefGnkM+khcbo4Flr8cAjw5Ps4j1BUoPDpQolsxYkrIbd+k7VEBanpRN33MriHepOqu1J2RrwqvUXf3RIQu4JHdnenjN8+oHcuvFhuL7O/8TBtxziah2CSw318m/AgcJzpKSEtkg8sCgYB/cr6PuuQ7JpK2kYmwYMSwNvys0v31iSqFmJK6EyPRycGw9Wj/ANiGJrKuVqdnzb2LqSzdNWkKte25hSIv21satgHM2of7oFzjFB2N/hMx5o+nOQgq0zZcA6Mvn0W3GFFZ1YAep3oyrxLh9+5ELi2JGXgJafiEJvr5J3YzSGOWrw==
|
||||||
|
alipay.serverUrl=https://openapi.alipay.com/gateway.do
|
||||||
|
alipay.domain=http://mall.yyundong.com/portalapi/api
|
||||||
|
#回调地址
|
||||||
|
alipay.notifyUrl=http://mall.yyundong.com/portalapi/api/aliPay/notify_url
|
||||||
|
# 支付宝CA根证书文件路径(alipay_root_cert_path 文件绝对路径)
|
||||||
|
alipay.RootCertPath=D:\\apliay\\alipayRootCert.crt
|
||||||
|
# 支付宝公钥证书文件路径(alipay_cert_path 文件绝对路径)
|
||||||
|
alipay.ALIPAY_PUBLIC_KEY=D:\\apliay\\alipayCertPublicKey_RSA2.crt
|
||||||
|
# 应用公钥证书路径(app_cert_path 文件绝对路径)
|
||||||
|
alipay.CertPath=D:\\apliay\\appCertPublicKey_2018082761134635.crt
|
||||||
@@ -4,10 +4,13 @@ spring.profiles.active=test
|
|||||||
#spring.profiles.active=dev
|
#spring.profiles.active=dev
|
||||||
#===server start===
|
#===server start===
|
||||||
server.port=8083
|
server.port=8083
|
||||||
|
#server.port=8111
|
||||||
#===server end===
|
#===server end===
|
||||||
|
|
||||||
#===redis custom key start===
|
#===redis custom key start===
|
||||||
redis.key.prefix.authCode=portal:authCode:
|
redis.key.prefix.authCode=portal:authCode:
|
||||||
|
redis.key.prefix.loginCode=portal:loginCode:
|
||||||
|
redis.key.prefix.forgetCode=portal:forgetCode:
|
||||||
redis.key.prefix.orderId=portal:orderId:
|
redis.key.prefix.orderId=portal:orderId:
|
||||||
authCode.expire.seconds=90
|
authCode.expire.seconds=90
|
||||||
#===redis custom key end===
|
#===redis custom key end===
|
||||||
@@ -27,8 +30,8 @@ jwt.tokenHead=Bearer
|
|||||||
# \u963F\u91CC\u4E91\u77ED\u4FE1\u914D\u7F6E
|
# \u963F\u91CC\u4E91\u77ED\u4FE1\u914D\u7F6E
|
||||||
aliyun.sms.accessKeyId=LTAI4FhoMuUqdigjDnFT1bY6
|
aliyun.sms.accessKeyId=LTAI4FhoMuUqdigjDnFT1bY6
|
||||||
aliyun.sms.accessKeySecret=JvE9FcILlHu5gClmAJr89ZkEv00l9s
|
aliyun.sms.accessKeySecret=JvE9FcILlHu5gClmAJr89ZkEv00l9s
|
||||||
aliyun.sms.sign.name=\u4EAC\u6021\u541B\u5546\u8D38
|
aliyun.sms.sign.name=YXT004911
|
||||||
aliyun.sms.template.code=SMS_164240312
|
aliyun.sms.template.code=yyundong@yuxintong
|
||||||
aliyun.sms.expire-minute=2
|
aliyun.sms.expire-minute=2
|
||||||
aliyun.sms.day-count=45
|
aliyun.sms.day-count=45
|
||||||
|
|
||||||
|
|||||||
16
mallplusui-uniapp-app/.hbuilderx/launch.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
|
||||||
|
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
|
||||||
|
"version": "0.0",
|
||||||
|
"configurations": [{
|
||||||
|
"app-plus" :
|
||||||
|
{
|
||||||
|
"launchtype" : "local"
|
||||||
|
},
|
||||||
|
"default" :
|
||||||
|
{
|
||||||
|
"launchtype" : "local"
|
||||||
|
},
|
||||||
|
"type" : "uniCloud"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -11,26 +11,27 @@
|
|||||||
} from 'vuex';
|
} from 'vuex';
|
||||||
export default {
|
export default {
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations(['login']) ,
|
...mapMutations(['login']),
|
||||||
// util.js
|
// util.js
|
||||||
// 微信公众号授权
|
// 微信公众号授权
|
||||||
wxAuthorize() {
|
wxAuthorize() {
|
||||||
let link = window.location.href;
|
let link = window.location.href;
|
||||||
let params = this._getUrlParams(link); // 地址解析
|
let params = this._getUrlParams(link); // 地址解析
|
||||||
|
|
||||||
// 已经授权登录过的就不用再授权了
|
// 已经授权登录过的就不用再授权了
|
||||||
if (store.state.token) return;
|
if (store.state.token) return;
|
||||||
|
|
||||||
// 如果拿到code,调用授权接口,没有拿到就跳转微信授权链接获取
|
// 如果拿到code,调用授权接口,没有拿到就跳转微信授权链接获取
|
||||||
if (params.code) {
|
if (params.code) {
|
||||||
api.wxAuth(params.code); // 调用后台接口,授权
|
api.wxAuth(params.code); // 调用后台接口,授权
|
||||||
} else {
|
} else {
|
||||||
let appid = 'wx8321531c6046c924';
|
let appid = 'wx8321531c6046c924';
|
||||||
let uri = encodeURIComponent(link);
|
let uri = encodeURIComponent(link);
|
||||||
let authURL = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${uri}&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect`;
|
let authURL =
|
||||||
window.location.href = authURL;
|
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${uri}&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect`;
|
||||||
}
|
window.location.href = authURL;
|
||||||
},
|
}
|
||||||
|
},
|
||||||
async typeGoodsList() {
|
async typeGoodsList() {
|
||||||
let params = {};
|
let params = {};
|
||||||
let list = await Api.apiCall('get', Api.goods.typeGoodsList, params);
|
let list = await Api.apiCall('get', Api.goods.typeGoodsList, params);
|
||||||
@@ -44,27 +45,34 @@
|
|||||||
async sysInfoMethod() {
|
async sysInfoMethod() {
|
||||||
let params = {};
|
let params = {};
|
||||||
let list = await Api.apiCall('get', Api.index.sysInfo, params);
|
let list = await Api.apiCall('get', Api.index.sysInfo, params);
|
||||||
|
console.log('sysInfo>>>>>', sysInfo)
|
||||||
this.$db.set('sysInfo', list)
|
this.$db.set('sysInfo', list)
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
onLaunch: function() {
|
onLaunch: function() {
|
||||||
|
// uni.removeStorageSync('userInfo');
|
||||||
|
// uni.removeStorageSync('token');
|
||||||
|
console.log('App onLaunch')
|
||||||
let userInfo = uni.getStorageSync('userInfo') || '';
|
let userInfo = uni.getStorageSync('userInfo') || '';
|
||||||
let token = uni.getStorageSync('token') || '';
|
let token = uni.getStorageSync('token') || '';
|
||||||
if(token){
|
console.log('App onLaunch>>>',userInfo)
|
||||||
|
console.log('App onLaunch>>>',token)
|
||||||
|
if (token) {
|
||||||
//更新登陆状态
|
//更新登陆状态
|
||||||
uni.getStorage({
|
uni.getStorage({
|
||||||
key: 'userInfo',
|
key: 'userInfo',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
|
console.log('App onLaunch>>', res)
|
||||||
this.login(res.data);
|
this.login(res.data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
let isWeiXin = this.$common.isWeiXinBrowser()
|
let isWeiXin = this.$common.isWeiXinBrowser()
|
||||||
if (isWeiXin) {
|
if (isWeiXin) {
|
||||||
this.wxAuthorize()
|
this.wxAuthorize()
|
||||||
}
|
}
|
||||||
this.typeGoodsList();
|
this.typeGoodsList();
|
||||||
this.areaGoodsList();
|
this.areaGoodsList();
|
||||||
this.sysInfoMethod();
|
this.sysInfoMethod();
|
||||||
@@ -418,6 +426,13 @@
|
|||||||
video {
|
video {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
html,
|
||||||
|
body,
|
||||||
|
#app {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
/* 骨架屏替代方案 */
|
/* 骨架屏替代方案 */
|
||||||
.Skeleton {
|
.Skeleton {
|
||||||
background: #f3f3f3;
|
background: #f3f3f3;
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import store from '../store/index';
|
import store from '../store/index';
|
||||||
export default {
|
export default {
|
||||||
// qq 237524947 wx15d4269d3210863d
|
// qq 237524947 wx15d4269d3210863d
|
||||||
|
// BASEURI: 'http://br68s5.natappfree.cc/api/',
|
||||||
BASEURI: 'http://mall.yyundong.com/portalapi/api/',
|
BASEURI: 'http://mall.yyundong.com/portalapi/api/',
|
||||||
// BASEURI: 'http://www.yyundong.com:8083/api/',
|
// BASEURI: 'http://192.168.31.52:8083/api/',
|
||||||
ADMINURI: 'http://mall.yyundong.com/adminapi/',
|
ADMINURI: 'http://mall.yyundong.com/adminapi/',
|
||||||
ESURI: 'http://www.yyundong.com:8081/',
|
ESURI: 'http://www.yyundong.com:8081/',
|
||||||
h5Appid: 'wxb4660f37187c0b8e', // h5微信登录的appId 暂时测试用
|
h5Appid: 'wxb4660f37187c0b8e', // h5微信登录的appId 暂时测试用
|
||||||
@@ -77,6 +78,8 @@ export default {
|
|||||||
memberTagList: 'single/user/memberTag/list', // 商户列表
|
memberTagList: 'single/user/memberTag/list', // 商户列表
|
||||||
addStoreComment: 'single/store/addStoreComment', // 商户addStoreComment
|
addStoreComment: 'single/store/addStoreComment', // 商户addStoreComment
|
||||||
memberBlanceLogList: 'single/user/memberBlanceLog/list',
|
memberBlanceLogList: 'single/user/memberBlanceLog/list',
|
||||||
|
mesList: 'sys/message/list', // GET 参数为空,获取用户消息通知列表,(需要先判断用户是已经登录状态)
|
||||||
|
mesInfo: 'sys/message/info', // GET 参数为 id:消息ID,获取消息详情
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
getBuildNoticeByPage: 'single/build/getBuildNoticeByPage', // 所有社区和房间
|
getBuildNoticeByPage: 'single/build/getBuildNoticeByPage', // 所有社区和房间
|
||||||
@@ -89,6 +92,7 @@ export default {
|
|||||||
bindCommunity: 'single/build/bindCommunity', // 绑定小区和房间
|
bindCommunity: 'single/build/bindCommunity', // 绑定小区和房间
|
||||||
home: 'single/build/home', // 首页内容页信息展示
|
home: 'single/build/home', // 首页内容页信息展示
|
||||||
applyCommunity: 'single/build/applyCommunity', // 社区入驻
|
applyCommunity: 'single/build/applyCommunity', // 社区入驻
|
||||||
|
wuyeCompanyWithCommunity: 'single/build/wuyeCompanyWithCommunity', // 所在地及其取货点列表(物业公司及其社区列表)
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
@@ -258,7 +262,7 @@ export default {
|
|||||||
|
|
||||||
let token = uni.getStorageSync('token') || '';
|
let token = uni.getStorageSync('token') || '';
|
||||||
let fullurl = this.BASEURI + endpoint;
|
let fullurl = this.BASEURI + endpoint;
|
||||||
console.log("fullurl",fullurl);
|
console.log("fullurl", fullurl);
|
||||||
var contentType = 'application/x-www-form-urlencoded';
|
var contentType = 'application/x-www-form-urlencoded';
|
||||||
|
|
||||||
data.authorization = token;
|
data.authorization = token;
|
||||||
@@ -277,11 +281,18 @@ export default {
|
|||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log('error', error);
|
||||||
|
console.log('res', res);
|
||||||
if (undefined == res || 'undefined' == res) {
|
if (undefined == res || 'undefined' == res) {
|
||||||
console.log('index');
|
console.log('index');
|
||||||
uni.navigateTo({
|
uni.showToast({
|
||||||
url: `/pages/public/login`
|
title: '网络错误',
|
||||||
})
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
// uni.navigateTo({
|
||||||
|
// url: `/pages/public/login`
|
||||||
|
// })
|
||||||
}
|
}
|
||||||
if (res.data.msg == 'User token expired!') {
|
if (res.data.msg == 'User token expired!') {
|
||||||
console.log('User token expired');
|
console.log('User token expired');
|
||||||
@@ -311,6 +322,7 @@ export default {
|
|||||||
return res.data.data;
|
return res.data.data;
|
||||||
} else {
|
} else {
|
||||||
console.log(">>>>>=");
|
console.log(">>>>>=");
|
||||||
|
console.log(">>>>>=", res.data);
|
||||||
if (res.data) {
|
if (res.data) {
|
||||||
if (!res.data.msg) {
|
if (!res.data.msg) {
|
||||||
res.data.msg = res.data.data;
|
res.data.msg = res.data.data;
|
||||||
@@ -319,7 +331,7 @@ export default {
|
|||||||
title: res.data.msg,
|
title: res.data.msg,
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
this.$api.msg(res.data.msg);
|
// this.$api.msg(res.data.msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,10 +8,10 @@
|
|||||||
<view class="demand">满{{ item.minPoint }} 减 {{ item.amount }}</view>
|
<view class="demand">满{{ item.minPoint }} 减 {{ item.amount }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="get-btn" v-if="!types" :style="{color:color, borderColor:color, background:solid}"
|
<view class="get-btn" :style="{color:color, borderColor:color, background:solid}" @click="acceptCoupon(item)">
|
||||||
@click="acceptCoupon(item)">立即领取</view>
|
立即领取</view>
|
||||||
<navigator class="get-btn" v-if="types" :style="{color:color, borderColor:color, background:solid}"
|
<!-- <navigator class="get-btn" v-if="types" :style="{color:color, borderColor:color, background:solid}"
|
||||||
:url='item.url' @click="useCoupon(item)">立即使用</navigator>
|
:url='item.url' @click="useCoupon(item)">立即使用</navigator> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -21,6 +21,9 @@
|
|||||||
import {
|
import {
|
||||||
formatDate
|
formatDate
|
||||||
} from '@/common/date';
|
} from '@/common/date';
|
||||||
|
import {
|
||||||
|
mapState
|
||||||
|
} from 'vuex';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -54,25 +57,54 @@
|
|||||||
return formatDate(date, 'yyyy-MM-dd hh:mm:ss')
|
return formatDate(date, 'yyyy-MM-dd hh:mm:ss')
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(['hasLogin','hasVip', 'userInfo']),
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async acceptCoupon(item) {
|
async acceptCoupon(item) {
|
||||||
this.types =!this.types
|
if (this.hasLogin) {
|
||||||
uni.showLoading({
|
if(this.hasVip){
|
||||||
title: '请稍后'
|
this.types = !this.types
|
||||||
|
uni.showLoading({
|
||||||
|
title: '请稍后'
|
||||||
|
});
|
||||||
|
|
||||||
|
let params = {
|
||||||
|
couponId: item.id
|
||||||
|
};
|
||||||
|
this.clickSubMethod(item)
|
||||||
|
let data = await Api.apiCall('post', Api.index.acceptCoupon, params);
|
||||||
|
// console.log("data?????", data);
|
||||||
|
// if (data) {
|
||||||
|
// // this.$api.msg(data);
|
||||||
|
// this.clickSubMethod(item)
|
||||||
|
|
||||||
|
// }
|
||||||
|
uni.hideLoading();
|
||||||
|
}else{
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '您不属于惠农会员,暂不能领取此优惠券',
|
||||||
|
showCancel:false,
|
||||||
|
success: function(res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/public/login'
|
||||||
});
|
});
|
||||||
|
|
||||||
let params = {
|
|
||||||
couponId: item.id
|
|
||||||
};
|
|
||||||
let data = await Api.apiCall('post', Api.index.acceptCoupon, params);
|
|
||||||
console.log(data);
|
|
||||||
if (data) {
|
|
||||||
this.$api.msg(data);
|
|
||||||
}
|
}
|
||||||
uni.hideLoading();
|
|
||||||
|
|
||||||
},
|
},
|
||||||
async useCoupon(item){
|
clickSubMethod(vel) {
|
||||||
|
console.log('clickSubMethod')
|
||||||
|
this.$emit('callParentMethod', JSON.stringify(vel))
|
||||||
|
},
|
||||||
|
async useCoupon(item) {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '请稍后'
|
title: '请稍后'
|
||||||
});
|
});
|
||||||
|
|||||||