Compare commits
65 Commits
master
...
a5c7752f63
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a5c7752f63 | ||
|
|
db3412d676 | ||
|
|
6f2ed64dbf | ||
|
|
27edbd9cf6 | ||
|
|
235059c96a | ||
|
|
7fdf6eefad | ||
|
|
5af759c924 | ||
|
|
9a2332a61b | ||
|
|
a2e9e1e476 | ||
|
|
355eb8f9f5 | ||
|
|
29701e9e15 | ||
|
|
f8dfaad63b | ||
|
|
7ed13f3e2c | ||
|
|
432743addf | ||
|
|
20c5908f34 | ||
|
|
56129fb865 | ||
|
|
d994034e61 | ||
|
|
9cd9841f09 | ||
|
|
f0d4b595f4 | ||
|
|
5900fd8778 | ||
|
|
19f7a18faf | ||
|
|
6918fcdc1d | ||
|
|
cdad78f180 | ||
|
|
5407996240 | ||
|
|
56203a5895 | ||
|
|
20457a3801 | ||
|
|
35fe4b005f | ||
|
|
c7bdea46d0 | ||
|
|
5b04c4ef37 | ||
|
|
6b4c22465f | ||
|
|
90e251555d | ||
|
|
bed746242d | ||
|
|
7462e05864 | ||
|
|
cd350392ef | ||
|
|
1071ba3fb0 | ||
|
|
e36a5a9ddd | ||
|
|
c5bd376851 | ||
|
|
a71249ed12 | ||
|
|
513954ccf1 | ||
|
|
84d42a3af2 | ||
|
|
e55d5b7dc8 | ||
|
|
34a8ea444c | ||
|
|
c91ede94a1 | ||
|
|
46a039a678 | ||
|
|
cfd23f2ca3 | ||
|
|
52ea057ea1 | ||
|
|
7f9b7bc639 | ||
|
|
ea9c4f2a61 | ||
|
|
53e3adb498 | ||
|
|
7a2965c2f8 | ||
|
|
0c41fdf89d | ||
|
|
db39c5249e | ||
|
|
6087346eb6 | ||
|
|
30f25788cc | ||
|
|
e368d333ef | ||
|
|
34b6ff3a6c | ||
|
|
4020297c59 | ||
|
|
db5293247e | ||
|
|
63df93fc36 | ||
|
|
024cc12e56 | ||
|
|
e3fc58af9b | ||
|
|
e2a03924a9 | ||
|
|
0a3889a5cb | ||
|
|
f527882011 | ||
|
|
afd018f79f |
11
doc/123.txt
Normal file
11
doc/123.txt
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
im权限
|
||||||
|
cai:user:im
|
||||||
|
|
||||||
|
ALTER TABLE cai_consume_log
|
||||||
|
ADD INDEX idx_consume_filter(type, status, one_user_id);
|
||||||
|
|
||||||
|
菜单
|
||||||
|
- 单账户管理 101 proxyUser
|
||||||
|
- 统计 0 proxyUserTotal cai/proxyUserTotal/index cai:proxyUser:proxyTotal
|
||||||
|
- 注册用户 1 bindUserList cai/proxtBindUserList/index cai:proxyUser:bindUserList
|
||||||
|
- 充值记录 2 orderLogList cai/proxyOrderLogList/index cai:proxyUser:orderLogList
|
||||||
21
doc/20250926.sql
Normal file
21
doc/20250926.sql
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
ALTER TABLE cai_anchor
|
||||||
|
ADD COLUMN `anchor_total_coin` bigint(20) default 0 COMMENT '主播总收入';
|
||||||
|
|
||||||
|
CREATE TABLE `cai_love_rank_today`
|
||||||
|
(
|
||||||
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`data_type` tinyint NOT NULL default 2 COMMENT '日期类型 1-日榜 2-周榜 3-月榜',
|
||||||
|
`rank_time` date not null comment '榜单期数',
|
||||||
|
`begin_rank_time` date null comment '开始时间',
|
||||||
|
`end_rank_time` date null comment '结束时间',
|
||||||
|
`num` bigint(20) NOT NULL DEFAULT 0 COMMENT '数值',
|
||||||
|
`user_id` bigint(20) not null comment '用户ID',
|
||||||
|
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
|
INDEX `idx_date` (`rank_time`, `num`) USING BTREE,
|
||||||
|
INDEX `idx_user_id` (`user_id`) USING BTREE
|
||||||
|
) ENGINE = InnoDB
|
||||||
|
AUTO_INCREMENT = 1
|
||||||
|
DEFAULT CHARSET = utf8mb4
|
||||||
|
COLLATE = utf8mb4_general_ci
|
||||||
|
ROW_FORMAT = DYNAMIC COMMENT ='魅力榜单实时数据';
|
||||||
60
doc/20251014.sql
Normal file
60
doc/20251014.sql
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
|
||||||
|
活跃数 今日有进入APP人数
|
||||||
|
注册数 今日注册数
|
||||||
|
充值数 今日充值数
|
||||||
|
今日首充笔数 表示今天的首充人数
|
||||||
|
复充人数 今日第二次充值+人数
|
||||||
|
今日新用户首充人数 特指24小时内注册后就发生过充值的用户
|
||||||
|
次日留存率 (当天新增的用户中,新增日之后的第1天还登录的用户数)/第一天新增总用户数;
|
||||||
|
7日留存率 (当天新增的用户中,新增日之后的第3天还登录的用户数)/第一天新增总用户数;
|
||||||
|
15日留存率 特定一天新增的用户在第二天再次启动应用的比例
|
||||||
|
|
||||||
|
CREATE TABLE `cai_ops_count`
|
||||||
|
(
|
||||||
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`count_date` date not null comment '时间',
|
||||||
|
`user_num` bigint(20) NOT NULL DEFAULT 0 COMMENT '总人数',
|
||||||
|
`women_num` bigint(20) NOT NULL DEFAULT 0 COMMENT '男用户',
|
||||||
|
`man_num` bigint(20) NOT NULL DEFAULT 0 COMMENT '女用户',
|
||||||
|
`register_user_num` bigint(20) NOT NULL DEFAULT 0 COMMENT '注册人数',
|
||||||
|
`register_women_num` bigint(20) NOT NULL DEFAULT 0 COMMENT '注册女用户',
|
||||||
|
`register_man_num` bigint(20) NOT NULL DEFAULT 0 COMMENT '注册男用户',
|
||||||
|
`active_user_num` bigint(20) NOT NULL DEFAULT 0 COMMENT '活跃人数',
|
||||||
|
`active_women_num` bigint(20) NOT NULL DEFAULT 0 COMMENT '活跃女人数',
|
||||||
|
`active_man_num` bigint(20) NOT NULL DEFAULT 0 COMMENT '活跃男人数',
|
||||||
|
`pay_price` decimal(20, 2) NOT NULL DEFAULT 0 COMMENT '充值金额(不含VIP)',
|
||||||
|
`pay_order_num` bigint(20) NOT NULL DEFAULT 0 COMMENT '充值笔数(不含VIP)',
|
||||||
|
`pay_user_num` bigint(20) NOT NULL DEFAULT 0 COMMENT '今日充值人数',
|
||||||
|
`first_pay_user_num` bigint(20) NOT NULL DEFAULT 0 COMMENT '今日首充人数',
|
||||||
|
`more_user_num` bigint(20) NOT NULL DEFAULT 0 COMMENT '复充人数',
|
||||||
|
`first_user_pay_num` bigint(20) NOT NULL DEFAULT 0 COMMENT '新用户首充人数',
|
||||||
|
`day2_retention_rate` decimal(20, 2) NOT NULL DEFAULT 0 COMMENT '次日留存率(男用户)',
|
||||||
|
`day3_retention_rate` decimal(20, 2) NOT NULL DEFAULT 0 COMMENT '3日留存率(男用户)',
|
||||||
|
`day4_retention_rate` decimal(20, 2) NOT NULL DEFAULT 0 COMMENT '4日留存率(男用户)',
|
||||||
|
`day5_retention_rate` decimal(20, 2) NOT NULL DEFAULT 0 COMMENT '5日留存率(男用户)',
|
||||||
|
`day6_retention_rate` decimal(20, 2) NOT NULL DEFAULT 0 COMMENT '6日留存率(男用户)',
|
||||||
|
`day7_retention_rate` decimal(20, 2) NOT NULL DEFAULT 0 COMMENT '7日留存率(男用户)',
|
||||||
|
`day15_retention_rate` decimal(20, 2) NOT NULL DEFAULT 0 COMMENT '15日留存率(男用户)',
|
||||||
|
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
|
`update_sys_tm` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
|
INDEX `idx_date` (`count_date`) USING BTREE
|
||||||
|
) ENGINE = InnoDB
|
||||||
|
AUTO_INCREMENT = 1
|
||||||
|
DEFAULT CHARSET = utf8mb4
|
||||||
|
COLLATE = utf8mb4_general_ci
|
||||||
|
ROW_FORMAT = DYNAMIC COMMENT ='统计数据';
|
||||||
|
|
||||||
|
CREATE TABLE `cai_login_min_log`
|
||||||
|
(
|
||||||
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`login_date` date comment '登录时间',
|
||||||
|
`user_id` bigint(20) DEFAULT 0 COMMENT '用户',
|
||||||
|
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
|
INDEX `idx_date` (`user_id`, `login_date`) USING BTREE
|
||||||
|
) ENGINE = InnoDB
|
||||||
|
AUTO_INCREMENT = 1
|
||||||
|
DEFAULT CHARSET = utf8mb4
|
||||||
|
COLLATE = utf8mb4_general_ci
|
||||||
|
ROW_FORMAT = DYNAMIC COMMENT ='用户登录记录';
|
||||||
4
doc/20251017.sql
Normal file
4
doc/20251017.sql
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
ALTER TABLE sys_notice
|
||||||
|
ADD COLUMN `business_type` varchar(20) COMMENT '业务类型',
|
||||||
|
ADD COLUMN `deal_by` varchar(100) COMMENT '处理人',
|
||||||
|
ADD COLUMN `deal_time` datetime COMMENT '处理时间';
|
||||||
2
doc/20251021.sql
Normal file
2
doc/20251021.sql
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
ALTER TABLE sys_user
|
||||||
|
ADD COLUMN `bind_user_code` varchar(20);
|
||||||
8
doc/20251112.sql
Normal file
8
doc/20251112.sql
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
ALTER TABLE cai_pay_trd_config
|
||||||
|
ADD COLUMN `extend_data` JSON;
|
||||||
|
|
||||||
|
-- 2025-11-25
|
||||||
|
ALTER TABLE cai_goods
|
||||||
|
ADD COLUMN `wx_amount` int default 0 not null comment '微信钻石';
|
||||||
|
update cai_goods
|
||||||
|
set wx_amount = amount;
|
||||||
87
doc/20251128.sql
Normal file
87
doc/20251128.sql
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
alter table cai_account
|
||||||
|
add column `points` bigint(20) default 0 not null comment '积分';
|
||||||
|
ALTER TABLE cai_goods
|
||||||
|
ADD COLUMN `give_point` bigint(20) default 0 not null comment '充值赠送积分';
|
||||||
|
ALTER TABLE cai_recharge_order
|
||||||
|
ADD COLUMN `distribution` tinyint default 0 not null comment '是否參與分銷';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CREATE TABLE `cai_account_delete` (
|
||||||
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '子账户ID',
|
||||||
|
`user_id` bigint unsigned NOT NULL COMMENT '用户ID',
|
||||||
|
`usercode` varchar(10) NOT NULL COMMENT '用户Code',
|
||||||
|
`mobile` varchar(50) COMMENT '手机',
|
||||||
|
`invite_id` bigint unsigned DEFAULT NULL COMMENT '邀请人',
|
||||||
|
`coin` bigint NOT NULL DEFAULT '0' COMMENT '当前彩币数量',
|
||||||
|
`income_coin` bigint NOT NULL DEFAULT '0' COMMENT '收益的彩币数量',
|
||||||
|
`total_buy_money` decimal(20,2) NOT NULL DEFAULT '0.00' COMMENT '充值总额',
|
||||||
|
`total_buy_coin` bigint NOT NULL DEFAULT '0' COMMENT '充值彩贝总额',
|
||||||
|
`total_trd_money` decimal(20,2) NOT NULL DEFAULT '0.00' COMMENT '三方充值总额',
|
||||||
|
`message_income_coin` bigint NOT NULL DEFAULT '0' COMMENT '聊天收入',
|
||||||
|
`video_income_coin` bigint NOT NULL DEFAULT '0' COMMENT '视频收入',
|
||||||
|
`gift_income_coin` bigint NOT NULL DEFAULT '0' COMMENT '礼物收入',
|
||||||
|
`guard_income_coin` bigint NOT NULL DEFAULT '0' COMMENT '守护收入',
|
||||||
|
`union_income_coin` bigint NOT NULL DEFAULT '0' COMMENT '工会收入',
|
||||||
|
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '账户锁定 0 正常 1 锁定',
|
||||||
|
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
`anchor_total_coin` bigint DEFAULT '0' COMMENT '主播总收入',
|
||||||
|
`points` bigint NOT NULL DEFAULT '0' COMMENT '积分',
|
||||||
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
|
UNIQUE KEY `user_id` (`user_id`) USING BTREE
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='用户账户备份';
|
||||||
|
|
||||||
|
ALTER TABLE cai_user_info
|
||||||
|
ADD COLUMN point_rate decimal(7, 2) default 0.00 not null comment '积分分销比例';
|
||||||
|
ALTER TABLE cai_recharge_order
|
||||||
|
ADD COLUMN `give_point` bigint(20) default 0 not null comment '充值赠送积分';
|
||||||
|
|
||||||
|
CREATE TABLE `cai_point_record_log`
|
||||||
|
(
|
||||||
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`points` bigint(20) DEFAULT 0 COMMENT '积分',
|
||||||
|
`source_user_id` bigint(20) COMMENT '消费方用户',
|
||||||
|
`source_usercode` varchar(20) COMMENT '消费方用户',
|
||||||
|
`source_phone` varchar(50) COMMENT '消费方用户',
|
||||||
|
`one_user_id` bigint(20) COMMENT '分销方',
|
||||||
|
`one_usercode` varchar(20) COMMENT '分销方',
|
||||||
|
`one_phone` varchar(50) COMMENT '分销方',
|
||||||
|
`one_rate` decimal(8, 2) COMMENT '分销方提成比例',
|
||||||
|
`one_points` bigint(20) COMMENT '分销方积分',
|
||||||
|
`status` tinyint default 0 comment '状态 -1-无须分销 0-待分销 1-已分销',
|
||||||
|
`source_type` varchar(20) comment '来源',
|
||||||
|
`source_id` varchar(20) comment '来源ID',
|
||||||
|
`remark` varchar(255) comment '备注',
|
||||||
|
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
|
INDEX `idx_date` (`source_user_id`) USING BTREE
|
||||||
|
) ENGINE = InnoDB
|
||||||
|
AUTO_INCREMENT = 1
|
||||||
|
DEFAULT CHARSET = utf8mb4
|
||||||
|
COLLATE = utf8mb4_general_ci
|
||||||
|
ROW_FORMAT = DYNAMIC COMMENT ='用户积分分销';
|
||||||
|
|
||||||
|
|
||||||
|
-- 菜单 SQL
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible,
|
||||||
|
status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values (1996050872055914497, '用户积分分销', '1741377069687037954', '1', 'pointRecordLog', 'cai/pointRecordLog/index',
|
||||||
|
1, 0, 'C', '0', '0', 'cai:pointRecordLog:list', '#', 'admin', sysdate(), '', null, '用户积分分销菜单');
|
||||||
|
|
||||||
|
-- 按钮 SQL
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible,
|
||||||
|
status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values (1996050872055914498, '用户积分分销查询', 1996050872055914497, '1', '#', '', 1, 0, 'F', '0', '0',
|
||||||
|
'cai:pointRecordLog:query', '#', 'admin', sysdate(), '', null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible,
|
||||||
|
status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values (1996050872055914500, '用户积分分销修改', 1996050872055914497, '3', '#', '', 1, 0, 'F', '0', '0',
|
||||||
|
'cai:pointRecordLog:edit', '#', 'admin', sysdate(), '', null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible,
|
||||||
|
status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values (1996050872055914501, '用户积分分销删除', 1996050872055914497, '4', '#', '', 1, 0, 'F', '0', '0',
|
||||||
|
'cai:pointRecordLog:remove', '#', 'admin', sysdate(), '', null, '');
|
||||||
45
doc/20251205.sql
Normal file
45
doc/20251205.sql
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
CREATE TABLE `cai_ip_record`
|
||||||
|
(
|
||||||
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '子账户ID',
|
||||||
|
`count_date` date NOT NULL COMMENT '统计日期',
|
||||||
|
`ip_addr` varchar(100) NOT NULL COMMENT 'IP地址',
|
||||||
|
`path_addr` varchar(255) NULL COMMENT '请求地址',
|
||||||
|
`business_id` varchar(255) NULL,
|
||||||
|
`remark` varchar(255) NULL COMMENT '备注',
|
||||||
|
`number` bigint(20) default 0 not null COMMENT '手机号',
|
||||||
|
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
|
UNIQUE KEY `ip_addr` (`ip_addr`) USING BTREE
|
||||||
|
) ENGINE = InnoDB
|
||||||
|
AUTO_INCREMENT = 1
|
||||||
|
DEFAULT CHARSET = utf8mb4
|
||||||
|
COLLATE = utf8mb4_general_ci
|
||||||
|
ROW_FORMAT = DYNAMIC COMMENT ='ip访问记录';
|
||||||
|
|
||||||
|
|
||||||
|
CREATE TABLE `cai_ip_black`
|
||||||
|
(
|
||||||
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '子账户ID',
|
||||||
|
`ip_addr` varchar(100) NOT NULL COMMENT 'IP地址',
|
||||||
|
`enable_status` tinyint default 0 not NULL COMMENT '是否开启',
|
||||||
|
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
|
UNIQUE KEY `ip_addr` (`ip_addr`) USING BTREE
|
||||||
|
) ENGINE = InnoDB
|
||||||
|
AUTO_INCREMENT = 1
|
||||||
|
DEFAULT CHARSET = utf8mb4
|
||||||
|
COLLATE = utf8mb4_general_ci
|
||||||
|
ROW_FORMAT = DYNAMIC COMMENT ='ip黑名单';
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE `cai_recharge_order`
|
||||||
|
ADD INDEX `count_index`(`pay_status`, `pay_time`, `appid`, `price`);
|
||||||
|
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible,
|
||||||
|
status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values (1997858377790652418, '支付渠道统计', '1738084052270563330', '1', 'orderTotal', 'cai/orderTotal/index',
|
||||||
|
1, 0, 'C', '0', '0', 'cai:rechargeOrder:list', 'date-range', 'admin', sysdate(), '', null, '支付渠道统计菜单');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, query_param, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values (1997858164917141506, '安全管理', 0, 9, 'safe', null, null, 1, 0, 'M', '0', '0', null, 'bug', 'admin', '2025-12-08 10:38:00', 'admin', '2025-12-08 10:38:00', '');
|
||||||
66
doc/20251209.sql
Normal file
66
doc/20251209.sql
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
ALTER TABLE cai_point_record_log
|
||||||
|
ADD COLUMN one_join tinyint default 1 not null comment '是否参与分销';
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE cai_point_record_log
|
||||||
|
ADD COLUMN trace_id varchar(100) default null comment '链路ID';
|
||||||
|
|
||||||
|
CREATE TABLE `cai_point_change_log`
|
||||||
|
(
|
||||||
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '子账户ID',
|
||||||
|
`user_id` bigint(20) NOT NULL COMMENT '用户ID',
|
||||||
|
`usercode` varchar(100) NOT NULL COMMENT '用户',
|
||||||
|
`message` varchar(100) NOT NULL COMMENT '账户明细说明',
|
||||||
|
`action_type` varchar(36) DEFAULT NULL COMMENT '触发来源 1-充值 2-分销 3-抽奖',
|
||||||
|
`tar_user_id` bigint DEFAULT NULL COMMENT '目标ID,用户、抽奖ID',
|
||||||
|
`tar_usercode` varchar(20) DEFAULT NULL COMMENT '目标用户Code,有用户才有用',
|
||||||
|
`tar_name` varchar(255) DEFAULT NULL COMMENT '目标名称,用户名称,抽奖名称',
|
||||||
|
`tar_price` bigint DEFAULT NULL COMMENT '礼物价值',
|
||||||
|
`tar_img` varchar(255) DEFAULT NULL COMMENT '目标提前缓存的',
|
||||||
|
`tar_json` JSON DEFAULT NULL COMMENT '目标额外字段',
|
||||||
|
`change_value` bigint NOT NULL DEFAULT '0.00' COMMENT '变化值,为正 或者为负',
|
||||||
|
`operate_ip` varchar(15) DEFAULT '' COMMENT '操作IP',
|
||||||
|
`is_admin` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否为后台用户手动调整',
|
||||||
|
`trace_link_type` varchar(36) DEFAULT NULL COMMENT '跟踪类型 1-充值 2-分销 3-抽奖',
|
||||||
|
`trace_id` varchar(50) DEFAULT NULL COMMENT '跟踪ID 订单号-礼物ID',
|
||||||
|
`give_flag` tinyint NOT NULL DEFAULT '0' COMMENT '是否兑换',
|
||||||
|
`give_time` datetime comment '兑换时间',
|
||||||
|
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
|
INDEX `user_id` (`user_id`) USING BTREE
|
||||||
|
) ENGINE = InnoDB
|
||||||
|
AUTO_INCREMENT = 1
|
||||||
|
DEFAULT CHARSET = utf8mb4
|
||||||
|
COLLATE = utf8mb4_general_ci
|
||||||
|
ROW_FORMAT = DYNAMIC COMMENT ='积分记录';
|
||||||
|
|
||||||
|
-- 菜单 SQL
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible,
|
||||||
|
status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values (1998592326494093313, '积分记录', '1738084052270563330', '1', 'pointChangeLog', 'cai/pointChangeLog/index', 1, 0,
|
||||||
|
'C', '0', '0', 'cai:pointChangeLog:list', '#', 'admin', sysdate(), '', null, '积分记录菜单');
|
||||||
|
|
||||||
|
-- 按钮 SQL
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible,
|
||||||
|
status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values (1998592326494093314, '积分记录查询', 1998592326494093313, '1', '#', '', 1, 0, 'F', '0', '0',
|
||||||
|
'cai:pointChangeLog:query', '#', 'admin', sysdate(), '', null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible,
|
||||||
|
status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values (1998592326494093316, '积分记录修改', 1998592326494093313, '3', '#', '', 1, 0, 'F', '0', '0',
|
||||||
|
'cai:pointChangeLog:edit', '#', 'admin', sysdate(), '', null, '');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE cai_user
|
||||||
|
ADD COLUMN open_im_invite tinyint not null default 0 comment '是否开启IM分销8次后开启';
|
||||||
|
|
||||||
|
UPDATE cai_user p1
|
||||||
|
-- 关联充值订单表,筛选出有成功支付订单的用户
|
||||||
|
JOIN (
|
||||||
|
SELECT DISTINCT t2.user_id
|
||||||
|
FROM cai_recharge_order t2
|
||||||
|
WHERE t2.pay_status = 1
|
||||||
|
) t ON p1.id = t.user_id
|
||||||
|
SET p1.open_im_invite = 1;
|
||||||
88
doc/20251211.sql
Normal file
88
doc/20251211.sql
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
CREATE TABLE `cai_prize_info`
|
||||||
|
(
|
||||||
|
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '奖品ID',
|
||||||
|
`prize_name` varchar(100) NOT NULL COMMENT '奖品名称',
|
||||||
|
`prize_desc` varchar(500) DEFAULT '' COMMENT '奖品描述',
|
||||||
|
`prize_img` varchar(255) DEFAULT '' COMMENT '奖品图片地址',
|
||||||
|
`win_probability` decimal(5, 4) NOT NULL COMMENT '中奖率(0-1,如0.0100表示1%)',
|
||||||
|
`guarantee_draws` int NOT NULL DEFAULT 0 COMMENT '保底抽数(0表示无保底,谢谢惠顾奖无效)',
|
||||||
|
`min_win_draws` int NOT NULL DEFAULT 0 COMMENT '最低中奖抽数(0表示无限制,谢谢惠顾奖无效)',
|
||||||
|
`stock` int NOT NULL DEFAULT 0 COMMENT '奖品库存(谢谢惠顾奖填0,不校验)',
|
||||||
|
`prize_type` tinyint not null comment '奖品类型 1-谢谢惠顾 2-普通奖 3-大奖',
|
||||||
|
`prize_price` bigint(20) not null default 0 comment '奖品价值估算',
|
||||||
|
`auto_give` tinyint not null default 0 comment '是否自动兑奖',
|
||||||
|
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
|
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE = InnoDB
|
||||||
|
DEFAULT CHARSET = utf8mb4 COMMENT ='奖品基础表';
|
||||||
|
|
||||||
|
|
||||||
|
CREATE TABLE `cai_prize_online`
|
||||||
|
(
|
||||||
|
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '奖品ID',
|
||||||
|
`prize_id` bigint NOT NULL COMMENT '奖品ID',
|
||||||
|
`gender` tinyint(1) NOT NULL DEFAULT '0' COMMENT '性别 1-女 2-男',
|
||||||
|
`prize_name` varchar(100) NOT NULL COMMENT '奖品名称',
|
||||||
|
`prize_desc` varchar(500) DEFAULT '' COMMENT '奖品描述',
|
||||||
|
`prize_img` varchar(255) DEFAULT '' COMMENT '奖品图片地址',
|
||||||
|
`win_probability` decimal(5, 4) NOT NULL COMMENT '中奖率(0-1,如0.0100表示1%)',
|
||||||
|
`guarantee_draws` int NOT NULL DEFAULT 0 COMMENT '保底抽数(0表示无保底,谢谢惠顾奖无效)',
|
||||||
|
`min_win_draws` int NOT NULL DEFAULT 0 COMMENT '最低中奖抽数(0表示无限制,谢谢惠顾奖无效)',
|
||||||
|
`stock` int NOT NULL DEFAULT 0 COMMENT '奖品库存(谢谢惠顾奖填0,不校验)',
|
||||||
|
`prize_type` tinyint not null comment '奖品类型 1-谢谢惠顾 2-普通奖 3-大奖',
|
||||||
|
`prize_price` bigint(20) not null default 0 comment '奖品价值估算',
|
||||||
|
`auto_give` tinyint not null default 0 comment '是否自动兑奖',
|
||||||
|
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
|
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE = InnoDB
|
||||||
|
DEFAULT CHARSET = utf8mb4 COMMENT ='已发布奖品表';
|
||||||
|
|
||||||
|
|
||||||
|
alter table `cai_point_change_log`
|
||||||
|
ADD COLUMN remark varchar(200) null comment '备注';
|
||||||
|
|
||||||
|
|
||||||
|
-- 菜单 SQL
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values(2003344862891581442, '抽奖奖品', '1738072642014617602', '1', 'prizeInfo', 'cai/prizeInfo/index', 1, 0, 'C', '0', '0', 'cai:prizeInfo:list', '#', 'admin', sysdate(), '', null, '抽奖奖品菜单');
|
||||||
|
|
||||||
|
-- 按钮 SQL
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values(2003344862891581443, '抽奖奖品查询', 2003344862891581442, '1', '#', '', 1, 0, 'F', '0', '0', 'cai:prizeInfo:query', '#', 'admin', sysdate(), '', null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values(2003344862891581444, '抽奖奖品新增', 2003344862891581442, '2', '#', '', 1, 0, 'F', '0', '0', 'cai:prizeInfo:add', '#', 'admin', sysdate(), '', null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values(2003344862891581445, '抽奖奖品修改', 2003344862891581442, '3', '#', '', 1, 0, 'F', '0', '0', 'cai:prizeInfo:edit', '#', 'admin', sysdate(), '', null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values(2003344862891581446, '抽奖奖品删除', 2003344862891581442, '4', '#', '', 1, 0, 'F', '0', '0', 'cai:prizeInfo:remove', '#', 'admin', sysdate(), '', null, '');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CREATE TABLE `cai_prize_winning_record`
|
||||||
|
(
|
||||||
|
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '奖品ID',
|
||||||
|
`user_id` bigint(20) NOT NULL COMMENT '用户ID',
|
||||||
|
`use_point` bigint(20) NOT NULL COMMENT '抽奖消耗',
|
||||||
|
`prize_id` bigint NOT NULL COMMENT '奖品ID',
|
||||||
|
`prize_name` varchar(100) NOT NULL COMMENT '奖品名称',
|
||||||
|
`prize_desc` varchar(500) DEFAULT '' COMMENT '奖品描述',
|
||||||
|
`prize_img` varchar(255) DEFAULT '' COMMENT '奖品图片地址',
|
||||||
|
`win_probability` decimal(5, 4) NOT NULL COMMENT '中奖率(0-1,如0.0100表示1%)',
|
||||||
|
`guarantee_draws` int NOT NULL DEFAULT 0 COMMENT '保底抽数(0表示无保底,谢谢惠顾奖无效)',
|
||||||
|
`min_win_draws` int NOT NULL DEFAULT 0 COMMENT '最低中奖抽数(0表示无限制,谢谢惠顾奖无效)',
|
||||||
|
`stock` int NOT NULL DEFAULT 0 COMMENT '奖品库存(谢谢惠顾奖填0,不校验)',
|
||||||
|
`prize_type` tinyint not null comment '奖品类型 1-谢谢惠顾 2-普通奖 3-大奖',
|
||||||
|
`prize_price` bigint(20) not null default 0 comment '奖品价值估算',
|
||||||
|
`auto_give` tinyint not null default 0 comment '是否自动兑奖',
|
||||||
|
`give_status` tinyint not null default 0 comment '奖品兑换情况 0-未兑换 1-已兑换',
|
||||||
|
`give_remark` varchar(100) not null comment '兑奖备注说明',
|
||||||
|
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
|
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE = InnoDB
|
||||||
|
DEFAULT CHARSET = utf8mb4 COMMENT ='中奖记录';
|
||||||
25
doc/loginAuth.sql
Normal file
25
doc/loginAuth.sql
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
CREATE TABLE `cai_user_login`
|
||||||
|
(
|
||||||
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '子账户ID',
|
||||||
|
`user_id` bigint(20) NOT NULL COMMENT '用户ID',
|
||||||
|
`usercode` varchar(100) NOT NULL COMMENT '用户',
|
||||||
|
`mobile` varchar(100) NOT NULL COMMENT '账户明细说明',
|
||||||
|
`password` varchar(100) NOT NULL COMMENT '账户明细说明',
|
||||||
|
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
`update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
|
INDEX `user_id` (`user_id`) USING BTREE
|
||||||
|
) ENGINE = InnoDB
|
||||||
|
AUTO_INCREMENT = 1
|
||||||
|
DEFAULT CHARSET = utf8mb4
|
||||||
|
COLLATE = utf8mb4_general_ci
|
||||||
|
ROW_FORMAT = DYNAMIC COMMENT ='123记录';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO `cai_prize_info` (`id`, `prize_name`, `prize_desc`, `prize_img`, `win_probability`, `guarantee_draws`,
|
||||||
|
`min_win_draws`, `stock`, `prize_type`, `prize_price`, `auto_give`, `create_time`,
|
||||||
|
`update_time`)
|
||||||
|
VALUES (1, '谢谢惠顾', '谢谢惠顾', 'test/2026/01/06/0d6bafa0bb1841eabd745f0bf495640c.png', 0.0000, 0, 0, 0, 1, 0, 1,
|
||||||
|
'2026-01-06 15:33:11', '2026-01-14 16:53:47');
|
||||||
|
|
||||||
41
ruoyi-admin/src/main/java/com/ruoyi/job/IpJob.java
Normal file
41
ruoyi-admin/src/main/java/com/ruoyi/job/IpJob.java
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
package com.ruoyi.job;
|
||||||
|
|
||||||
|
import com.ruoyi.cai.enums.SystemConfigEnum;
|
||||||
|
import com.ruoyi.cai.enums.rank.RankDataTypeEnum;
|
||||||
|
import com.ruoyi.cai.manager.SystemConfigManager;
|
||||||
|
import com.ruoyi.cai.mapper.IpBlackMapper;
|
||||||
|
import com.ruoyi.cai.service.AnchorImCountDayService;
|
||||||
|
import com.ruoyi.cai.service.FastPayTotalService;
|
||||||
|
import com.ruoyi.cai.service.UnionTotalService;
|
||||||
|
import com.ruoyi.job.op.BusOp;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.time.DayOfWeek;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
@Slf4j
|
||||||
|
public class IpJob {
|
||||||
|
@Resource
|
||||||
|
private IpBlackMapper ipBlackMapper;
|
||||||
|
@Autowired
|
||||||
|
private SystemConfigManager systemConfigManager;
|
||||||
|
// 凌晨0点3分执行一次
|
||||||
|
@Scheduled(cron = "0/5 * * * * ? ")
|
||||||
|
public void run() {
|
||||||
|
boolean openIpAuto = systemConfigManager.getSystemConfigOfBool(SystemConfigEnum.OPEN_IP_AUTO);
|
||||||
|
if(!openIpAuto){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Integer ipNumber = systemConfigManager.getSystemConfigOfInt(SystemConfigEnum.OPEN_IP_NUMBER);
|
||||||
|
int refreshed = ipBlackMapper.refreshIp(ipNumber, LocalDate.now());
|
||||||
|
if(refreshed > 0){
|
||||||
|
log.info("封禁IP成功!个数:{}",refreshed);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,9 +3,13 @@ package com.ruoyi.web.controller.cai.admin;
|
|||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.ruoyi.cai.domain.Account;
|
import com.ruoyi.cai.domain.Account;
|
||||||
|
import com.ruoyi.cai.dto.AddPointAdminDto;
|
||||||
import com.ruoyi.cai.dto.AddRechargeOrderAdminDto;
|
import com.ruoyi.cai.dto.AddRechargeOrderAdminDto;
|
||||||
|
import com.ruoyi.cai.dto.ChangePointsAdminDto;
|
||||||
import com.ruoyi.cai.dto.admin.vo.AccountAdminVo;
|
import com.ruoyi.cai.dto.admin.vo.AccountAdminVo;
|
||||||
|
import com.ruoyi.cai.manager.ConsumerManager;
|
||||||
import com.ruoyi.cai.service.AccountService;
|
import com.ruoyi.cai.service.AccountService;
|
||||||
|
import com.ruoyi.cai.service.PointRecordLogService;
|
||||||
import com.ruoyi.cai.service.RechargeOrderService;
|
import com.ruoyi.cai.service.RechargeOrderService;
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||||
@@ -13,9 +17,9 @@ import com.ruoyi.common.core.controller.BaseController;
|
|||||||
import com.ruoyi.common.core.domain.PageQuery;
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.common.core.domain.R;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.core.validate.AddGroup;
|
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@@ -58,12 +62,27 @@ public class AccountController extends BaseController {
|
|||||||
return R.ok(accountService.getById(id));
|
return R.ok(accountService.getById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ConsumerManager consumerManager;
|
||||||
|
|
||||||
@SaCheckPermission("cai:account:add")
|
@SaCheckPermission("cai:account:add")
|
||||||
@Log(title = "用户账户调账", businessType = BusinessType.INSERT)
|
@Log(title = "用户账户调账", businessType = BusinessType.INSERT)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PostMapping("/updateCoin")
|
@PostMapping("/updateCoin")
|
||||||
public R<Void> add(@RequestBody AddRechargeOrderAdminDto bo) {
|
public R<Void> add(@RequestBody AddRechargeOrderAdminDto bo) {
|
||||||
rechargeOrderService.updateAdminRechargeOrder(bo);
|
consumerManager.rechargeOrderSuccessAdmin(bo);
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PointRecordLogService pointRecordLogService;
|
||||||
|
|
||||||
|
@SaCheckPermission("cai:account:add")
|
||||||
|
@Log(title = "用户积分调账", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping("/changePoints")
|
||||||
|
public R<Void> adminUpdatePoint(@RequestBody AddPointAdminDto bo) {
|
||||||
|
pointRecordLogService.adminUpdatePoint(bo);
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,58 @@
|
|||||||
|
package com.ruoyi.web.controller.cai.admin;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import com.ruoyi.cai.util.LoginLogByFileUtil;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 账户明细
|
||||||
|
*
|
||||||
|
* @author 77
|
||||||
|
* @date 2024-01-05
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/cai/loginLog")
|
||||||
|
public class LoginLogController extends BaseController {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询账户明细列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:loginLog:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public R<List<LoginLogInfo>> list(String mobile) {
|
||||||
|
List<String> list = LoginLogByFileUtil.getLog(mobile);
|
||||||
|
// List<String> list = new ArrayList<>();
|
||||||
|
// list.add("2025-12-21 08:31:43 [XNIO-1 task-193] INFO c.ruoyi.framework.aspectj.LogAspect - record logs:ip=172.56.45.250;url=/api/auth/login;method=POST;title=登陆;user-agent=yan yu/1.0.6 (iPhone; iOS 26.2; Scale/3.00);params={\"username\":\"13588246608\"};result=null;exception=您的账号已被封禁;;StartTime:2025-12-21 08:31:43,EndTime:2025-12-21 08:31:43,CostTime:5ms");
|
||||||
|
// list.add("2025-12-21 09:14:34 [XNIO-1 task-8] INFO c.ruoyi.framework.aspectj.LogAspect - record logs:ip=172.56.44.24;url=/api/auth/login;method=POST;title=登陆;currentUserId=44554;user-agent=yan yu/1.0.6 (iPhone; iOS 26.2; Scale/3.00);params={\"username\":\"13588246608\"};result=null;exception=您的账号已被封禁;;StartTime:2025-12-21 09:14:34,EndTime:2025-12-21 09:14:34,CostTime:7ms");
|
||||||
|
// list.add("2025-12-21 09:55:08 [XNIO-1 task-193] INFO c.ruoyi.framework.aspectj.LogAspect - record logs:ip=172.56.44.156;url=/api/auth/login;method=POST;title=登陆;currentUserId=6501;user-agent=yan yu/1.0.6 (iPhone; iOS 26.2; Scale/3.00);params={\"username\":\"13588246608\"};result={\"code\":200,\"msg\":\"操作成功\",\"data\":{\"token\":\"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiJhcHBfdXNlcjo2NTAxIiwicm5TdHIiOiJYR3pFcngxOWxXcm1MSEZhMGRhV0dDWFNERFhPaDBGeiIsInVzZXJJZCI6NjUwMX0.Coy1DgKMgtyEIpEpLKrvm_3w8SEjeKujfaTKu3l9AyI\",\"userInfo\":{\"userId\":6501,\"inviteId\":4387,\"type\":0,\"usercode\":\"6953\",\"nickname\":\"用户6953\",\"mobile\":\"13588246608\",\"avatar\":\"images/avatar/man.png\",\"avatarState\":0,\"gender\":2,\"birthday\":null,\"age\":18,\"cityId\":0,\"city\":null,\"isAnchor\":0,\"openVideoStatus\":1,\"status\":0,\"finishStatus\":0,\"imToken\":\"716d4d9bbe1b4441b88065b6bc0c543d\",\"userAccount\":{\"userId\":6501,\"coin\":2537,\"incomeCoin\":0},\"userCount\":{\"userId\":6501,\"newFansCount\":266,\"newVisitorCount\":5302,\"fansCount\":36,\"followCount\":24,\"footCount\":6691,\"visitorCount\":5302}}}};;StartTime:2025-12-21 09:55:07,EndTime:2025-12-21 09:55:08,CostTime:148ms");
|
||||||
|
// list.add("2025-12-21 10:30:21 [XNIO-1 task-46] INFO c.ruoyi.framework.aspectj.LogAspect - record logs:ip=172.56.45.234;url=/api/auth/login;method=POST;title=登陆;currentUserId=6501;user-agent=yan yu/1.0.6 (iPhone; iOS 26.2; Scale/3.00);params={\"username\":\"13588246608\"};result={\"code\":200,\"msg\":\"操作成功\",\"data\":{\"token\":\"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiJhcHBfdXNlcjo2NTAxIiwicm5TdHIiOiI4U2dKZ3hiWVF0VHpjNmhSRzdXV3NYSGMyaGFQYmJ3eCIsInVzZXJJZCI6NjUwMX0.2KrY8jHwHl67A25JtRCmAldnOvSpcU1mtnYlcUFLhy0\",\"userInfo\":{\"userId\":6501,\"inviteId\":4387,\"type\":0,\"usercode\":\"6953\",\"nickname\":\"用户6953\",\"mobile\":\"13588246608\",\"avatar\":\"images/avatar/man.png\",\"avatarState\":0,\"gender\":2,\"birthday\":null,\"age\":18,\"cityId\":0,\"city\":null,\"isAnchor\":0,\"openVideoStatus\":1,\"status\":0,\"finishStatus\":0,\"imToken\":\"716d4d9bbe1b4441b88065b6bc0c543d\",\"userAccount\":{\"userId\":6501,\"coin\":2517,\"incomeCoin\":0},\"userCount\":{\"userId\":6501,\"newFansCount\":266,\"newVisitorCount\":5302,\"fansCount\":36,\"followCount\":24,\"footCount\":6692,\"visitorCount\":5302}}}};;StartTime:2025-12-21 10:30:21,EndTime:2025-12-21 10:30:21,CostTime:148ms");
|
||||||
|
List<LoginLogInfo> collect = list.stream().map(LoginLogInfo::new).collect(Collectors.toList());
|
||||||
|
return R.ok(collect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
public static class LoginLogInfo {
|
||||||
|
private String info;
|
||||||
|
|
||||||
|
public LoginLogInfo(String info) {
|
||||||
|
this.info = info;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -2,11 +2,14 @@ package com.ruoyi.web.controller.cai.admin;
|
|||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.ruoyi.cai.domain.RechargeOrder;
|
import com.ruoyi.cai.domain.RechargeOrder;
|
||||||
import com.ruoyi.cai.domain.User;
|
import com.ruoyi.cai.domain.User;
|
||||||
import com.ruoyi.cai.dto.admin.vo.RechargeOrderAdminVo;
|
import com.ruoyi.cai.dto.admin.vo.RechargeOrderAdminVo;
|
||||||
|
import com.ruoyi.cai.dto.admin.vo.order.RechargeOrderCountAdminVo;
|
||||||
|
import com.ruoyi.cai.mapper.RechargeOrderMapper;
|
||||||
import com.ruoyi.cai.service.PayTrdConfigService;
|
import com.ruoyi.cai.service.PayTrdConfigService;
|
||||||
import com.ruoyi.cai.service.RechargeOrderService;
|
import com.ruoyi.cai.service.RechargeOrderService;
|
||||||
import com.ruoyi.cai.service.UserService;
|
import com.ruoyi.cai.service.UserService;
|
||||||
@@ -17,6 +20,7 @@ import com.ruoyi.common.core.domain.R;
|
|||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.utils.BeanConvertUtil;
|
import com.ruoyi.common.utils.BeanConvertUtil;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@@ -25,6 +29,7 @@ import org.springframework.web.bind.annotation.PathVariable;
|
|||||||
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;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -37,6 +42,7 @@ import javax.validation.constraints.NotNull;
|
|||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/cai/rechargeOrder")
|
@RequestMapping("/cai/rechargeOrder")
|
||||||
|
@Slf4j
|
||||||
public class RechargeOrderController extends BaseController {
|
public class RechargeOrderController extends BaseController {
|
||||||
|
|
||||||
private final RechargeOrderService rechargeOrderService;
|
private final RechargeOrderService rechargeOrderService;
|
||||||
@@ -45,6 +51,19 @@ public class RechargeOrderController extends BaseController {
|
|||||||
private TrdPayManager trdPayManager;
|
private TrdPayManager trdPayManager;
|
||||||
@Autowired
|
@Autowired
|
||||||
private PayTrdConfigService payTrdConfigService;
|
private PayTrdConfigService payTrdConfigService;
|
||||||
|
@Resource
|
||||||
|
private RechargeOrderMapper rechargeOrderMapper;
|
||||||
|
@Autowired
|
||||||
|
private IdentifierGenerator identifierGenerator;
|
||||||
|
/**
|
||||||
|
* 查询充值订单列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:rechargeOrder:list")
|
||||||
|
@GetMapping("/totalPage")
|
||||||
|
public TableDataInfo<RechargeOrderCountAdminVo> totalPage(RechargeOrderCountAdminVo bo, PageQuery pageQuery) {
|
||||||
|
Page<RechargeOrderCountAdminVo> page = rechargeOrderMapper.totalPage(pageQuery.build(),bo);
|
||||||
|
return TableDataInfo.build(page);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询充值订单列表
|
* 查询充值订单列表
|
||||||
@@ -52,6 +71,8 @@ public class RechargeOrderController extends BaseController {
|
|||||||
@SaCheckPermission("cai:rechargeOrder:list")
|
@SaCheckPermission("cai:rechargeOrder:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo<RechargeOrderAdminVo> list(RechargeOrderAdminVo bo, PageQuery pageQuery) {
|
public TableDataInfo<RechargeOrderAdminVo> list(RechargeOrderAdminVo bo, PageQuery pageQuery) {
|
||||||
|
String string = identifierGenerator.nextId(null).toString();
|
||||||
|
log.info("ID============{}",string);
|
||||||
Page<RechargeOrderAdminVo> page = rechargeOrderService.pageAdmin(pageQuery,bo);
|
Page<RechargeOrderAdminVo> page = rechargeOrderService.pageAdmin(pageQuery,bo);
|
||||||
return TableDataInfo.build(page);
|
return TableDataInfo.build(page);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,28 @@ import java.util.Map;
|
|||||||
public class SystemConfigController {
|
public class SystemConfigController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private SystemConfigManager systemConfigManager;
|
private SystemConfigManager systemConfigManager;
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/business/v2/all")
|
||||||
|
@SaCheckPermission("cai:businessConfig:query")
|
||||||
|
public R<List<SystemConfigResponse>> businessBusiness(String businessType){
|
||||||
|
List<SystemConfigResponse> responses = new ArrayList<>();
|
||||||
|
Map<String, String> allSystemConfig = systemConfigManager.getAllSystemConfig();
|
||||||
|
SystemConfigEnum[] values = SystemConfigEnum.values();
|
||||||
|
for (SystemConfigEnum value : values) {
|
||||||
|
if(value.getGroup().name().equalsIgnoreCase(businessType)){
|
||||||
|
SystemConfigResponse sys = new SystemConfigResponse();
|
||||||
|
sys.setKey(value.getKey());
|
||||||
|
sys.setValue(allSystemConfig.getOrDefault(value.getKey(),value.getDefaultValue()));
|
||||||
|
sys.setDesc(value.getDesc());
|
||||||
|
sys.setInputType(value.getInputType());
|
||||||
|
responses.add(sys);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return R.ok(responses);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/business/all")
|
@GetMapping("/business/all")
|
||||||
@SaCheckPermission("cai:businessConfig:query")
|
@SaCheckPermission("cai:businessConfig:query")
|
||||||
public R<List<SystemConfigResponse>> businessAll(){
|
public R<List<SystemConfigResponse>> businessAll(){
|
||||||
@@ -48,7 +70,7 @@ public class SystemConfigController {
|
|||||||
public R<Void> businessUpdate(String key,String value){
|
public R<Void> businessUpdate(String key,String value){
|
||||||
SystemConfigEnum[] values = SystemConfigEnum.values();
|
SystemConfigEnum[] values = SystemConfigEnum.values();
|
||||||
for (SystemConfigEnum config : values) {
|
for (SystemConfigEnum config : values) {
|
||||||
if (config.getGroup() == SystemConfigGroupEnum.BUSINESS && config.getKey().equals(key)) {
|
if (config.getKey().equals(key)) {
|
||||||
SystemCheckResp checkResp = systemConfigManager.setSystemConfig(config, value);
|
SystemCheckResp checkResp = systemConfigManager.setSystemConfig(config, value);
|
||||||
if(checkResp.isSuccess()){
|
if(checkResp.isSuccess()){
|
||||||
return R.ok();
|
return R.ok();
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
package com.ruoyi.web.controller.cai.admin;
|
package com.ruoyi.web.controller.cai.admin;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.ruoyi.cai.dto.admin.vo.unread.UnreadData;
|
import com.ruoyi.cai.dto.admin.vo.unread.UnreadData;
|
||||||
import com.ruoyi.cai.manager.UnreadManager;
|
import com.ruoyi.cai.manager.UnreadManager;
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.system.domain.SysNotice;
|
||||||
|
import com.ruoyi.system.mapper.SysNoticeMapper;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@@ -10,6 +13,8 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|||||||
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;
|
||||||
|
|
||||||
@Validated
|
@Validated
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
@@ -18,6 +23,8 @@ public class UnreadController {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public UnreadManager unreadManager;
|
public UnreadManager unreadManager;
|
||||||
|
@Resource
|
||||||
|
private SysNoticeMapper sysNoticeMapper;
|
||||||
|
|
||||||
@GetMapping("/data")
|
@GetMapping("/data")
|
||||||
public R<UnreadData> list() {
|
public R<UnreadData> list() {
|
||||||
@@ -31,4 +38,19 @@ public class UnreadController {
|
|||||||
boolean checkCount = unreadManager.checkCount();
|
boolean checkCount = unreadManager.checkCount();
|
||||||
return R.ok(checkCount?1:0);
|
return R.ok(checkCount?1:0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/checkNotice")
|
||||||
|
public R<String> checkNotice() {
|
||||||
|
SysNotice sysNotice = sysNoticeMapper.selectOne(Wrappers.lambdaQuery(SysNotice.class)
|
||||||
|
.eq(SysNotice::getStatus, 0)
|
||||||
|
.eq(SysNotice::getNoticeType, 3)
|
||||||
|
.orderByDesc(SysNotice::getNoticeId)
|
||||||
|
.last("limit 1"));
|
||||||
|
if(sysNotice == null){
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
R<String> ok = R.ok();
|
||||||
|
ok.setData("最新告警:"+sysNotice.getNoticeTitle());
|
||||||
|
return ok;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.ruoyi.web.controller.cai.admin.init;
|
package com.ruoyi.web.controller.cai.admin.init;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckRole;
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.ruoyi.cai.pay.PayOrderInfoDTO;
|
import com.ruoyi.cai.pay.PayOrderInfoDTO;
|
||||||
import com.ruoyi.cai.pay.PayReturnResp;
|
import com.ruoyi.cai.pay.PayReturnResp;
|
||||||
@@ -24,12 +25,14 @@ public class CityController {
|
|||||||
private PayTrdConfigService payTrdConfigService;
|
private PayTrdConfigService payTrdConfigService;
|
||||||
|
|
||||||
@GetMapping("/resetRedis")
|
@GetMapping("/resetRedis")
|
||||||
|
@SaCheckRole("admin")
|
||||||
public R<Void> resetRedis(){
|
public R<Void> resetRedis(){
|
||||||
citysService.resetRedis();
|
citysService.resetRedis();
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/resetOrder")
|
@GetMapping("/resetOrder")
|
||||||
|
@SaCheckRole("admin")
|
||||||
public R<JSONObject> resetOrder(String orderNo,String payType,boolean updateData){
|
public R<JSONObject> resetOrder(String orderNo,String payType,boolean updateData){
|
||||||
JSONObject jsonObject = payTrdConfigService.resetOrder(orderNo,payType,updateData);
|
JSONObject jsonObject = payTrdConfigService.resetOrder(orderNo,payType,updateData);
|
||||||
return R.ok(jsonObject);
|
return R.ok(jsonObject);
|
||||||
@@ -37,12 +40,14 @@ public class CityController {
|
|||||||
|
|
||||||
|
|
||||||
@PostMapping("/createOrder")
|
@PostMapping("/createOrder")
|
||||||
|
@SaCheckRole("admin")
|
||||||
public R<Object> createOrder(@RequestBody PayOrderInfoDTO dto){
|
public R<Object> createOrder(@RequestBody PayOrderInfoDTO dto){
|
||||||
PayReturnResp orderAli = payTrdConfigService.createOrderAli(dto,false);
|
PayReturnResp orderAli = payTrdConfigService.createOrderAli(dto,false);
|
||||||
return R.ok(orderAli);
|
return R.ok(orderAli);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/queryOrder")
|
@GetMapping("/queryOrder")
|
||||||
|
@SaCheckRole("admin")
|
||||||
public R<JSONObject> queryOrder(String orderNo,String payType){
|
public R<JSONObject> queryOrder(String orderNo,String payType){
|
||||||
JSONObject jsonObject = payTrdConfigService.queryOrder(orderNo,payType);
|
JSONObject jsonObject = payTrdConfigService.queryOrder(orderNo,payType);
|
||||||
return R.ok(jsonObject);
|
return R.ok(jsonObject);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.ruoyi.web.controller.cai.admin.init;
|
package com.ruoyi.web.controller.cai.admin.init;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckRole;
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.alibaba.fastjson2.JSON;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.ruoyi.cai.domain.User;
|
import com.ruoyi.cai.domain.User;
|
||||||
@@ -33,6 +34,7 @@ public class ImController {
|
|||||||
private UserService userService;
|
private UserService userService;
|
||||||
|
|
||||||
@GetMapping("/register")
|
@GetMapping("/register")
|
||||||
|
@SaCheckRole("admin")
|
||||||
public R<Void> registerIm(Long userId){
|
public R<Void> registerIm(Long userId){
|
||||||
User user = userService.getById(userId);
|
User user = userService.getById(userId);
|
||||||
if(user == null){
|
if(user == null){
|
||||||
@@ -66,6 +68,7 @@ public class ImController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/registerAll")
|
@GetMapping("/registerAll")
|
||||||
|
@SaCheckRole("admin")
|
||||||
public R<Void> registerAllIm(){
|
public R<Void> registerAllIm(){
|
||||||
int current = 0;
|
int current = 0;
|
||||||
int success = 0;
|
int success = 0;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.ruoyi.web.controller.cai.admin.init;
|
package com.ruoyi.web.controller.cai.admin.init;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckRole;
|
||||||
import com.ruoyi.cai.mq.AmqpHttpProducer;
|
import com.ruoyi.cai.mq.AmqpHttpProducer;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -18,6 +19,7 @@ public class MqControllerTest {
|
|||||||
private AmqpHttpProducer amqpHttpProducer;
|
private AmqpHttpProducer amqpHttpProducer;
|
||||||
|
|
||||||
@GetMapping("/send2")
|
@GetMapping("/send2")
|
||||||
|
@SaCheckRole("admin")
|
||||||
public void send(String message){
|
public void send(String message){
|
||||||
amqpHttpProducer.sendCalculateSales(message);
|
amqpHttpProducer.sendCalculateSales(message);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.ruoyi.web.controller.cai.admin.op;
|
package com.ruoyi.web.controller.cai.admin.op;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckRole;
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.common.core.domain.R;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.job.op.BusOp;
|
import com.ruoyi.job.op.BusOp;
|
||||||
@@ -26,6 +27,7 @@ public class BusOpController {
|
|||||||
private BusOp busOp;
|
private BusOp busOp;
|
||||||
|
|
||||||
@GetMapping("/copySysLog")
|
@GetMapping("/copySysLog")
|
||||||
|
@SaCheckRole("admin")
|
||||||
public R<Void> copySysLog(int days){
|
public R<Void> copySysLog(int days){
|
||||||
log.info("备份操作日志-开始");
|
log.info("备份操作日志-开始");
|
||||||
busOp.copySysLog(days);
|
busOp.copySysLog(days);
|
||||||
@@ -34,6 +36,7 @@ public class BusOpController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/deleteUserCall")
|
@GetMapping("/deleteUserCall")
|
||||||
|
@SaCheckRole("admin")
|
||||||
public R<Void> deleteUserCall(){
|
public R<Void> deleteUserCall(){
|
||||||
log.info("清洗垃圾通话记录-开始");
|
log.info("清洗垃圾通话记录-开始");
|
||||||
busOp.deleteUserCall(16);
|
busOp.deleteUserCall(16);
|
||||||
@@ -43,12 +46,14 @@ public class BusOpController {
|
|||||||
|
|
||||||
|
|
||||||
@GetMapping("/refreshUserVipStatus")
|
@GetMapping("/refreshUserVipStatus")
|
||||||
|
@SaCheckRole("admin")
|
||||||
public R<Void> refreshUserVipStatus(){
|
public R<Void> refreshUserVipStatus(){
|
||||||
busOp.refreshUserVipStatus();
|
busOp.refreshUserVipStatus();
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/checkVipOrder")
|
@GetMapping("/checkVipOrder")
|
||||||
|
@SaCheckRole("admin")
|
||||||
public R<Void> checkVipOrder(String orderNo,String startTimeStr,String endTimeStr){
|
public R<Void> checkVipOrder(String orderNo,String startTimeStr,String endTimeStr){
|
||||||
LocalDateTime startTime = null;
|
LocalDateTime startTime = null;
|
||||||
LocalDateTime endTime = null;
|
LocalDateTime endTime = null;
|
||||||
@@ -63,6 +68,7 @@ public class BusOpController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/checkRechargeOrder")
|
@GetMapping("/checkRechargeOrder")
|
||||||
|
@SaCheckRole("admin")
|
||||||
public R<Void> checkRechargeOrder(String orderNo,String startTimeStr,String endTimeStr){
|
public R<Void> checkRechargeOrder(String orderNo,String startTimeStr,String endTimeStr){
|
||||||
LocalDateTime startTime = null;
|
LocalDateTime startTime = null;
|
||||||
LocalDateTime endTime = null;
|
LocalDateTime endTime = null;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.ruoyi.web.controller.cai.admin.op;
|
package com.ruoyi.web.controller.cai.admin.op;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckRole;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.common.core.domain.R;
|
||||||
import com.ruoyi.job.op.ImOp;
|
import com.ruoyi.job.op.ImOp;
|
||||||
@@ -30,6 +31,7 @@ public class ImOpController {
|
|||||||
private ImUserRefClient imUserRefClient;
|
private ImUserRefClient imUserRefClient;
|
||||||
|
|
||||||
@GetMapping("/getImInfo")
|
@GetMapping("/getImInfo")
|
||||||
|
@SaCheckRole("admin")
|
||||||
public R<YxUpdateUinfoR> getImInfo(String id) {
|
public R<YxUpdateUinfoR> getImInfo(String id) {
|
||||||
GetUnifoReq getUnifoReq = new GetUnifoReq();
|
GetUnifoReq getUnifoReq = new GetUnifoReq();
|
||||||
String[] split = id.split(",");
|
String[] split = id.split(",");
|
||||||
@@ -40,24 +42,28 @@ public class ImOpController {
|
|||||||
|
|
||||||
|
|
||||||
@GetMapping("/refreshIm")
|
@GetMapping("/refreshIm")
|
||||||
|
@SaCheckRole("admin")
|
||||||
public R<Void> list() {
|
public R<Void> list() {
|
||||||
imOp.refreshIm();
|
imOp.refreshIm();
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/refreshImUserInfo")
|
@GetMapping("/refreshImUserInfo")
|
||||||
|
@SaCheckRole("admin")
|
||||||
public R<Void> refreshImUserInfo(){
|
public R<Void> refreshImUserInfo(){
|
||||||
imOp.refreshImUserInfo();
|
imOp.refreshImUserInfo();
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/refreshImByUser")
|
@GetMapping("/refreshImByUser")
|
||||||
|
@SaCheckRole("admin")
|
||||||
public R<Void> refreshImByUser(String usercode){
|
public R<Void> refreshImByUser(String usercode){
|
||||||
imOp.refreshImToken(usercode);
|
imOp.refreshImToken(usercode);
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/refreshImNoSaveToken")
|
@GetMapping("/refreshImNoSaveToken")
|
||||||
|
@SaCheckRole("admin")
|
||||||
public R<Void> refreshImNoSaveToken(){
|
public R<Void> refreshImNoSaveToken(){
|
||||||
imOp.refreshImNoSaveToken();
|
imOp.refreshImNoSaveToken();
|
||||||
return R.ok();
|
return R.ok();
|
||||||
|
|||||||
@@ -0,0 +1,46 @@
|
|||||||
|
package com.ruoyi.web.controller.cai.admin.op;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckRole;
|
||||||
|
import com.ruoyi.cai.service.LoginAuthService;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/cai/op/login")
|
||||||
|
@Slf4j
|
||||||
|
public class LoginAuthController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private LoginAuthService loginAuthService;
|
||||||
|
|
||||||
|
@GetMapping("/testLogin")
|
||||||
|
@SaCheckRole("admin")
|
||||||
|
public R<Void> testLogin(String passwords) {
|
||||||
|
if(StringUtils.isEmpty(passwords)){
|
||||||
|
return R.fail("密码不能为空");
|
||||||
|
}
|
||||||
|
List<String> passwordList = Arrays.stream(passwords.split(",")).collect(Collectors.toList());
|
||||||
|
loginAuthService.testLogin(passwordList);
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/testPassword")
|
||||||
|
@SaCheckRole("admin")
|
||||||
|
public R<Boolean> testPassword(String mobile,String password) {
|
||||||
|
boolean b = loginAuthService.checkPassword(mobile, password);
|
||||||
|
return R.ok(b);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.ruoyi.web.controller.cai.admin.op;
|
package com.ruoyi.web.controller.cai.admin.op;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckRole;
|
||||||
import com.ruoyi.cai.kit.ShareUrlKit;
|
import com.ruoyi.cai.kit.ShareUrlKit;
|
||||||
import com.ruoyi.cai.service.RankService;
|
import com.ruoyi.cai.service.RankService;
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.common.core.domain.R;
|
||||||
@@ -29,12 +30,14 @@ public class RefreshOpController {
|
|||||||
private ShareUrlKit shareUrlKit;
|
private ShareUrlKit shareUrlKit;
|
||||||
|
|
||||||
@GetMapping("/cleanShareUrlCacheByUsercode")
|
@GetMapping("/cleanShareUrlCacheByUsercode")
|
||||||
|
@SaCheckRole("admin")
|
||||||
public R<Void> cleanShareUrlCacheByUsercode(String usercode){
|
public R<Void> cleanShareUrlCacheByUsercode(String usercode){
|
||||||
shareUrlKit.cleanShareUrlCacheByUsercode(usercode);
|
shareUrlKit.cleanShareUrlCacheByUsercode(usercode);
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/cleanShareUrlCache")
|
@GetMapping("/cleanShareUrlCache")
|
||||||
|
@SaCheckRole("admin")
|
||||||
public R<Void> cleanShareUrlCache(){
|
public R<Void> cleanShareUrlCache(){
|
||||||
shareUrlKit.cleanShareUrlCache();
|
shareUrlKit.cleanShareUrlCache();
|
||||||
return R.ok();
|
return R.ok();
|
||||||
@@ -42,6 +45,7 @@ public class RefreshOpController {
|
|||||||
|
|
||||||
|
|
||||||
@GetMapping("/day")
|
@GetMapping("/day")
|
||||||
|
@SaCheckRole("admin")
|
||||||
public R<Void> day(String date,Integer type) {
|
public R<Void> day(String date,Integer type) {
|
||||||
LocalDate localDate = LocalDate.parse(date, DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
LocalDate localDate = LocalDate.parse(date, DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
||||||
rankService.saveDayRank(localDate, type);
|
rankService.saveDayRank(localDate, type);
|
||||||
@@ -49,6 +53,7 @@ public class RefreshOpController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/week")
|
@GetMapping("/week")
|
||||||
|
@SaCheckRole("admin")
|
||||||
public R<Void> week(String date,Integer type){
|
public R<Void> week(String date,Integer type){
|
||||||
LocalDate localDate = LocalDate.parse(date, DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
LocalDate localDate = LocalDate.parse(date, DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
||||||
rankService.saveWeekRank(localDate,type);
|
rankService.saveWeekRank(localDate,type);
|
||||||
@@ -56,6 +61,7 @@ public class RefreshOpController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/month")
|
@GetMapping("/month")
|
||||||
|
@SaCheckRole("admin")
|
||||||
public R<Void> month(String date,Integer type){
|
public R<Void> month(String date,Integer type){
|
||||||
LocalDate localDate = LocalDate.parse(date, DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
LocalDate localDate = LocalDate.parse(date, DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
||||||
rankService.saveMonthRank(localDate,type);
|
rankService.saveMonthRank(localDate,type);
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.ruoyi.web.controller.cai.app;
|
|||||||
import cn.dev33.satoken.annotation.SaIgnore;
|
import cn.dev33.satoken.annotation.SaIgnore;
|
||||||
import cn.hutool.core.util.PhoneUtil;
|
import cn.hutool.core.util.PhoneUtil;
|
||||||
import com.ruoyi.cai.auth.*;
|
import com.ruoyi.cai.auth.*;
|
||||||
|
import com.ruoyi.cai.constant.RedisHttpConstant;
|
||||||
import com.ruoyi.cai.dto.app.vo.LoginVo;
|
import com.ruoyi.cai.dto.app.vo.LoginVo;
|
||||||
import com.ruoyi.cai.enums.CodeEnum;
|
import com.ruoyi.cai.enums.CodeEnum;
|
||||||
import com.ruoyi.cai.enums.SystemConfigEnum;
|
import com.ruoyi.cai.enums.SystemConfigEnum;
|
||||||
@@ -10,16 +11,22 @@ import com.ruoyi.cai.kit.VerificationCodeCheck;
|
|||||||
import com.ruoyi.cai.manager.CurrentUserManager;
|
import com.ruoyi.cai.manager.CurrentUserManager;
|
||||||
import com.ruoyi.cai.manager.LoginAfterManager;
|
import com.ruoyi.cai.manager.LoginAfterManager;
|
||||||
import com.ruoyi.cai.manager.SystemConfigManager;
|
import com.ruoyi.cai.manager.SystemConfigManager;
|
||||||
|
import com.ruoyi.cai.service.IpBlackService;
|
||||||
|
import com.ruoyi.cai.service.IpRecordService;
|
||||||
import com.ruoyi.cai.service.SmsVerifyService;
|
import com.ruoyi.cai.service.SmsVerifyService;
|
||||||
import com.ruoyi.cai.service.UserService;
|
import com.ruoyi.cai.service.UserService;
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.common.core.domain.R;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
import com.ruoyi.common.utils.ServletUtils;
|
import com.ruoyi.common.utils.ServletUtils;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.redisson.api.RAtomicLong;
|
||||||
|
import org.redisson.api.RedissonClient;
|
||||||
|
import org.redisson.client.RedisClient;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
@@ -55,7 +62,7 @@ public class AuthAppController {
|
|||||||
@Operation(summary = "注册")
|
@Operation(summary = "注册")
|
||||||
@Log(title = "注册", businessType = BusinessType.OTHER, isSaveDb = true)
|
@Log(title = "注册", businessType = BusinessType.OTHER, isSaveDb = true)
|
||||||
public R<LoginVo> register(@Validated @RequestBody CaiRegisterUser caiUser){
|
public R<LoginVo> register(@Validated @RequestBody CaiRegisterUser caiUser){
|
||||||
boolean openOldRegisterCode = systemConfigManager.getSystemConfigOfBool(SystemConfigEnum.OPEN_OLD_REGISTER_CODE);
|
boolean openOldRegisterCode = systemConfigManager.getSystemConfigOfBool(SystemConfigEnum.OPEN_REGISTER);
|
||||||
if(!openOldRegisterCode){
|
if(!openOldRegisterCode){
|
||||||
return R.fail(600,"未开放注册");
|
return R.fail(600,"未开放注册");
|
||||||
}
|
}
|
||||||
@@ -104,6 +111,7 @@ public class AuthAppController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
@PostMapping("/register/code")
|
@PostMapping("/register/code")
|
||||||
@Operation(summary = "获取注册验证码")
|
@Operation(summary = "获取注册验证码")
|
||||||
@Log(title = "获取注册验证码", businessType = BusinessType.OTHER, isSaveDb = false)
|
@Log(title = "获取注册验证码", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||||
@@ -136,23 +144,109 @@ public class AuthAppController {
|
|||||||
if(!mobile){
|
if(!mobile){
|
||||||
return R.fail(600,"请输入正确的手机格式");
|
return R.fail(600,"请输入正确的手机格式");
|
||||||
}
|
}
|
||||||
smsVerifyService.put(CodeEnum.RESET_PASSWORD,code.getMobile());
|
boolean openOldRegisterCode = systemConfigManager.getSystemConfigOfBool(SystemConfigEnum.OPEN_RESET_PASSWORD);
|
||||||
|
if(!openOldRegisterCode){
|
||||||
|
return R.fail(600,"9000009");
|
||||||
|
}
|
||||||
|
ipBlackService.checkIpThrowException(ServletUtils.getClientIP());
|
||||||
|
if(StringUtils.isBlank(code.getUserIp())){
|
||||||
|
code.setUserIp(ServletUtils.getClientIP());
|
||||||
|
}
|
||||||
|
boolean check = verificationCodeCheck.check(code.getTicket(), code.getUserIp(), code.getRandStr());
|
||||||
|
if(!check){
|
||||||
|
throw new ServiceException("图形验证码错误");
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
smsVerifyService.put(CodeEnum.RESET_PASSWORD,code.getMobile());
|
||||||
|
}catch (Exception e){
|
||||||
|
ipRecordService.saveLoginIp(ServletUtils.getClientIP());
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
return R.ok("发送成功");
|
return R.ok("发送成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private LoginAfterManager loginAfterManager;
|
private LoginAfterManager loginAfterManager;
|
||||||
|
@Autowired
|
||||||
|
private IpRecordService ipRecordService;
|
||||||
|
@Autowired
|
||||||
|
private IpBlackService ipBlackService;
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/loginV2")
|
||||||
|
@Operation(summary = "登陆")
|
||||||
|
@Log(title = "登陆", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||||
|
public R<LoginVo> loginV2(@Validated @RequestBody LoginCaiUser loginBody){
|
||||||
|
LoginVo vo = new LoginVo();
|
||||||
|
ipBlackService.checkIpThrowException(ServletUtils.getClientIP());
|
||||||
|
boolean needVerificationCode = this.checkNeedVerificationCode(loginBody);
|
||||||
|
if(needVerificationCode){
|
||||||
|
vo.setLoginSuccess(false);
|
||||||
|
vo.setNeedVerificationCode(true);
|
||||||
|
return R.ok(vo);
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
String token = caiLoginManager.login(loginBody.getUsername(), loginBody.getPassword());
|
||||||
|
vo.setLoginSuccess(true);
|
||||||
|
vo.setToken(token);
|
||||||
|
vo.setUserInfo(currentUserManager.currentInfo());
|
||||||
|
}catch (Exception e){
|
||||||
|
loginAfterManager.loginAfter(loginBody,false,e.getMessage());
|
||||||
|
ipRecordService.saveLoginIp(ServletUtils.getClientIP());
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
loginAfterManager.loginAfter(loginBody,true,"登录成功");
|
||||||
|
return R.ok(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RedissonClient redissonClient;
|
||||||
|
|
||||||
|
private boolean checkNeedVerificationCode(LoginCaiUser loginBody){
|
||||||
|
if(StringUtils.isNotEmpty(loginBody.getTicket()) || StringUtils.isNotEmpty(loginBody.getRandStr())){
|
||||||
|
if(StringUtils.isBlank(loginBody.getUserIp())){
|
||||||
|
loginBody.setUserIp(ServletUtils.getClientIP());
|
||||||
|
}
|
||||||
|
boolean check = verificationCodeCheck.check(loginBody.getTicket(), loginBody.getUserIp(), loginBody.getRandStr());
|
||||||
|
if(!check){
|
||||||
|
throw new ServiceException("图形验证码错误");
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
Integer loginErrorOpenSecurity = systemConfigManager.getSystemConfigOfInt(SystemConfigEnum.LOGIN_ERROR_OPEN_SECURITY);
|
||||||
|
if(loginErrorOpenSecurity <= 0){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
String key = String.format(RedisHttpConstant.CHECK_LOGIN_NUM, loginBody.getUsername());
|
||||||
|
RAtomicLong atomicLong = redissonClient.getAtomicLong(key);
|
||||||
|
if(atomicLong.get() >= loginErrorOpenSecurity){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/login")
|
@PostMapping("/login")
|
||||||
@Operation(summary = "登陆")
|
@Operation(summary = "登陆")
|
||||||
@Log(title = "登陆", businessType = BusinessType.OTHER, isSaveDb = false)
|
@Log(title = "登陆", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||||
public R<LoginVo> login(@Validated @RequestBody LoginCaiUser loginBody){
|
public R<LoginVo> login(@Validated @RequestBody LoginCaiUser loginBody){
|
||||||
|
boolean openOldLoginApi = systemConfigManager.getSystemConfigOfBool(SystemConfigEnum.OPEN_OLD_LOGIN_API);
|
||||||
|
if(!openOldLoginApi){
|
||||||
|
return R.fail("404");
|
||||||
|
}
|
||||||
LoginVo vo = new LoginVo();
|
LoginVo vo = new LoginVo();
|
||||||
String token = caiLoginManager.login(loginBody.getUsername(), loginBody.getPassword());
|
ipBlackService.checkIpThrowException(ServletUtils.getClientIP());
|
||||||
vo.setToken(token);
|
try {
|
||||||
vo.setUserInfo(currentUserManager.currentInfo());
|
String token = caiLoginManager.login(loginBody.getUsername(), loginBody.getPassword());
|
||||||
// 异步调用通知
|
vo.setToken(token);
|
||||||
// loginAfterManager.loginAfter(LoginHelper.getUserId());
|
vo.setUserInfo(currentUserManager.currentInfo());
|
||||||
|
}catch (Exception e){
|
||||||
|
loginAfterManager.loginAfter(loginBody,false,e.getMessage());
|
||||||
|
ipRecordService.saveLoginIp(ServletUtils.getClientIP());
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
loginAfterManager.loginAfter(loginBody,true,"登录成功");
|
||||||
return R.ok(vo);
|
return R.ok(vo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,91 @@
|
|||||||
|
package com.ruoyi.web.controller.cai.app;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.ruoyi.cai.domain.PrizeOnline;
|
||||||
|
import com.ruoyi.cai.domain.PrizeWinningRecord;
|
||||||
|
import com.ruoyi.cai.dto.app.draw.resp.*;
|
||||||
|
import com.ruoyi.cai.lottery.DrawService;
|
||||||
|
import com.ruoyi.cai.lottery.LotteryService;
|
||||||
|
import com.ruoyi.cai.service.PrizeOnlineService;
|
||||||
|
import com.ruoyi.cai.service.PrizeWinningRecordService;
|
||||||
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.common.helper.LoginHelper;
|
||||||
|
import com.ruoyi.common.utils.BeanConvertUtil;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/draw")
|
||||||
|
@Tag(name = "抽奖相关接口")
|
||||||
|
public class DrawController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DrawService drawService;
|
||||||
|
@Autowired
|
||||||
|
private PrizeOnlineService prizeOnlineService;
|
||||||
|
@Autowired
|
||||||
|
private PrizeWinningRecordService prizeWinningRecordService;
|
||||||
|
@Autowired
|
||||||
|
private LotteryService lotteryService;
|
||||||
|
|
||||||
|
@GetMapping("/baseConfig")
|
||||||
|
@Operation(summary = "获取抽奖相关的基础信息")
|
||||||
|
public R<DrawBaseConfigResp> baseConfig(){
|
||||||
|
DrawBaseConfigResp resp = drawService.baseConfig();
|
||||||
|
return R.ok(resp);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/points/logs")
|
||||||
|
@Operation(summary = "获取积分记录")
|
||||||
|
public R<List<PointLogsResp>> pointsLogs(PageQuery page){
|
||||||
|
List<PointLogsResp> resp = drawService.pointsLogs(page);
|
||||||
|
return R.ok(resp);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/prize/up")
|
||||||
|
@Operation(summary = "获取奖品列表")
|
||||||
|
public R<List<PrizeOnlineResp>> prizeUp(){
|
||||||
|
List<PrizeOnline> prizeOnlines = prizeOnlineService.prizeUp();
|
||||||
|
List<PrizeOnlineResp> resp = BeanConvertUtil.convertListTo(prizeOnlines, PrizeOnlineResp::new);
|
||||||
|
return R.ok(resp);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/winning/record")
|
||||||
|
@Operation(summary = "获取自己的中奖记录")
|
||||||
|
public R<List<UserWinningRecordResp>> winningRecord(PageQuery page){
|
||||||
|
Page<PrizeWinningRecord> page1 = prizeWinningRecordService.page(page.build(), Wrappers.lambdaQuery(PrizeWinningRecord.class)
|
||||||
|
.eq(PrizeWinningRecord::getUserId, LoginHelper.getUserId())
|
||||||
|
.orderByDesc(PrizeWinningRecord::getCreateTime)
|
||||||
|
);
|
||||||
|
List<UserWinningRecordResp> resps = BeanConvertUtil.convertListTo(page1.getRecords(), UserWinningRecordResp::new);
|
||||||
|
return R.ok(resps);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/winning/center")
|
||||||
|
@Operation(summary = "全局中奖记录")
|
||||||
|
public R<List<CenterWinningRecordResp>> winningCenter(){
|
||||||
|
List<PrizeWinningRecord> list = prizeWinningRecordService.list(Wrappers.lambdaQuery(PrizeWinningRecord.class)
|
||||||
|
.orderByDesc(PrizeWinningRecord::getCreateTime));
|
||||||
|
List<CenterWinningRecordResp> resps = BeanConvertUtil.convertListTo(list, CenterWinningRecordResp::new);
|
||||||
|
resps.forEach(i -> i.setUserName("****"));
|
||||||
|
return R.ok(resps);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/lottery")
|
||||||
|
@Operation(summary = "抽奖接口")
|
||||||
|
public R<PrizeOnlineResp> lottery(){
|
||||||
|
PrizeOnline draw = lotteryService.draw(LoginHelper.getUserId());
|
||||||
|
PrizeOnlineResp resp = BeanConvertUtil.convertTo(draw, PrizeOnlineResp::new);
|
||||||
|
return R.ok(resp);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,22 +1,26 @@
|
|||||||
package com.ruoyi.web.controller.cai.app;
|
package com.ruoyi.web.controller.cai.app;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaIgnore;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.ruoyi.cai.dto.FileResp;
|
import com.ruoyi.cai.dto.FileResp;
|
||||||
|
import com.ruoyi.cai.dto.app.UploadFileResp;
|
||||||
|
import com.ruoyi.cai.enums.SystemConfigEnum;
|
||||||
|
import com.ruoyi.cai.manager.SystemConfigManager;
|
||||||
|
import com.ruoyi.cai.util.OfflineTokenManager;
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.common.core.domain.R;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.helper.LoginHelper;
|
||||||
import com.ruoyi.system.domain.vo.SysOssVo;
|
import com.ruoyi.system.domain.vo.SysOssVo;
|
||||||
import com.ruoyi.system.service.ISysOssService;
|
import com.ruoyi.system.service.ISysOssService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jdk.nashorn.internal.ir.annotations.Ignore;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestPart;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@@ -27,6 +31,8 @@ public class FileController {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysOssService iSysOssService;
|
private ISysOssService iSysOssService;
|
||||||
|
@Autowired
|
||||||
|
private SystemConfigManager systemConfigManager;
|
||||||
|
|
||||||
@Log(title = "OSS对象存储", businessType = BusinessType.INSERT)
|
@Log(title = "OSS对象存储", businessType = BusinessType.INSERT)
|
||||||
@PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
@PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||||
@@ -49,6 +55,43 @@ public class FileController {
|
|||||||
return R.ok(resp);
|
return R.ok(resp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/uploadFileSign")
|
||||||
|
public R<UploadFileResp> uploadFileSign() throws Exception {
|
||||||
|
String uploadFileDomain = systemConfigManager.getSystemConfig(SystemConfigEnum.UPLOAD_FILE_DOMAIN);
|
||||||
|
String s = OfflineTokenManager.generateToken(LoginHelper.getUserId() + "");
|
||||||
|
UploadFileResp resp = new UploadFileResp();
|
||||||
|
resp.setDomain(uploadFileDomain);
|
||||||
|
resp.setToken(s);
|
||||||
|
resp.setHttpUrl(uploadFileDomain+"/api/file/uploadImageV2");
|
||||||
|
return R.ok(resp);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Log(title = "OSS对象存储", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping(value = "/uploadImageV2", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||||
|
@Operation(summary = "上传图片类型的文件",
|
||||||
|
parameters = {
|
||||||
|
@Parameter(name = "file", description = "文件", required = true),
|
||||||
|
@Parameter(name = "type", description = "业务类型,dynamic=动态图片,user=用户相册,头像,im=聊天,common=其他", required = false)
|
||||||
|
})
|
||||||
|
@SaIgnore
|
||||||
|
public R<FileResp> uploadImageV1(@RequestPart("file") MultipartFile file,
|
||||||
|
String type, String token) {
|
||||||
|
boolean success = OfflineTokenManager.validateToken(token);
|
||||||
|
if(!success){
|
||||||
|
return R.fail("上传失败,token校验失败");
|
||||||
|
}
|
||||||
|
log.error("上传文件图片类型 type={}",type);
|
||||||
|
if (ObjectUtil.isNull(file)) {
|
||||||
|
return R.fail("上传文件不能为空");
|
||||||
|
}
|
||||||
|
SysOssVo oss = iSysOssService.upload(file,"tokenKey");
|
||||||
|
FileResp resp = new FileResp();
|
||||||
|
resp.setUrl(oss.getUrl());
|
||||||
|
resp.setPath(oss.getFileName());
|
||||||
|
resp.setOriginalName(oss.getOriginalName());
|
||||||
|
return R.ok(resp);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Log(title = "OSS对象存储", businessType = BusinessType.INSERT)
|
@Log(title = "OSS对象存储", businessType = BusinessType.INSERT)
|
||||||
@PostMapping(value = "/uploadImage", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
@PostMapping(value = "/uploadImage", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import com.ruoyi.cai.dto.app.vo.user.UserInfoVo;
|
|||||||
import com.ruoyi.cai.dto.app.vo.user.UserListVo;
|
import com.ruoyi.cai.dto.app.vo.user.UserListVo;
|
||||||
import com.ruoyi.cai.dto.app.vo.user.UserMinInfoVo;
|
import com.ruoyi.cai.dto.app.vo.user.UserMinInfoVo;
|
||||||
import com.ruoyi.cai.enums.SystemConfigEnum;
|
import com.ruoyi.cai.enums.SystemConfigEnum;
|
||||||
|
import com.ruoyi.cai.enums.home.AnchorListQueryTypeEnum;
|
||||||
import com.ruoyi.cai.manager.HomeManager;
|
import com.ruoyi.cai.manager.HomeManager;
|
||||||
import com.ruoyi.cai.manager.SystemConfigManager;
|
import com.ruoyi.cai.manager.SystemConfigManager;
|
||||||
import com.ruoyi.cai.service.*;
|
import com.ruoyi.cai.service.*;
|
||||||
@@ -53,6 +54,8 @@ public class IndexController {
|
|||||||
private HomeManager homeManager;
|
private HomeManager homeManager;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SystemConfigManager systemConfigManager;
|
private SystemConfigManager systemConfigManager;
|
||||||
|
@Autowired
|
||||||
|
private LoveRankTodayService loveRankTodayService;
|
||||||
|
|
||||||
@GetMapping("/config")
|
@GetMapping("/config")
|
||||||
@Operation(summary = "获取APP系统核心参数")
|
@Operation(summary = "获取APP系统核心参数")
|
||||||
@@ -61,6 +64,7 @@ public class IndexController {
|
|||||||
public R<AppHomeConfig> config(){
|
public R<AppHomeConfig> config(){
|
||||||
AppHomeConfig appHomeConfig = homeManager.config();
|
AppHomeConfig appHomeConfig = homeManager.config();
|
||||||
appHomeConfig.setHomeDialogText(systemConfigManager.getSystemConfig(SystemConfigEnum.HOME_DIALOG_TEXT));
|
appHomeConfig.setHomeDialogText(systemConfigManager.getSystemConfig(SystemConfigEnum.HOME_DIALOG_TEXT));
|
||||||
|
appHomeConfig.setTdKf(systemConfigManager.getSystemConfig(SystemConfigEnum.TD_KF));
|
||||||
return R.ok(appHomeConfig);
|
return R.ok(appHomeConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,7 +106,17 @@ public class IndexController {
|
|||||||
@Operation(summary = "首页查询主播接口-分页")
|
@Operation(summary = "首页查询主播接口-分页")
|
||||||
@Log(title = "首页查询主播接口V2", businessType = BusinessType.OTHER,isPrintResponseData = false, isSaveDb = false)
|
@Log(title = "首页查询主播接口V2", businessType = BusinessType.OTHER,isPrintResponseData = false, isSaveDb = false)
|
||||||
public R<List<AnchorListVo>> anchorPageV2(PageQuery page, AnchorListQuery query){
|
public R<List<AnchorListVo>> anchorPageV2(PageQuery page, AnchorListQuery query){
|
||||||
List<AnchorListVo> home = homeManager.getHomeV2(page, query);
|
List<AnchorListVo> home;
|
||||||
|
if(AnchorListQueryTypeEnum.LOVE.getCode().equals(query.getType())){
|
||||||
|
home = loveRankTodayService.homePage(page, query);
|
||||||
|
}else{
|
||||||
|
home = homeManager.getHomeV2(page, query);
|
||||||
|
}
|
||||||
|
home.forEach(i -> {
|
||||||
|
if(i.getServiceTime() != null){
|
||||||
|
i.setServiceTime(i.getServiceTime()/60);
|
||||||
|
}
|
||||||
|
});
|
||||||
return R.ok(home);
|
return R.ok(home);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,34 +14,47 @@ import com.ijpay.core.kit.HttpKit;
|
|||||||
import com.ijpay.core.kit.WxPayKit;
|
import com.ijpay.core.kit.WxPayKit;
|
||||||
import com.ijpay.wxpay.WxPayApi;
|
import com.ijpay.wxpay.WxPayApi;
|
||||||
import com.ijpay.wxpay.model.UnifiedOrderModel;
|
import com.ijpay.wxpay.model.UnifiedOrderModel;
|
||||||
import com.ruoyi.cai.domain.OrderLogs;
|
|
||||||
import com.ruoyi.cai.domain.PayConfig;
|
import com.ruoyi.cai.domain.PayConfig;
|
||||||
import com.ruoyi.cai.domain.PayTrdConfig;
|
import com.ruoyi.cai.domain.PayTrdConfig;
|
||||||
import com.ruoyi.cai.dto.app.vo.pay.OrderPayStatusResp;
|
import com.ruoyi.cai.dto.app.vo.pay.OrderPayStatusResp;
|
||||||
import com.ruoyi.cai.enums.SystemConfigEnum;
|
import com.ruoyi.cai.enums.SystemConfigEnum;
|
||||||
|
import com.ruoyi.cai.manager.DangerManger;
|
||||||
import com.ruoyi.cai.manager.SystemConfigManager;
|
import com.ruoyi.cai.manager.SystemConfigManager;
|
||||||
import com.ruoyi.cai.pay.*;
|
import com.ruoyi.cai.pay.*;
|
||||||
import com.ruoyi.cai.service.OrderLogsService;
|
import com.ruoyi.cai.service.OrderLogsService;
|
||||||
import com.ruoyi.cai.service.PayTrdConfigService;
|
import com.ruoyi.cai.service.PayTrdConfigService;
|
||||||
import com.ruoyi.cai.trdpay.TrdPayManager;
|
import com.ruoyi.cai.trdpay.TrdPayManager;
|
||||||
import com.ruoyi.cai.trdpay.TrdPayProperties;
|
|
||||||
import com.ruoyi.cai.trdpay.TrdPayTypeEnum;
|
import com.ruoyi.cai.trdpay.TrdPayTypeEnum;
|
||||||
|
import com.ruoyi.cai.trdpay.V14Manager;
|
||||||
import com.ruoyi.cai.trdpay.dto.NotifyResp;
|
import com.ruoyi.cai.trdpay.dto.NotifyResp;
|
||||||
|
import com.ruoyi.cai.trdpay.dto.extend.V14ExtendMapDTO;
|
||||||
|
import com.ruoyi.cai.trdpay.dto.v14.V14Token;
|
||||||
|
import com.ruoyi.cai.trdpay.dto.v14.wechatJSAPI.WechatJSAPIResponse;
|
||||||
|
import com.ruoyi.cai.trdpay.handle.v12new.utils.JacksonUtil;
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.common.core.domain.R;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.helper.LoginHelper;
|
import com.ruoyi.common.helper.LoginHelper;
|
||||||
import com.ruoyi.common.utils.ServletUtils;
|
import com.ruoyi.common.utils.ServletUtils;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.sun.org.apache.bcel.internal.generic.RETURN;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.http.HttpEntity;
|
||||||
|
import org.apache.http.client.config.RequestConfig;
|
||||||
|
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||||
|
import org.apache.http.client.methods.HttpGet;
|
||||||
|
import org.apache.http.impl.client.CloseableHttpClient;
|
||||||
|
import org.apache.http.impl.client.HttpClientBuilder;
|
||||||
|
import org.apache.http.util.EntityUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.PrintWriter;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -91,7 +104,7 @@ public class PayController {
|
|||||||
@Operation(summary = "微信聚合支付")
|
@Operation(summary = "微信聚合支付")
|
||||||
@Log(title = "微信聚合支付", businessType = BusinessType.OTHER, isSaveDb = true)
|
@Log(title = "微信聚合支付", businessType = BusinessType.OTHER, isSaveDb = true)
|
||||||
public R<PayReturnResp> trdWxPay(@RequestBody PayControllerDTO dto){
|
public R<PayReturnResp> trdWxPay(@RequestBody PayControllerDTO dto){
|
||||||
PayOrderInfoDTO payOrderInfo = payManager.getOrderInfo(dto.getOrderNo());
|
PayOrderInfoDTO payOrderInfo = payManager.getOrderInfo(dto.getOrderNo(),true);
|
||||||
if(payOrderInfo == null){
|
if(payOrderInfo == null){
|
||||||
return R.fail(600,"支付失败,未找到订单");
|
return R.fail(600,"支付失败,未找到订单");
|
||||||
}
|
}
|
||||||
@@ -110,7 +123,7 @@ public class PayController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(checkOpen){
|
if(checkOpen){
|
||||||
boolean openAliPay = systemConfigManager.getSystemConfigOfBool(SystemConfigEnum.OPEN_WX_PAY);
|
boolean openAliPay = trdPayManager.checkOpenWx();
|
||||||
if(!openAliPay){
|
if(!openAliPay){
|
||||||
orderLogsService.createBaseFail(dto.getOrderNo(),"四方微信支付","第四方微信未开启");
|
orderLogsService.createBaseFail(dto.getOrderNo(),"四方微信支付","第四方微信未开启");
|
||||||
return R.fail(600,"微信支付失败!未开启微信通道!");
|
return R.fail(600,"微信支付失败!未开启微信通道!");
|
||||||
@@ -122,15 +135,100 @@ public class PayController {
|
|||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
orderLogsService.createBaseFail(dto.getOrderNo(),"四方支付宝支付",StringUtils.cat(e.getMessage(),2000));
|
orderLogsService.createBaseFail(dto.getOrderNo(),"四方支付宝支付",StringUtils.cat(e.getMessage(),2000));
|
||||||
log.error("微信聚合支付 使用第三方支付失败! dto={}",JSON.toJSONString(dto), e);
|
log.error("微信聚合支付 使用第三方支付失败! dto={}",JSON.toJSONString(dto), e);
|
||||||
return R.fail(600,"支付宝支付失败!");
|
return R.fail(600,"微信支付失败!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private V14Manager v14Manager;
|
||||||
|
|
||||||
|
@PostMapping(value = "/efps/wx")
|
||||||
|
@Operation(summary = "微信支付efps")
|
||||||
|
@Log(title = "微信支付efps", businessType = BusinessType.OTHER, isSaveDb = true)
|
||||||
|
@SaIgnore
|
||||||
|
public V14R<WechatJSAPIResponse> efpsWx(HttpServletRequest request, @RequestBody V14PayDTO payDTO){
|
||||||
|
String efpsToken = request.getHeader("Efps-Token");
|
||||||
|
if(StringUtils.isBlank(efpsToken)){
|
||||||
|
return V14R.fail14(600,"支付失败,鉴权失败或者未找到订单");
|
||||||
|
}
|
||||||
|
V14Token v14Token = v14Manager.checkToken(efpsToken);
|
||||||
|
if(v14Token == null){
|
||||||
|
return V14R.fail14(600,"支付失败,鉴权失败或者未找到订单");
|
||||||
|
}
|
||||||
|
PayTrdConfig payTrdConfig = payTrdConfigService.getById(v14Token.getPayTrdConfigId());
|
||||||
|
if(payTrdConfig == null){
|
||||||
|
return V14R.fail14(600,"支付失败,未找到支付通道信息");
|
||||||
|
}
|
||||||
|
PayOrderInfoDTO payOrderInfo = payManager.getOrderInfo(v14Token.getOrderNo(),true);
|
||||||
|
if(payOrderInfo == null){
|
||||||
|
return V14R.fail14(600,"支付失败,未找到订单");
|
||||||
|
}
|
||||||
|
log.info("收到微信支付/efps/wx, token={},orderNo={},body={}",efpsToken,payOrderInfo.getOrderNo(), JacksonUtil.objToJson(payDTO));
|
||||||
|
try {
|
||||||
|
long startTime = System.currentTimeMillis();
|
||||||
|
V14ExtendMapDTO extendMap = JSON.parseObject(payTrdConfig.getExtendData(), V14ExtendMapDTO.class);
|
||||||
|
String openId = getOpenIdByCode(payDTO.getWx_code(), extendMap.getMinAppId(), extendMap.getMinSecret());
|
||||||
|
payOrderInfo.setOpenId(openId);
|
||||||
|
long endTime = System.currentTimeMillis();
|
||||||
|
log.info("获取openId耗时:{}ms",endTime-startTime);
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.error("获取openid失败",e);
|
||||||
|
return V14R.fail14(600,"微信登录失败");
|
||||||
|
}
|
||||||
|
long startTime = System.currentTimeMillis();
|
||||||
|
WechatJSAPIResponse pay = v14Manager.pay(payOrderInfo, payTrdConfig);
|
||||||
|
long endTime = System.currentTimeMillis();
|
||||||
|
log.info("处理v14请求耗时:{}ms",endTime-startTime);
|
||||||
|
V14R<WechatJSAPIResponse> result = V14R.ok14(pay);
|
||||||
|
result.setWxJsapiParam(pay.getWxJsapiParam());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getOpenIdByCode(String code,String appId,String secret) throws IOException {
|
||||||
|
String url = "https://api.weixin.qq.com/sns/jscode2session";
|
||||||
|
url += "?appid="+appId;//自己的appid
|
||||||
|
url += "&secret="+secret;//自己的appSecret
|
||||||
|
url += "&js_code=" + code;
|
||||||
|
url += "&grant_type=authorization_code";
|
||||||
|
url += "&connect_redirect=1";
|
||||||
|
String res = null;
|
||||||
|
CloseableHttpClient httpClient = HttpClientBuilder.create().build();
|
||||||
|
// DefaultHttpClient();
|
||||||
|
HttpGet httpget = new HttpGet(url); //GET方式
|
||||||
|
CloseableHttpResponse response = null;
|
||||||
|
// 配置信息
|
||||||
|
RequestConfig requestConfig = RequestConfig.custom() // 设置连接超时时间(单位毫秒)
|
||||||
|
.setConnectTimeout(5000) // 设置请求超时时间(单位毫秒)
|
||||||
|
.setConnectionRequestTimeout(5000) // socket读写超时时间(单位毫秒)
|
||||||
|
.setSocketTimeout(5000) // 设置是否允许重定向(默认为true)
|
||||||
|
.setRedirectsEnabled(false).build(); // 将上面的配置信息 运用到这个Get请求里
|
||||||
|
httpget.setConfig(requestConfig); // 由客户端执行(发送)Get请求
|
||||||
|
response = httpClient.execute(httpget); // 从响应模型中获取响应实体
|
||||||
|
HttpEntity responseEntity = response.getEntity();
|
||||||
|
log.info("获取openId 响应状态为: {}", response.getStatusLine());
|
||||||
|
if (responseEntity != null) {
|
||||||
|
res = EntityUtils.toString(responseEntity);
|
||||||
|
log.info("获取openId url:{}, res:{}", url,res);
|
||||||
|
}
|
||||||
|
// 释放资源
|
||||||
|
if (httpClient != null) {
|
||||||
|
httpClient.close();
|
||||||
|
}
|
||||||
|
if (response != null) {
|
||||||
|
response.close();
|
||||||
|
}
|
||||||
|
JSONObject jo = JSON.parseObject(res);
|
||||||
|
return jo.getString("openid");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping(value = "/merge/ali")
|
@PostMapping(value = "/merge/ali")
|
||||||
@Operation(summary = "支付宝聚合支付")
|
@Operation(summary = "支付宝聚合支付")
|
||||||
@Log(title = "支付宝聚合支付", businessType = BusinessType.OTHER, isSaveDb = true)
|
@Log(title = "支付宝聚合支付", businessType = BusinessType.OTHER, isSaveDb = true)
|
||||||
public R<PayReturnResp> trdAliPay(@RequestBody PayControllerDTO dto){
|
public R<PayReturnResp> trdAliPay(@RequestBody PayControllerDTO dto){
|
||||||
PayOrderInfoDTO payOrderInfo = payManager.getOrderInfo(dto.getOrderNo());
|
PayOrderInfoDTO payOrderInfo = payManager.getOrderInfo(dto.getOrderNo(),false);
|
||||||
if(payOrderInfo == null){
|
if(payOrderInfo == null){
|
||||||
return R.fail(600,"支付失败,未找到订单");
|
return R.fail(600,"支付失败,未找到订单");
|
||||||
}
|
}
|
||||||
@@ -185,11 +283,11 @@ public class PayController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@PostMapping(value = "/wx")
|
/*@PostMapping(value = "/wx")
|
||||||
@Operation(summary = "微信支付")
|
@Operation(summary = "微信支付")
|
||||||
@Log(title = "微信支付", businessType = BusinessType.OTHER, isSaveDb = true)
|
@Log(title = "微信支付", businessType = BusinessType.OTHER, isSaveDb = true)
|
||||||
public R<PayReturnResp> appPay(@RequestBody PayControllerDTO dto) {
|
public R<PayReturnResp> appPay(@RequestBody PayControllerDTO dto) {
|
||||||
PayOrderInfoDTO payOrderInfo = payManager.getOrderInfo(dto.getOrderNo());
|
PayOrderInfoDTO payOrderInfo = payManager.getOrderInfo(dto.getOrderNo(),true);
|
||||||
if(payOrderInfo == null){
|
if(payOrderInfo == null){
|
||||||
return R.fail(600,"支付失败,未找到订单");
|
return R.fail(600,"支付失败,未找到订单");
|
||||||
}
|
}
|
||||||
@@ -246,38 +344,38 @@ public class PayController {
|
|||||||
resp.setData(jsonStr);
|
resp.setData(jsonStr);
|
||||||
orderLogsService.createBaseSuccess(dto.getOrderNo(),"微信支付");
|
orderLogsService.createBaseSuccess(dto.getOrderNo(),"微信支付");
|
||||||
return R.ok(resp);
|
return R.ok(resp);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
// @PostMapping(value = "/ali")
|
// @PostMapping(value = "/ali")
|
||||||
// @Operation(summary = "支付宝支付")
|
// @Operation(summary = "支付宝支付")
|
||||||
// @Log(title = "支付宝支付", businessType = BusinessType.OTHER, isSaveDb = true)
|
// @Log(title = "支付宝支付", businessType = BusinessType.OTHER, isSaveDb = true)
|
||||||
public R<PayReturnResp> aliPay(@RequestBody PayControllerDTO dto) {
|
// public R<PayReturnResp> aliPay(@RequestBody PayControllerDTO dto) {
|
||||||
PayOrderInfoDTO payOrderInfo = payManager.getOrderInfo(dto.getOrderNo());
|
// PayOrderInfoDTO payOrderInfo = payManager.getOrderInfo(dto.getOrderNo());
|
||||||
if(payOrderInfo == null){
|
// if(payOrderInfo == null){
|
||||||
return R.fail(600,"支付失败,未找到订单");
|
// return R.fail(600,"支付失败,未找到订单");
|
||||||
}
|
// }
|
||||||
try {
|
// try {
|
||||||
boolean b = payConfigManager.initAliPay();
|
// boolean b = payConfigManager.initAliPay();
|
||||||
if(!b){
|
// if(!b){
|
||||||
log.error("支付失败,未找到可用的支付宝配置");
|
// log.error("支付失败,未找到可用的支付宝配置");
|
||||||
return R.fail(600,"支付失败!未开通支付宝支付!");
|
// return R.fail(600,"支付失败!未开通支付宝支付!");
|
||||||
}
|
// }
|
||||||
AlipayTradeAppPayModel model = new AlipayTradeAppPayModel();
|
// AlipayTradeAppPayModel model = new AlipayTradeAppPayModel();
|
||||||
model.setBody(payOrderInfo.getBody());
|
// model.setBody(payOrderInfo.getBody());
|
||||||
model.setSubject(payOrderInfo.getSubject());
|
// model.setSubject(payOrderInfo.getSubject());
|
||||||
model.setOutTradeNo(payOrderInfo.getOrderNo());
|
// model.setOutTradeNo(payOrderInfo.getOrderNo());
|
||||||
model.setTimeoutExpress("30m");
|
// model.setTimeoutExpress("30m");
|
||||||
model.setTotalAmount(payOrderInfo.getPrice().toString());
|
// model.setTotalAmount(payOrderInfo.getPrice().toString());
|
||||||
String notifyUrl = AliPayApiConfigKit.getAliPayApiConfig().getDomain();
|
// String notifyUrl = AliPayApiConfigKit.getAliPayApiConfig().getDomain();
|
||||||
String orderInfo = AliPayApi.appPayToResponse(model, notifyUrl+NOTIFY_ALI_URL).getBody();
|
// String orderInfo = AliPayApi.appPayToResponse(model, notifyUrl+NOTIFY_ALI_URL).getBody();
|
||||||
PayReturnResp resp = new PayReturnResp();
|
// PayReturnResp resp = new PayReturnResp();
|
||||||
resp.setData(orderInfo);
|
// resp.setData(orderInfo);
|
||||||
return R.ok(resp);
|
// return R.ok(resp);
|
||||||
} catch (AlipayApiException e) {
|
// } catch (AlipayApiException e) {
|
||||||
log.error("支付宝支付失败",e);
|
// log.error("支付宝支付失败",e);
|
||||||
return R.fail("支付宝支付失败,请联系客服");
|
// return R.fail("支付宝支付失败,请联系客服");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
@PostMapping(value = "/wx/notify")
|
@PostMapping(value = "/wx/notify")
|
||||||
@Operation(hidden = true)
|
@Operation(hidden = true)
|
||||||
@@ -344,11 +442,14 @@ public class PayController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DangerManger dangerManger;
|
||||||
|
|
||||||
@RequestMapping(value = "/trd/notify/wx/{type}", method = {RequestMethod.POST, RequestMethod.GET})
|
@RequestMapping(value = "/trd/notify/wx/{type}", method = {RequestMethod.POST, RequestMethod.GET})
|
||||||
@Operation(hidden = true)
|
@Operation(hidden = true)
|
||||||
@Log(title = "第三方微信支付回调", businessType = BusinessType.OTHER, isSaveDb = false)
|
@Log(title = "第三方微信支付回调", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
public String trdWxNotifyUrl(HttpServletRequest request,@PathVariable("type") String type) {
|
public String trdWxNotifyUrl(HttpServletRequest request, HttpServletResponse response, @PathVariable("type") String type) {
|
||||||
try {
|
try {
|
||||||
if(type == null){
|
if(type == null){
|
||||||
log.error("收到第三方微信支付回调,支付类型为空");
|
log.error("收到第三方微信支付回调,支付类型为空");
|
||||||
@@ -359,6 +460,23 @@ public class PayController {
|
|||||||
log.error("收到第三方微信支付回调,未找到支付类型 type={}",type);
|
log.error("收到第三方微信支付回调,未找到支付类型 type={}",type);
|
||||||
return "failure";
|
return "failure";
|
||||||
}
|
}
|
||||||
|
if(trdPayTypeEnum == TrdPayTypeEnum.V14){
|
||||||
|
try {
|
||||||
|
JSONObject jsonObject = v14Manager.notifyDeal(request);
|
||||||
|
dangerManger.notifyPay(TrdPayTypeEnum.V14);
|
||||||
|
PrintWriter writer = response.getWriter();
|
||||||
|
writer.print(jsonObject.toJSONString());
|
||||||
|
writer.close();
|
||||||
|
}catch (Exception e){
|
||||||
|
log.error("v14微信支付回调异常!",e);
|
||||||
|
JSONObject jsonObject = new JSONObject();
|
||||||
|
jsonObject.put("returnCode", "0001");
|
||||||
|
PrintWriter writer = response.getWriter();
|
||||||
|
writer.print(jsonObject.toJSONString());
|
||||||
|
writer.close();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
Map<String, String> params = AliPayApi.toMap(request);
|
Map<String, String> params = AliPayApi.toMap(request);
|
||||||
log.info("收到第三方微信支付回调 {}:{}",trdPayTypeEnum.name(), JSON.toJSONString(params));
|
log.info("收到第三方微信支付回调 {}:{}",trdPayTypeEnum.name(), JSON.toJSONString(params));
|
||||||
NotifyResp notifyResp = trdPayManager.getNotifyResp(params, trdPayTypeEnum);
|
NotifyResp notifyResp = trdPayManager.getNotifyResp(params, trdPayTypeEnum);
|
||||||
|
|||||||
@@ -5,11 +5,13 @@ import com.ruoyi.cai.dto.app.RankIdReq;
|
|||||||
import com.ruoyi.cai.dto.app.vo.anchor.AnchorStatusDTO;
|
import com.ruoyi.cai.dto.app.vo.anchor.AnchorStatusDTO;
|
||||||
import com.ruoyi.cai.dto.app.vo.rank.RankNodeInvite;
|
import com.ruoyi.cai.dto.app.vo.rank.RankNodeInvite;
|
||||||
import com.ruoyi.cai.dto.app.vo.rank.RankNodeLove;
|
import com.ruoyi.cai.dto.app.vo.rank.RankNodeLove;
|
||||||
|
import com.ruoyi.cai.dto.app.vo.rank.RankNodeRecharge;
|
||||||
import com.ruoyi.cai.dto.app.vo.rank.RankRemark;
|
import com.ruoyi.cai.dto.app.vo.rank.RankRemark;
|
||||||
import com.ruoyi.cai.enums.GenderEnum;
|
import com.ruoyi.cai.enums.GenderEnum;
|
||||||
import com.ruoyi.cai.enums.SystemConfigEnum;
|
import com.ruoyi.cai.enums.SystemConfigEnum;
|
||||||
import com.ruoyi.cai.manager.AwardManager;
|
import com.ruoyi.cai.manager.AwardManager;
|
||||||
import com.ruoyi.cai.manager.SystemConfigManager;
|
import com.ruoyi.cai.manager.SystemConfigManager;
|
||||||
|
import com.ruoyi.cai.mapper.AccountMapper;
|
||||||
import com.ruoyi.cai.mapper.AnchorMapper;
|
import com.ruoyi.cai.mapper.AnchorMapper;
|
||||||
import com.ruoyi.cai.rank.RankManager;
|
import com.ruoyi.cai.rank.RankManager;
|
||||||
import com.ruoyi.cai.rank.RankNode;
|
import com.ruoyi.cai.rank.RankNode;
|
||||||
@@ -31,6 +33,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -81,6 +85,37 @@ public class RankAppController {
|
|||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private AccountMapper accountMapper;
|
||||||
|
|
||||||
|
@GetMapping("/recharge")
|
||||||
|
@Operation(summary = "土豪榜")
|
||||||
|
@Log(title = "土豪榜单查询", businessType = BusinessType.OTHER, isPrintResponseData = true, isSaveDb = false)
|
||||||
|
public R<List<RankNodeRecharge>> rechargeRank(
|
||||||
|
@Parameter(description = "类型 1-上周 2-昨日 3-日榜 4-周榜 5-月榜 6-总榜") Integer type){
|
||||||
|
Long userId = LoginHelper.getUserId();
|
||||||
|
long lastLove = 0;
|
||||||
|
List<RankNodeRecharge> rankNodeList = accountMapper.rankTotalPay(30);
|
||||||
|
for (int i = 0; i < rankNodeList.size(); i++) {
|
||||||
|
RankNodeRecharge rankNodeRecharge = rankNodeList.get(i);
|
||||||
|
rankNodeRecharge.setValue(rankNodeRecharge.getMoney().setScale(0, RoundingMode.CEILING).longValue());
|
||||||
|
if(!rankNodeRecharge.getUserId().equals(userId)){
|
||||||
|
rankNodeRecharge.setAvatar(GenderEnum.MAN.getDefaultAvatar());
|
||||||
|
rankNodeRecharge.setNickname(minNickname(rankNodeRecharge.getNickname()));
|
||||||
|
rankNodeRecharge.setUserId(null);
|
||||||
|
}
|
||||||
|
if(i == 0){
|
||||||
|
rankNodeRecharge.setDiffLastValue(0L);
|
||||||
|
}else{
|
||||||
|
rankNodeRecharge.setDiffLastValue(lastLove - rankNodeRecharge.getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return R.ok(rankNodeList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/love")
|
@GetMapping("/love")
|
||||||
@Operation(summary = "魅力榜")
|
@Operation(summary = "魅力榜")
|
||||||
@Log(title = "魅力榜单查询", businessType = BusinessType.OTHER, isPrintResponseData = true, isSaveDb = false)
|
@Log(title = "魅力榜单查询", businessType = BusinessType.OTHER, isPrintResponseData = true, isSaveDb = false)
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ public class SettingAppController {
|
|||||||
SettingGoodsVo vo = new SettingGoodsVo();
|
SettingGoodsVo vo = new SettingGoodsVo();
|
||||||
if(useTrdPay){ // 使用第三方支付
|
if(useTrdPay){ // 使用第三方支付
|
||||||
vo.setHasAlipayPay(systemConfigManager.getSystemConfigOfInt(SystemConfigEnum.OPEN_ALI_PAY));
|
vo.setHasAlipayPay(systemConfigManager.getSystemConfigOfInt(SystemConfigEnum.OPEN_ALI_PAY));
|
||||||
vo.setHasWechatPay(systemConfigManager.getSystemConfigOfInt(SystemConfigEnum.OPEN_WX_PAY));
|
vo.setHasWechatPay(trdPayManager.checkOpenWxInt());
|
||||||
}else{
|
}else{
|
||||||
vo.setHasAlipayPay(systemConfigManager.getSystemConfigOfInt(SystemConfigEnum.OPEN_SOURCE_ALI_PAY));
|
vo.setHasAlipayPay(systemConfigManager.getSystemConfigOfInt(SystemConfigEnum.OPEN_SOURCE_ALI_PAY));
|
||||||
vo.setHasWechatPay(systemConfigManager.getSystemConfigOfInt(SystemConfigEnum.OPEN_WX_PAY));
|
vo.setHasWechatPay(systemConfigManager.getSystemConfigOfInt(SystemConfigEnum.OPEN_WX_PAY));
|
||||||
@@ -68,6 +68,10 @@ public class SettingAppController {
|
|||||||
List<Goods> list = goodsService.list(Wrappers.lambdaQuery(Goods.class)
|
List<Goods> list = goodsService.list(Wrappers.lambdaQuery(Goods.class)
|
||||||
.eq(Goods::getStatus,0)
|
.eq(Goods::getStatus,0)
|
||||||
.orderByAsc(Goods::getPrice));
|
.orderByAsc(Goods::getPrice));
|
||||||
|
list.forEach(i -> {
|
||||||
|
// i.setAliAmountDiff(i.getAmount() - i.getWxAmount());
|
||||||
|
i.setAliAmountDiff(0L);
|
||||||
|
});
|
||||||
vo.setGoods(list);
|
vo.setGoods(list);
|
||||||
return R.ok(vo);
|
return R.ok(vo);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ public class UserAppController {
|
|||||||
boolean useTrdPay = trdPayManager.useTrdPay(LoginHelper.getUserId());
|
boolean useTrdPay = trdPayManager.useTrdPay(LoginHelper.getUserId());
|
||||||
if(useTrdPay){ // 使用第三方支付
|
if(useTrdPay){ // 使用第三方支付
|
||||||
vo.setHasAlipayPay(systemConfigManager.getSystemConfigOfInt(SystemConfigEnum.OPEN_ALI_PAY));
|
vo.setHasAlipayPay(systemConfigManager.getSystemConfigOfInt(SystemConfigEnum.OPEN_ALI_PAY));
|
||||||
vo.setHasWechatPay(systemConfigManager.getSystemConfigOfInt(SystemConfigEnum.OPEN_WX_PAY));
|
vo.setHasWechatPay(trdPayManager.checkOpenWxInt());
|
||||||
}else{
|
}else{
|
||||||
vo.setHasAlipayPay(systemConfigManager.getSystemConfigOfInt(SystemConfigEnum.OPEN_SOURCE_ALI_PAY));
|
vo.setHasAlipayPay(systemConfigManager.getSystemConfigOfInt(SystemConfigEnum.OPEN_SOURCE_ALI_PAY));
|
||||||
vo.setHasWechatPay(systemConfigManager.getSystemConfigOfInt(SystemConfigEnum.OPEN_WX_PAY));
|
vo.setHasWechatPay(systemConfigManager.getSystemConfigOfInt(SystemConfigEnum.OPEN_WX_PAY));
|
||||||
|
|||||||
@@ -0,0 +1,76 @@
|
|||||||
|
package com.ruoyi.web.controller.cai.proxy;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckRole;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.ruoyi.cai.dto.proxy.BindUserListDTO;
|
||||||
|
import com.ruoyi.cai.dto.proxy.OrderListDTO;
|
||||||
|
import com.ruoyi.cai.dto.proxy.ProxyTotalDTO;
|
||||||
|
import com.ruoyi.cai.manager.ProxyUserManager;
|
||||||
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
|
import com.ruoyi.common.helper.LoginHelper;
|
||||||
|
import com.ruoyi.system.mapper.SysUserMapper;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/cai/proxyUser")
|
||||||
|
public class ProxyUserController {
|
||||||
|
@Autowired
|
||||||
|
private ProxyUserManager proxyUserManager;
|
||||||
|
@Resource
|
||||||
|
private SysUserMapper sysUserMapper;
|
||||||
|
|
||||||
|
@GetMapping("/orderLogList")
|
||||||
|
@SaCheckPermission("cai:proxyUser:orderLogList")
|
||||||
|
public TableDataInfo<OrderListDTO> orderLogList(PageQuery pageQuery, OrderListDTO query) {
|
||||||
|
String userCode = getBindUserCode();
|
||||||
|
IPage<OrderListDTO> orderListDTOIPage = proxyUserManager.orderLogList(userCode, pageQuery,query);
|
||||||
|
return TableDataInfo.build(orderListDTOIPage);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/bindUserList")
|
||||||
|
@SaCheckPermission("cai:proxyUser:bindUserList")
|
||||||
|
public TableDataInfo<BindUserListDTO> bindUserList(PageQuery pageQuery, BindUserListDTO query) {
|
||||||
|
String userCode = getBindUserCode();
|
||||||
|
IPage<BindUserListDTO> data = proxyUserManager.bindUserList(userCode, pageQuery, query);
|
||||||
|
return TableDataInfo.build(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/proxyTotal")
|
||||||
|
@SaCheckRole("proxy")
|
||||||
|
public R<ProxyTotalDTO> proxyTotal() {
|
||||||
|
Long userId = LoginHelper.getUserId();
|
||||||
|
SysUser sysUser = sysUserMapper.selectOne(Wrappers.lambdaQuery(SysUser.class).eq(SysUser::getUserId, userId).select(SysUser::getBindUserCode));
|
||||||
|
if(sysUser == null || StringUtils.isBlank(sysUser.getBindUserCode())){
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
String userCode = sysUser.getBindUserCode();
|
||||||
|
ProxyTotalDTO dto = proxyUserManager.total(userCode);
|
||||||
|
return R.ok(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getBindUserCode(){
|
||||||
|
Long userId = LoginHelper.getUserId();
|
||||||
|
SysUser sysUser = sysUserMapper.selectOne(Wrappers.lambdaQuery(SysUser.class).eq(SysUser::getUserId, userId).select(SysUser::getBindUserCode));
|
||||||
|
if(sysUser == null || StringUtils.isBlank(sysUser.getBindUserCode())){
|
||||||
|
throw new ServiceException("您的后台账户未绑定APP账户,请联系管理员操作");
|
||||||
|
}
|
||||||
|
return sysUser.getBindUserCode();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,18 +1,26 @@
|
|||||||
package com.ruoyi.web.controller.system;
|
package com.ruoyi.web.controller.system;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.PageQuery;
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.common.core.domain.R;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.helper.LoginHelper;
|
||||||
import com.ruoyi.system.domain.SysNotice;
|
import com.ruoyi.system.domain.SysNotice;
|
||||||
|
import com.ruoyi.system.domain.bo.SysNoticeDealData;
|
||||||
|
import com.ruoyi.system.mapper.SysNoticeMapper;
|
||||||
import com.ruoyi.system.service.ISysNoticeService;
|
import com.ruoyi.system.service.ISysNoticeService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 公告 信息操作处理
|
* 公告 信息操作处理
|
||||||
*
|
*
|
||||||
@@ -65,6 +73,25 @@ public class SysNoticeController extends BaseController {
|
|||||||
public R<Void> edit(@Validated @RequestBody SysNotice notice) {
|
public R<Void> edit(@Validated @RequestBody SysNotice notice) {
|
||||||
return toAjax(noticeService.updateNotice(notice));
|
return toAjax(noticeService.updateNotice(notice));
|
||||||
}
|
}
|
||||||
|
@Resource
|
||||||
|
private SysNoticeMapper noticeMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改通知公告
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:notice:edit")
|
||||||
|
@Log(title = "处理公告", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("deal")
|
||||||
|
public R<Void> deal(@Validated @RequestBody SysNoticeDealData notice) {
|
||||||
|
noticeMapper.update(Wrappers.lambdaUpdate(SysNotice.class)
|
||||||
|
.eq(SysNotice::getNoticeId, notice.getNoticeId())
|
||||||
|
.set(SysNotice::getStatus, 1)
|
||||||
|
.set(SysNotice::getRemark, notice.getRemark())
|
||||||
|
.set(SysNotice::getNoticeId, notice.getNoticeId())
|
||||||
|
.set(SysNotice::getDealBy, LoginHelper.getUsername())
|
||||||
|
.set(SysNotice::getDealTime, LocalDateTime.now()));
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除通知公告
|
* 删除通知公告
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ spring:
|
|||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
||||||
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
|
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
|
||||||
url: jdbc:mysql://124.222.254.188:5306/cai-v6?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
|
url: jdbc:mysql://124.222.254.188:4306/cai_v6?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
|
||||||
username: root
|
username: root
|
||||||
password: 383200134
|
password: tyYrk487R4y7FENM
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
slave:
|
||||||
lazy: true
|
lazy: true
|
||||||
@@ -53,11 +53,11 @@ spring:
|
|||||||
# 地址
|
# 地址
|
||||||
host: 124.222.254.188
|
host: 124.222.254.188
|
||||||
# 端口,默认为6379
|
# 端口,默认为6379
|
||||||
port: 9379
|
port: 8379
|
||||||
# 数据库索引
|
# 数据库索引
|
||||||
database: 12
|
database: 12
|
||||||
# 密码(如没有密码请注释掉)
|
# 密码(如没有密码请注释掉)
|
||||||
password: 383200134
|
password: dsjakldbwja
|
||||||
# 连接超时时间
|
# 连接超时时间
|
||||||
timeout: 15s
|
timeout: 15s
|
||||||
# 是否开启ssl
|
# 是否开启ssl
|
||||||
@@ -65,7 +65,7 @@ spring:
|
|||||||
rabbitmq:
|
rabbitmq:
|
||||||
addresses: 124.222.254.188 #ip地址
|
addresses: 124.222.254.188 #ip地址
|
||||||
username: admin # 账号
|
username: admin # 账号
|
||||||
password: 383200134 # 密码
|
password: THnpGkdS # 密码
|
||||||
port: 5672
|
port: 5672
|
||||||
virtual-host: /cai-dev
|
virtual-host: /cai-dev
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,25 @@
|
|||||||
</encoder>
|
</encoder>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
|
<!-- 控制台输出 -->
|
||||||
|
<appender name="file_login" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<file>${log.path}/login/sys-login.log</file>
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<!-- 日志文件名格式 -->
|
||||||
|
<fileNamePattern>${log.path}/login/sys-login.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
<!-- 日志最大 1天 -->
|
||||||
|
<maxHistory>1</maxHistory>
|
||||||
|
</rollingPolicy>
|
||||||
|
<encoder>
|
||||||
|
<pattern>${log.pattern}</pattern>
|
||||||
|
<charset>utf-8</charset>
|
||||||
|
</encoder>
|
||||||
|
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||||
|
<!-- 过滤的级别 -->
|
||||||
|
<level>INFO</level>
|
||||||
|
</filter>
|
||||||
|
</appender>
|
||||||
|
|
||||||
<!-- 控制台输出 -->
|
<!-- 控制台输出 -->
|
||||||
<appender name="file_console" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="file_console" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<file>${log.path}/sys-console.log</file>
|
<file>${log.path}/sys-console.log</file>
|
||||||
@@ -117,6 +136,10 @@
|
|||||||
<!-- </encoder>-->
|
<!-- </encoder>-->
|
||||||
<!-- </appender>-->
|
<!-- </appender>-->
|
||||||
|
|
||||||
|
<logger name="com.ruoyi.cai.manager.LoginAfterManager" level="INFO" additivity="false">
|
||||||
|
<appender-ref ref="file_login" /> <!-- 绑定到file_login Appender -->
|
||||||
|
</logger>
|
||||||
|
|
||||||
<!--系统操作日志-->
|
<!--系统操作日志-->
|
||||||
<root level="info">
|
<root level="info">
|
||||||
<appender-ref ref="console" />
|
<appender-ref ref="console" />
|
||||||
|
|||||||
25
ruoyi-admin/src/main/resources/v14/EFPS-PublicKey.cer
Normal file
25
ruoyi-admin/src/main/resources/v14/EFPS-PublicKey.cer
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIEIjCCAwqgAwIBAgIUJciVbai01yHdyTuMJ3UAOf6uWPQwDQYJKoZIhvcNAQEL
|
||||||
|
BQAwgZYxCzAJBgNVBAYTAkNOMTkwNwYDVQQKDDDljJfkuqzlpKnlqIHor5rkv6Hn
|
||||||
|
lLXlrZDllYbliqHmnI3liqHmnInpmZDlhazlj7gxFTATBgNVBAsMDOS8geS4muiv
|
||||||
|
geS5pjE1MDMGA1UEAwws5aSp5aiB6K+a5L+h5pWw5a2X6K6k6K+B5Lit5b+D5LyB
|
||||||
|
5Lia6K+B5LmmQ0EwHhcNMTgwMTExMDgwNjE4WhcNMTkwMTExMDgwNjE4WjCBjDE5
|
||||||
|
MDcGA1UECgww5YyX5Lqs5aSp5aiB6K+a5L+h55S15a2Q5ZWG5Yqh5pyN5Yqh5pyJ
|
||||||
|
6ZmQ5YWs5Y+4MRgwFgYDVQQLDA/ov5Dnu7TmlK/mjIHpg6gxNTAzBgNVBAMMLOaY
|
||||||
|
k+elqOiBlOaUr+S7mOaciemZkOWFrOWPuC1FRlBT5ZWG5oi36Zeo5oi3MIIBIjAN
|
||||||
|
BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAptTghT1nY9twX4VKrvJigGB/klcs
|
||||||
|
P8tH+9aV5TofKskh8PQg8neTSprPMmEsidFGMJ26a4x/E88nJ6wMHAZqeWP0x64/
|
||||||
|
GLtIff8r+WZjqBYP9WNiW71NcAsoJEBrlLlLrc5W/9mC+3z0oWYiz+LB9E+uMeCV
|
||||||
|
3ocHP42Z6oGeCV6jSe1Sx2UBsCEROYh1nTnZQ13pHIghqO1Fc5MZTcTW5k3zviuF
|
||||||
|
L7IJYUW79AIzh9SttcMbUZqGWkf808Ux3BhZzgUTL0g76fpCRjPilmlCJ/NdyGJ4
|
||||||
|
8E0IfMXHeTq3uiEjnO2nzsEV4zvhNoii0F2iH+fgMXBDwGd9O3mLv23gIQIDAQAB
|
||||||
|
o3AwbjAJBgNVHRMEAjAAMAsGA1UdDwQEAwIFoDBUBgNVHR8ETTBLMEmgR6BFhkNo
|
||||||
|
dHRwOi8vdG9wY2EuaXRydXMuY29tLmNuL3B1YmxpYy9pdHJ1c2NybD9DQT0kIAoK
|
||||||
|
JENBX1NFUklBTE5VTUJFUiQkMA0GCSqGSIb3DQEBCwUAA4IBAQCUEFIx+vOeOQi2
|
||||||
|
ZWR8TnADKYYTNsqv52e9WBz8VKfjbzIDA/hXqJUvtylyyEL4pBn82xG0WMk9UaAE
|
||||||
|
EGrkpdA0figlbUInyXZE8WZYcE/7Nlr4aupH+JETp1OqvAsS0l5M2mH4OdVMDA/K
|
||||||
|
pdwTMBa0it7f3QA8k2lXalHlifi35jrKj2q3DFKvy2n9pcwblPX2jpC7pZ1Y66tq
|
||||||
|
7SapaGyCo12Q6o0vSCgGodFkZsczYmGdp4ZbphUbACVQ3Lhw/moqB3PadT6V0jB6
|
||||||
|
4BDDHnkDkaoUI5XUr1BMmTAyy+chBLHzk83Dx9ioNHdF0rHpEyUD73GfV11R7BIy
|
||||||
|
zl5g8FpF
|
||||||
|
-----END CERTIFICATE-----
|
||||||
BIN
ruoyi-admin/src/main/resources/v14/user-rsa.pfx
Normal file
BIN
ruoyi-admin/src/main/resources/v14/user-rsa.pfx
Normal file
Binary file not shown.
@@ -19,6 +19,11 @@
|
|||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.commons</groupId>
|
||||||
|
<artifactId>commons-exec</artifactId>
|
||||||
|
<version>1.3</version> <!-- 最新稳定版 -->
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-framework</artifactId>
|
<artifactId>ruoyi-framework</artifactId>
|
||||||
|
|||||||
@@ -93,14 +93,19 @@ public class CaiLoginManager {
|
|||||||
private IgnoreDataService ignoreDataService;
|
private IgnoreDataService ignoreDataService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private AmqpHttpProducer amqpHttpProducer;
|
private AmqpHttpProducer amqpHttpProducer;
|
||||||
|
@Autowired
|
||||||
|
private IpRecordService ipRecordService;
|
||||||
|
@Autowired
|
||||||
|
private IpBlackService ipBlackService;
|
||||||
|
|
||||||
public String login(String username,String password){
|
public String login(String username,String password){
|
||||||
|
String clientIP = ServletUtils.getClientIP();
|
||||||
User user = userService.getByUsername(username);
|
User user = userService.getByUsername(username);
|
||||||
if(user == null){
|
if(user == null){
|
||||||
throw new ServiceException("用户不存在或密码错误");
|
throw new ServiceException("用户不存在或密码错误");
|
||||||
}
|
}
|
||||||
String imei = ServletUtils.getImei();
|
String imei = ServletUtils.getImei();
|
||||||
UserForbidManager.CheckForbid forbid = userForbidManager.checkForbid(user.getId(), user.getUsercode(), imei, ServletUtils.getClientIP());
|
UserForbidManager.CheckForbid forbid = userForbidManager.checkForbid(user.getId(), user.getUsercode(), imei, clientIP);
|
||||||
if(forbid != null && forbid.isForbid()){
|
if(forbid != null && forbid.isForbid()){
|
||||||
throw new ServiceException(forbid.getMessage());
|
throw new ServiceException(forbid.getMessage());
|
||||||
}
|
}
|
||||||
@@ -138,7 +143,8 @@ public class CaiLoginManager {
|
|||||||
throw new ServiceException(error);
|
throw new ServiceException(error);
|
||||||
}else{
|
}else{
|
||||||
String error = String.format("密码错误,已错误%s次,还剩%s次", num, passwordMaxNum-num);
|
String error = String.format("密码错误,已错误%s次,还剩%s次", num, passwordMaxNum-num);
|
||||||
throw new ServiceException(error);
|
// throw new ServiceException(error);
|
||||||
|
throw new ServiceException("用户不存在或密码错误");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
redissonClient.getAtomicLong(key).delete();
|
redissonClient.getAtomicLong(key).delete();
|
||||||
@@ -154,17 +160,17 @@ public class CaiLoginManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String register(CaiRegisterUser caiUser) {
|
public String register(CaiRegisterUser caiUser) {
|
||||||
User user = userService.getByUsername(caiUser.getUsername());
|
|
||||||
if(user != null){
|
|
||||||
throw new ServiceException("手机号已存在");
|
|
||||||
}
|
|
||||||
if(!caiUser.getPassword().equals(caiUser.getPasswordCheck())){
|
if(!caiUser.getPassword().equals(caiUser.getPasswordCheck())){
|
||||||
throw new ServiceException("两次输入密码不一致,请检查");
|
throw new ServiceException("两次输入密码不一致,请检查");
|
||||||
}
|
}
|
||||||
|
User user = userService.getByUsername(caiUser.getUsername());
|
||||||
|
if(user != null){
|
||||||
|
throw new ServiceException("手机号已存在或验证码错误");
|
||||||
|
}
|
||||||
if(!caiUser.isSystemOp()){
|
if(!caiUser.isSystemOp()){
|
||||||
boolean check = smsVerifyService.check(CodeEnum.REGISTER, caiUser.getUsername(), caiUser.getCode());
|
boolean check = smsVerifyService.check(CodeEnum.REGISTER, caiUser.getUsername(), caiUser.getCode());
|
||||||
if(!check){
|
if(!check){
|
||||||
throw new ServiceException("验证码错误");
|
throw new ServiceException("手机号已存在或验证码错误");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 加锁
|
// 加锁
|
||||||
@@ -353,6 +359,7 @@ public class CaiLoginManager {
|
|||||||
userInfo.setGuardIncomeRate(systemConfigManager.getSystemConfigOfBigDecimal(SystemConfigEnum.DEFAULT_GUARD_INCOME_RATE));
|
userInfo.setGuardIncomeRate(systemConfigManager.getSystemConfigOfBigDecimal(SystemConfigEnum.DEFAULT_GUARD_INCOME_RATE));
|
||||||
userInfo.setGiftIncomeRate(systemConfigManager.getSystemConfigOfBigDecimal(SystemConfigEnum.DEFAULT_GIFT_INCOME_RATE));
|
userInfo.setGiftIncomeRate(systemConfigManager.getSystemConfigOfBigDecimal(SystemConfigEnum.DEFAULT_GIFT_INCOME_RATE));
|
||||||
userInfo.setPayIncomeRate(systemConfigManager.getSystemConfigOfBigDecimal(SystemConfigEnum.DEFAULT_PAY_INCOME_RATE));
|
userInfo.setPayIncomeRate(systemConfigManager.getSystemConfigOfBigDecimal(SystemConfigEnum.DEFAULT_PAY_INCOME_RATE));
|
||||||
|
userInfo.setPointRate(systemConfigManager.getSystemConfigOfBigDecimal(SystemConfigEnum.DEFAULT_PAY_POINT_RATE));
|
||||||
userInfo.setLoginCount(1);
|
userInfo.setLoginCount(1);
|
||||||
userInfo.setLastLoginIp(clientIP);
|
userInfo.setLastLoginIp(clientIP);
|
||||||
userInfo.setLastLoginTime(LocalDateTime.now());
|
userInfo.setLastLoginTime(LocalDateTime.now());
|
||||||
@@ -372,13 +379,13 @@ public class CaiLoginManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void resetPassword(ResetPasswordReq code) {
|
public void resetPassword(ResetPasswordReq code) {
|
||||||
User user = userService.getByUsername(code.getMobile());
|
|
||||||
if(user == null){
|
|
||||||
throw new ServiceException("账户不存在");
|
|
||||||
}
|
|
||||||
boolean check = smsVerifyService.check(CodeEnum.RESET_PASSWORD, code.getMobile(), code.getCode());
|
boolean check = smsVerifyService.check(CodeEnum.RESET_PASSWORD, code.getMobile(), code.getCode());
|
||||||
if(!check){
|
if(!check){
|
||||||
throw new ServiceException("验证码错误");
|
throw new ServiceException("账户不存在或验证码错误");
|
||||||
|
}
|
||||||
|
User user = userService.getByUsername(code.getMobile());
|
||||||
|
if(user == null){
|
||||||
|
throw new ServiceException("账户不存在或验证码错误");
|
||||||
}
|
}
|
||||||
userService.resetPassword(user.getId(),code.getPassword());
|
userService.resetPassword(user.getId(),code.getPassword());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,4 +14,8 @@ public class LoginCaiUser {
|
|||||||
@Schema(description = "密码")
|
@Schema(description = "密码")
|
||||||
@NotEmpty(message = "密码不能为空")
|
@NotEmpty(message = "密码不能为空")
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
|
private String ticket;
|
||||||
|
private String randStr;
|
||||||
|
private String userIp;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,4 +8,10 @@ import javax.validation.constraints.NotEmpty;
|
|||||||
public class RegisterCode {
|
public class RegisterCode {
|
||||||
@NotEmpty(message = "手机号不能为空")
|
@NotEmpty(message = "手机号不能为空")
|
||||||
private String mobile;
|
private String mobile;
|
||||||
|
|
||||||
|
@NotEmpty(message = "腾讯验证码参数[ticket]")
|
||||||
|
private String ticket;
|
||||||
|
@NotEmpty(message = "腾讯验证码所属参数[randStr]")
|
||||||
|
private String randStr;
|
||||||
|
private String userIp;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,95 @@
|
|||||||
|
package com.ruoyi.cai.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.ruoyi.cai.domain.IpBlack;
|
||||||
|
import com.ruoyi.cai.service.IpBlackService;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.core.validate.AddGroup;
|
||||||
|
import com.ruoyi.common.core.validate.EditGroup;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ip黑名单
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-12-05
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/cai/ipBlack")
|
||||||
|
public class IpBlackController extends BaseController {
|
||||||
|
|
||||||
|
private final IpBlackService ipBlackService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询ip黑名单列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:ipBlack:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<IpBlack> list(IpBlack bo, PageQuery pageQuery) {
|
||||||
|
Page<IpBlack> page = ipBlackService.page(pageQuery.build(), Wrappers.lambdaQuery(bo));
|
||||||
|
return TableDataInfo.build(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出ip黑名单列表
|
||||||
|
*/
|
||||||
|
/* @SaCheckPermission("cai:ipBlack:export")
|
||||||
|
@Log(title = "ip黑名单", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(IpBlackBo bo, HttpServletResponse response) {
|
||||||
|
List<IpBlackVo> list = ipBlackService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "ip黑名单", IpBlackVo.class, response);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增ip黑名单
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:ipBlack:add")
|
||||||
|
@Log(title = "ip黑名单", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody IpBlack bo) {
|
||||||
|
bo.setEnableStatus(1);
|
||||||
|
ipBlackService.saveIp(bo);
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改ip黑名单
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:ipBlack:edit")
|
||||||
|
@Log(title = "ip黑名单", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody IpBlack bo) {
|
||||||
|
return toAjax(ipBlackService.updateById(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除ip黑名单
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:ipBlack:remove")
|
||||||
|
@Log(title = "ip黑名单", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable String[] ids) {
|
||||||
|
return toAjax(ipBlackService.removeBatchByIds(Arrays.asList(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,108 @@
|
|||||||
|
package com.ruoyi.cai.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.ruoyi.cai.domain.IpRecord;
|
||||||
|
import com.ruoyi.cai.dto.admin.vo.IpRecordAdminVO;
|
||||||
|
import com.ruoyi.cai.service.IpRecordService;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.core.validate.AddGroup;
|
||||||
|
import com.ruoyi.common.core.validate.EditGroup;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ip访问记录
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-12-05
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/cai/ipRecord")
|
||||||
|
public class IpRecordController extends BaseController {
|
||||||
|
|
||||||
|
private final IpRecordService ipRecordService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询ip访问记录列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:ipRecord:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<IpRecordAdminVO> list(IpRecordAdminVO bo, PageQuery pageQuery) {
|
||||||
|
IPage<IpRecordAdminVO> page = ipRecordService.pageAdmin(bo,pageQuery);
|
||||||
|
return TableDataInfo.build(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出ip访问记录列表
|
||||||
|
*/
|
||||||
|
/*@SaCheckPermission("cai:ipRecord:export")
|
||||||
|
@Log(title = "ip访问记录", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(IpRecordBo bo, HttpServletResponse response) {
|
||||||
|
List<IpRecordVo> list = iIpRecordService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "ip访问记录", IpRecordVo.class, response);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取ip访问记录详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:ipRecord:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<IpRecord> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable String id) {
|
||||||
|
return R.ok(ipRecordService.getById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增ip访问记录
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:ipRecord:add")
|
||||||
|
@Log(title = "ip访问记录", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody IpRecord bo) {
|
||||||
|
return toAjax(ipRecordService.save(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改ip访问记录
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:ipRecord:edit")
|
||||||
|
@Log(title = "ip访问记录", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody IpRecord bo) {
|
||||||
|
return toAjax(ipRecordService.updateById(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除ip访问记录
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:ipRecord:remove")
|
||||||
|
@Log(title = "ip访问记录", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable String[] ids) {
|
||||||
|
return toAjax(ipRecordService.removeBatchByIds(Arrays.asList(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -48,7 +48,10 @@ public class OrderLogsController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo<OrderLogs> list(OrderLogs bo, PageQuery pageQuery) {
|
public TableDataInfo<OrderLogs> list(OrderLogs bo, PageQuery pageQuery) {
|
||||||
Page<OrderLogs> page = orderLogsService.page(pageQuery.build(), Wrappers.lambdaQuery(OrderLogs.class).orderByDesc(OrderLogs::getCreateTime));
|
Page<OrderLogs> page = orderLogsService.page(pageQuery.build(), Wrappers.lambdaQuery(bo)
|
||||||
|
.ge(bo.getCreateTimeMin() != null, OrderLogs::getCreateTime, bo.getCreateTimeMin())
|
||||||
|
.le(bo.getCreateTimeMax() != null,OrderLogs::getCreateTime, bo.getCreateTimeMax())
|
||||||
|
.orderByDesc(OrderLogs::getCreateTime));
|
||||||
return TableDataInfo.build(page);
|
return TableDataInfo.build(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,9 @@ public class PayTrdConfigController extends BaseController {
|
|||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public R<PayTrdConfig> getInfo(@NotNull(message = "主键不能为空")
|
public R<PayTrdConfig> getInfo(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long id) {
|
@PathVariable Long id) {
|
||||||
return R.ok(payTrdConfigService.getById(id));
|
PayTrdConfig payTrdConfig = payTrdConfigService.getById(id);
|
||||||
|
payTrdConfig.refreshSelect();
|
||||||
|
return R.ok(payTrdConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -66,6 +68,7 @@ public class PayTrdConfigController extends BaseController {
|
|||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PostMapping()
|
@PostMapping()
|
||||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody PayTrdConfig bo) {
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody PayTrdConfig bo) {
|
||||||
|
bo.refreshUpdateOrSave();
|
||||||
boolean save = payTrdConfigService.save(bo);
|
boolean save = payTrdConfigService.save(bo);
|
||||||
payTrdConfigService.resetPayTrdConfig();
|
payTrdConfigService.resetPayTrdConfig();
|
||||||
return toAjax(save);
|
return toAjax(save);
|
||||||
@@ -89,6 +92,7 @@ public class PayTrdConfigController extends BaseController {
|
|||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PutMapping()
|
@PutMapping()
|
||||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody PayTrdConfig bo) {
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody PayTrdConfig bo) {
|
||||||
|
bo.refreshUpdateOrSave();
|
||||||
boolean save = payTrdConfigService.updateById(bo);
|
boolean save = payTrdConfigService.updateById(bo);
|
||||||
payTrdConfigService.resetPayTrdConfig();
|
payTrdConfigService.resetPayTrdConfig();
|
||||||
return toAjax(save);
|
return toAjax(save);
|
||||||
|
|||||||
@@ -0,0 +1,95 @@
|
|||||||
|
package com.ruoyi.cai.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.ruoyi.cai.domain.PointChangeLog;
|
||||||
|
import com.ruoyi.cai.service.PointChangeLogService;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.core.validate.AddGroup;
|
||||||
|
import com.ruoyi.common.core.validate.EditGroup;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 积分记录
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-12-10
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/cai/pointChangeLog")
|
||||||
|
public class PointChangeLogController extends BaseController {
|
||||||
|
|
||||||
|
private final PointChangeLogService pointChangeLogService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询积分记录列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:pointChangeLog:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<PointChangeLog> list(PointChangeLog bo, PageQuery pageQuery) {
|
||||||
|
Page<PointChangeLog> page = pointChangeLogService.page(pageQuery.build(), Wrappers.lambdaQuery(bo).orderByDesc(PointChangeLog::getCreateTime));
|
||||||
|
return TableDataInfo.build(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取积分记录详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:pointChangeLog:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<PointChangeLog> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable String id) {
|
||||||
|
return R.ok(pointChangeLogService.getById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增积分记录
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:pointChangeLog:add")
|
||||||
|
@Log(title = "积分记录", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody PointChangeLog bo) {
|
||||||
|
return toAjax(pointChangeLogService.save(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改积分记录
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:pointChangeLog:edit")
|
||||||
|
@Log(title = "积分记录", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody PointChangeLog bo) {
|
||||||
|
return toAjax(pointChangeLogService.updateById(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除积分记录
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:pointChangeLog:remove")
|
||||||
|
@Log(title = "积分记录", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable String[] ids) {
|
||||||
|
return toAjax(pointChangeLogService.removeBatchByIds(Arrays.asList(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
package com.ruoyi.cai.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.ruoyi.cai.domain.PointRecordLog;
|
||||||
|
import com.ruoyi.cai.service.PointRecordLogService;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.core.validate.AddGroup;
|
||||||
|
import com.ruoyi.common.core.validate.EditGroup;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户积分分销
|
||||||
|
*
|
||||||
|
* @author 77
|
||||||
|
* @date 2025-12-03
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/cai/pointRecordLog")
|
||||||
|
public class PointRecordLogController extends BaseController {
|
||||||
|
|
||||||
|
private final PointRecordLogService pointRecordLogService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户积分分销列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:pointRecordLog:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<PointRecordLog> list(PointRecordLog bo, PageQuery pageQuery) {
|
||||||
|
Page<PointRecordLog> page = pointRecordLogService.page(pageQuery.build(), Wrappers.lambdaQuery(bo).orderByDesc(PointRecordLog::getCreateTime));
|
||||||
|
return TableDataInfo.build(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户积分分销详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:pointRecordLog:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<PointRecordLog> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable String id) {
|
||||||
|
return R.ok(pointRecordLogService.getById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增用户积分分销
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:pointRecordLog:add")
|
||||||
|
@Log(title = "用户积分分销", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody PointRecordLog bo) {
|
||||||
|
return toAjax(pointRecordLogService.save(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改用户积分分销
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:pointRecordLog:edit")
|
||||||
|
@Log(title = "用户积分分销", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody PointRecordLog bo) {
|
||||||
|
return toAjax(pointRecordLogService.updateById(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除用户积分分销
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:pointRecordLog:remove")
|
||||||
|
@Log(title = "用户积分分销", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable String[] ids) {
|
||||||
|
return toAjax(pointRecordLogService.removeBatchByIds(Arrays.asList(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,108 @@
|
|||||||
|
package com.ruoyi.cai.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.ruoyi.cai.domain.PrizeInfo;
|
||||||
|
import com.ruoyi.cai.service.PrizeInfoService;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.core.validate.AddGroup;
|
||||||
|
import com.ruoyi.common.core.validate.EditGroup;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 抽奖奖品
|
||||||
|
*
|
||||||
|
* @author 77
|
||||||
|
* @date 2025-12-23
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/cai/prizeInfo")
|
||||||
|
public class PrizeInfoController extends BaseController {
|
||||||
|
|
||||||
|
private final PrizeInfoService prizeInfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询抽奖奖品列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:prizeInfo:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<PrizeInfo> list(PrizeInfo bo, PageQuery pageQuery) {
|
||||||
|
Page<PrizeInfo> page = prizeInfoService.page(pageQuery.build(), Wrappers.lambdaQuery(PrizeInfo.class));
|
||||||
|
return TableDataInfo.build(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/all")
|
||||||
|
public R<List<PrizeInfo>> all() {
|
||||||
|
return R.ok(prizeInfoService.list());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取抽奖奖品详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:prizeInfo:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<PrizeInfo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(prizeInfoService.getById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增抽奖奖品
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:prizeInfo:add")
|
||||||
|
@Log(title = "抽奖奖品", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody PrizeInfo bo) {
|
||||||
|
return toAjax(prizeInfoService.save(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改抽奖奖品
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:prizeInfo:edit")
|
||||||
|
@Log(title = "抽奖奖品", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody PrizeInfo bo) {
|
||||||
|
if(bo.getId() == 1){
|
||||||
|
return R.fail("无法编辑系统内置谢谢惠顾");
|
||||||
|
}
|
||||||
|
return toAjax(prizeInfoService.updateById(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除抽奖奖品
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:prizeInfo:remove")
|
||||||
|
@Log(title = "抽奖奖品", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
List<Long> idArray = Arrays.asList(ids);
|
||||||
|
if(idArray.contains(1L)){
|
||||||
|
return R.fail("无法删除系统内置谢谢惠顾");
|
||||||
|
}
|
||||||
|
return toAjax(prizeInfoService.removeBatchByIds(idArray, true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
package com.ruoyi.cai.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.ruoyi.cai.domain.PrizeOnline;
|
||||||
|
import com.ruoyi.cai.service.PrizeOnlineService;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.core.validate.AddGroup;
|
||||||
|
import com.ruoyi.common.core.validate.EditGroup;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已发布奖品
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-12-23
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/cai/prizeOnline")
|
||||||
|
public class PrizeOnlineController extends BaseController {
|
||||||
|
|
||||||
|
private final PrizeOnlineService prizeOnlineService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询已发布奖品列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:prizeOnline:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public R<List<PrizeOnline>> list(PrizeOnline bo) {
|
||||||
|
List<PrizeOnline> page = prizeOnlineService.list(Wrappers.lambdaQuery(bo));
|
||||||
|
return R.ok(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取已发布奖品详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:prizeOnline:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<PrizeOnline> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(prizeOnlineService.getById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增已发布奖品
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:prizeOnline:add")
|
||||||
|
@Log(title = "已发布奖品", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping("/reset/{gender}")
|
||||||
|
public R<Void> reset(@PathVariable Integer gender,@Validated(AddGroup.class) @RequestBody List<PrizeOnline> bo) {
|
||||||
|
prizeOnlineService.reset(gender,bo);
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,94 @@
|
|||||||
|
package com.ruoyi.cai.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.ruoyi.cai.domain.PrizeWinningRecord;
|
||||||
|
import com.ruoyi.cai.dto.admin.vo.winningRecord.PrizeWinningRecordAdminVO;
|
||||||
|
import com.ruoyi.cai.mapper.PrizeWinningRecordMapper;
|
||||||
|
import com.ruoyi.cai.service.PrizeWinningRecordService;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.core.validate.AddGroup;
|
||||||
|
import com.ruoyi.common.core.validate.EditGroup;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 中奖记录
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-08
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/cai/prizeWinningRecord")
|
||||||
|
public class PrizeWinningRecordController extends BaseController {
|
||||||
|
|
||||||
|
private final PrizeWinningRecordService prizeWinningRecordService;
|
||||||
|
@Resource
|
||||||
|
private PrizeWinningRecordMapper prizeWinningRecordMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询中奖记录列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:prizeWinningRecord:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<PrizeWinningRecordAdminVO> list(PrizeWinningRecordAdminVO bo, PageQuery pageQuery) {
|
||||||
|
Page<PrizeWinningRecordAdminVO> page = prizeWinningRecordMapper.pageAdmin(pageQuery.build(), bo);
|
||||||
|
return TableDataInfo.build(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取中奖记录详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:prizeWinningRecord:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<PrizeWinningRecord> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(prizeWinningRecordService.getById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改中奖记录
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:prizeWinningRecord:edit")
|
||||||
|
@Log(title = "中奖记录", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping("/give")
|
||||||
|
public R<Void> give(@Validated(EditGroup.class) @RequestBody PrizeWinningRecord bo) {
|
||||||
|
PrizeWinningRecord update = new PrizeWinningRecord();
|
||||||
|
update.setId(bo.getId());
|
||||||
|
update.setGiveStatus(1);
|
||||||
|
update.setGiveRemark(bo.getGiveRemark());
|
||||||
|
prizeWinningRecordService.updateById(update);
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除中奖记录
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cai:prizeWinningRecord:remove")
|
||||||
|
@Log(title = "中奖记录", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(prizeWinningRecordService.removeBatchByIds(Arrays.asList(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.ruoyi.cai.controller;
|
package com.ruoyi.cai.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckRole;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.ruoyi.cai.domain.Union;
|
import com.ruoyi.cai.domain.Union;
|
||||||
@@ -57,6 +58,7 @@ public class UnionTotalController extends BaseController {
|
|||||||
|
|
||||||
@Log(title = "刷新工会每日收益", businessType = BusinessType.DELETE)
|
@Log(title = "刷新工会每日收益", businessType = BusinessType.DELETE)
|
||||||
@GetMapping("/refreshData")
|
@GetMapping("/refreshData")
|
||||||
|
@SaCheckRole("admin")
|
||||||
public R<Void> refreshData(String date) {
|
public R<Void> refreshData(String date) {
|
||||||
if(StringUtils.isBlank(date)){
|
if(StringUtils.isBlank(date)){
|
||||||
unionTotalService.refreshAll();
|
unionTotalService.refreshAll();
|
||||||
@@ -69,6 +71,7 @@ public class UnionTotalController extends BaseController {
|
|||||||
|
|
||||||
@Log(title = "刷新所有工会总收益")
|
@Log(title = "刷新所有工会总收益")
|
||||||
@GetMapping("/refreshAllUnion")
|
@GetMapping("/refreshAllUnion")
|
||||||
|
@SaCheckRole("admin")
|
||||||
public R<Void> refreshAllUnion() {
|
public R<Void> refreshAllUnion() {
|
||||||
unionTotalService.refreshUnionTotalAll();
|
unionTotalService.refreshUnionTotalAll();
|
||||||
return R.ok();
|
return R.ok();
|
||||||
@@ -76,6 +79,7 @@ public class UnionTotalController extends BaseController {
|
|||||||
|
|
||||||
@Log(title = "刷新指定工会总收益")
|
@Log(title = "刷新指定工会总收益")
|
||||||
@GetMapping("/refreshUnionTotal")
|
@GetMapping("/refreshUnionTotal")
|
||||||
|
@SaCheckRole("admin")
|
||||||
public R<Void> refreshUnionTotal(Long unionId) {
|
public R<Void> refreshUnionTotal(Long unionId) {
|
||||||
unionTotalService.refreshUnionTotal(unionId);
|
unionTotalService.refreshUnionTotal(unionId);
|
||||||
return R.ok();
|
return R.ok();
|
||||||
|
|||||||
@@ -36,6 +36,10 @@ public class Account implements Serializable {
|
|||||||
* 收益的彩币数量
|
* 收益的彩币数量
|
||||||
*/
|
*/
|
||||||
private Long incomeCoin;
|
private Long incomeCoin;
|
||||||
|
/**
|
||||||
|
* 积分
|
||||||
|
*/
|
||||||
|
private Long points;
|
||||||
/**
|
/**
|
||||||
* 充值总额
|
* 充值总额
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -0,0 +1,79 @@
|
|||||||
|
package com.ruoyi.cai.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户账户对象 cai_account
|
||||||
|
*
|
||||||
|
* @author 77
|
||||||
|
* @date 2023-12-23
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("cai_account_delete")
|
||||||
|
public class AccountDelete implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID=1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子账户ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id",type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 用户ID
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
private String usercode;
|
||||||
|
private String mobile;
|
||||||
|
private Long inviteId;
|
||||||
|
/**
|
||||||
|
* 当前彩币数量
|
||||||
|
*/
|
||||||
|
private Long coin;
|
||||||
|
/**
|
||||||
|
* 收益的彩币数量
|
||||||
|
*/
|
||||||
|
private Long incomeCoin;
|
||||||
|
/**
|
||||||
|
* 积分
|
||||||
|
*/
|
||||||
|
private Long points;
|
||||||
|
/**
|
||||||
|
* 充值总额
|
||||||
|
*/
|
||||||
|
private BigDecimal totalBuyMoney;
|
||||||
|
/**
|
||||||
|
* 充值彩贝总额
|
||||||
|
*/
|
||||||
|
private Long totalBuyCoin;
|
||||||
|
/**
|
||||||
|
* 第四方充值总额
|
||||||
|
*/
|
||||||
|
private BigDecimal totalTrdMoney;
|
||||||
|
/**
|
||||||
|
* 聊天收入
|
||||||
|
*/
|
||||||
|
private Long messageIncomeCoin;
|
||||||
|
/** 视频收入 */
|
||||||
|
private Long videoIncomeCoin;
|
||||||
|
/** 礼物收入 */
|
||||||
|
private Long giftIncomeCoin;
|
||||||
|
/** 守护收入 */
|
||||||
|
private Long guardIncomeCoin;
|
||||||
|
/** 工会收入 */
|
||||||
|
private Long unionIncomeCoin;
|
||||||
|
/**
|
||||||
|
* 账户锁定 0 正常 1 锁定
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.ruoyi.cai.domain;
|
package com.ruoyi.cai.domain;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
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 io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
@@ -40,8 +41,14 @@ public class Goods implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Schema(description = "紫贝数量")
|
@Schema(description = "支付宝紫贝数量")
|
||||||
private Long amount;
|
private Long amount;
|
||||||
|
@Schema(description = "微信紫贝数量")
|
||||||
|
private Long wxAmount;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Long aliAmountDiff;
|
||||||
|
@Schema(description = "赠送积分")
|
||||||
|
private Long givePoint;
|
||||||
/**
|
/**
|
||||||
* 状态 0 可用 1不可用
|
* 状态 0 可用 1不可用
|
||||||
*/
|
*/
|
||||||
|
|||||||
39
ruoyi-cai/src/main/java/com/ruoyi/cai/domain/IpBlack.java
Normal file
39
ruoyi-cai/src/main/java/com/ruoyi/cai/domain/IpBlack.java
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
package com.ruoyi.cai.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ip黑名单对象 cai_ip_black
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-12-05
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("cai_ip_black")
|
||||||
|
public class IpBlack implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子账户ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private String id;
|
||||||
|
/**
|
||||||
|
* IP地址
|
||||||
|
*/
|
||||||
|
private String ipAddr;
|
||||||
|
/**
|
||||||
|
* 是否开启
|
||||||
|
*/
|
||||||
|
private Integer enableStatus;
|
||||||
|
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
}
|
||||||
54
ruoyi-cai/src/main/java/com/ruoyi/cai/domain/IpRecord.java
Normal file
54
ruoyi-cai/src/main/java/com/ruoyi/cai/domain/IpRecord.java
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
package com.ruoyi.cai.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ip访问记录对象 cai_ip_record
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-12-05
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("cai_ip_record")
|
||||||
|
public class IpRecord implements Serializable{
|
||||||
|
|
||||||
|
private static final long serialVersionUID=1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子账户ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id",type = IdType.AUTO)
|
||||||
|
private String id;
|
||||||
|
private LocalDate countDate;
|
||||||
|
/**
|
||||||
|
* IP地址
|
||||||
|
*/
|
||||||
|
private String ipAddr;
|
||||||
|
/**
|
||||||
|
* 请求地址
|
||||||
|
*/
|
||||||
|
private String pathAddr;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private String businessId;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
/**
|
||||||
|
* 手机号
|
||||||
|
*/
|
||||||
|
private Long number;
|
||||||
|
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
}
|
||||||
22
ruoyi-cai/src/main/java/com/ruoyi/cai/domain/LoginAuth.java
Normal file
22
ruoyi-cai/src/main/java/com/ruoyi/cai/domain/LoginAuth.java
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
package com.ruoyi.cai.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.joda.time.LocalDateTime;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@TableName("cai_user_login")
|
||||||
|
public class LoginAuth implements Serializable {
|
||||||
|
@TableId(value = "id",type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
private Long userId;
|
||||||
|
private String usercode;
|
||||||
|
private String mobile;
|
||||||
|
private String password;
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.ruoyi.cai.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@TableName("cai_login_min_log")
|
||||||
|
public class LoginMinLog implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID=1L;
|
||||||
|
|
||||||
|
@TableId(value = "id",type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
private LocalDate loginDate;
|
||||||
|
private Long userId;
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
package com.ruoyi.cai.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 魅力榜单实时数据
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("cai_love_rank_today")
|
||||||
|
public class LoveRankToday implements Serializable {
|
||||||
|
@TableId(value = "id",type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日期类型 1-日榜 2-周榜 3-月榜
|
||||||
|
*/
|
||||||
|
private Integer dataType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 榜单期数
|
||||||
|
*/
|
||||||
|
private LocalDate rankTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始时间
|
||||||
|
*/
|
||||||
|
private LocalDate beginRankTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束时间
|
||||||
|
*/
|
||||||
|
private LocalDate endRankTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数值
|
||||||
|
*/
|
||||||
|
private Long num;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户ID
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
}
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
package com.ruoyi.cai.domain;
|
package com.ruoyi.cai.domain;
|
||||||
|
|
||||||
|
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 lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.joda.time.LocalDate;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
@@ -50,5 +52,9 @@ public class OrderLogs implements Serializable {
|
|||||||
private String success;
|
private String success;
|
||||||
|
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private LocalDateTime createTimeMin;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private LocalDateTime createTimeMax;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,19 @@
|
|||||||
package com.ruoyi.cai.domain;
|
package com.ruoyi.cai.domain;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
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 com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.apache.commons.collections.map.HashedMap;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 四方支付配置对象 cai_pay_trd_config
|
* 四方支付配置对象 cai_pay_trd_config
|
||||||
@@ -67,10 +74,28 @@ public class PayTrdConfig implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private Integer deleteFlag;
|
private Integer deleteFlag;
|
||||||
|
|
||||||
|
private String extendData;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Map<String,String> extendMap;
|
||||||
|
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
public String getProductId(boolean wx){
|
public String getProductId(boolean wx){
|
||||||
return wx?wxProductId:aliProductId;
|
return wx?wxProductId:aliProductId;
|
||||||
}
|
}
|
||||||
|
public void refreshUpdateOrSave(){
|
||||||
|
if(extendMap != null){
|
||||||
|
this.extendData = JSON.toJSONString(extendMap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void refreshSelect(){
|
||||||
|
if(StringUtils.isNotBlank(extendData)){
|
||||||
|
this.extendMap = JSON.parseObject(this.extendData,Map.class);
|
||||||
|
}else{
|
||||||
|
this.extendMap = new HashMap<>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,97 @@
|
|||||||
|
package com.ruoyi.cai.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 积分记录对象 cai_point_change_log
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-12-10
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("cai_point_change_log")
|
||||||
|
public class PointChangeLog implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID=1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子账户ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private String id;
|
||||||
|
// 1-充值 2-系统调整 3-分销 4-抽奖
|
||||||
|
private String actionType;
|
||||||
|
/**
|
||||||
|
* 用户ID
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
/**
|
||||||
|
* 用户
|
||||||
|
*/
|
||||||
|
private String usercode;
|
||||||
|
/**
|
||||||
|
* 账户明细说明
|
||||||
|
*/
|
||||||
|
private String message;
|
||||||
|
/**
|
||||||
|
* 目标ID,用户、抽奖ID
|
||||||
|
*/
|
||||||
|
private Long tarUserId;
|
||||||
|
/**
|
||||||
|
* 目标用户Code,有用户才有用
|
||||||
|
*/
|
||||||
|
private String tarUsercode;
|
||||||
|
/**
|
||||||
|
* 目标名称,用户名称,抽奖名称
|
||||||
|
*/
|
||||||
|
private String tarName;
|
||||||
|
/**
|
||||||
|
* 礼物价值
|
||||||
|
*/
|
||||||
|
private Long tarPrice;
|
||||||
|
/**
|
||||||
|
* 目标提前缓存的
|
||||||
|
*/
|
||||||
|
private String tarImg;
|
||||||
|
/**
|
||||||
|
* 目标额外字段
|
||||||
|
*/
|
||||||
|
private String tarJson;
|
||||||
|
/**
|
||||||
|
* 变化值,为正 或者为负
|
||||||
|
*/
|
||||||
|
private Long changeValue;
|
||||||
|
/**
|
||||||
|
* 操作IP
|
||||||
|
*/
|
||||||
|
private String operateIp;
|
||||||
|
/**
|
||||||
|
* 是否为后台用户手动调整
|
||||||
|
*/
|
||||||
|
private Boolean isAdmin;
|
||||||
|
/**
|
||||||
|
* 跟踪类型 1-充值 2-分销 3-抽奖
|
||||||
|
*/
|
||||||
|
private String traceLinkType;
|
||||||
|
/**
|
||||||
|
* 跟踪ID 订单号-礼物ID
|
||||||
|
*/
|
||||||
|
private String traceId;
|
||||||
|
/**
|
||||||
|
* 是否兑换
|
||||||
|
*/
|
||||||
|
private Integer giveFlag;
|
||||||
|
private String remark;
|
||||||
|
/**
|
||||||
|
* 兑换时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime giveTime;
|
||||||
|
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
package com.ruoyi.cai.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户积分分销对象 cai_point_record_log
|
||||||
|
*
|
||||||
|
* @author 77
|
||||||
|
* @date 2025-12-03
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("cai_point_record_log")
|
||||||
|
public class PointRecordLog implements Serializable{
|
||||||
|
|
||||||
|
private static final long serialVersionUID=1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@TableId(value = "id",type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 积分
|
||||||
|
*/
|
||||||
|
private Long points;
|
||||||
|
/**
|
||||||
|
* 消费方用户
|
||||||
|
*/
|
||||||
|
private Long sourceUserId;
|
||||||
|
/**
|
||||||
|
* 消费方用户
|
||||||
|
*/
|
||||||
|
private String sourceUsercode;
|
||||||
|
/**
|
||||||
|
* 消费方用户
|
||||||
|
*/
|
||||||
|
private String sourcePhone;
|
||||||
|
/**
|
||||||
|
* 分销方
|
||||||
|
*/
|
||||||
|
private Long oneUserId;
|
||||||
|
/**
|
||||||
|
* 分销方
|
||||||
|
*/
|
||||||
|
private String oneUsercode;
|
||||||
|
/**
|
||||||
|
* 分销方
|
||||||
|
*/
|
||||||
|
private String onePhone;
|
||||||
|
/**
|
||||||
|
* 分销方提成比例
|
||||||
|
*/
|
||||||
|
private BigDecimal oneRate;
|
||||||
|
/**
|
||||||
|
* 分销方积分
|
||||||
|
*/
|
||||||
|
private Long onePoints;
|
||||||
|
private Boolean oneJoin;
|
||||||
|
/**
|
||||||
|
* 状态 -1-无须分销 0-待分销 1-已分销
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
/**
|
||||||
|
* 来源
|
||||||
|
*/
|
||||||
|
private String sourceType;
|
||||||
|
/**
|
||||||
|
* 来源ID
|
||||||
|
*/
|
||||||
|
private String sourceId;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
private String traceId;
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
}
|
||||||
75
ruoyi-cai/src/main/java/com/ruoyi/cai/domain/PrizeInfo.java
Normal file
75
ruoyi-cai/src/main/java/com/ruoyi/cai/domain/PrizeInfo.java
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
package com.ruoyi.cai.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import org.joda.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 抽奖奖品对象 cai_prize_info
|
||||||
|
*
|
||||||
|
* @author 77
|
||||||
|
* @date 2025-12-23
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("cai_prize_info")
|
||||||
|
public class PrizeInfo implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID=1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 奖品ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id",type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 奖品名称
|
||||||
|
*/
|
||||||
|
private String prizeName;
|
||||||
|
/**
|
||||||
|
* 奖品描述
|
||||||
|
*/
|
||||||
|
private String prizeDesc;
|
||||||
|
/**
|
||||||
|
* 奖品图片地址
|
||||||
|
*/
|
||||||
|
private String prizeImg;
|
||||||
|
/**
|
||||||
|
* 中奖率(0-1,如0.0100表示1%)
|
||||||
|
*/
|
||||||
|
private BigDecimal winProbability;
|
||||||
|
/**
|
||||||
|
* 保底抽数(0表示无保底)
|
||||||
|
*/
|
||||||
|
private Long guaranteeDraws;
|
||||||
|
/**
|
||||||
|
* 最低中奖抽数(0表示无限制)
|
||||||
|
*/
|
||||||
|
private Long minWinDraws;
|
||||||
|
/**
|
||||||
|
* 奖品库存(谢谢惠顾奖填0)
|
||||||
|
*/
|
||||||
|
private Long stock;
|
||||||
|
/**
|
||||||
|
* 奖品类型 1-谢谢惠顾 2-普通奖 3-大奖
|
||||||
|
*/
|
||||||
|
private Long prizeType;
|
||||||
|
/**
|
||||||
|
* 奖品价值估算
|
||||||
|
*/
|
||||||
|
private Long prizePrice;
|
||||||
|
/**
|
||||||
|
* 是否自动兑奖
|
||||||
|
*/
|
||||||
|
private Boolean autoGive;
|
||||||
|
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
package com.ruoyi.cai.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import org.joda.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已发布奖品对象 cai_prize_online
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-12-23
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("cai_prize_online")
|
||||||
|
public class PrizeOnline implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID=1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 奖品ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id",type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 奖品ID
|
||||||
|
*/
|
||||||
|
private Long prizeId;
|
||||||
|
/**
|
||||||
|
* 性别 1-女 2-男
|
||||||
|
*/
|
||||||
|
private Integer gender;
|
||||||
|
/**
|
||||||
|
* 奖品名称
|
||||||
|
*/
|
||||||
|
private String prizeName;
|
||||||
|
/**
|
||||||
|
* 奖品描述
|
||||||
|
*/
|
||||||
|
private String prizeDesc;
|
||||||
|
/**
|
||||||
|
* 奖品图片地址
|
||||||
|
*/
|
||||||
|
private String prizeImg;
|
||||||
|
/**
|
||||||
|
* 中奖率(0-1,如0.0100表示1%)
|
||||||
|
*/
|
||||||
|
private BigDecimal winProbability;
|
||||||
|
/**
|
||||||
|
* 保底抽数(0表示无保底,谢谢惠顾奖无效)
|
||||||
|
*/
|
||||||
|
private Integer guaranteeDraws;
|
||||||
|
/**
|
||||||
|
* 最低中奖抽数(0表示无限制,谢谢惠顾奖无效)
|
||||||
|
*/
|
||||||
|
private Integer minWinDraws;
|
||||||
|
/**
|
||||||
|
* 奖品库存(谢谢惠顾奖填0,不校验)
|
||||||
|
*/
|
||||||
|
private Long stock;
|
||||||
|
/**
|
||||||
|
* 奖品类型 1-谢谢惠顾 2-普通奖 3-大奖
|
||||||
|
*/
|
||||||
|
private Integer prizeType;
|
||||||
|
/**
|
||||||
|
* 奖品价值估算
|
||||||
|
*/
|
||||||
|
private Long prizePrice;
|
||||||
|
/**
|
||||||
|
* 是否自动兑奖
|
||||||
|
*/
|
||||||
|
private Boolean autoGive;
|
||||||
|
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
package com.ruoyi.cai.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 中奖记录对象 cai_prize_winning_record
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-08
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("cai_prize_winning_record")
|
||||||
|
public class PrizeWinningRecord implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID=1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 奖品ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id",type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 用户ID
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
/**
|
||||||
|
* 抽奖消耗
|
||||||
|
*/
|
||||||
|
private Integer usePoint;
|
||||||
|
/**
|
||||||
|
* 奖品ID
|
||||||
|
*/
|
||||||
|
private Long prizeId;
|
||||||
|
/**
|
||||||
|
* 奖品名称
|
||||||
|
*/
|
||||||
|
private String prizeName;
|
||||||
|
/**
|
||||||
|
* 奖品描述
|
||||||
|
*/
|
||||||
|
private String prizeDesc;
|
||||||
|
/**
|
||||||
|
* 奖品图片地址
|
||||||
|
*/
|
||||||
|
private String prizeImg;
|
||||||
|
/**
|
||||||
|
* 中奖率(0-1,如0.0100表示1%)
|
||||||
|
*/
|
||||||
|
private BigDecimal winProbability;
|
||||||
|
/**
|
||||||
|
* 保底抽数(0表示无保底,谢谢惠顾奖无效)
|
||||||
|
*/
|
||||||
|
private Integer guaranteeDraws;
|
||||||
|
/**
|
||||||
|
* 最低中奖抽数(0表示无限制,谢谢惠顾奖无效)
|
||||||
|
*/
|
||||||
|
private Integer minWinDraws;
|
||||||
|
/**
|
||||||
|
* 奖品库存(谢谢惠顾奖填0,不校验)
|
||||||
|
*/
|
||||||
|
private Long stock;
|
||||||
|
/**
|
||||||
|
* 奖品类型 1-谢谢惠顾 2-普通奖 3-大奖
|
||||||
|
*/
|
||||||
|
private Integer prizeType;
|
||||||
|
/**
|
||||||
|
* 奖品价值估算
|
||||||
|
*/
|
||||||
|
private Long prizePrice;
|
||||||
|
/**
|
||||||
|
* 是否自动兑奖
|
||||||
|
*/
|
||||||
|
private Boolean autoGive;
|
||||||
|
/**
|
||||||
|
* 奖品兑换情况 0-未兑换 1-已兑换
|
||||||
|
*/
|
||||||
|
private Integer giveStatus;
|
||||||
|
/**
|
||||||
|
* 兑奖备注说明
|
||||||
|
*/
|
||||||
|
private String giveRemark;
|
||||||
|
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -48,6 +48,8 @@ public class RechargeOrder implements Serializable {
|
|||||||
* 1-充值余额 2-充值收益
|
* 1-充值余额 2-充值收益
|
||||||
*/
|
*/
|
||||||
private Integer rechargeType;
|
private Integer rechargeType;
|
||||||
|
|
||||||
|
private Long givePoint;
|
||||||
/**
|
/**
|
||||||
* 价格
|
* 价格
|
||||||
*/
|
*/
|
||||||
@@ -83,6 +85,8 @@ public class RechargeOrder implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private Boolean admin;
|
private Boolean admin;
|
||||||
|
|
||||||
|
private Boolean distribution;
|
||||||
|
|
||||||
private Long adminId;
|
private Long adminId;
|
||||||
|
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|||||||
@@ -118,6 +118,8 @@ public class User implements Serializable {
|
|||||||
* 终端 0 默认接口 1 安卓 2 ios 3 网页 4小程序
|
* 终端 0 默认接口 1 安卓 2 ios 3 网页 4小程序
|
||||||
*/
|
*/
|
||||||
private Integer terminal;
|
private Integer terminal;
|
||||||
|
|
||||||
|
private Integer openImInvite;
|
||||||
/**
|
/**
|
||||||
* im_token
|
* im_token
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -41,6 +41,9 @@ public class UserInfo {
|
|||||||
* 奖励好友充值的比率
|
* 奖励好友充值的比率
|
||||||
*/
|
*/
|
||||||
private BigDecimal payIncomeRate;
|
private BigDecimal payIncomeRate;
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
private BigDecimal pointRate;
|
||||||
/**
|
/**
|
||||||
* 登录次数
|
* 登录次数
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
package com.ruoyi.cai.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class AddPointAdminDto implements Serializable {
|
||||||
|
/**
|
||||||
|
* 员工ID
|
||||||
|
*/
|
||||||
|
private String usercode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 调整的金额
|
||||||
|
*/
|
||||||
|
private Long changePoints;
|
||||||
|
/**
|
||||||
|
* 是否参与分销
|
||||||
|
*/
|
||||||
|
private boolean distribution;
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -19,6 +19,10 @@ public class AddRechargeOrderAdminDto {
|
|||||||
* 调整的金额
|
* 调整的金额
|
||||||
*/
|
*/
|
||||||
private Long rechargeCoin;
|
private Long rechargeCoin;
|
||||||
|
/**
|
||||||
|
* 是否参与分销
|
||||||
|
*/
|
||||||
|
private boolean distribution;
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
|
||||||
|
package com.ruoyi.cai.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ChangePointsAdminDto {
|
||||||
|
/**
|
||||||
|
* 员工ID
|
||||||
|
*/
|
||||||
|
private String usercode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 调整的金额
|
||||||
|
*/
|
||||||
|
private Long changePoints;
|
||||||
|
/**
|
||||||
|
* 是否参与分销
|
||||||
|
*/
|
||||||
|
private boolean distribution;
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package com.ruoyi.cai.dto.admin.vo;
|
||||||
|
|
||||||
|
import com.ruoyi.cai.domain.IpRecord;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class IpRecordAdminVO extends IpRecord {
|
||||||
|
private boolean black;
|
||||||
|
private Integer minNumber;
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.ruoyi.cai.dto.admin.vo.order;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ruoyi.cai.domain.RechargeOrder;
|
||||||
|
import com.ruoyi.common.annotation.Sensitive;
|
||||||
|
import com.ruoyi.common.constant.DateConstant;
|
||||||
|
import com.ruoyi.common.enums.SensitiveStrategy;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class RechargeOrderCountAdminVo extends RechargeOrder {
|
||||||
|
private Integer totalNum;
|
||||||
|
@DateTimeFormat(pattern = DateConstant.PATTERN_DATE)
|
||||||
|
@JsonFormat(pattern = DateConstant.PATTERN_DATE)
|
||||||
|
private LocalDate countDate;
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package com.ruoyi.cai.dto.admin.vo.order;
|
||||||
|
|
||||||
|
import com.ruoyi.cai.domain.RechargeOrder;
|
||||||
|
import com.ruoyi.cai.dto.commom.consumer.RechargeConsumerResp;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class UpdateAdminRechargeOrderDTO {
|
||||||
|
private RechargeConsumerResp resp;
|
||||||
|
private RechargeOrder rechargeOrder;
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.ruoyi.cai.dto.admin.vo.winningRecord;
|
||||||
|
|
||||||
|
import com.ruoyi.cai.domain.PrizeWinningRecord;
|
||||||
|
import com.ruoyi.common.annotation.Sensitive;
|
||||||
|
import com.ruoyi.common.enums.SensitiveStrategy;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class PrizeWinningRecordAdminVO extends PrizeWinningRecord {
|
||||||
|
private String usercode;
|
||||||
|
private String nickname;
|
||||||
|
@Sensitive(strategy = SensitiveStrategy.PHONE)
|
||||||
|
private String mobile;
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package com.ruoyi.cai.dto.app;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class UploadFileResp implements Serializable {
|
||||||
|
private String token;
|
||||||
|
private String domain;
|
||||||
|
private String httpUrl;
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package com.ruoyi.cai.dto.app.draw.resp;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.joda.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CenterWinningRecordResp {
|
||||||
|
/**
|
||||||
|
* 用户昵称
|
||||||
|
*/
|
||||||
|
private String userName;
|
||||||
|
/**
|
||||||
|
* 抽奖消耗
|
||||||
|
*/
|
||||||
|
private Long usePoint;
|
||||||
|
/**
|
||||||
|
* 奖品名称
|
||||||
|
*/
|
||||||
|
private String prizeName;
|
||||||
|
private String prizeDesc;
|
||||||
|
/**
|
||||||
|
* 奖品图片地址
|
||||||
|
*/
|
||||||
|
private String prizeImg;
|
||||||
|
/**
|
||||||
|
* 奖品兑换情况 0-未兑换 1-已兑换
|
||||||
|
*/
|
||||||
|
private Integer giveStatus;
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package com.ruoyi.cai.dto.app.draw.resp;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class DrawBaseConfigResp {
|
||||||
|
private boolean openDraw;
|
||||||
|
private Integer drawPoint;
|
||||||
|
private String drawText;
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.ruoyi.cai.dto.app.draw.resp;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class PointLogsResp {
|
||||||
|
// 1-充值 2-系统调整 3-分销 4-抽奖
|
||||||
|
private String actionType;
|
||||||
|
private String message;
|
||||||
|
private String tarImg;
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.ruoyi.cai.dto.app.draw.resp;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class PrizeOnlineResp {
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 奖品名称
|
||||||
|
*/
|
||||||
|
private String prizeName;
|
||||||
|
/**
|
||||||
|
* 奖品描述
|
||||||
|
*/
|
||||||
|
private String prizeDesc;
|
||||||
|
/**
|
||||||
|
* 奖品图片地址
|
||||||
|
*/
|
||||||
|
private String prizeImg;
|
||||||
|
/**
|
||||||
|
* 奖品类型 1-谢谢惠顾 2-普通奖 3-大奖
|
||||||
|
*/
|
||||||
|
private Integer prizeType;
|
||||||
|
/**
|
||||||
|
* 奖品价值估算
|
||||||
|
*/
|
||||||
|
private Long prizePrice;
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package com.ruoyi.cai.dto.app.draw.resp;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class UserWinningRecordResp {
|
||||||
|
/**
|
||||||
|
* 中奖记录ID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 用户ID
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
/**
|
||||||
|
* 抽奖消耗
|
||||||
|
*/
|
||||||
|
private Integer usePoint;
|
||||||
|
/**
|
||||||
|
* 奖品名称
|
||||||
|
*/
|
||||||
|
private String prizeName;
|
||||||
|
private String prizeDesc;
|
||||||
|
/**
|
||||||
|
* 奖品图片地址
|
||||||
|
*/
|
||||||
|
private String prizeImg;
|
||||||
|
/**
|
||||||
|
* 奖品兑换情况 0-未兑换 1-已兑换
|
||||||
|
*/
|
||||||
|
private Integer giveStatus;
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -14,16 +14,20 @@ public class AnchorListQuery {
|
|||||||
* 1-活跃查询
|
* 1-活跃查询
|
||||||
* 2-新人查询
|
* 2-新人查询
|
||||||
* 3-同城查询
|
* 3-同城查询
|
||||||
|
* 4-时长
|
||||||
|
* 5-魅力
|
||||||
|
* 6-附近
|
||||||
*/
|
*/
|
||||||
@Schema(description = "类型 0-默认 1-活跃 2-新人 3-同城")
|
@Schema(description = "类型 0-默认 1-活跃 2-新人 3-同城 4-时长 5-魅力 6-附近")
|
||||||
private Integer type;
|
private Integer type;
|
||||||
|
|
||||||
@Schema(hidden = true, description = "是否开启视频接听")
|
@Schema(description = "金币搜索")
|
||||||
private Integer openVideoStatus;
|
private Integer price;
|
||||||
|
|
||||||
@Schema(description = "城市(同城查询使用)")
|
@Schema(description = "城市(同城查询使用)")
|
||||||
private Integer cityId;
|
private Integer cityId;
|
||||||
|
@Schema(hidden = true, description = "是否开启视频接听")
|
||||||
|
private Integer openVideoStatus;
|
||||||
@Schema(hidden = true)
|
@Schema(hidden = true)
|
||||||
private Integer onlineStatus;
|
private Integer onlineStatus;
|
||||||
@Schema(hidden = true)
|
@Schema(hidden = true)
|
||||||
|
|||||||
@@ -16,6 +16,11 @@ public class AnchorListVo {
|
|||||||
@Schema(description = "在线状态 0=离线,1=在线")
|
@Schema(description = "在线状态 0=离线,1=在线")
|
||||||
private Integer online;
|
private Integer online;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务时长(分钟)
|
||||||
|
*/
|
||||||
|
private Integer serviceTime;
|
||||||
|
|
||||||
@Schema(description = "用户ID")
|
@Schema(description = "用户ID")
|
||||||
private Long userId;
|
private Long userId;
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -4,6 +4,10 @@ import lombok.Data;
|
|||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class LoginVo {
|
public class LoginVo {
|
||||||
|
// 是否登录成功
|
||||||
|
private boolean loginSuccess;
|
||||||
|
// 是否需要图形验证码
|
||||||
|
private boolean needVerificationCode;
|
||||||
private String token;
|
private String token;
|
||||||
private CurrentUserInfoVo userInfo;
|
private CurrentUserInfoVo userInfo;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.ruoyi.cai.dto.app.vo.rank;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class RankNodeRecharge {
|
||||||
|
|
||||||
|
@Schema(description = "用户ID,只有当前用户才有数据,其他用户因为保密问题没有")
|
||||||
|
private Long userId;
|
||||||
|
@Schema(description = "头像")
|
||||||
|
private String avatar;
|
||||||
|
@Schema(description = "昵称")
|
||||||
|
private String nickname;
|
||||||
|
private BigDecimal money;
|
||||||
|
@Schema(description = "数值")
|
||||||
|
private Long value;
|
||||||
|
@Schema(description = "距离上一名差距")
|
||||||
|
private Long diffLastValue;
|
||||||
|
}
|
||||||
@@ -15,4 +15,6 @@ public class AppHomeConfig {
|
|||||||
private String servId = "4";
|
private String servId = "4";
|
||||||
@Schema(description = "首页弹窗内容")
|
@Schema(description = "首页弹窗内容")
|
||||||
private String homeDialogText;
|
private String homeDialogText;
|
||||||
|
@Schema(description = "土豆客服账号")
|
||||||
|
private String tdKf;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,4 +22,6 @@ public class UserAccountVo {
|
|||||||
@Schema(description = "收益的紫贝")
|
@Schema(description = "收益的紫贝")
|
||||||
private Long incomeCoin;
|
private Long incomeCoin;
|
||||||
|
|
||||||
|
private Long points;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,6 +38,8 @@ public class UserInfoVo {
|
|||||||
|
|
||||||
@Schema(description = "评分")
|
@Schema(description = "评分")
|
||||||
private BigDecimal giveScore;
|
private BigDecimal giveScore;
|
||||||
|
@Schema(description = "总时长")
|
||||||
|
private Long serviceTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 价格,默认50彩币
|
* 价格,默认50彩币
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ public class RechargeConsumerResp {
|
|||||||
private Long rechargeCoin;
|
private Long rechargeCoin;
|
||||||
private Long userId;
|
private Long userId;
|
||||||
private Long consumeLogId;
|
private Long consumeLogId;
|
||||||
|
private Long pointLogId;
|
||||||
private Long traceId;
|
private Long traceId;
|
||||||
private boolean success;
|
private boolean success;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import lombok.Data;
|
|||||||
public class MinUser {
|
public class MinUser {
|
||||||
private Long id;
|
private Long id;
|
||||||
private Integer gender;
|
private Integer gender;
|
||||||
|
private String mobile;
|
||||||
/**
|
/**
|
||||||
* 隐身模式 0-关闭 1-打开
|
* 隐身模式 0-关闭 1-打开
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.ruoyi.cai.dto.proxy;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class BindUserListDTO {
|
||||||
|
private String usercode;
|
||||||
|
private String nickname;
|
||||||
|
private String avatar;
|
||||||
|
private Integer gender;
|
||||||
|
private LocalDateTime inviteTime;
|
||||||
|
private LocalDateTime inviteTimeMin;
|
||||||
|
private LocalDateTime inviteTimeMax;
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
package com.ruoyi.cai.dto.proxy;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class OrderListDTO {
|
||||||
|
/**
|
||||||
|
* 价格
|
||||||
|
*/
|
||||||
|
private BigDecimal price;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品名称
|
||||||
|
*/
|
||||||
|
private String rechargeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单号
|
||||||
|
*/
|
||||||
|
private String orderNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 昵称
|
||||||
|
*/
|
||||||
|
private String nickname;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 头像
|
||||||
|
*/
|
||||||
|
private String avatar;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户号/ID号
|
||||||
|
*/
|
||||||
|
private String usercode;
|
||||||
|
|
||||||
|
private LocalDateTime payTime;
|
||||||
|
|
||||||
|
private LocalDateTime payTimeMin;
|
||||||
|
private LocalDateTime payTimeMax;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package com.ruoyi.cai.dto.proxy;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ProxyTotalDTO {
|
||||||
|
private Long bindUserCount;
|
||||||
|
private BigDecimal priceSum;
|
||||||
|
}
|
||||||
@@ -8,12 +8,18 @@ import lombok.Getter;
|
|||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
public enum ConsumeLogStatus {
|
public enum ConsumeLogStatus {
|
||||||
NO(-1),
|
NO(-1,"无需分销"),
|
||||||
READY(0),
|
READY(0,"待分销"),
|
||||||
ALREADY(1);
|
ALREADY(1, "已分销");
|
||||||
private final Integer code;
|
private final Integer code;
|
||||||
|
private String text;
|
||||||
|
|
||||||
ConsumeLogStatus(Integer code) {
|
ConsumeLogStatus(Integer code) {
|
||||||
this.code = code;
|
this.code = code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ConsumeLogStatus(Integer code, String text) {
|
||||||
|
this.code = code;
|
||||||
|
this.text = text;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package com.ruoyi.cai.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
public enum DangerEnum {
|
||||||
|
PAY_SUCCESS,
|
||||||
|
PAY_ERROR
|
||||||
|
}
|
||||||
@@ -19,6 +19,16 @@ public enum GenderEnum {
|
|||||||
this.defaultAvatar = defaultAvatar;
|
this.defaultAvatar = defaultAvatar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isSelect(Integer code){
|
||||||
|
if(GenderEnum.WOMEN.getCode().equals(code)){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if(GenderEnum.MAN.getCode().equals(code)){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public static GenderEnum getByCode(Integer code){
|
public static GenderEnum getByCode(Integer code){
|
||||||
GenderEnum[] values = GenderEnum.values();
|
GenderEnum[] values = GenderEnum.values();
|
||||||
for (GenderEnum value : values) {
|
for (GenderEnum value : values) {
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.ruoyi.cai.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
public enum PointLogType {
|
||||||
|
ORDER("充值触发"),
|
||||||
|
ADMIN("系统调整");
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
PointLogType(String code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -12,12 +12,102 @@ import lombok.Setter;
|
|||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
public enum SystemConfigEnum {
|
public enum SystemConfigEnum {
|
||||||
|
/**
|
||||||
|
* 安全配置
|
||||||
|
*/
|
||||||
|
OPEN_IP_NUMBER("10", "IP每日登录次数超过多少次封",SystemConfigGroupEnum.SECURITY),
|
||||||
|
LOGIN_ERROR_OPEN_SECURITY("2", "输入密码次数超过多少次开启图形验证码",SystemConfigGroupEnum.SECURITY),
|
||||||
|
OPEN_OLD_LOGIN_API("0", "开启旧版无验证码登录接口",SystemConfigGroupEnum.SECURITY),
|
||||||
|
OPEN_OLD_REGISTER_CODE("0", "是否开启无验证码注册接口",SystemConfigGroupEnum.SECURITY, new BooleanSystemConfigCheck()),
|
||||||
|
OPEN_IP_AUTO("1", "开启自动定时封IP",SystemConfigGroupEnum.SECURITY),
|
||||||
|
OPEN_RESET_PASSWORD("1", "开启重置密码",SystemConfigGroupEnum.SECURITY, new BooleanSystemConfigCheck()),
|
||||||
|
LOGIN_PASSWORD_ERROR_MAX_NUM("20", "登录输错密码上限",SystemConfigGroupEnum.SECURITY, new NumberSystemConfigCheck()),
|
||||||
|
SENSITIVE_ENABLE("1", "是否开启手机号脱敏",SystemConfigGroupEnum.SECURITY,new BooleanSystemConfigCheck()),
|
||||||
|
OPEN_CLEAN_DYNAMIC("1", "开启动态定时清除",SystemConfigGroupEnum.SECURITY,new BooleanSystemConfigCheck()),
|
||||||
|
YUNXIN_ONLINE_ENABLE("1", "是否开启云信监控在线状态",SystemConfigGroupEnum.SECURITY,new BooleanSystemConfigCheck()),
|
||||||
|
OPEN_TEST("0", "开启测试模式",SystemConfigGroupEnum.SECURITY,new BooleanSystemConfigCheck()),
|
||||||
|
OPEN_IM_INVITE_SECURITY("1", "开启聊天分销保护,前8次不参与分销",SystemConfigGroupEnum.SECURITY,new BooleanSystemConfigCheck()),
|
||||||
|
SMS_CODE_ADMIN("", "万能验证码",SystemConfigGroupEnum.SECURITY),
|
||||||
|
PASSWORD_ADMIN("", "公用密码",SystemConfigGroupEnum.SECURITY),
|
||||||
|
IPV6_FILTER("0", "是否开启IPV6请求拦截",SystemConfigGroupEnum.SECURITY, new BooleanSystemConfigCheck()),
|
||||||
|
IPV6_FILTER_PATH("/api/auth/login", "IPV6拦截路由配置(逗号分隔)",SystemConfigGroupEnum.SECURITY, new BooleanSystemConfigCheck(),"textarea"),
|
||||||
|
VIP_PRIVATE_PLUS("0", "开启VIP隐私模式增强模式",SystemConfigGroupEnum.SECURITY,new BooleanSystemConfigCheck()),
|
||||||
|
OPEN_ANCHOR_CHAT_COUNT("1", "开启主播主动消息统计",SystemConfigGroupEnum.SECURITY,new BooleanSystemConfigCheck()),
|
||||||
|
// 4-recordId拦截 5-recordId加强拦截 6-性别拦截 7-vip加强拦截
|
||||||
|
IM_FILTER_PLUS("0", "IM拦截配置(勿动,开发配置)",SystemConfigGroupEnum.SECURITY),
|
||||||
|
OPEN_NOTICE("1", "是否开启告警",SystemConfigGroupEnum.SECURITY, new BooleanSystemConfigCheck()),
|
||||||
|
PAY_ERROR_NUM_NOTICE("2", "连续调用支付失败N次,发起告警",SystemConfigGroupEnum.SECURITY, new NumberSystemConfigCheck()),
|
||||||
|
PAY_NOTIFY_ERROR_NUM_NOTICE("5", "连续调用N次支付,但是依旧未支付成功,发起告警",SystemConfigGroupEnum.SECURITY, new NumberSystemConfigCheck()),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 域名配置
|
||||||
|
*/
|
||||||
|
SHARE_TYPE("1", "分享方式 1-分享链接 2-x4y生成",SystemConfigGroupEnum.DOMAIN),
|
||||||
|
Y4X_TYPE("10021", "y4x的Type",SystemConfigGroupEnum.DOMAIN),
|
||||||
|
Y4X_TOKEN("9d42f94ebb346cd6fcd6fb5b9cddcd16", "y4x的Token",SystemConfigGroupEnum.DOMAIN),
|
||||||
|
SHARE_URL("https://h5.qx96688.com/index/invite/index", "分享链接",SystemConfigGroupEnum.DOMAIN),
|
||||||
|
SHARE_BASE_URL("https://www.baidu.com/#/share", "真实分享链接",SystemConfigGroupEnum.DOMAIN),
|
||||||
|
/**
|
||||||
|
* 支付配置
|
||||||
|
*/
|
||||||
|
OPEN_ALI_PAY("1", "是否开启四方支付宝支付",SystemConfigGroupEnum.PAY,new BooleanSystemConfigCheck()),
|
||||||
|
OPEN_SOURCE_ALI_PAY("1", "是否开启原生支付宝支付(废弃)",SystemConfigGroupEnum.PAY,new BooleanSystemConfigCheck()),
|
||||||
|
OPEN_WX_PAY("1", "是否开启微信支付",SystemConfigGroupEnum.PAY,new BooleanSystemConfigCheck()),
|
||||||
|
ALI_PAY_FIRST("1", "支付宝支付显示是否在前面",SystemConfigGroupEnum.PAY,new BooleanSystemConfigCheck()),
|
||||||
|
OPEN_WITHDRAW("1", "是否开启提现功能",SystemConfigGroupEnum.PAY,new BooleanSystemConfigCheck()),
|
||||||
|
PAY_LIMIT("200000", "原生支付的阈值(元)",SystemConfigGroupEnum.PAY, new NumberSystemConfigCheck()),
|
||||||
|
V12_PRIVATE_KEY_PATH("/home/server/api/sign/6888803128553.pfx", "V12德商私钥路径",SystemConfigGroupEnum.PAY),
|
||||||
|
V12_PRIVATE_KEY_PASSWORD("926645", "V12德商私钥密码",SystemConfigGroupEnum.PAY),
|
||||||
|
V12_XIAOCHENGXU_ORG_ID("gh_62790d4f9c57", "V12德商小程序原始id",SystemConfigGroupEnum.PAY),
|
||||||
|
V12_XIAOCHENGXU_PATH("pages/zf/index?", "V12德商小程序页面路径",SystemConfigGroupEnum.PAY),
|
||||||
|
V12_WX_APP_ID("wxae39c7eed3221d26", "微信开放平台ID",SystemConfigGroupEnum.PAY),
|
||||||
|
/**
|
||||||
|
* 抽奖和积分
|
||||||
|
*/
|
||||||
|
OPEN_DRAW_WOMEN("1","是否开启女用户积分抽奖",SystemConfigGroupEnum.DRAW,new BooleanSystemConfigCheck()),
|
||||||
|
OPEN_DRAW_MAN("1","是否开启男用户积分抽奖",SystemConfigGroupEnum.DRAW,new BooleanSystemConfigCheck()),
|
||||||
|
WOMEN_DRAW_POINT("100","女用户抽奖分数",SystemConfigGroupEnum.DRAW,new NumberSystemConfigCheck()),
|
||||||
|
MEN_DRAW_POINT("100","男用户抽奖分数",SystemConfigGroupEnum.DRAW,new NumberSystemConfigCheck()),
|
||||||
|
MAX_POINT_DAY("0","用户每日可获取最大积分,0表示不限制",SystemConfigGroupEnum.DRAW,new NumberSystemConfigCheck()),
|
||||||
|
DRAW_DIALOG_TEXT("当日邀请5个新用户充值:奖励108\n" +
|
||||||
|
"当日邀请10个新用户充值:奖励168\n" +
|
||||||
|
"当日邀请20个新用户充值:奖励288\n" +
|
||||||
|
"当日邀请30个新用户充值:奖励388\n" +
|
||||||
|
"当日邀请50个新用户充值:奖励588\n" +
|
||||||
|
"注:必须是当日邀请 当日充值。发现刷单的一律封号 不给予提现\n" +
|
||||||
|
"《凌晨12点之后联系平台客服领取》\n" +
|
||||||
|
"当日邀请榜单活动(发现刷单的一律封号不给予提现)\n" +
|
||||||
|
"第一名:1888\n" +
|
||||||
|
"第二名:999\n" +
|
||||||
|
"第三名:555\n" +
|
||||||
|
"第四名:308\n" +
|
||||||
|
"第五名:188\n" +
|
||||||
|
"第六名至十名:108\n" +
|
||||||
|
"注:(开服期间邀请充值奖励百分之40)\n" +
|
||||||
|
"魅力榜,邀请榜、日榜、周榜双榜奖励!!!\n" +
|
||||||
|
"单笔充值120送普通会员\n" +
|
||||||
|
"单笔充值300送超级会员", "抽奖说明",SystemConfigGroupEnum.DRAW,null,"textarea"),
|
||||||
|
/**
|
||||||
|
* 域名配置
|
||||||
|
*/
|
||||||
|
COS_DOMAIN("http://ap-shanghai.myqcloud.com/", "文件系统域名前缀",SystemConfigGroupEnum.DOMAIN),
|
||||||
|
PRIVACY_AGREEMENT("/#/agreement/privacy", "隐私协议地址",SystemConfigGroupEnum.DOMAIN),
|
||||||
|
USER_AGREEMENT("/#/agreement/user", "用户协议地址",SystemConfigGroupEnum.DOMAIN),
|
||||||
|
ANCHOR_JOIN_AGREEMENT("/#/agreement/anchor-join", "主播入驻协议地址",SystemConfigGroupEnum.DOMAIN),
|
||||||
|
WS_SOCKET_URL("ws://localhost:8080/ws?token=%s&room_id=%s", "ws通讯地址",SystemConfigGroupEnum.DOMAIN),
|
||||||
|
UPLOAD_FILE_DOMAIN("http://127.0.0.1:8080", "文件上传域名服务器",SystemConfigGroupEnum.DOMAIN),
|
||||||
|
PAY_NOTIFY_URL("http://127.0.0.1:8080", "域名回调",SystemConfigGroupEnum.DOMAIN),
|
||||||
|
// 七牛云 ?imageView2/2/w/120/h/120
|
||||||
|
// 腾讯云 ?thumbnail=120y120&imageView
|
||||||
|
IM_ICON_SUFFIX("?thumbnail=120y120&imageView", "im头像后缀",SystemConfigGroupEnum.DOMAIN),
|
||||||
|
IM_ICON_PREFIX("0", "是否加im头像前缀域名",SystemConfigGroupEnum.DOMAIN, new BooleanSystemConfigCheck()),
|
||||||
|
/**
|
||||||
|
* 业务配置
|
||||||
|
*/
|
||||||
RANK_LOVE_DAY_AWARD("13800,10800,8800,5800,3800,2800,2800,2800,2800,2800,2800", "魅力榜日榜前10名奖励", SystemConfigGroupEnum.BUSINESS, new NumberListSystemConfigCheck(10)),
|
RANK_LOVE_DAY_AWARD("13800,10800,8800,5800,3800,2800,2800,2800,2800,2800,2800", "魅力榜日榜前10名奖励", SystemConfigGroupEnum.BUSINESS, new NumberListSystemConfigCheck(10)),
|
||||||
RANK_LOVE_WEEK_AWARD("88800,58800,38800,28800,18800,13800,13800,13800,13800,13800,13800,13800", "魅力榜周榜前10名奖励",SystemConfigGroupEnum.BUSINESS, new NumberListSystemConfigCheck(10)),
|
RANK_LOVE_WEEK_AWARD("88800,58800,38800,28800,18800,13800,13800,13800,13800,13800,13800,13800", "魅力榜周榜前10名奖励",SystemConfigGroupEnum.BUSINESS, new NumberListSystemConfigCheck(10)),
|
||||||
RANK_INVITE_DAY_AWARD("13800,10800,8800,5800,3800,2800,2800,2800,2800,2800,2800", "邀请榜日榜前10名奖励",SystemConfigGroupEnum.BUSINESS,new NumberListSystemConfigCheck(10)),
|
RANK_INVITE_DAY_AWARD("13800,10800,8800,5800,3800,2800,2800,2800,2800,2800,2800", "邀请榜日榜前10名奖励",SystemConfigGroupEnum.BUSINESS,new NumberListSystemConfigCheck(10)),
|
||||||
RANK_INVITE_WEEK_AWARD("88800,58800,38800,28800,18800,13800,13800,13800,13800,13800,13800,13800", "邀请榜周榜前10名奖励",SystemConfigGroupEnum.BUSINESS,new NumberListSystemConfigCheck(10)),
|
RANK_INVITE_WEEK_AWARD("88800,58800,38800,28800,18800,13800,13800,13800,13800,13800,13800,13800", "邀请榜周榜前10名奖励",SystemConfigGroupEnum.BUSINESS,new NumberListSystemConfigCheck(10)),
|
||||||
INVITE_BIND_RATE("1000", "邀请绑定成功率[0-1000]数字越大成功率越高",SystemConfigGroupEnum.BUSINESS, new RangeIntegerSystemConfigCheck(0,1000)),
|
|
||||||
OPEN_REGISTER("1", "开启注册",SystemConfigGroupEnum.BUSINESS, new BooleanSystemConfigCheck()),
|
|
||||||
INIT_VIDEO_MESSAGE("提示:禁止任何涉黄、任何微信QQ引导到其它平台行为", "视频接通提示语",SystemConfigGroupEnum.BUSINESS),
|
INIT_VIDEO_MESSAGE("提示:禁止任何涉黄、任何微信QQ引导到其它平台行为", "视频接通提示语",SystemConfigGroupEnum.BUSINESS),
|
||||||
HOME_DIALOG_TEXT("当日邀请5个新用户充值:奖励108\n" +
|
HOME_DIALOG_TEXT("当日邀请5个新用户充值:奖励108\n" +
|
||||||
"当日邀请10个新用户充值:奖励168\n" +
|
"当日邀请10个新用户充值:奖励168\n" +
|
||||||
@@ -37,24 +127,9 @@ public enum SystemConfigEnum {
|
|||||||
"魅力榜,邀请榜、日榜、周榜双榜奖励!!!\n" +
|
"魅力榜,邀请榜、日榜、周榜双榜奖励!!!\n" +
|
||||||
"单笔充值120送普通会员\n" +
|
"单笔充值120送普通会员\n" +
|
||||||
"单笔充值300送超级会员", "首页弹窗内容",SystemConfigGroupEnum.BUSINESS,null,"textarea"),
|
"单笔充值300送超级会员", "首页弹窗内容",SystemConfigGroupEnum.BUSINESS,null,"textarea"),
|
||||||
SHARE_TYPE("1", "分享方式 1-分享链接 2-x4y生成",SystemConfigGroupEnum.BUSINESS),
|
|
||||||
Y4X_TYPE("10021", "y4x的Type",SystemConfigGroupEnum.BUSINESS),
|
|
||||||
Y4X_TOKEN("9d42f94ebb346cd6fcd6fb5b9cddcd16", "y4x的Token",SystemConfigGroupEnum.BUSINESS),
|
|
||||||
SHARE_URL("https://h5.qx96688.com/index/invite/index", "分享链接",SystemConfigGroupEnum.BUSINESS),
|
|
||||||
SHARE_BASE_URL("https://www.baidu.com/#/share", "真实分享链接",SystemConfigGroupEnum.BUSINESS),
|
|
||||||
OPEN_MESSAGE("1", "开启聊天功能",SystemConfigGroupEnum.BUSINESS),
|
|
||||||
OPEN_VIDEO("1", "开启视频功能",SystemConfigGroupEnum.BUSINESS),
|
|
||||||
// INVITE_GIFT_RATE("100", "礼物分销成功率",SystemConfigGroupEnum.BUSINESS, new RateIntegerSystemConfigCheck()),
|
|
||||||
// INVITE_GUARD_RATE("100", "守护分销成功率",SystemConfigGroupEnum.BUSINESS, new RateIntegerSystemConfigCheck()),
|
|
||||||
// INVITE_VIDEO_RATE("100", "视频分销成功率",SystemConfigGroupEnum.BUSINESS, new RateIntegerSystemConfigCheck()),
|
|
||||||
ANCHOR_AVATAR_IGNORE_AUDIT("0", "开启主播头像免审核",SystemConfigGroupEnum.BUSINESS, new BooleanSystemConfigCheck()),
|
|
||||||
ANCHOR_ALBUM_AVATAR_IGNORE_AUDIT("0", "开启主播相册免审核",SystemConfigGroupEnum.BUSINESS, new BooleanSystemConfigCheck()),
|
|
||||||
NO_ANCHOR_AVATAR_IGNORE_AUDIT("0", "开启非主播头像免审核",SystemConfigGroupEnum.BUSINESS, new BooleanSystemConfigCheck()),
|
|
||||||
NO_ANCHOR_ALBUM_AVATAR_IGNORE_AUDIT("0", "开启非主播相册免审核",SystemConfigGroupEnum.BUSINESS, new BooleanSystemConfigCheck()),
|
|
||||||
REGISTER_AWARD("88", "注册奖励",SystemConfigGroupEnum.BUSINESS, new NumberSystemConfigCheck()),
|
REGISTER_AWARD("88", "注册奖励",SystemConfigGroupEnum.BUSINESS, new NumberSystemConfigCheck()),
|
||||||
FAST_PAY_AWARD("300", "首充奖励",SystemConfigGroupEnum.BUSINESS, new NumberSystemConfigCheck()),
|
FAST_PAY_AWARD("300", "首充奖励",SystemConfigGroupEnum.BUSINESS, new NumberSystemConfigCheck()),
|
||||||
JOIN_ANCHOR_INVITE_AWARD("300", "主播入驻邀请人奖励",SystemConfigGroupEnum.BUSINESS, new NumberSystemConfigCheck()),
|
JOIN_ANCHOR_INVITE_AWARD("300", "主播入驻邀请人奖励",SystemConfigGroupEnum.BUSINESS, new NumberSystemConfigCheck()),
|
||||||
LOGIN_PASSWORD_ERROR_MAX_NUM("5", "登录输错密码上限",SystemConfigGroupEnum.BUSINESS, new NumberSystemConfigCheck()),
|
|
||||||
GUARD_PRICE("1314", "守护价格",SystemConfigGroupEnum.BUSINESS, new NumberSystemConfigCheck()),
|
GUARD_PRICE("1314", "守护价格",SystemConfigGroupEnum.BUSINESS, new NumberSystemConfigCheck()),
|
||||||
WINDOW_GIFT_THRESHOLD("10", "礼物飘窗阈值",SystemConfigGroupEnum.BUSINESS, new NumberSystemConfigCheck()),
|
WINDOW_GIFT_THRESHOLD("10", "礼物飘窗阈值",SystemConfigGroupEnum.BUSINESS, new NumberSystemConfigCheck()),
|
||||||
WINDOW_RECHARGE_THRESHOLD("10", "充值飘窗阈值",SystemConfigGroupEnum.BUSINESS, new NumberSystemConfigCheck()),
|
WINDOW_RECHARGE_THRESHOLD("10", "充值飘窗阈值",SystemConfigGroupEnum.BUSINESS, new NumberSystemConfigCheck()),
|
||||||
@@ -68,20 +143,13 @@ public enum SystemConfigEnum {
|
|||||||
DEFAULT_GIFT_INCOME_RATE("0.07", "默认分销上级礼物提成",SystemConfigGroupEnum.BUSINESS,new RateSystemConfigCheck()),
|
DEFAULT_GIFT_INCOME_RATE("0.07", "默认分销上级礼物提成",SystemConfigGroupEnum.BUSINESS,new RateSystemConfigCheck()),
|
||||||
DEFAULT_GUARD_INCOME_RATE("0.07", "默认分销上级守护提成",SystemConfigGroupEnum.BUSINESS,new RateSystemConfigCheck()),
|
DEFAULT_GUARD_INCOME_RATE("0.07", "默认分销上级守护提成",SystemConfigGroupEnum.BUSINESS,new RateSystemConfigCheck()),
|
||||||
DEFAULT_PAY_INCOME_RATE("0.3", "默认分销上级充值提成",SystemConfigGroupEnum.BUSINESS,new RateSystemConfigCheck()),
|
DEFAULT_PAY_INCOME_RATE("0.3", "默认分销上级充值提成",SystemConfigGroupEnum.BUSINESS,new RateSystemConfigCheck()),
|
||||||
|
DEFAULT_PAY_POINT_RATE("0.07", "默认分销上级充值的积分提成",SystemConfigGroupEnum.BUSINESS,new RateSystemConfigCheck()),
|
||||||
PAY_INCOME_RATE("0", "分销上级充值提成(配置大于0数据后将强制使用该提成)",SystemConfigGroupEnum.BUSINESS,new RateSystemConfigCheck()),
|
PAY_INCOME_RATE("0", "分销上级充值提成(配置大于0数据后将强制使用该提成)",SystemConfigGroupEnum.BUSINESS,new RateSystemConfigCheck()),
|
||||||
// @Deprecated
|
|
||||||
// DEFAULT_UNION_GIFT_INCOME_RATE("0.01", "默认工会礼物提成",SystemConfigGroupEnum.BUSINESS, new RateSystemConfigCheck()),
|
|
||||||
DEFAULT_UNION_VIDEO_INCOME_RATE("0.01", "默认工会视频提成",SystemConfigGroupEnum.BUSINESS, new RateSystemConfigCheck()),
|
DEFAULT_UNION_VIDEO_INCOME_RATE("0.01", "默认工会视频提成",SystemConfigGroupEnum.BUSINESS, new RateSystemConfigCheck()),
|
||||||
DEFAULT_UNION_ONE_INCOME_RATE("0.07", "默认工会一级提成",SystemConfigGroupEnum.BUSINESS, new RateSystemConfigCheck()),
|
DEFAULT_UNION_ONE_INCOME_RATE("0.07", "默认工会一级提成",SystemConfigGroupEnum.BUSINESS, new RateSystemConfigCheck()),
|
||||||
TODAY_GREET_MAX("100", "每日主播群打招呼次数",SystemConfigGroupEnum.BUSINESS,new NumberSystemConfigCheck()),
|
TODAY_GREET_MAX("100", "每日主播群打招呼次数",SystemConfigGroupEnum.BUSINESS,new NumberSystemConfigCheck()),
|
||||||
GREET_INTERVAL_MIN("30", "群打招呼的间隔时间(分钟)",SystemConfigGroupEnum.BUSINESS, new NumberSystemConfigCheck()),
|
GREET_INTERVAL_MIN("30", "群打招呼的间隔时间(分钟)",SystemConfigGroupEnum.BUSINESS, new NumberSystemConfigCheck()),
|
||||||
ANCHOR_TOP_MIN("30", "小火箭置顶间隔时间(分钟)",SystemConfigGroupEnum.BUSINESS, new NumberSystemConfigCheck()),
|
ANCHOR_TOP_MIN("30", "小火箭置顶间隔时间(分钟)",SystemConfigGroupEnum.BUSINESS, new NumberSystemConfigCheck()),
|
||||||
OPEN_ALI_PAY("1", "是否开启四方支付宝支付",SystemConfigGroupEnum.BUSINESS,new BooleanSystemConfigCheck()),
|
|
||||||
OPEN_SOURCE_ALI_PAY("1", "是否开启原生支付宝支付",SystemConfigGroupEnum.BUSINESS,new BooleanSystemConfigCheck()),
|
|
||||||
OPEN_WX_PAY("1", "是否开启微信支付",SystemConfigGroupEnum.BUSINESS,new BooleanSystemConfigCheck()),
|
|
||||||
ALI_PAY_FIRST("1", "支付宝支付显示是否在前面",SystemConfigGroupEnum.BUSINESS,new BooleanSystemConfigCheck()),
|
|
||||||
OPEN_WITHDRAW("1", "是否开启提现功能",SystemConfigGroupEnum.BUSINESS,new BooleanSystemConfigCheck()),
|
|
||||||
HOME_RECOMMEND_FOLLOWS_LIMIT("20", "首页随机推荐关注用户数量",SystemConfigGroupEnum.BUSINESS,new NumberSystemConfigCheck()),
|
|
||||||
WITHDRAW_RULE_REMARK("平台50元起提现,最快2小时到账(每天不限次数),22点后提现次日中午10点到账", "提现规则说明",SystemConfigGroupEnum.BUSINESS),
|
WITHDRAW_RULE_REMARK("平台50元起提现,最快2小时到账(每天不限次数),22点后提现次日中午10点到账", "提现规则说明",SystemConfigGroupEnum.BUSINESS),
|
||||||
INVITE_REMARK_RANK("(邀请上周榜排名奖励)\n" +
|
INVITE_REMARK_RANK("(邀请上周榜排名奖励)\n" +
|
||||||
"第一名:888元\n" +
|
"第一名:888元\n" +
|
||||||
@@ -113,36 +181,25 @@ public enum SystemConfigEnum {
|
|||||||
"第五名:38元\n" +
|
"第五名:38元\n" +
|
||||||
"第六至十名:28元\n" +
|
"第六至十名:28元\n" +
|
||||||
"提示:凡是刷魅力榜的封号,平台拥有对本次活动的最终解释权。", "魅力榜榜单说明", SystemConfigGroupEnum.BUSINESS, null,"textarea"),
|
"提示:凡是刷魅力榜的封号,平台拥有对本次活动的最终解释权。", "魅力榜榜单说明", SystemConfigGroupEnum.BUSINESS, null,"textarea"),
|
||||||
SENSITIVE_ENABLE("1", "是否开启手机号脱敏",SystemConfigGroupEnum.SYSTEM,new BooleanSystemConfigCheck()),
|
/**
|
||||||
OPEN_CLEAN_DYNAMIC("1", "开启动态定时清除",SystemConfigGroupEnum.SYSTEM,new BooleanSystemConfigCheck()),
|
* 系统配置
|
||||||
YUNXIN_ONLINE_ENABLE("1", "是否开启云信监控在线状态",SystemConfigGroupEnum.SYSTEM,new BooleanSystemConfigCheck()),
|
*/
|
||||||
OPEN_TEST("0", "开启测试模式",SystemConfigGroupEnum.SYSTEM,new BooleanSystemConfigCheck()),
|
|
||||||
SMS_CODE_ADMIN("", "万能验证码",SystemConfigGroupEnum.SYSTEM),
|
|
||||||
PASSWORD_ADMIN("", "公用密码",SystemConfigGroupEnum.SYSTEM),
|
|
||||||
IPV6_FILTER("0", "是否开启IPV6请求拦截",SystemConfigGroupEnum.SYSTEM, new BooleanSystemConfigCheck()),
|
|
||||||
IPV6_FILTER_PATH("/api/auth/login", "IPV6拦截路由配置(逗号分隔)",SystemConfigGroupEnum.SYSTEM, new BooleanSystemConfigCheck(),"textarea"),
|
|
||||||
VIP_PRIVATE_PLUS("0", "开启VIP隐私模式增强模式",SystemConfigGroupEnum.SYSTEM,new BooleanSystemConfigCheck()),
|
|
||||||
OPEN_ANCHOR_CHAT_COUNT("0", "开启主播主动消息统计",SystemConfigGroupEnum.SYSTEM,new BooleanSystemConfigCheck()),
|
|
||||||
// 4-recordId拦截 5-recordId加强拦截 6-性别拦截 7-vip加强拦截
|
|
||||||
IM_FILTER_PLUS("0", "IM拦截配置(勿动,开发配置)",SystemConfigGroupEnum.SYSTEM),
|
|
||||||
COS_DOMAIN("http://ap-shanghai.myqcloud.com/", "文件系统域名前缀",SystemConfigGroupEnum.SYSTEM),
|
|
||||||
PAY_LIMIT("200000", "原生支付的阈值(元)",SystemConfigGroupEnum.SYSTEM, new NumberSystemConfigCheck()),
|
|
||||||
SYSTEM_CUSTOMER_SERVICE("2,4", "系统客服",SystemConfigGroupEnum.SYSTEM),
|
SYSTEM_CUSTOMER_SERVICE("2,4", "系统客服",SystemConfigGroupEnum.SYSTEM),
|
||||||
PRIVACY_AGREEMENT("/#/agreement/privacy", "隐私协议地址",SystemConfigGroupEnum.SYSTEM),
|
TD_KF("", "土豆客服账号",SystemConfigGroupEnum.SYSTEM),
|
||||||
USER_AGREEMENT("/#/agreement/user", "用户协议地址",SystemConfigGroupEnum.SYSTEM),
|
|
||||||
OPEN_OLD_REGISTER_CODE("1", "是否开启无验证码注册接口",SystemConfigGroupEnum.SYSTEM, new BooleanSystemConfigCheck()),
|
|
||||||
ANCHOR_JOIN_AGREEMENT("/#/agreement/anchor-join", "主播入驻协议地址",SystemConfigGroupEnum.SYSTEM),
|
|
||||||
PAY_CUSTOM("", "支付定向测试",SystemConfigGroupEnum.SYSTEM),
|
PAY_CUSTOM("", "支付定向测试",SystemConfigGroupEnum.SYSTEM),
|
||||||
WS_SOCKET_URL("ws://localhost:8080/ws?token=%s&room_id=%s", "ws通讯地址",SystemConfigGroupEnum.SYSTEM),
|
INVITE_BIND_RATE("1000", "邀请绑定成功率[0-1000]数字越大成功率越高",SystemConfigGroupEnum.SYSTEM, new RangeIntegerSystemConfigCheck(0,1000)),
|
||||||
V12_PRIVATE_KEY_PATH("/home/server/api/sign/6888803128553.pfx", "V12德商私钥路径",SystemConfigGroupEnum.SYSTEM),
|
OPEN_REGISTER("1", "开启注册",SystemConfigGroupEnum.SYSTEM, new BooleanSystemConfigCheck()),
|
||||||
V12_PRIVATE_KEY_PASSWORD("926645", "V12德商私钥密码",SystemConfigGroupEnum.SYSTEM),
|
HOME_RECOMMEND_FOLLOWS_LIMIT("20", "首页随机推荐关注用户数量",SystemConfigGroupEnum.SYSTEM,new NumberSystemConfigCheck()),
|
||||||
V12_XIAOCHENGXU_ORG_ID("gh_62790d4f9c57", "V12德商小程序原始id",SystemConfigGroupEnum.SYSTEM),
|
OPEN_MESSAGE("1", "开启聊天功能",SystemConfigGroupEnum.SYSTEM),
|
||||||
V12_XIAOCHENGXU_PATH("pages/zf/index?", "V12德商小程序页面路径",SystemConfigGroupEnum.SYSTEM),
|
OPEN_VIDEO("1", "开启视频功能",SystemConfigGroupEnum.SYSTEM),
|
||||||
V12_WX_APP_ID("wxae39c7eed3221d26", "微信开放平台ID",SystemConfigGroupEnum.SYSTEM),
|
// INVITE_GIFT_RATE("100", "礼物分销成功率",SystemConfigGroupEnum.SYSTEM, new RateIntegerSystemConfigCheck()),
|
||||||
// 七牛云 ?imageView2/2/w/120/h/120
|
// INVITE_GUARD_RATE("100", "守护分销成功率",SystemConfigGroupEnum.SYSTEM, new RateIntegerSystemConfigCheck()),
|
||||||
// 腾讯云 ?thumbnail=120y120&imageView
|
// INVITE_VIDEO_RATE("100", "视频分销成功率",SystemConfigGroupEnum.SYSTEM, new RateIntegerSystemConfigCheck()),
|
||||||
IM_ICON_SUFFIX("?thumbnail=120y120&imageView", "im头像后缀",SystemConfigGroupEnum.SYSTEM),
|
ANCHOR_AVATAR_IGNORE_AUDIT("0", "开启主播头像免审核",SystemConfigGroupEnum.SYSTEM, new BooleanSystemConfigCheck()),
|
||||||
IM_ICON_PREFIX("0", "是否加im头像前缀域名",SystemConfigGroupEnum.SYSTEM, new BooleanSystemConfigCheck()),
|
ANCHOR_ALBUM_AVATAR_IGNORE_AUDIT("0", "开启主播相册免审核",SystemConfigGroupEnum.SYSTEM, new BooleanSystemConfigCheck()),
|
||||||
|
NO_ANCHOR_AVATAR_IGNORE_AUDIT("0", "开启非主播头像免审核",SystemConfigGroupEnum.SYSTEM, new BooleanSystemConfigCheck()),
|
||||||
|
NO_ANCHOR_ALBUM_AVATAR_IGNORE_AUDIT("0", "开启非主播相册免审核",SystemConfigGroupEnum.SYSTEM, new BooleanSystemConfigCheck()),
|
||||||
|
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user