轮播图和用户消息
This commit is contained in:
42
doc/sql/app_banner_postgres.sql
Normal file
42
doc/sql/app_banner_postgres.sql
Normal file
@@ -0,0 +1,42 @@
|
||||
|
||||
-- 创建表
|
||||
CREATE TABLE app_banner
|
||||
(
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
cover_url VARCHAR(300) NULL,
|
||||
route VARCHAR(255) NULL,
|
||||
outside_url VARCHAR(300) NULL,
|
||||
sort INTEGER DEFAULT 1 NOT NULL,
|
||||
banner_type INTEGER NULL,
|
||||
remark VARCHAR(100) NULL,
|
||||
is_show INTEGER DEFAULT 0 NOT NULL,
|
||||
tag_name VARCHAR(255) NULL,
|
||||
create_user BIGINT NULL,
|
||||
create_dept BIGINT NULL,
|
||||
create_time TIMESTAMP NULL,
|
||||
update_user BIGINT NULL,
|
||||
update_time TIMESTAMP NULL,
|
||||
status INTEGER NULL,
|
||||
is_deleted INTEGER DEFAULT 0 NULL
|
||||
);
|
||||
|
||||
-- 添加表注释
|
||||
COMMENT ON TABLE app_banner IS '首页轮播图';
|
||||
|
||||
-- 添加列注释
|
||||
COMMENT ON COLUMN app_banner.id IS 'ID';
|
||||
COMMENT ON COLUMN app_banner.cover_url IS '轮播图地址';
|
||||
COMMENT ON COLUMN app_banner.route IS '路由';
|
||||
COMMENT ON COLUMN app_banner.outside_url IS '外链地址';
|
||||
COMMENT ON COLUMN app_banner.sort IS '排序';
|
||||
COMMENT ON COLUMN app_banner.banner_type IS '轮播图类型 1-主banner 2-商城banner';
|
||||
COMMENT ON COLUMN app_banner.remark IS '备注';
|
||||
COMMENT ON COLUMN app_banner.is_show IS '是否显示';
|
||||
COMMENT ON COLUMN app_banner.tag_name IS '标签名';
|
||||
COMMENT ON COLUMN app_banner.create_user IS '创建人';
|
||||
COMMENT ON COLUMN app_banner.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN app_banner.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN app_banner.update_user IS '修改人';
|
||||
COMMENT ON COLUMN app_banner.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN app_banner.status IS '状态';
|
||||
COMMENT ON COLUMN app_banner.is_deleted IS '是否已删除';
|
||||
35
doc/sql/insert_blade_dict.sql
Normal file
35
doc/sql/insert_blade_dict.sql
Normal file
@@ -0,0 +1,35 @@
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017256532300197889, 0, 'app_order_status', '-1', 'app订单状态', 17, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017256701003493378, 2017256532300197889, 'app_order_status', '3', '待收货', 3, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017256735887519745, 2017256532300197889, 'app_order_status', '4', '已完成', 4, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017256766271057921, 2017256532300197889, 'app_order_status', '5', '已取消', 5, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017256798575587330, 2017256532300197889, 'app_order_status', '6', '售后中', 6, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017256831240826882, 2017256532300197889, 'app_order_status', '7', '已完结', 7, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017277351755730945, 0, 'app_yes_no', '-1', 'app是否状态', 18, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017277404973060097, 2017277351755730945, 'app_yes_no', '0', '否', 0, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017277445628448770, 2017277351755730945, 'app_yes_no', '1', '是', 1, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017279052097212417, 0, 'app_pay_status', '-1', 'app支付状态', 19, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017279219479302146, 2017279052097212417, 'app_pay_status', '1', '待支付', 1, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017279260155662338, 2017279052097212417, 'app_pay_status', '2', '已支付', 2, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017279292049149953, 2017279052097212417, 'app_pay_status', '3', '已关闭', 3, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017256666383708162, 2017256532300197889, 'app_order_status', '2', '已支付', 2, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017256633735245825, 2017256532300197889, 'app_order_status', '1', '待支付', 1, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017279326488580097, 2017279052097212417, 'app_pay_status', '4', '退款中', 4, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017279356754677762, 2017279052097212417, 'app_pay_status', '5', '已退款', 5, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017280506669256705, 0, 'app_order_model', '-1', 'app订单类型', 20, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017280559299383297, 2017280506669256705, 'app_order_model', '1', '商城订单', 1, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017448732011200513, 0, 'app_pay_type', '-1', 'app支付类型', 21, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017448799661129730, 2017448732011200513, 'app_pay_type', '1', '支付宝', 1, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017448849464295426, 2017448732011200513, 'app_pay_type', '2', '微信', 2, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017448927499321345, 2017448732011200513, 'app_pay_type', '3', '线下支付', 3, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017256598469537794, 2017256532300197889, 'app_order_status', '0', '待支付', 0, '', 0, 1, 1);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017478580159041538, 0, 'app_point_spending_type', '-1', 'app积分消费类型', 22, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017478672572141569, 2017478580159041538, 'app_point_spending_type', '1', '收入', 1, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017478708412469249, 2017478580159041538, 'app_point_spending_type', '2', '支出', 2, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017517140190855170, 0, 'app_package_type', '-1', 'app福利包类型', 23, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017517209350733826, 2017517140190855170, 'app_package_type', '1', '积分兑换', 1, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2017517264824598530, 2017517140190855170, 'app_package_type', '2', '后台划拨', 2, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2018600540205121537, 0, 'app_banner_type', '-1', 'app轮播图类型', 24, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2018600645536677890, 2018600540205121537, 'app_banner_type', '1', '主banner', 1, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2018600683209916417, 2018600540205121537, 'app_banner_type', '2', '商城banner', 2, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2018607816655708161, 0, 'app_user_notice', '-1', 'app用户通知类型', 25, '', 0, 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "status", "is_deleted") VALUES (2018607875027836929, 2018607816655708161, 'app_user_notice', '0', '系统通知', 0, '', 0, 1, 0);
|
||||
@@ -189,7 +189,6 @@ INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path",
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511982136934401, 2016446547672596482, 'mallIntegral', '用户商城积分', 'menu', '/userPoint/userMallIntegral', NULL, 1, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511991586701313, 2016445572647911425, 'commissionAccount', '用户佣金账户', 'menu', '/cashAccount/userCommissionAccount', NULL, 1, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511992614305793, 2016444412729917441, 'genealogy', '用户族谱', 'menu', '/customer/userGenealogy', NULL, 1, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511978492084225, 2016444412729917441, 'levelLog', '用户等级日志', 'menu', '/customer/userLevelLog', NULL, 1, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511996863135745, 2016445572647911425, 'commissionServiceProviderLog', '5%服务商佣金流水', 'menu', '/cashAccount/userCommissionServiceProviderLog', NULL, 7, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511985525932034, 2016446332399943682, 'packageInfo', '用户积分包信息', 'menu', '/userPackInfo/userPackageInfo', NULL, 3, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511982589919234, 2016446547672596482, 'mallIntegralLog', '用户商城积分流水', 'menu', '/userPoint/userMallIntegralLog', NULL, 2, 1, 0, 1, NULL, NULL, 0);
|
||||
@@ -215,12 +214,10 @@ INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path",
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2017499535723909124, 2017499535723909122, 'givePackLog_edit', '修改', 'edit', '/userPackInfo/givePackLog/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2017499535723909125, 2017499535723909122, 'givePackLog_delete', '删除', 'delete', '/api/blade-givepacklog/givePackLog/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2017499535723909126, 2017499535723909122, 'givePackLog_view', '查看', 'view', '/userPackInfo/givePackLog/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2017499534536921089, 2016445919294554113, 'prizeSpu', '奖池商品', 'menu', '/mall/prizeSpu', NULL, 1, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2017499534536921090, 2017499534536921089, 'prizeSpu_add', '新增', 'add', '/mall/prizeSpu/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2017499534536921091, 2017499534536921089, 'prizeSpu_edit', '修改', 'edit', '/mall/prizeSpu/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2017499534536921092, 2017499534536921089, 'prizeSpu_delete', '删除', 'delete', '/api/blade-prizespu/prizeSpu/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2017499534536921093, 2017499534536921089, 'prizeSpu_view', '查看', 'view', '/mall/prizeSpu/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2017499535132512257, 2016445919294554113, 'prizeSpuOrder', '奖池商品订单', 'menu', '/mall/prizeSpuOrder', NULL, 1, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2017499535132512258, 2017499535132512257, 'prizeSpuOrder_add', '新增', 'add', '/mall/prizeSpuOrder/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2017499535132512259, 2017499535132512257, 'prizeSpuOrder_edit', '修改', 'edit', '/mall/prizeSpuOrder/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2017499535132512260, 2017499535132512257, 'prizeSpuOrder_delete', '删除', 'delete', '/api/blade-prizespuorder/prizeSpuOrder/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
@@ -229,3 +226,16 @@ INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path",
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511987023298563, 2016511987023298561, 'dailySign_edit', '修改', 'edit', '/customer/userDailySign/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511987023298564, 2016511987023298561, 'dailySign_delete', '删除', 'delete', '/api/blade-dailysign/dailySign/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511987023298565, 2016511987023298561, 'dailySign_view', '查看', 'view', '/customer/userDailySign/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2018593495594790914, 2018593495594790913, 'banner_add', '新增', 'add', '/mall/banner/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2018593495594790915, 2018593495594790913, 'banner_edit', '修改', 'edit', '/mall/banner/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2018593495594790916, 2018593495594790913, 'banner_delete', '删除', 'delete', '/api/blade-banner/banner/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2018593495594790917, 2018593495594790913, 'banner_view', '查看', 'view', '/mall/banner/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2018593496119078914, 2018593496119078913, 'notice_add', '新增', 'add', '/customer/notice/add', 'plus', 1, 2, 1, 1, NULL, NULL, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2018593495594790913, 2016445919294554113, 'banner', '首页轮播图', 'menu', '/mall/banner', NULL, 7, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2018593496119078913, 2016444412729917441, 'notice', '用户通知', 'menu', '/customer/notice', NULL, 8, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2016511978492084225, 2016444412729917441, 'levelLog', '用户等级日志', 'menu', '/customer/userLevelLog', NULL, 7, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2018593496119078915, 2018593496119078913, 'notice_edit', '修改', 'edit', '/customer/notice/edit', 'form', 2, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2018593496119078916, 2018593496119078913, 'notice_delete', '删除', 'delete', '/api/blade-notice/notice/remove', 'delete', 3, 2, 3, 1, NULL, NULL, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2018593496119078917, 2018593496119078913, 'notice_view', '查看', 'view', '/customer/notice/view', 'file-text', 4, 2, 2, 1, NULL, NULL, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2017499535132512257, 2016445919294554113, 'prizeSpuOrder', '奖池商品订单', 'menu', '/mall/prizeSpuOrder', NULL, 6, 1, 0, 1, NULL, NULL, 0);
|
||||
INSERT INTO "<table_name>" ("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "component", "remark", "is_deleted") VALUES (2017499534536921089, 2016445919294554113, 'prizeSpu', '奖池商品', 'menu', '/mall/prizeSpu', NULL, 5, 1, 0, 1, NULL, NULL, 0);
|
||||
|
||||
1
doc/sql/insert_blade_oss.sql
Normal file
1
doc/sql/insert_blade_oss.sql
Normal file
@@ -0,0 +1 @@
|
||||
INSERT INTO "<table_name>" ("id", "tenant_id", "category", "oss_code", "endpoint", "transform_endpoint", "access_key", "secret_key", "bucket_name", "app_id", "region", "remark", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2017524776370114561, '000000', 3, 'alioss', 'https://oss-cn-beijing.aliyuncs.com', '', 'LTAI5tHgTPu3QbQkP3qPH8EM', 'UG1exiMCt31B6OoeSrw3BrW08izrJl', 'yicha1lu-app', '', '', '', 1123598821738675201, 1123598813738675201, '2026-01-31 17:06:05', 1123598821738675201, '2026-02-03 17:53:47.79', 2, 0);
|
||||
@@ -1,8 +1,284 @@
|
||||
INSERT INTO "<table_name>" ("id", "param_name", "param_key", "param_value", "remark", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2016775545220931585, 'app用户注册默认角色信息', 'yichayilu:app:register:role-info', '{"avatar":"https://tse1-mm.cn.bing.net/th/id/OIP-C.BM4bF8_qipHCQu014y_8UgAAAA?w=220&h=217&c=7&r=0&o=7&pid=1.7&rm=3","deptId":"1123598813738675201","postId":"1123598817738675208","roleId":"1123598816738675202"}', 'app用户注册默认角色信息-包含角色、部门、岗位、头像', NULL, NULL, '2026-01-29 15:28:54.508', NULL, '2026-01-29 15:28:54.508', 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "param_name", "param_key", "param_value", "remark", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2016918730731626498, '商城app用户隐私政策', 'yichayilu:app:formal:user:privacy', '隐私政策', '商城app用户隐私政策', NULL, NULL, '2026-01-30 00:57:52.597', NULL, '2026-01-30 00:57:52.597', 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "param_name", "param_key", "param_value", "remark", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2017183573497827329, '商城app订单类型', 'yichayilu:app:formal:order:model_type', '[{"code":"MALL","id":1,"name":"商城"}]', '商城app订单类型', NULL, NULL, '2026-01-30 18:30:16.033', NULL, '2026-01-30 18:30:16.033', 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "param_name", "param_key", "param_value", "remark", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2017184619259478018, '商城app订单现金兑换积分比例', 'yichayilu:app:formal:mall.cash.to.point.Rate', '0.3', '商城app订单现金兑换积分比例', NULL, NULL, '2026-01-30 18:34:25.363', NULL, '2026-01-30 18:34:25.363', 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "param_name", "param_key", "param_value", "remark", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2017185330957312002, '商城app随机立减比例范围', 'yichayilu:app:formal:mall.cut.amount.rang', '{"max":0.001,"min":0.01}', '商城app随机立减比例范围', NULL, NULL, '2026-01-30 18:37:15.043', NULL, '2026-01-30 18:37:15.043', 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "param_name", "param_key", "param_value", "remark", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2017186990513410049, '商城app支付类型', 'yichayilu:app:formal:pay.type', '{1:[{"code":"ALI","id":1,"name":"支付宝"},{"code":"WEI","id":2,"name":"微信"},{"code":"OFFLINE_PAY","id":3,"name":"线下支付"}]}', '商城app支付类型', NULL, NULL, '2026-01-30 18:43:50.713', NULL, '2026-01-30 18:43:50.713', 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "param_name", "param_key", "param_value", "remark", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2017835848230760450, '积分app是否看广告', 'yichayilu:app:dailysign.is.look.ads', 'true', '积分app是否看广告', NULL, NULL, '2026-02-01 13:42:10.446', NULL, '2026-02-01 13:42:10.446', 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "param_name", "param_key", "param_value", "remark", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2017836205065338882, '积分app看广告的时间范围', 'yichayilu:app:dailysign:watch.video.time.rang', '{"endTime":"22:00","startTime":"08:00"}', '积分app看广告的时间范围', NULL, NULL, '2026-02-01 13:43:35.522', NULL, '2026-02-01 13:43:35.522', 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "param_name", "param_key", "param_value", "remark", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2018579715242532866, '商城app用户协议', 'yichayilu:app:formal:user:agreement', '商城app用户协议', '商城app用户协议', NULL, NULL, '2026-02-03 14:58:02.165', NULL, '2026-02-03 14:58:02.165', 1, 0);
|
||||
INSERT INTO "<table_name>" ("id", "param_name", "param_key", "param_value", "remark", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted") VALUES (2016918730731626498, '商城app用户隐私政策', 'yichayilu:app:formal:user:privacy', '<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>成都心随云文化科技有限公司隐私政策</title>
|
||||
<link rel="stylesheet" href="./css/style.css">
|
||||
<link rel="stylesheet" href="https://unpkg.com/swiper/swiper-bundle.min.css" />
|
||||
<!-- 引入样式 -->
|
||||
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
|
||||
<!-- 引入组件库 -->
|
||||
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
|
||||
</head>
|
||||
|
||||
<style>
|
||||
.privacy_policy{
|
||||
margin-top: 50px;
|
||||
}
|
||||
.fly-text-color{
|
||||
color: #ff0000;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<body>
|
||||
<!-- 头部 -->
|
||||
<header>
|
||||
<div id="menu-bar" class="el-icon-s-unfold"></div>
|
||||
<a href="#" class="logo"><span>心</span>随云飘</a>
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
<section class="privacy_policy" id="privacy_policy">
|
||||
|
||||
<h2 style="text-align: center;">隐私政策(用户协议)</h3>
|
||||
|
||||
<h3 style="text-align: center;">发布日期: 2024 年 11 月 11 日</h3>
|
||||
<h3 style="text-align: center;">生效日期: 2024 年 11 月 11 日</h3>
|
||||
|
||||
<p style=" margin-top: 50px"></p>
|
||||
|
||||
<span >  【心随云飘】APP是由成都心随云文化科技有限公司开发,下文所有“我们”均指该公司。
|
||||
如果您在【心随云飘】软件上或其他【心随云飘】提供的移动应用上进行访问,便视为您接受了以下隐私政策,请您仔细阅读以下内容,尤其是以下加粗字体。如果您不同意以下任何内容,请立刻停止访问/使用本app站或其他任何移动应用或软件。 “用户”以及“您”均指自愿接受本隐私政策的个体。<br></span>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<span >1、隐私政策的确认和接纳<br></span>
|
||||
<span >  尊重用户个人隐私是【心随云飘】的一项基本政策。【心随云飘】旅行攻略是将各旅行景区含餐饮、娱乐、洒店、出行、养生、教育、游戏信息汇集于【心随云飘】用户查阅,同时用户在浏览查阅同时即可获得平台产物。 您在使用我们的产品与 / 或服务前仔细阅读并确认您已经充分理解本隐私政策所写明的内容,并与成都心随云文化科技有限公司达成协议并接受所有的服务条款。<br></span>
|
||||
<span >  我们十分注重保护用户的个人信息及隐私安全,我们理解您通过【心随云飘】app向我们提供信息是建立在对我们信任的基础上,我们重视这种信任,也深知隐私对您的重要性,并尽最大努力全力保护您的隐私。<br></span>
|
||||
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<span >2 、信息收集<br></span>
|
||||
<span >  ( 1 )为了更好地为您提供服务,【心随云飘】将遵循 “ 合理、相关、必要 ” 原则,且以您同意为前提收集信息,不会收集法律法规禁止收集的信息。考虑到【心随云飘】会员服务的重要性,用户同意,【心随云飘】将会收集您在【心随云飘】软件上输入的或者以其他方式提供给我们的所有信息,例如:<br></span>
|
||||
  ①<span class="fly-text-color">在您注册为【心随云飘】会员时,需提供手机号码并设置密码,用以创建【心随云飘】账号。前述信息属于敏感信息,如果您拒绝提供,可能无法正常使用我们的服务。<br></span>
|
||||
  ②<span class="fly-text-color">在您实名认证时,需提供身份证信息、人脸识别活体认证、银行卡信息或第三方支付机构信息以验证您的身份。前述信息属于敏感信息,如果您拒绝提供,可能无法正常使用我们的部分服务。<br></span>
|
||||
  ③<span class="fly-text-color">在您购买产品时需要使用邮寄(发票、商品)服务时、需提供收货人的姓名、手机号、固定电话、配送地址信息,以便于您的订单能够送达。前述信息属于敏感信息,如果您拒绝提供,可能无法完成送达。<br></span>
|
||||
  ④<span class="fly-text-color">在您购买产品进行支付结算时,需提供支付宝,微信,银行卡信息。前述信息属于敏感信息,如果您拒绝提供,可能无法完成支付。<br></span>
|
||||
  ⑤<span class="fly-text-color">当您联系我们的客服以获得我们的客户服务时,您还需要提供您的会员资料来验证身份。其中可能涉及敏感信息,如果您拒绝提供,可能无法获得我们的客户服务。<br></span>
|
||||
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<span >  ( 2 )我们将在您使用【心随云飘】服务过程中,自动收集您的个人信息:<br></span>
|
||||
<span >  ①日志信息,指您使用我们的服务时,系统可能通过cookies、app beacon或其他方式自动采集的信息,包括:<br></span>
|
||||
<span >  ②设备信息或软件信息,例如您的IP地址和移动设备所用的版本和设备识别码(IDFA/IMEI)、移动设备用于接入我们服务的配置信息。这些是我们为提供服务必须收集的基础信息。<br></span>
|
||||
<span >  ③在使用我们服务时搜索或浏览的信息,例如您使用的app页或app搜索词语、访问页面,以及您在使用我们服务时浏览或提供的其他信息。<br></span>
|
||||
<span >  ④您通过我们的服务分享的内容所包含的信息,例如拍摄或上传的共享照片或评论,以及日期、时间。<br></span>
|
||||
<span >  ⑤位置信息, 指您开启设备定位功能并使用我们基于位置提供的相关服务时,收集的有关您的位置信息,例如通过GPS或WLAN方式收集您的地理位置信息,或您提供账户信息中包含的您所在地区信息,您或其他人上传的显示您当前或曾经所处地理位置的共享信息。该信息属于敏感信息,您可以通过关闭定位功能,停止对您的地理位置信息的收集,但将无法使用我们提供的部分与位置信息相关的服务。<br></span>
|
||||
<span >  ⑥传感器信息:在您使用App时,会获取方向传感器、陀螺仪设备传感器信息,用于鉴别您是否为真实用户。<br></span>
|
||||
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<span >  (3)由于我们向您提供的产品和服务是不断更新的,如果某一产品或服务未在前述内容中说明且收集了您的信息,我们不会通过页面提示、交互流程、app站公告方式另行向您说明信息收集的内容,但您可以到个人中心隐私政策查看最新条款。该信息适用本隐私政策的约定。<br></span>
|
||||
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<span >  (4)为识别您的设备并预防恶意程序及反作弊、提高服务安全性、保障运营质量及效率,我们会收集您的设备信息(设备序列号、OAID、MEID、AndroidID、IMSl、MAC、BSSID、SSID、WIFI、WIFI列表、MAC地址、收集软件列表、设备MAC地址、加速度传感器(BODY_SENSORS))、已安装APP信息(软件安装列表或软件列表)或运行中的进程信息。<br></span>
|
||||
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<span >  (5)以上列明的基本为核心业务功能,对于第三方业务功能(例如第三方提供的金融业务功能)会通过页面提示、交互流程方式另行向您说明相应的个人信息收集和使用规则,并征得您的同意。<br></span>
|
||||
<span class="fly-text-color">  获取位置信息个人信息<br></span>
|
||||
<span >  用于附近店铺显示和当地天气数据获取<br></span>
|
||||
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<span class="fly-text-color">  获取设备ID<br></span>
|
||||
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<span >  在用户授权获取设备ID时, SDK根据不同系统分别调用不同的系统命令来获取设备ID,在 iOS 设备 中,SDK将会获取 IDFA ;在 Android 10以下版本的设备中,SDK将会获 取 IMEI 、 AndroidID ;在 Android 10以上版本的设备,SDK获取 OAID 。<br></span>
|
||||
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<span class="fly-text-color">  获取设备GPS数据<br></span>
|
||||
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<span >  在经过用户授权后,SDK将调用您设备的GPS接口,获取您的GPS坐标数据。<br></span>
|
||||
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<span class="fly-text-color">  获取广告相关行为数据<br></span>
|
||||
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<span >  在用户与广告进行交互时,如观看广告,点击广告链接等行为,SDK将会通过接口来获取这些数据。<br></span>
|
||||
|
||||
<p style=" margin-top: 20px"></p>
|
||||
<h4>ADSet SDK隐私权限</h4>
|
||||
<img src="./images/table/01.jpg" alt="" srcset="">
|
||||
|
||||
<p style=" margin-top: 20px"></p>
|
||||
<h4>第三方SDK隐私权限</h4>
|
||||
<span >  AdSet SDK会调用其他SDK ,表为其他SDK隐私内容及隐私链接。<br></span>
|
||||
|
||||
<h4>高德地图 SDK</h4>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<img src="./images/table/09.jpg" alt="" srcset="">
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<img src="./images/table/10.jpg" alt="" srcset="">
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<img src="./images/table/11.jpg" alt="" srcset="">
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<img src="./images/table/12.jpg" alt="" srcset="">
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<img src="./images/table/13.jpg" alt="" srcset="">
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<img src="./images/table/14.jpg" alt="" srcset="">
|
||||
|
||||
|
||||
<h4>支付宝SDK(com.alipay.alipaysecuritysdk)</h4>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<img src="./images/table/15.jpg" alt="" srcset="">
|
||||
|
||||
<h4>mPaaS</h4>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<img src="./images/table/18.jpg" alt="" srcset="">
|
||||
|
||||
<h4>阿里乘车码</h4>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<img src="./images/table/19.jpg" alt="" srcset="">
|
||||
|
||||
<h4>阿里芝麻信用实名认证</h4>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<img src="./images/table/20.jpg" alt="" srcset="">
|
||||
|
||||
<h4>芝麻认证</h4>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<img src="./images/table/21.jpg" alt="" srcset="">
|
||||
|
||||
|
||||
<h4>微信支付SDK</h4>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<span >  为实现让用户在第三方应用中使用微信支付功能,<strong>我们会收集用户发起支付时第三方应用生成的微信支付订单标识并向微信APP传输,并在用户进行支付操作后向第三方应用传输本次支付是否成功的状态信息。</strong>请注意,微信支付功能由财付通支付科技有限公司(下称“财付通公司”)提供服务。<br></span>
|
||||
<span >  前述关于收集、使用个人信息的内容适用于iOS及Android系统。<br></span>
|
||||
<span >  特别说明,在Android系统中我们会验证用户设备上安装微信APP的状态,用于确认该设备是否能够实现Open SDK的相关能力,如设备上未安装微信APP,用户将无法使用微信Open SDK能力所实现的相关功能。<br></span>
|
||||
<span >  如用户使用iOS系统,为了在iOS系统设备中实现前述相关功能在不同设备下的表现适配,我们会收集用户的设备型号信息并保存在设备本地。<br></span>
|
||||
<span >  为实现SDK产品的相应功能所必需,在用户通过第三方应用使用微信Open SDK相关能力的过程中,我们会通过第三方应用申请以下权限:<br></span>
|
||||
<span >  如用户使用iOS系统,为了在iOS系统中实现前述相关功能所涉及的第三方应用与微信APP之间的信息传输,我们需调用iOS的剪切板权限,并在剪切板中写入、读取上述相关信息。<br></span>
|
||||
|
||||
<p style=" margin-top: 20px"></p>
|
||||
<h4>阿里云金融及实人认证SDK</h4>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<h4>1、设备信息</h4>
|
||||
<span >  当您使用增强版实人认证时,为了确认SDK服务可用性和识别虚假设备,我们会获取最终用户的,<br></span>
|
||||
<span >  <strong>(1)设备基础信息:设备制造商、设备品牌、设备型号、设备名称、设备操作系统信息、设备配置信息、设备环境信息;</strong><br></span>
|
||||
<span >  <strong>(2)设备标识信息:Android ID、OAID、Google AID(Google广告ID)net.security.device,Android_ID,BODY_SENSORS ,READ_PHONE_STATE;</strong><br></span>
|
||||
<span >  <strong>(2)设备标识信息:Android ID、OAID、Google AID(Google广告ID)net.security.device,Android_ID,BODY_SENSORS ,READ_PHONE_STATE;</strong><br></span>
|
||||
<span >  <strong>(4)设备应用信息:SDK宿主APP信息(包括:应用名称、应用版本、安装时间)</strong><br></span>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<h4>2、最终用户上传的人脸及身份证图片</h4>
|
||||
<span >  在最终用户同意开启相机/摄像头权限后,我们会在您完成指定验证动作时,<strong>获取最终用户的人脸图片进行身份验证的比对。此外,当您使用实人认证OCR功能时,我们还将通过最终用户拍照上传的身份证图片获取最终用户的身份证字段信息,以进行安全验证。</strong>您及最终用户知晓,即使最终用户已同意开启相机权限,我们也仅会在您主动点击客户端内相机图标或录制视频时通过相机获取照片信息。<br></span>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<h4>3、终端权限信息</h4>
|
||||
<span >  为保障产品功能实现与安全稳定运行目的,我们可能会申请或使用最终用户操作系统的相关权限。<br></span>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<h4>4、日志信息</h4>
|
||||
<span >  当您使用我们增强版实人认证时,我们会自动收集您对我们服务的详细使用情况,作为有关操作日志保存,<strong>包括您的操作参数、操作时间、服务响应时间、操作步骤、验证结果、错误原因。</strong><br></span>
|
||||
|
||||
<p style=" margin-top: 20px"></p>
|
||||
<h4>安卓操作系统应用权限列表</h4>
|
||||
<img src="./images/table/16.jpg" alt="" srcset="">
|
||||
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<h4>iOS 操作系统应用权限列表</h4>
|
||||
<img src="./images/table/17.jpg" alt="" srcset="">
|
||||
|
||||
<h4>讯飞SDK</h4>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<span >  权限:设备号(IMEI号)、设备码(IMSI码)、IP地址、Android ID(安卓唯一设备ID)、中国移动UAID(仅限安卓设备)、OAID(仅限安卓设备)、UUID(仅限iOS设备)<br></span>
|
||||
<span >  是否不选:必选<br></span>
|
||||
<span >  申请目的:提供语音输入后的语音转文字、语音合成、语音评测服务。<br></span>
|
||||
<span >  权限:网络权限、麦克风权限<br></span>
|
||||
|
||||
<p style=" margin-top: 20px"></p>
|
||||
<h4>3 、信息使用</h4>
|
||||
<span >  ( 1 )一般来说,【心随云飘】出于以下目的收集、使用您的个人信息:<br></span>
|
||||
  ①<span class="fly-text-color">账号管理:</span><span >您可以通过【心随云飘】APP创建账号,我们将使用您所提供的信息来管理您的账号,并为您提供一系列的实用功能,您可以使用您的账号进行多种操作,如管理订单、调整个人设置、查看历史订单信息、支付管理。<br></span>
|
||||
  ②<span class="fly-text-color">答复您的问询和请求:</span><span >我们向您提供客户服务,以便在您需要的时候提供帮助。<br></span>
|
||||
  ③<span class="fly-text-color">与您联系:</span><span >回复及处理您所提出的疑问或要求、发送与订单相关的信息、我们也可能会向您发送问卷调查或邀请您对我们的服务提供反馈。<br></span>
|
||||
  ④<span class="fly-text-color">市场调研:</span><span >我们有时会邀请您参与市场调查,以衡量您对我们的产品、服务和app站的兴趣。<br></span>
|
||||
<!--   ⑤<span class="fly-text-color">数据分析:我们可能将您的数据用于分析,从而形成用户画像,以便让我们能够了解您所在的位置、偏好和人口统计信息,或与其他来源(包括第三方)的数据相匹配,从而开发我们的产品、服务或营销计划,改进我们的服务<br></span> -->
|
||||
  ⑤<span class="fly-text-color">控制信用风险:</span><span >为了确保交易安全,【心随云飘】及关联公司、业务合作伙伴可能对用户信息进行数据分析,并对上述分析结果进行商业利用。<br></span>
|
||||
  ⑥<span class="fly-text-color">日常运营:</span><span >包括但不限于订单管理、客户验证、技术支持、app络维护、故障排除、内部行政事务及内部政策和程序、生成内部报告。<br></span>
|
||||
  ⑦<span class="fly-text-color">电话监测:</span><span >您接听和拨打我们的客服电话可能会被录音,我们可能会使用通话录音来监控我们的客服服务质量,检查您所提供的信息的准确性以防止欺诈,或为了我们内部人员培训的目的。录音在被保留一段时间后会自动删除,除非由于合规要求或合法利益需要为场景的保留<br></span>
|
||||
  ⑧<span class="fly-text-color">法律目的:</span><span >我们可能需要使用您的信息来处理和解决法律纠纷,或遵循对我们具有约束力的任何法律法规或监管机构颁发的文件规定,以配合国家部门或监管机构调查和遵从法律法规的目的。<br></span>
|
||||
<span >  此外,我们可能会出于其他目的收集、使用和披露您的个人信息,并通过修订本声明的形式告知您。<br></span>
|
||||
<span >  如要改变个人信息的处理目的,我们将以推送通知方式再次征求您的授权同意。 <br></span>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<h4>( 2 )您充分知晓,以下情形中我们使用个人信息无需征得您的授权同意:</h4>
|
||||
<span >  ①与国家安全、国防安全有关的;<br></span>
|
||||
<span >  ②与公共安全、公共卫生、重大公共利益有关的;<br></span>
|
||||
<span >  ③与犯罪侦查、起诉、审判和判决执行有关的;<br></span>
|
||||
<span >  ④出于维护个人信息主体或其他个人的生命、财产重大合法权益但又很难得到本人同意的;<br></span>
|
||||
<span >  ⑤所收集的个人信息是个人信息主体自行向社会公众公开的;<br></span>
|
||||
<span >  ⑥从合法公开披露的信息中收集的您的个人信息的,如合法的新闻报道、政府信息公开渠道;<br></span>
|
||||
<span >  ⑦用于维护所提供的产品与/或服务的安全稳定运行所必需的,例如发现、处置产品与/或服务的故障;<br></span>
|
||||
<span >  ⑧为合法的新闻报道所必需的;<br></span>
|
||||
<span >  ⑨学术研究机构基于公共利益开展统计或学术研究所必要,且对外提供学术研究或描述的结果时,对结果中所包含的个人信息进行去标识化处理的;<br></span>
|
||||
<span >  ⑩法律法规规定的其他情形。<br></span>
|
||||
|
||||
|
||||
<p style=" margin-top: 20px"></p>
|
||||
<h4>4 、信息保存</h4>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<h4>(1)我们仅在本政策所述目的所必需期间和法律法规及监管规定的时限内保存您的个人信息。如我们停止运营【心随云飘】APP产品或服务,我们将及时停止继续收集您个人信息的活动,将停止运营的通知以逐一送达或公告的形式通知您,对所持有的个人信息进行删除或匿名化处理。</h4>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<h4>( 2 )您充分知晓,以下情形中我们使用个人信息无需征得您的授权同意:</h4>
|
||||
<span >  ①法律法规有明确规定;<br></span>
|
||||
<span >  ②获得您的明确授权<br></span>
|
||||
<span >  ③您通过互联app进行跨境交易个人主动行为。<br></span>
|
||||
|
||||
<p style=" margin-top: 20px"></p>
|
||||
<h4>5 、个人敏感信息提示</h4>
|
||||
<span >  某些特殊的个人信息可能被认为是个人敏感信息,这些个人敏感信息将受到严格保护。【心随云飘】隐私政策在此提醒您,您在使用【心随云飘】为您提供的产品及服务中所上传或发布的内容和信息可能会披露泄露您的个人敏感信息。 因此,您需要在使用我们为您提供的产品或服务前谨慎考虑。您同意这些个人敏感信息将按照本隐私政策阐明的目的和方式来进行处理。;<br></span>
|
||||
|
||||
|
||||
<p style=" margin-top: 20px"></p>
|
||||
<h4>6 、信息安全与保护</h4>
|
||||
<p style=" margin-top: 10px"></p>
|
||||
<span >  (1)【心随云飘】非常重视信息安全,成立了专门的负责团队。<br></span>
|
||||
<span >  (2)我们从数据的生命周期角度出发,在数据收集、存储、显示、处理、使用、销毁各个环节建立了安全防护措施,根据信息敏感程度的级别采取不同的控制措施,包括但不限于访问控制、SSL加密传输、AES256bit或以上强度的加密算法进行加密存储。<br></span>
|
||||
<span >  (3)尽管有前述的安全措施,但同时也请您理解在app络上不存在“完善的安全措施”。我们会按现有的技术提供相应的安全措施来保护您的信息,提供合理的安全保障,我们将尽力做到使您的信息不被泄露、损毁或丢失。<br></span>
|
||||
<span >  (4)您的账户均有安全保护功能,请妥善保管您的账号及密码信息,切勿将密码告知他人,如果您发现自己的个人信息泄露,特别是您的账号和密码发生泄露,请您立即与我们的客服联系,以便我们采取相应的措施。;<br></span>
|
||||
<span >  (5)请您及时保存或备份您的文字、图片其他信息,您需理解并接受,您接入我们的服务所用的系统和通讯app络,有可能因我们可控范围外的因素而出现问题。<br></span>
|
||||
|
||||
<p style=" margin-top: 20px"></p>
|
||||
<h4>7 、信息安全事件处置</h4>
|
||||
<span >  在不幸发生个人信息安全事件后,我们会启动应急预案,同时按照法律法规的要求向您告知:安全事件的基本情况和可能的影响、我们已采取或将要采取的处置措施、您可自主防范和降低风险的建议、对您的补救措施。事件相关情况我们将以推送通知方式告知您,难以逐一告知个人信息主体时,我们会采取合理、有效的方式发布公告。同时,我们还将按照监管部门要求,上报个人信息安全事件的处置情况。<br></span>
|
||||
|
||||
<p style=" margin-top: 20px"></p>
|
||||
<h4>8 、用户个人信息管理</h4>
|
||||
<span >  (1)您可以随时登录【心随云飘】旅行攻略,查询、更正、删除自己的账户信息;修改个人资料、隐私设置、安全设置;修改地址、常用联系人信息使用【心随云飘】服务时您提供的个人信息。操作过程中如有问题,可以联系【心随云飘】客服。<br></span>
|
||||
<span >  (2)您可以通过删除您的个人信息、关闭设备功能、修改个人设置方式改变您授权我们继续收集个人信息的范围或撤回您的授权。<br></span>
|
||||
|
||||
<p style=" margin-top: 20px"></p>
|
||||
<h4>9、从中国大陆地区以外访问我们的 app 站</h4>
|
||||
<span >  如果您是中国大陆以外地区的公民,或者从中国大陆以外地区访问我们的 app 站,请您注意,您的信息可能被传送至、存储于中国大陆,并且在中国大陆进行处理。中国大陆的数据保护法和其他法律可能与您所在国家 / 地区的法律不同,您继续使用我们的服务,意味着放弃适用您所在国家 / 地区的法律。选择使用我们的服务的同时,您了解并同意您的信息可能被传送至我们的 app 站,并如本隐私政策所述的与我们共享信息的第三方。<br></span>
|
||||
|
||||
|
||||
|
||||
<p style=" margin-top: 20px"></p>
|
||||
<h4>10 、隐私政策的适用范围</h4>
|
||||
<span >  除某些特定服务外,我们所有的服务均适用本隐私政策。特定服务将适用特定的隐私政策。该特定服务的隐私政策构成本隐私政策的一部分。如任何特定服务的隐私政策与本隐私政策有不一致之处,则适用特定服务的隐私政策。请您注意,本隐私政策不适用于以下情况:通过我们的服务而接入的第三方服务(包括任何第三方app站)收集的信息;通过在我们服务中进行广告服务的其他公司和机构所收集的信息。<br></span>
|
||||
|
||||
|
||||
<p style=" margin-top: 20px"></p>
|
||||
<h4>11 、隐私政策的修改</h4>
|
||||
<span >  【心随云飘】会在必要时修改隐私政策,请您理解,我们可能会适时修订本隐私政策,我们将标注本隐私政策最近更新的日期。未经您明确同意,【心随云飘】不会减少您按照本隐私权政策所应享有的权利。对于重大变更,请您经常回访本隐私政策,以阅读最新版本。<br></span>
|
||||
|
||||
<p style=" margin-top: 20px"></p>
|
||||
<h4>12 、如何联系我们</h4>
|
||||
<span >  如您有任何与个人信息保护或隐私保护相关的问题、意见或建议,以及相关的投诉、举报,您可以通过访问在线客服系统,或拨打【心随云飘】主页公示的客服电话与我们联系。一般情况下,我们将在核验您的身份无误后三十日内回复(联系方式:028-85109076)。<br></span>
|
||||
|
||||
<p style=" margin-top: 20px"></p>
|
||||
<h4>13 、法律管辖</h4>
|
||||
<span >  本隐私政策之效力、解释、变更、执行与争议解决均适用中华人民共和国法律。因本协议产生的争议,均应依照中华人民共和国法律予以处理,并由被告住所地人民法院管辖。<br></span>
|
||||
|
||||
<p style=" margin-top: 20px"></p>
|
||||
<h4>14、用户账号注销</h4>
|
||||
<span >  本平台用户可在APP“我的”页面点击头像进入“个人信息”页面,注销个人账号。<br></span>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
', '商城app用户隐私政策', NULL, NULL, '2026-01-30 00:57:52.597', NULL, '2026-01-30 00:57:52.597', 1, 0);
|
||||
|
||||
44
doc/sql/user_notice_postgres.sql
Normal file
44
doc/sql/user_notice_postgres.sql
Normal file
@@ -0,0 +1,44 @@
|
||||
|
||||
-- 创建表
|
||||
CREATE TABLE user_notice
|
||||
(
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
user_id BIGINT DEFAULT 0 NOT NULL,
|
||||
notice_type INTEGER DEFAULT 0 NOT NULL,
|
||||
has_read INTEGER DEFAULT 0 NOT NULL,
|
||||
release_time TIMESTAMP NULL,
|
||||
title VARCHAR(100) NULL,
|
||||
content TEXT NULL,
|
||||
remarks VARCHAR(200) NULL,
|
||||
create_user BIGINT NULL,
|
||||
create_dept BIGINT NULL,
|
||||
create_time TIMESTAMP NULL,
|
||||
update_user BIGINT NULL,
|
||||
update_time TIMESTAMP NULL,
|
||||
status INTEGER NULL,
|
||||
is_deleted INTEGER DEFAULT 0 NULL
|
||||
);
|
||||
|
||||
|
||||
create index user_notice_user_index
|
||||
on user_notice (is_deleted, user_id);
|
||||
|
||||
-- 添加表注释
|
||||
COMMENT ON TABLE user_notice IS '用户通知';
|
||||
|
||||
-- 添加列注释
|
||||
COMMENT ON COLUMN user_notice.id IS '主键';
|
||||
COMMENT ON COLUMN user_notice.user_id IS '用户id';
|
||||
COMMENT ON COLUMN user_notice.notice_type IS '通知类型0-系统通知';
|
||||
COMMENT ON COLUMN user_notice.has_read IS '是否已读 0-否 1-是';
|
||||
COMMENT ON COLUMN user_notice.release_time IS '阅读时间';
|
||||
COMMENT ON COLUMN user_notice.title IS '标题';
|
||||
COMMENT ON COLUMN user_notice.content IS '内容';
|
||||
COMMENT ON COLUMN user_notice.remarks IS '备注';
|
||||
COMMENT ON COLUMN user_notice.create_user IS '创建人';
|
||||
COMMENT ON COLUMN user_notice.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN user_notice.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN user_notice.update_user IS '修改人';
|
||||
COMMENT ON COLUMN user_notice.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN user_notice.status IS '状态';
|
||||
COMMENT ON COLUMN user_notice.is_deleted IS '是否已删除';
|
||||
@@ -15,6 +15,7 @@ import org.springblade.modules.appFormal.manager.FormalAppBaseManager;
|
||||
import org.springblade.modules.appFormal.manager.FormalAppCustomerManager;
|
||||
import org.springblade.modules.appFormal.manager.FormalAppMallManager;
|
||||
import org.springblade.modules.appFormal.request.CustomerSmsRequest;
|
||||
import org.springblade.modules.appFormal.vo.AppFormalBannerVO;
|
||||
import org.springblade.modules.appFormal.vo.AppFormalMallSpuVO;
|
||||
import org.springblade.modules.appFormal.vo.MallCategoryVO;
|
||||
import org.springblade.modules.mall.pojo.vo.MallSpuVO;
|
||||
@@ -39,7 +40,13 @@ public class FormalBaseController {
|
||||
return R.data(appBaseManager.formalAppPrivacy());
|
||||
}
|
||||
|
||||
@RateLimiter(value = "yichayilu:sms:send", param = "#request.getPhone()", max = 10, ttl = 12, timeUnit = TimeUnit.HOURS)
|
||||
@Operation(summary = "用户协议")
|
||||
@GetMapping("/formal-app-agreement")
|
||||
public R<String> formalAppAgreement() {
|
||||
return R.data(appBaseManager.formalAppAgreement());
|
||||
}
|
||||
|
||||
@RateLimiter(value = "yichayilu:sms:send", param = "#request.getPhone()", max =3, ttl = 12, timeUnit = TimeUnit.HOURS)
|
||||
@Operation(summary = "发送验证码")
|
||||
@PostMapping("/send-sms-code")
|
||||
public R<Boolean> sendSmsCode(@RequestBody CustomerSmsRequest request) {
|
||||
@@ -66,5 +73,20 @@ public class FormalBaseController {
|
||||
|
||||
|
||||
|
||||
@Operation(summary = "获得主banner")
|
||||
@GetMapping("/find-main-banner")
|
||||
public R<List<AppFormalBannerVO>> findMainBanner() {
|
||||
return R.data(appBaseManager.findMainBanner());
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "获得商城banner")
|
||||
@GetMapping("/find-mall-banner")
|
||||
public R<List<AppFormalBannerVO>> findMallBanner() {
|
||||
return R.data(appBaseManager.findMallBanner());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import org.springblade.core.tool.api.R;
|
||||
import org.springblade.modules.appFormal.manager.FormalAppCustomerManager;
|
||||
import org.springblade.modules.appFormal.request.CustomerSmsRequest;
|
||||
import org.springblade.modules.appFormal.request.UpdatePasswordRequest;
|
||||
import org.springblade.modules.appFormal.vo.AppUserNoticeVO;
|
||||
import org.springblade.modules.appFormal.vo.MallIntegralLogVO;
|
||||
import org.springblade.modules.appFormal.vo.MallIntegralVO;
|
||||
import org.springblade.modules.appFormal.vo.UserInfoVO;
|
||||
@@ -81,4 +82,18 @@ public class FormalCustomerController {
|
||||
return R.data(formalAppCustomerManager.findMallIntegralFlow(Condition.getPage(query), logVO, AuthUtil.getUserId()));
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "查询用户通知")
|
||||
@GetMapping("/find-user-notice-page")
|
||||
public R<IPage<AppUserNoticeVO>> findUserNoticePage(Query query , AppUserNoticeVO userNotice) {
|
||||
return R.data(formalAppCustomerManager.findUserNoticePage(Condition.getPage(query), userNotice, AuthUtil.getUserId()));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询用户通知")
|
||||
@PostMapping("/read-user-notice")
|
||||
public R<Boolean> readUserNotice(AppUserNoticeVO userNotice) {
|
||||
return R.status(formalAppCustomerManager.readUserNotice(userNotice.getId()));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -40,14 +40,14 @@ public class FormalMallController {
|
||||
|
||||
@Operation(summary = "添加购物车")
|
||||
@PostMapping("/add-cart")
|
||||
public R<Long> addCart(@RequestBody MallCartRequest request) {
|
||||
public R<AppFormalMallCartInfoVO> addCart(@RequestBody MallCartRequest request) {
|
||||
return R.data(mallProductManager.addCart(request.setUserId(AuthUtil.getUserId())));
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "添加购物车(创建订单之前调用)")
|
||||
@PostMapping("/add-cart-to-order")
|
||||
public R<Long> addCartToOrder(@RequestBody MallCartRequest request) {
|
||||
public R<AppFormalMallCartInfoVO> addCartToOrder(@RequestBody MallCartRequest request) {
|
||||
return R.data(mallProductManager.addCartToOrder(request.setUserId(AuthUtil.getUserId())));
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package org.springblade.modules.appFormal.convert;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
import org.springblade.modules.appFormal.vo.AppFormalBannerVO;
|
||||
import org.springblade.modules.appFormal.vo.AppUserNoticeVO;
|
||||
import org.springblade.modules.appFormal.vo.MallIntegralLogVO;
|
||||
import org.springblade.modules.customer.pojo.entity.UserNoticeEntity;
|
||||
import org.springblade.modules.mall.pojo.entity.AppBannerEntity;
|
||||
import org.springblade.modules.userPoint.pojo.entity.UserMallIntegralLogEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author jack
|
||||
*/
|
||||
@Mapper
|
||||
public interface AppBaseConvert {
|
||||
|
||||
AppBaseConvert INSTANCE = Mappers.getMapper(AppBaseConvert.class);
|
||||
|
||||
|
||||
List<AppFormalBannerVO> convertBannerListToVO(List<AppBannerEntity> bannerEntityList);
|
||||
|
||||
AppUserNoticeVO convertUserNoticePageToVO(UserNoticeEntity userNoticeEntity);
|
||||
}
|
||||
@@ -9,14 +9,18 @@ import org.springblade.core.jwt.props.JwtProperties;
|
||||
import org.springblade.core.oauth2.provider.OAuth2Request;
|
||||
import org.springblade.core.secure.BladeUser;
|
||||
import org.springblade.core.secure.utils.AuthUtil;
|
||||
import org.springblade.modules.appFormal.convert.AppBaseConvert;
|
||||
import org.springblade.modules.appFormal.convert.AppUserInfoConvert;
|
||||
import org.springblade.modules.appFormal.dto.PayOrderDicDTO;
|
||||
import org.springblade.modules.appFormal.request.CustomerSmsRequest;
|
||||
import org.springblade.modules.appFormal.request.UpdatePasswordRequest;
|
||||
import org.springblade.modules.appFormal.vo.AppFormalBannerVO;
|
||||
import org.springblade.modules.appFormal.vo.MallIntegralLogVO;
|
||||
import org.springblade.modules.appFormal.vo.MallIntegralVO;
|
||||
import org.springblade.modules.appFormal.vo.UserInfoVO;
|
||||
import org.springblade.modules.appOffline.event.AppUserRevokedEvent;
|
||||
import org.springblade.modules.mall.pojo.entity.AppBannerEntity;
|
||||
import org.springblade.modules.mall.service.IAppBannerService;
|
||||
import org.springblade.modules.sms.service.AliYunSmsService;
|
||||
import org.springblade.modules.system.pojo.entity.User;
|
||||
import org.springblade.modules.system.service.IParamService;
|
||||
@@ -38,6 +42,7 @@ import java.util.Objects;
|
||||
public class FormalAppBaseManager {
|
||||
|
||||
private final IParamService paramService;
|
||||
private final IAppBannerService appBannerService;
|
||||
|
||||
|
||||
public String formalAppPrivacy() {
|
||||
@@ -51,6 +56,36 @@ public class FormalAppBaseManager {
|
||||
return paramService.findAppFormalPayType(payModel);
|
||||
|
||||
}
|
||||
|
||||
public String formalAppAgreement() {
|
||||
return paramService.formalAppAgreement();
|
||||
}
|
||||
|
||||
public List<AppFormalBannerVO> findMainBanner() {
|
||||
|
||||
List<AppBannerEntity> bannerEntityList = appBannerService.list(
|
||||
Wrappers.<AppBannerEntity>lambdaQuery()
|
||||
.eq(AppBannerEntity::getBannerType, 1)
|
||||
.eq(AppBannerEntity::getIsShow, 1)
|
||||
.orderByDesc(AppBannerEntity::getId)
|
||||
|
||||
);
|
||||
|
||||
return AppBaseConvert.INSTANCE.convertBannerListToVO(bannerEntityList);
|
||||
|
||||
}
|
||||
|
||||
public List<AppFormalBannerVO> findMallBanner() {
|
||||
List<AppBannerEntity> bannerEntityList = appBannerService.list(
|
||||
Wrappers.<AppBannerEntity>lambdaQuery()
|
||||
.eq(AppBannerEntity::getBannerType, 2)
|
||||
.eq(AppBannerEntity::getIsShow, 1)
|
||||
.orderByDesc(AppBannerEntity::getId)
|
||||
|
||||
);
|
||||
|
||||
return AppBaseConvert.INSTANCE.convertBannerListToVO(bannerEntityList);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -15,13 +15,17 @@ import org.springblade.core.secure.utils.AuthUtil;
|
||||
import org.springblade.core.tool.utils.DigestUtil;
|
||||
import org.springblade.core.tool.utils.SM2Util;
|
||||
import org.springblade.core.tool.utils.StringUtil;
|
||||
import org.springblade.modules.appFormal.convert.AppBaseConvert;
|
||||
import org.springblade.modules.appFormal.convert.AppUserInfoConvert;
|
||||
import org.springblade.modules.appFormal.request.CustomerSmsRequest;
|
||||
import org.springblade.modules.appFormal.request.UpdatePasswordRequest;
|
||||
import org.springblade.modules.appFormal.vo.AppUserNoticeVO;
|
||||
import org.springblade.modules.appFormal.vo.MallIntegralLogVO;
|
||||
import org.springblade.modules.appFormal.vo.MallIntegralVO;
|
||||
import org.springblade.modules.appFormal.vo.UserInfoVO;
|
||||
import org.springblade.modules.appOffline.event.AppUserRevokedEvent;
|
||||
import org.springblade.modules.customer.pojo.entity.UserNoticeEntity;
|
||||
import org.springblade.modules.customer.service.IUserNoticeService;
|
||||
import org.springblade.modules.mall.pojo.entity.YsCategoryEntity;
|
||||
import org.springblade.modules.sms.service.AliYunSmsService;
|
||||
import org.springblade.modules.system.pojo.entity.User;
|
||||
@@ -47,6 +51,7 @@ public class FormalAppCustomerManager {
|
||||
private final IUserService userService;
|
||||
private final IUserMallIntegralService userMallIntegralService;
|
||||
private final IUserMallIntegralLogService mallIntegralLogService;
|
||||
private final IUserNoticeService userNoticeService;
|
||||
private final JwtProperties jwtProperties;
|
||||
private final ApplicationEventPublisher publisher;
|
||||
private final OAuth2Properties properties;
|
||||
@@ -164,6 +169,28 @@ public class FormalAppCustomerManager {
|
||||
}
|
||||
|
||||
|
||||
public IPage<AppUserNoticeVO> findUserNoticePage(IPage<AppUserNoticeVO> page, AppUserNoticeVO userNotice, Long userId) {
|
||||
|
||||
Page<UserNoticeEntity> pageResult = userNoticeService.page(
|
||||
new Page<>(page.getCurrent(), page.getSize()),
|
||||
Wrappers.lambdaQuery(UserNoticeEntity.class)
|
||||
.eq(UserNoticeEntity::getUserId, userId)
|
||||
.eq(Objects.nonNull(userNotice.getHasRead()), UserNoticeEntity::getHasRead, userNotice.getHasRead())
|
||||
.eq(Objects.nonNull(userNotice.getNoticeType()), UserNoticeEntity::getNoticeType, userNotice.getNoticeType())
|
||||
.orderByDesc(UserNoticeEntity::getHasRead , UserNoticeEntity::getId)
|
||||
);
|
||||
|
||||
return pageResult.convert(AppBaseConvert.INSTANCE::convertUserNoticePageToVO);
|
||||
}
|
||||
|
||||
public boolean readUserNotice(Long id) {
|
||||
|
||||
UserNoticeEntity userNotice = userNoticeService.getById(id);
|
||||
Assert.notNull(userNotice, "通知不存在");
|
||||
userNotice.setHasRead(1);
|
||||
userNotice.setReleaseTime(new Date());
|
||||
return userNoticeService.updateById(userNotice);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.core.secure.utils.AuthUtil;
|
||||
import org.springblade.core.tool.utils.StringUtil;
|
||||
import org.springblade.modules.appFormal.convert.AppFormalMallConvert;
|
||||
import org.springblade.modules.appFormal.request.AddressSubmitRequest;
|
||||
import org.springblade.modules.appFormal.request.MallCartRequest;
|
||||
@@ -26,6 +27,7 @@ import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -58,8 +60,8 @@ public class FormalAppMallManager {
|
||||
Page<MallSpuEntity> pageResult = spuService.page(
|
||||
new Page<>(page.getCurrent(), page.getSize()),
|
||||
Wrappers.lambdaQuery(MallSpuEntity.class)
|
||||
.eq(StringUtils.hasText(spuVO.getCateId()), MallSpuEntity::getCateId, spuVO.getCateId())
|
||||
.like(StringUtils.hasText(spuVO.getSpuName()), MallSpuEntity::getSpuName, spuVO.getSpuName())
|
||||
.eq(StringUtil.isNotBlank(spuVO.getCateId()), MallSpuEntity::getCateId, spuVO.getCateId())
|
||||
.like(StringUtil.isNotBlank(spuVO.getSpuName()), MallSpuEntity::getSpuName, spuVO.getSpuName())
|
||||
.orderByDesc(MallSpuEntity::getId)
|
||||
);
|
||||
|
||||
@@ -72,7 +74,7 @@ public class FormalAppMallManager {
|
||||
new Page<>(page.getCurrent(), page.getSize()),
|
||||
Wrappers.lambdaQuery(MallCartEntity.class)
|
||||
.eq(MallCartEntity::getUserId, userId)
|
||||
.like(StringUtils.hasText(cartVO.getTitle()), MallCartEntity::getTitle, cartVO.getTitle())
|
||||
.like(StringUtil.isNotBlank(cartVO.getTitle()), MallCartEntity::getTitle, cartVO.getTitle())
|
||||
.orderByDesc(MallCartEntity::getId)
|
||||
);
|
||||
|
||||
@@ -80,7 +82,7 @@ public class FormalAppMallManager {
|
||||
|
||||
}
|
||||
|
||||
public Long addCart(MallCartRequest request) {
|
||||
public AppFormalMallCartInfoVO addCart(MallCartRequest request) {
|
||||
|
||||
MallSpuEntity mallSpu = spuService.getById(request.getSpuId());
|
||||
Assert.notNull(mallSpu, "商品不存在");
|
||||
@@ -94,7 +96,10 @@ public class FormalAppMallManager {
|
||||
|
||||
if (mallCart != null){
|
||||
mallCart.setQuantity(mallCart.getQuantity() + request.getQuantity());
|
||||
return mallCartService.updateById(mallCart) ? mallCart.getId() : null;
|
||||
if (!mallCartService.updateById(mallCart)){
|
||||
throw new RuntimeException("更新购物车失败");
|
||||
}
|
||||
return new AppFormalMallCartInfoVO().setId( mallCart.getId()).setFreight(BigDecimal.ZERO);
|
||||
}
|
||||
|
||||
MallCartEntity cart = new MallCartEntity();
|
||||
@@ -106,13 +111,13 @@ public class FormalAppMallManager {
|
||||
cart.setOriginalPrice(mallSpu.getOriginalPrice());
|
||||
cart.setRetailPrice(mallSpu.getRetailPrice());
|
||||
if (mallCartService.save(cart)){
|
||||
return cart.getId();
|
||||
return new AppFormalMallCartInfoVO().setFreight(BigDecimal.ZERO).setId(cart.getId());
|
||||
}
|
||||
throw new RuntimeException("添加购物车失败");
|
||||
|
||||
}
|
||||
|
||||
public Long addCartToOrder(MallCartRequest request) {
|
||||
public AppFormalMallCartInfoVO addCartToOrder(MallCartRequest request) {
|
||||
|
||||
MallSpuEntity mallSpu = spuService.getById(request.getSpuId());
|
||||
Assert.notNull(mallSpu, "商品不存在");
|
||||
@@ -126,7 +131,7 @@ public class FormalAppMallManager {
|
||||
cart.setOriginalPrice(mallSpu.getOriginalPrice());
|
||||
cart.setRetailPrice(mallSpu.getRetailPrice());
|
||||
if (mallCartService.save(cart)){
|
||||
return cart.getId();
|
||||
return new AppFormalMallCartInfoVO().setFreight(BigDecimal.ZERO).setId(cart.getId());
|
||||
}
|
||||
throw new RuntimeException("添加购物车失败");
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.appFormal.vo;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 首页轮播图 实体类
|
||||
*
|
||||
* @author lzq
|
||||
* @since 2026-02-03
|
||||
*/
|
||||
@Data
|
||||
public class AppFormalBannerVO {
|
||||
|
||||
|
||||
|
||||
private String coverUrl;
|
||||
|
||||
private String route;
|
||||
|
||||
private String outsideUrl;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package org.springblade.modules.appFormal.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class AppFormalMallCartInfoVO {
|
||||
private Long id;
|
||||
private BigDecimal freight = BigDecimal.ZERO;
|
||||
|
||||
}
|
||||
@@ -65,4 +65,6 @@ public class AppFormalMallSpuVO implements Serializable {
|
||||
*/
|
||||
private String tags;
|
||||
|
||||
private BigDecimal freight = BigDecimal.ZERO;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.appFormal.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 用户通知 实体类
|
||||
*
|
||||
* @author lzq
|
||||
* @since 2026-02-03
|
||||
*/
|
||||
@Data
|
||||
public class AppUserNoticeVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@Schema(description = "用户id")
|
||||
private Long id;
|
||||
|
||||
private Integer noticeType;
|
||||
/**
|
||||
* 是否已读 0-否 1-是
|
||||
*/
|
||||
private Integer hasRead;
|
||||
|
||||
private Date releaseTime;
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
private String title;
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
|
||||
}
|
||||
@@ -34,7 +34,7 @@ public class MallIntegralLogVO implements Serializable {
|
||||
private Integer type;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date statisticalDate;
|
||||
|
||||
|
||||
|
||||
@@ -9,9 +9,12 @@ import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
import org.springblade.core.secure.utils.AuthUtil;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.modules.appFormal.manager.FormalAppCustomerManager;
|
||||
import org.springblade.modules.appFormal.vo.AppUserNoticeVO;
|
||||
import org.springblade.modules.appOffline.manager.OfflineAppCustomerManager;
|
||||
import org.springblade.modules.appOffline.vo.*;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@@ -21,9 +24,10 @@ import java.util.List;
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("offline-app/customer")
|
||||
@Tag(name = "积分app用户信息", description = "积分app用户信息接口")
|
||||
public class OfflineBaseController {
|
||||
public class OfflineCustomerController {
|
||||
|
||||
private final OfflineAppCustomerManager offlineAppCustomerManager;;
|
||||
private final OfflineAppCustomerManager offlineAppCustomerManager;
|
||||
private final FormalAppCustomerManager formalAppCustomerManager;
|
||||
|
||||
|
||||
|
||||
@@ -34,6 +38,24 @@ public class OfflineBaseController {
|
||||
return R.data(offlineAppCustomerManager.findUserInfo(AuthUtil.getUserId()));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询用户直推")
|
||||
@GetMapping("/find-user-direct-list")
|
||||
public R<List<AppOfflineUserDirectVO>> findUserDirectList() {
|
||||
return R.data(offlineAppCustomerManager.findUserDirectList(AuthUtil.getUserId()));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询用户通知")
|
||||
@GetMapping("/find-user-notice-page")
|
||||
public R<IPage<AppUserNoticeVO>> findUserNoticePage(Query query , AppUserNoticeVO userNotice) {
|
||||
return R.data(formalAppCustomerManager.findUserNoticePage(Condition.getPage(query), userNotice, AuthUtil.getUserId()));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询用户通知")
|
||||
@GetMapping("/read-user-notice")
|
||||
public R<Boolean> readUserNotice(AppUserNoticeVO userNotice) {
|
||||
return R.status(formalAppCustomerManager.readUserNotice(userNotice.getId()));
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "查询积分")
|
||||
@GetMapping("/find-user-integral")
|
||||
@@ -74,7 +96,7 @@ public class OfflineBaseController {
|
||||
|
||||
|
||||
@Operation(summary = "查询用户兑换福利包的列表")
|
||||
@GetMapping("/find-user-pack-list")
|
||||
@PostMapping("/find-user-pack-list")
|
||||
public R<IPage<AppOffLineUserPackInfoVO>> findUserPackList(Query query , AppOffLineUserPackInfoVO packInfo) {
|
||||
return R.data(offlineAppCustomerManager.findUserPackList(Condition.getPage(query) , packInfo ,AuthUtil.getUserId()));
|
||||
|
||||
@@ -5,8 +5,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.mapstruct.Mapper;
|
||||
|
||||
import org.mapstruct.Mapping;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
import org.springblade.modules.appOffline.vo.*;
|
||||
import org.springblade.modules.customer.pojo.entity.UserGenealogyEntity;
|
||||
import org.springblade.modules.customer.pojo.entity.UserIncreaseDayEntity;
|
||||
import org.springblade.modules.userPackInfo.pojo.entity.AdsEntity;
|
||||
import org.springblade.modules.userPackInfo.pojo.entity.PackageInfoEntity;
|
||||
@@ -39,4 +41,10 @@ public interface AppOfflineUserInfoConvert {
|
||||
AppOffLineUserPackInfoVO convertUserPackInfoPageToVO(UserPackageInfoCopyEntity entity);
|
||||
|
||||
List<AppOffLineAdsVO> convertAdsListToVO(List<AdsEntity> list);
|
||||
|
||||
|
||||
@Mapping(source = "id", target = "userId")
|
||||
@Mapping(source = "createTime", target = "registerTime")
|
||||
AppOfflineUserDirectVO convertGenealogyListToVO(UserGenealogyEntity entity);
|
||||
List<AppOfflineUserDirectVO> convertGenealogyListToListVO(List<UserGenealogyEntity> list);
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@@ -50,6 +51,7 @@ public class AppUserInfoListener {
|
||||
savaUserTree.setIsSyncGenealogy(0);
|
||||
savaUserTree.setIsRevoked(0);
|
||||
savaUserTree.setRegisterDate(DateUtil.getToday());
|
||||
savaUserTree.setCreateTime(new Date());
|
||||
|
||||
if (event.getIsRoot() == 0){
|
||||
UserTreeEntity parentTree = userTreeService.getById(event.getPid());
|
||||
@@ -86,6 +88,7 @@ public class AppUserInfoListener {
|
||||
savaUserGenealogy.setRootId(event.getUserId());
|
||||
savaUserGenealogy.setGroupId(event.getUserId());
|
||||
savaUserGenealogy.setGenealogyList(new ArrayList<>());
|
||||
savaUserGenealogy.setCreateTime(new Date());
|
||||
|
||||
if (event.getIsRoot() == 0){
|
||||
UserGenealogyEntity parentGenealogy = userGenealogyService.getById(event.getPid());
|
||||
@@ -130,6 +133,7 @@ public class AppUserInfoListener {
|
||||
savaUserIncreaseDay.setPName("");
|
||||
savaUserIncreaseDay.setPPhone(null);
|
||||
savaUserIncreaseDay.setPLevel(0);
|
||||
savaUserIncreaseDay.setCreateTime(new Date());
|
||||
|
||||
if (event.getIsRoot() == 0){
|
||||
UserIncreaseDayEntity parentIncreaseDay = userIncreaseDayService.getById(event.getPid());
|
||||
|
||||
@@ -9,7 +9,9 @@ import jakarta.annotation.PostConstruct;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.modules.appOffline.convert.AppOfflineUserInfoConvert;
|
||||
import org.springblade.modules.appOffline.vo.*;
|
||||
import org.springblade.modules.customer.pojo.entity.UserGenealogyEntity;
|
||||
import org.springblade.modules.customer.pojo.entity.UserIncreaseDayEntity;
|
||||
import org.springblade.modules.customer.service.IUserGenealogyService;
|
||||
import org.springblade.modules.customer.service.IUserIncreaseDayService;
|
||||
import org.springblade.modules.system.pojo.entity.User;
|
||||
import org.springblade.modules.system.service.IUserService;
|
||||
@@ -32,6 +34,7 @@ public class OfflineAppCustomerManager {
|
||||
|
||||
|
||||
private final IUserService userService;
|
||||
private final IUserGenealogyService userGenealogyService;
|
||||
private final IUserIncreaseDayService userIncreaseDayService;
|
||||
private final IUserBenefitService userBenefitService;
|
||||
private final IUserCashService userCashService;
|
||||
@@ -66,13 +69,31 @@ public class OfflineAppCustomerManager {
|
||||
UserIncreaseDayEntity userIncreaseDayEntity = userIncreaseDayService.getById(userId);
|
||||
return AppOfflineUserInfoConvert.INSTANCE.convertEntityToVO(userIncreaseDayEntity);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public List<AppOfflineUserDirectVO> findUserDirectList(Long userId) {
|
||||
|
||||
User user = userService.getById(userId);
|
||||
Assert.notNull(user, "用户不存在");
|
||||
|
||||
List<UserGenealogyEntity> genealogyList = userGenealogyService.list(
|
||||
Wrappers.lambdaQuery(UserGenealogyEntity.class)
|
||||
.eq(UserGenealogyEntity::getPid, userId)
|
||||
.eq(UserGenealogyEntity::getIsRevoked, 0)
|
||||
.orderByDesc(UserGenealogyEntity::getId)
|
||||
|
||||
);
|
||||
|
||||
return AppOfflineUserInfoConvert.INSTANCE.convertGenealogyListToListVO(genealogyList);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public AppOfflineIntegralVO findUserIntegral(Long userId) {
|
||||
|
||||
UserBenefitEntity userBenefit = userBenefitService.getById(userId);
|
||||
if (userBenefit == null){
|
||||
if (userBenefit == null) {
|
||||
userBenefit = new UserBenefitEntity();
|
||||
userBenefit.setId(userId);
|
||||
userBenefit.setAmount(BigDecimal.ZERO);
|
||||
@@ -80,7 +101,7 @@ public class OfflineAppCustomerManager {
|
||||
}
|
||||
|
||||
UserCashEntity userCash = userCashService.getById(userId);
|
||||
if (userCash == null){
|
||||
if (userCash == null) {
|
||||
userCash = new UserCashEntity();
|
||||
userCash.setId(userId);
|
||||
userCash.setAmount(BigDecimal.ZERO);
|
||||
@@ -88,7 +109,7 @@ public class OfflineAppCustomerManager {
|
||||
}
|
||||
|
||||
UserCommissionEntity userCommission = userCommissionService.getById(userId);
|
||||
if (userCommission == null){
|
||||
if (userCommission == null) {
|
||||
userCommission = new UserCommissionEntity();
|
||||
userCommission.setId(userId);
|
||||
userCommission.setAmount(BigDecimal.ZERO);
|
||||
@@ -160,4 +181,5 @@ public class OfflineAppCustomerManager {
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -106,6 +106,18 @@ public class OfflineAppDailySignManager {
|
||||
if (isLook(binaryLookAtAds , adsIndex)){
|
||||
throw new RuntimeException("此广告今日已经观看");
|
||||
}
|
||||
|
||||
if(userDailySignService.count(
|
||||
Wrappers.lambdaQuery(UserDailySignEntity.class)
|
||||
.eq(UserDailySignEntity::getType, 1)
|
||||
.eq(UserDailySignEntity::getUserId, request.getUserId())
|
||||
.eq(UserDailySignEntity::getStatisticsDate, DateUtil.getToday())
|
||||
.eq(UserDailySignEntity::getIsComplete, 1)
|
||||
|
||||
) > 0){
|
||||
throw new RuntimeException("今日已完成签到");
|
||||
}
|
||||
|
||||
bladeRedis.setEx(outputTimeKey, System.currentTimeMillis(), Duration.ofSeconds(60 * 60 * 24));
|
||||
return Boolean.TRUE;
|
||||
|
||||
@@ -156,6 +168,18 @@ public class OfflineAppDailySignManager {
|
||||
lookToBinary = setLookToBinary(String.valueOf(objectLookAtAds), adsIndex);
|
||||
}
|
||||
bladeRedis.setEx(key, lookToBinary, Duration.ofSeconds(60 * 60 * 24));
|
||||
|
||||
if(userDailySignService.count(
|
||||
Wrappers.lambdaQuery(UserDailySignEntity.class)
|
||||
.eq(UserDailySignEntity::getType, 1)
|
||||
.eq(UserDailySignEntity::getUserId, request.getUserId())
|
||||
.eq(UserDailySignEntity::getStatisticsDate, DateUtil.getToday())
|
||||
.eq(UserDailySignEntity::getIsComplete, 1)
|
||||
|
||||
) > 0){
|
||||
throw new RuntimeException("今日已完成签到");
|
||||
}
|
||||
|
||||
UserDailySignEntity userDailySign = userDailySignService.getOne(
|
||||
Wrappers.lambdaQuery(UserDailySignEntity.class)
|
||||
.eq(UserDailySignEntity::getType, adsType)
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package org.springblade.modules.appOffline.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class AppOfflineUserDirectVO implements Serializable {
|
||||
|
||||
private Long userId;
|
||||
private String name;
|
||||
private Long phone;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
|
||||
private Date registerTime;
|
||||
|
||||
}
|
||||
@@ -20,7 +20,6 @@ public interface BladeAuthConstant {
|
||||
*/
|
||||
Integer FAIL_COUNT = 5;
|
||||
|
||||
String DEFAULT_PASSWORD = "123456";
|
||||
|
||||
String INVITATION_CODE = "invitation_code";
|
||||
|
||||
|
||||
@@ -49,6 +49,8 @@ import org.springblade.core.oauth2.service.OAuth2ClientService;
|
||||
import org.springblade.core.oauth2.service.OAuth2User;
|
||||
import org.springblade.core.oauth2.service.OAuth2UserService;
|
||||
import org.springblade.core.oauth2.service.impl.OAuth2UserDetail;
|
||||
import org.springblade.core.oauth2.utils.OAuth2Util;
|
||||
import org.springblade.core.secure.TokenInfo;
|
||||
import org.springblade.core.social.props.SocialProperties;
|
||||
import org.springblade.core.tool.support.Kv;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
@@ -128,11 +130,12 @@ public class RegisterTokenGranter extends AbstractTokenGranter {
|
||||
|
||||
// 验证码
|
||||
String code = request.getCode();
|
||||
String password = request.getPassword();
|
||||
String password = SM2Util.decrypt(request.getPassword(), properties.getPrivateKey());
|
||||
log.info("password:[{}]", password);
|
||||
if (code != null){
|
||||
aliYunSmsService.verifySms(request.getPhone(), code);
|
||||
password = BladeAuthConstant.DEFAULT_PASSWORD;
|
||||
// 截取手机号后六位
|
||||
password = createDefaultPassword(request.getPhone());
|
||||
}else {
|
||||
Assert.notNull(password, "密码不能为空");
|
||||
//校验密码长度是6到12位, 可以包含字母、数字
|
||||
@@ -150,7 +153,7 @@ public class RegisterTokenGranter extends AbstractTokenGranter {
|
||||
user.setUserType(UserType.of(request.getUserType()).getCategory());
|
||||
user.setTenantId(request.getTenantId());
|
||||
user.setAccount(request.getPhone());
|
||||
user.setPassword(SM2Util.decrypt(request.getPassword(), properties.getPrivateKey()));
|
||||
user.setPassword(password);
|
||||
user.setName(request.getName());
|
||||
user.setRealName(request.getName());
|
||||
user.setPhone(request.getPhone());
|
||||
@@ -205,14 +208,11 @@ public class RegisterTokenGranter extends AbstractTokenGranter {
|
||||
|
||||
@Override
|
||||
public OAuth2Token token(OAuth2User user, OAuth2Request request) {
|
||||
// 移除注册后返回的令牌与刷新令牌,防止外部攻击采用注册接口获取令牌并调用低权接口
|
||||
// 注意:
|
||||
// 1. 框架已默认开启严格模式,blade.secure.strict-token=true,不移除令牌则不受影响,注册令牌会被框架校验并拒绝
|
||||
// 2. 若自行关闭严格模式,blade.secure.strict-token=false,必须将令牌移除,否则注册获取令牌后可调用低权接口
|
||||
OAuth2Token token = super.token(user, request);
|
||||
token.getArgs().remove(TokenConstant.ACCESS_TOKEN);
|
||||
token.getArgs().remove(TokenConstant.REFRESH_TOKEN);
|
||||
return token;
|
||||
TokenInfo accessToken = OAuth2Util.createAccessToken(user);
|
||||
TokenInfo refreshToken = OAuth2Util.createRefreshToken(user);
|
||||
OAuth2Token token = OAuth2Token.create();
|
||||
token.getArgs().set("tenant_id", user.getTenantId()).set("user_id", user.getUserId()).set("dept_id", user.getDeptId()).set("post_id", user.getPostId()).set("role_id", user.getRoleId()).set("oauth_id", user.getOauthId()).set("account", user.getAccount()).set("user_name", user.getAccount()).set("nick_name", user.getName()).set("real_name", user.getRealName()).set("role_name", Func.join(user.getAuthorities())).set("avatar", Func.toStr(user.getAvatar(), "https://bladex.cn/images/logo-small.png")).set("access_token", accessToken.getToken()).set("refresh_token", refreshToken.getToken()).set("token_type", "bearer").set("expires_in", accessToken.getExpire()).set("detail", user.getDetail()).set("license", "powered by bladex");
|
||||
return token.setAccessToken(accessToken.getToken()).setAccessTokenExpire(accessToken.getExpire()).setRefreshToken(refreshToken.getToken()).setRefreshTokenExpire(refreshToken.getExpire());
|
||||
}
|
||||
|
||||
private void validateUser(User user) {
|
||||
@@ -261,4 +261,9 @@ public class RegisterTokenGranter extends AbstractTokenGranter {
|
||||
private Long HexToPhone(String invitation_code) {
|
||||
return RadixUtil.decode(BladeAuthConstant.BINARY_TEMPLATE, invitation_code);
|
||||
}
|
||||
|
||||
private String createDefaultPassword(String phone) {
|
||||
return phone.substring(phone.length() - 6);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,161 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.customer.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import lombok.AllArgsConstructor;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import org.springblade.core.secure.BladeUser;
|
||||
import org.springblade.core.secure.annotation.IsAdmin;
|
||||
import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.modules.customer.pojo.entity.UserNoticeEntity;
|
||||
import org.springblade.modules.customer.pojo.vo.UserNoticeVO;
|
||||
import org.springblade.modules.customer.excel.UserNoticeExcel;
|
||||
import org.springblade.modules.customer.wrapper.UserNoticeWrapper;
|
||||
import org.springblade.modules.customer.service.IUserNoticeService;
|
||||
import org.springblade.core.boot.ctrl.BladeController;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springblade.core.excel.util.ExcelUtil;
|
||||
import org.springblade.core.tool.constant.BladeConstant;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* 用户通知 控制器
|
||||
*
|
||||
* @author lzq
|
||||
* @since 2026-02-03
|
||||
*/
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("blade-notice/notice")
|
||||
@Tag(name = "用户通知", description = "用户通知接口")
|
||||
public class UserNoticeController extends BladeController {
|
||||
|
||||
private final IUserNoticeService noticeService;
|
||||
|
||||
/**
|
||||
* 用户通知 详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "详情", description = "传入notice")
|
||||
public R<UserNoticeVO> detail(UserNoticeEntity notice) {
|
||||
UserNoticeEntity detail = noticeService.getOne(Condition.getQueryWrapper(notice));
|
||||
return R.data(UserNoticeWrapper.build().entityVO(detail));
|
||||
}
|
||||
/**
|
||||
* 用户通知 分页
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "分页", description = "传入notice")
|
||||
public R<IPage<UserNoticeVO>> list(UserNoticeEntity notice, Query query) {
|
||||
IPage<UserNoticeEntity> pages = noticeService.page(Condition.getPage(query), Condition.getQueryWrapper(notice).orderByDesc("id"));
|
||||
return R.data(UserNoticeWrapper.build().pageVO(pages));
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户通知 自定义分页
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "分页", description = "传入notice")
|
||||
public R<IPage<UserNoticeVO>> page(UserNoticeVO notice, Query query) {
|
||||
IPage<UserNoticeVO> pages = noticeService.selectUserNoticePage(Condition.getPage(query), notice);
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户通知 新增
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "新增", description = "传入notice")
|
||||
public R save(@Valid @RequestBody UserNoticeEntity notice) {
|
||||
return R.status(noticeService.save(notice));
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户通知 修改
|
||||
*/
|
||||
@PostMapping("/update")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "修改", description = "传入notice")
|
||||
public R update(@Valid @RequestBody UserNoticeEntity notice) {
|
||||
return R.status(noticeService.updateById(notice));
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户通知 新增或修改
|
||||
*/
|
||||
@PostMapping("/submit")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "新增或修改", description = "传入notice")
|
||||
public R submit(@Valid @RequestBody UserNoticeEntity notice) {
|
||||
return R.status(noticeService.saveOrUpdate(notice));
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户通知 删除
|
||||
*/
|
||||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(noticeService.deleteLogic(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出数据
|
||||
*/
|
||||
@IsAdmin
|
||||
@GetMapping("/export-notice")
|
||||
@ApiOperationSupport(order = 9)
|
||||
@Operation(summary = "导出数据", description = "传入notice")
|
||||
public void exportUserNotice(@Parameter(hidden = true) @RequestParam Map<String, Object> notice, BladeUser bladeUser, HttpServletResponse response) {
|
||||
QueryWrapper<UserNoticeEntity> queryWrapper = Condition.getQueryWrapper(notice, UserNoticeEntity.class);
|
||||
//if (!AuthUtil.isAdministrator()) {
|
||||
// queryWrapper.lambda().eq(UserNotice::getTenantId, bladeUser.getTenantId());
|
||||
//}
|
||||
//queryWrapper.lambda().eq(UserNoticeEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
|
||||
List<UserNoticeExcel> list = noticeService.exportUserNotice(queryWrapper);
|
||||
ExcelUtil.export(response, "用户通知数据" + DateUtil.time(), "用户通知数据表", list, UserNoticeExcel.class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.customer.excel;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import cn.idev.excel.annotation.write.style.ColumnWidth;
|
||||
import cn.idev.excel.annotation.write.style.ContentRowHeight;
|
||||
import cn.idev.excel.annotation.write.style.HeadRowHeight;
|
||||
import java.io.Serializable;
|
||||
import java.io.Serial;
|
||||
|
||||
|
||||
/**
|
||||
* 用户通知 Excel实体类
|
||||
*
|
||||
* @author lzq
|
||||
* @since 2026-02-03
|
||||
*/
|
||||
@Data
|
||||
@ColumnWidth(25)
|
||||
@HeadRowHeight(20)
|
||||
@ContentRowHeight(18)
|
||||
public class UserNoticeExcel implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("用户id")
|
||||
private Long userId;
|
||||
/**
|
||||
* 通知类型0-系统通知
|
||||
*/
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("通知类型0-系统通知")
|
||||
private Integer noticeType;
|
||||
/**
|
||||
* 是否已读 0-否 1-是
|
||||
*/
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("是否已读 0-否 1-是")
|
||||
private Integer hasRead;
|
||||
/**
|
||||
* 阅读时间
|
||||
*/
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("阅读时间")
|
||||
private Date releaseTime;
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("标题")
|
||||
private String title;
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("内容")
|
||||
private String content;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("备注")
|
||||
private String remarks;
|
||||
/**
|
||||
* 是否已删除
|
||||
*/
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("是否已删除")
|
||||
private Integer isDeleted;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.customer.mapper;
|
||||
|
||||
import org.springblade.modules.customer.pojo.entity.UserNoticeEntity;
|
||||
import org.springblade.modules.customer.pojo.vo.UserNoticeVO;
|
||||
import org.springblade.modules.customer.excel.UserNoticeExcel;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户通知 Mapper 接口
|
||||
*
|
||||
* @author lzq
|
||||
* @since 2026-02-03
|
||||
*/
|
||||
public interface UserNoticeMapper extends BaseMapper<UserNoticeEntity> {
|
||||
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param notice 查询参数
|
||||
* @return List<UserNoticeVO>
|
||||
*/
|
||||
List<UserNoticeVO> selectUserNoticePage(IPage page, UserNoticeVO notice);
|
||||
|
||||
|
||||
/**
|
||||
* 获取导出数据
|
||||
*
|
||||
* @param queryWrapper 查询条件
|
||||
* @return List<UserNoticeExcel>
|
||||
*/
|
||||
List<UserNoticeExcel> exportUserNotice(@Param("ew") Wrapper<UserNoticeEntity> queryWrapper);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.springblade.modules.customer.mapper.UserNoticeMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="noticeResultMap" type="org.springblade.modules.customer.pojo.entity.UserNoticeEntity">
|
||||
<result column="id" property="id"/>
|
||||
<result column="user_id" property="userId"/>
|
||||
<result column="notice_type" property="noticeType"/>
|
||||
<result column="has_read" property="hasRead"/>
|
||||
<result column="release_time" property="releaseTime"/>
|
||||
<result column="title" property="title"/>
|
||||
<result column="content" property="content"/>
|
||||
<result column="remarks" property="remarks"/>
|
||||
<result column="create_user" property="createUser"/>
|
||||
<result column="create_dept" property="createDept"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_user" property="updateUser"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="is_deleted" property="isDeleted"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="selectUserNoticePage" resultMap="noticeResultMap">
|
||||
select * from user_notice where is_deleted = 0
|
||||
</select>
|
||||
|
||||
|
||||
<select id="exportUserNotice" resultType="org.springblade.modules.customer.excel.UserNoticeExcel">
|
||||
SELECT * FROM user_notice ${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.customer.pojo.dto;
|
||||
|
||||
import org.springblade.modules.customer.pojo.entity.UserNoticeEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 用户通知 数据传输对象实体类
|
||||
*
|
||||
* @author lzq
|
||||
* @since 2026-02-03
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class UserNoticeDTO extends UserNoticeEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.customer.pojo.entity;
|
||||
|
||||
import lombok.Data;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.util.Date;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.mp.base.BaseEntity;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 用户通知 实体类
|
||||
*
|
||||
* @author lzq
|
||||
* @since 2026-02-03
|
||||
*/
|
||||
@Data
|
||||
@TableName("user_notice")
|
||||
@Schema(description = "UserNotice对象")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class UserNoticeEntity extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@Schema(description = "用户id")
|
||||
private Long userId;
|
||||
/**
|
||||
* 通知类型0-系统通知
|
||||
*/
|
||||
@Schema(description = "通知类型0-系统通知")
|
||||
private Integer noticeType;
|
||||
/**
|
||||
* 是否已读 0-否 1-是
|
||||
*/
|
||||
@Schema(description = "是否已读 0-否 1-是")
|
||||
private Integer hasRead;
|
||||
/**
|
||||
* 阅读时间
|
||||
*/
|
||||
@Schema(description = "阅读时间")
|
||||
private Date releaseTime;
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@Schema(description = "标题")
|
||||
private String title;
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
@Schema(description = "内容")
|
||||
private String content;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Schema(description = "备注")
|
||||
private String remarks;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.customer.pojo.vo;
|
||||
|
||||
import org.springblade.modules.customer.pojo.entity.UserNoticeEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 用户通知 视图实体类
|
||||
*
|
||||
* @author lzq
|
||||
* @since 2026-02-03
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class UserNoticeVO extends UserNoticeEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.customer.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import org.springblade.modules.customer.pojo.entity.UserNoticeEntity;
|
||||
import org.springblade.modules.customer.pojo.vo.UserNoticeVO;
|
||||
import org.springblade.modules.customer.excel.UserNoticeExcel;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户通知 服务类
|
||||
*
|
||||
* @author lzq
|
||||
* @since 2026-02-03
|
||||
*/
|
||||
public interface IUserNoticeService extends BaseService<UserNoticeEntity> {
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param notice 查询参数
|
||||
* @return IPage<UserNoticeVO>
|
||||
*/
|
||||
IPage<UserNoticeVO> selectUserNoticePage(IPage<UserNoticeVO> page, UserNoticeVO notice);
|
||||
|
||||
|
||||
/**
|
||||
* 导出数据
|
||||
*
|
||||
* @param queryWrapper 查询条件
|
||||
* @return List<UserNoticeExcel>
|
||||
*/
|
||||
List<UserNoticeExcel> exportUserNotice(Wrapper<UserNoticeEntity> queryWrapper);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.customer.service.impl;
|
||||
|
||||
import org.springblade.modules.customer.pojo.entity.UserNoticeEntity;
|
||||
import org.springblade.modules.customer.pojo.vo.UserNoticeVO;
|
||||
import org.springblade.modules.customer.excel.UserNoticeExcel;
|
||||
import org.springblade.modules.customer.mapper.UserNoticeMapper;
|
||||
import org.springblade.modules.customer.service.IUserNoticeService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户通知 服务实现类
|
||||
*
|
||||
* @author lzq
|
||||
* @since 2026-02-03
|
||||
*/
|
||||
@Service
|
||||
public class UserNoticeServiceImpl extends BaseServiceImpl<UserNoticeMapper, UserNoticeEntity> implements IUserNoticeService {
|
||||
|
||||
@Override
|
||||
public IPage<UserNoticeVO> selectUserNoticePage(IPage<UserNoticeVO> page, UserNoticeVO notice) {
|
||||
return page.setRecords(baseMapper.selectUserNoticePage(page, notice));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<UserNoticeExcel> exportUserNotice(Wrapper<UserNoticeEntity> queryWrapper) {
|
||||
List<UserNoticeExcel> noticeList = baseMapper.exportUserNotice(queryWrapper);
|
||||
//noticeList.forEach(notice -> {
|
||||
// notice.setTypeName(DictCache.getValue(DictEnum.YES_NO, UserNotice.getType()));
|
||||
//});
|
||||
return noticeList;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.customer.wrapper;
|
||||
|
||||
import org.springblade.core.mp.support.BaseEntityWrapper;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.modules.customer.pojo.entity.UserNoticeEntity;
|
||||
import org.springblade.modules.customer.pojo.vo.UserNoticeVO;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 用户通知 包装类,返回视图层所需的字段
|
||||
*
|
||||
* @author lzq
|
||||
* @since 2026-02-03
|
||||
*/
|
||||
public class UserNoticeWrapper extends BaseEntityWrapper<UserNoticeEntity, UserNoticeVO> {
|
||||
|
||||
public static UserNoticeWrapper build() {
|
||||
return new UserNoticeWrapper();
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserNoticeVO entityVO(UserNoticeEntity notice) {
|
||||
UserNoticeVO noticeVO = Objects.requireNonNull(BeanUtil.copyProperties(notice, UserNoticeVO.class));
|
||||
|
||||
//User createUser = UserCache.getUser(notice.getCreateUser());
|
||||
//User updateUser = UserCache.getUser(notice.getUpdateUser());
|
||||
//noticeVO.setCreateUserName(createUser.getName());
|
||||
//noticeVO.setUpdateUserName(updateUser.getName());
|
||||
|
||||
return noticeVO;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.mall.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import lombok.AllArgsConstructor;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import org.springblade.core.secure.BladeUser;
|
||||
import org.springblade.core.secure.annotation.IsAdmin;
|
||||
import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.modules.mall.pojo.entity.AppBannerEntity;
|
||||
import org.springblade.modules.mall.pojo.vo.UserBannerVO;
|
||||
import org.springblade.modules.mall.excel.AppBannerExcel;
|
||||
import org.springblade.modules.mall.wrapper.AppBannerWrapper;
|
||||
import org.springblade.modules.mall.service.IAppBannerService;
|
||||
import org.springblade.core.boot.ctrl.BladeController;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springblade.core.excel.util.ExcelUtil;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* 首页轮播图 控制器
|
||||
*
|
||||
* @author lzq
|
||||
* @since 2026-02-03
|
||||
*/
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("blade-banner/banner")
|
||||
@Tag(name = "首页轮播图", description = "首页轮播图接口")
|
||||
public class AppBannerController extends BladeController {
|
||||
|
||||
private final IAppBannerService bannerService;
|
||||
|
||||
/**
|
||||
* 首页轮播图 详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "详情", description = "传入banner")
|
||||
public R<UserBannerVO> detail(AppBannerEntity banner) {
|
||||
AppBannerEntity detail = bannerService.getOne(Condition.getQueryWrapper(banner));
|
||||
return R.data(AppBannerWrapper.build().entityVO(detail));
|
||||
}
|
||||
/**
|
||||
* 首页轮播图 分页
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "分页", description = "传入banner")
|
||||
public R<IPage<UserBannerVO>> list(AppBannerEntity banner, Query query) {
|
||||
IPage<AppBannerEntity> pages = bannerService.page(Condition.getPage(query), Condition.getQueryWrapper(banner).orderByDesc("id"));
|
||||
return R.data(AppBannerWrapper.build().pageVO(pages));
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页轮播图 自定义分页
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "分页", description = "传入banner")
|
||||
public R<IPage<UserBannerVO>> page(UserBannerVO banner, Query query) {
|
||||
IPage<UserBannerVO> pages = bannerService.selectUserBannerPage(Condition.getPage(query), banner);
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页轮播图 新增
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "新增", description = "传入banner")
|
||||
public R save(@Valid @RequestBody AppBannerEntity banner) {
|
||||
return R.status(bannerService.save(banner));
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页轮播图 修改
|
||||
*/
|
||||
@PostMapping("/update")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "修改", description = "传入banner")
|
||||
public R update(@Valid @RequestBody AppBannerEntity banner) {
|
||||
return R.status(bannerService.updateById(banner));
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页轮播图 新增或修改
|
||||
*/
|
||||
@PostMapping("/submit")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "新增或修改", description = "传入banner")
|
||||
public R submit(@Valid @RequestBody AppBannerEntity banner) {
|
||||
return R.status(bannerService.saveOrUpdate(banner));
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页轮播图 删除
|
||||
*/
|
||||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(bannerService.deleteLogic(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出数据
|
||||
*/
|
||||
@IsAdmin
|
||||
@GetMapping("/export-banner")
|
||||
@ApiOperationSupport(order = 9)
|
||||
@Operation(summary = "导出数据", description = "传入banner")
|
||||
public void exportUserBanner(@Parameter(hidden = true) @RequestParam Map<String, Object> banner, BladeUser bladeUser, HttpServletResponse response) {
|
||||
QueryWrapper<AppBannerEntity> queryWrapper = Condition.getQueryWrapper(banner, AppBannerEntity.class);
|
||||
//if (!AuthUtil.isAdministrator()) {
|
||||
// queryWrapper.lambda().eq(UserBanner::getTenantId, bladeUser.getTenantId());
|
||||
//}
|
||||
//queryWrapper.lambda().eq(UserBannerEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
|
||||
List<AppBannerExcel> list = bannerService.exportUserBanner(queryWrapper);
|
||||
ExcelUtil.export(response, "首页轮播图数据" + DateUtil.time(), "首页轮播图数据表", list, AppBannerExcel.class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.mall.excel;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import cn.idev.excel.annotation.write.style.ColumnWidth;
|
||||
import cn.idev.excel.annotation.write.style.ContentRowHeight;
|
||||
import cn.idev.excel.annotation.write.style.HeadRowHeight;
|
||||
import java.io.Serializable;
|
||||
import java.io.Serial;
|
||||
|
||||
|
||||
/**
|
||||
* 首页轮播图 Excel实体类
|
||||
*
|
||||
* @author lzq
|
||||
* @since 2026-02-03
|
||||
*/
|
||||
@Data
|
||||
@ColumnWidth(25)
|
||||
@HeadRowHeight(20)
|
||||
@ContentRowHeight(18)
|
||||
public class AppBannerExcel implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("ID")
|
||||
private Long id;
|
||||
/**
|
||||
* 轮播图地址
|
||||
*/
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("轮播图地址")
|
||||
private String coverUrl;
|
||||
/**
|
||||
* 路由
|
||||
*/
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("路由")
|
||||
private String route;
|
||||
/**
|
||||
* 外链地址
|
||||
*/
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("外链地址")
|
||||
private String outsideUrl;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("排序")
|
||||
private Integer sort;
|
||||
/**
|
||||
* 轮播图类型 1-主banner 2-商城banner
|
||||
*/
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("轮播图类型 1-主banner 2-商城banner")
|
||||
private Integer bannerType;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
/**
|
||||
* 是否显示
|
||||
*/
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("是否显示")
|
||||
private Integer isShow;
|
||||
/**
|
||||
* 标签名
|
||||
*/
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("标签名")
|
||||
private String tagName;
|
||||
/**
|
||||
* 是否已删除
|
||||
*/
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("是否已删除")
|
||||
private Integer isDeleted;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.mall.mapper;
|
||||
|
||||
import org.springblade.modules.mall.pojo.entity.AppBannerEntity;
|
||||
import org.springblade.modules.mall.pojo.vo.UserBannerVO;
|
||||
import org.springblade.modules.mall.excel.AppBannerExcel;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 首页轮播图 Mapper 接口
|
||||
*
|
||||
* @author lzq
|
||||
* @since 2026-02-03
|
||||
*/
|
||||
public interface AppBannerMapper extends BaseMapper<AppBannerEntity> {
|
||||
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param banner 查询参数
|
||||
* @return List<UserBannerVO>
|
||||
*/
|
||||
List<UserBannerVO> selectUserBannerPage(IPage page, UserBannerVO banner);
|
||||
|
||||
|
||||
/**
|
||||
* 获取导出数据
|
||||
*
|
||||
* @param queryWrapper 查询条件
|
||||
* @return List<UserBannerExcel>
|
||||
*/
|
||||
List<AppBannerExcel> exportUserBanner(@Param("ew") Wrapper<AppBannerEntity> queryWrapper);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.springblade.modules.mall.mapper.AppBannerMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="bannerResultMap" type="org.springblade.modules.mall.pojo.entity.AppBannerEntity">
|
||||
<result column="id" property="id"/>
|
||||
<result column="cover_url" property="coverUrl"/>
|
||||
<result column="route" property="route"/>
|
||||
<result column="outside_url" property="outsideUrl"/>
|
||||
<result column="sort" property="sort"/>
|
||||
<result column="banner_type" property="bannerType"/>
|
||||
<result column="remark" property="remark"/>
|
||||
<result column="is_show" property="isShow"/>
|
||||
<result column="tag_name" property="tagName"/>
|
||||
<result column="create_user" property="createUser"/>
|
||||
<result column="create_dept" property="createDept"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_user" property="updateUser"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="is_deleted" property="isDeleted"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="selectUserBannerPage" resultMap="bannerResultMap">
|
||||
select * from app_banner where is_deleted = 0
|
||||
</select>
|
||||
|
||||
|
||||
<select id="exportUserBanner" resultType="org.springblade.modules.mall.excel.AppBannerExcel">
|
||||
SELECT * FROM app_banner ${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.mall.pojo.dto;
|
||||
|
||||
import org.springblade.modules.mall.pojo.entity.AppBannerEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 首页轮播图 数据传输对象实体类
|
||||
*
|
||||
* @author lzq
|
||||
* @since 2026-02-03
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class AppBannerDTO extends AppBannerEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.mall.pojo.entity;
|
||||
|
||||
import lombok.Data;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.mp.base.BaseEntity;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 首页轮播图 实体类
|
||||
*
|
||||
* @author lzq
|
||||
* @since 2026-02-03
|
||||
*/
|
||||
@Data
|
||||
@TableName("app_banner")
|
||||
@Schema(description = "UserBanner对象")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class AppBannerEntity extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 轮播图地址
|
||||
*/
|
||||
@Schema(description = "轮播图地址")
|
||||
private String coverUrl;
|
||||
/**
|
||||
* 路由
|
||||
*/
|
||||
@Schema(description = "路由")
|
||||
private String route;
|
||||
/**
|
||||
* 外链地址
|
||||
*/
|
||||
@Schema(description = "外链地址")
|
||||
private String outsideUrl;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@Schema(description = "排序")
|
||||
private Integer sort;
|
||||
/**
|
||||
* 轮播图类型 1-主banner 2-商城banner
|
||||
*/
|
||||
@Schema(description = "轮播图类型 1-主banner 2-商城banner")
|
||||
private Integer bannerType;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
/**
|
||||
* 是否显示
|
||||
*/
|
||||
@Schema(description = "是否显示")
|
||||
private Integer isShow;
|
||||
/**
|
||||
* 标签名
|
||||
*/
|
||||
@Schema(description = "标签名")
|
||||
private String tagName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.mall.pojo.vo;
|
||||
|
||||
import org.springblade.modules.mall.pojo.entity.AppBannerEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 首页轮播图 视图实体类
|
||||
*
|
||||
* @author lzq
|
||||
* @since 2026-02-03
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class UserBannerVO extends AppBannerEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.mall.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import org.springblade.modules.mall.pojo.entity.AppBannerEntity;
|
||||
import org.springblade.modules.mall.pojo.vo.UserBannerVO;
|
||||
import org.springblade.modules.mall.excel.AppBannerExcel;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 首页轮播图 服务类
|
||||
*
|
||||
* @author lzq
|
||||
* @since 2026-02-03
|
||||
*/
|
||||
public interface IAppBannerService extends BaseService<AppBannerEntity> {
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param banner 查询参数
|
||||
* @return IPage<UserBannerVO>
|
||||
*/
|
||||
IPage<UserBannerVO> selectUserBannerPage(IPage<UserBannerVO> page, UserBannerVO banner);
|
||||
|
||||
|
||||
/**
|
||||
* 导出数据
|
||||
*
|
||||
* @param queryWrapper 查询条件
|
||||
* @return List<UserBannerExcel>
|
||||
*/
|
||||
List<AppBannerExcel> exportUserBanner(Wrapper<AppBannerEntity> queryWrapper);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.mall.service.impl;
|
||||
|
||||
import org.springblade.modules.mall.pojo.entity.AppBannerEntity;
|
||||
import org.springblade.modules.mall.pojo.vo.UserBannerVO;
|
||||
import org.springblade.modules.mall.excel.AppBannerExcel;
|
||||
import org.springblade.modules.mall.mapper.AppBannerMapper;
|
||||
import org.springblade.modules.mall.service.IAppBannerService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 首页轮播图 服务实现类
|
||||
*
|
||||
* @author lzq
|
||||
* @since 2026-02-03
|
||||
*/
|
||||
@Service
|
||||
public class AppBannerServiceImpl extends BaseServiceImpl<AppBannerMapper, AppBannerEntity> implements IAppBannerService {
|
||||
|
||||
@Override
|
||||
public IPage<UserBannerVO> selectUserBannerPage(IPage<UserBannerVO> page, UserBannerVO banner) {
|
||||
return page.setRecords(baseMapper.selectUserBannerPage(page, banner));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<AppBannerExcel> exportUserBanner(Wrapper<AppBannerEntity> queryWrapper) {
|
||||
List<AppBannerExcel> bannerList = baseMapper.exportUserBanner(queryWrapper);
|
||||
//bannerList.forEach(banner -> {
|
||||
// banner.setTypeName(DictCache.getValue(DictEnum.YES_NO, UserBanner.getType()));
|
||||
//});
|
||||
return bannerList;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.mall.wrapper;
|
||||
|
||||
import org.springblade.core.mp.support.BaseEntityWrapper;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.modules.mall.pojo.entity.AppBannerEntity;
|
||||
import org.springblade.modules.mall.pojo.vo.UserBannerVO;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 首页轮播图 包装类,返回视图层所需的字段
|
||||
*
|
||||
* @author lzq
|
||||
* @since 2026-02-03
|
||||
*/
|
||||
public class AppBannerWrapper extends BaseEntityWrapper<AppBannerEntity, UserBannerVO> {
|
||||
|
||||
public static AppBannerWrapper build() {
|
||||
return new AppBannerWrapper();
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserBannerVO entityVO(AppBannerEntity banner) {
|
||||
UserBannerVO bannerVO = Objects.requireNonNull(BeanUtil.copyProperties(banner, UserBannerVO.class));
|
||||
|
||||
//User createUser = UserCache.getUser(banner.getCreateUser());
|
||||
//User updateUser = UserCache.getUser(banner.getUpdateUser());
|
||||
//bannerVO.setCreateUserName(createUser.getName());
|
||||
//bannerVO.setUpdateUserName(updateUser.getName());
|
||||
|
||||
return bannerVO;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -55,6 +55,8 @@ public interface IParamService extends BaseService<Param> {
|
||||
|
||||
String getFormalAppPrivacy();
|
||||
|
||||
String formalAppAgreement();
|
||||
|
||||
List<PayOrderDicDTO> getOrderBizModel();
|
||||
|
||||
BigDecimal getMallCashToPointRate();
|
||||
@@ -67,4 +69,5 @@ public interface IParamService extends BaseService<Param> {
|
||||
|
||||
WatchVideoTimeRangeDTO watchVideoTimeRange();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -60,6 +60,7 @@ public class ParamServiceImpl extends BaseServiceImpl<ParamMapper, Param> implem
|
||||
|
||||
private static final String APP_USER_REGISTER_ROLE = "yichayilu:app:register:role-info";
|
||||
private static final String APP_FORMAL_USER_PRIVACY = "yichayilu:app:formal:user:privacy";
|
||||
private static final String APP_FORMAL_USER_AGREEMENT = "yichayilu:app:formal:user:agreement";
|
||||
private static final String APP_FORMAL_ORDER_MODEL_TYPE = "yichayilu:app:formal:order:model_type";
|
||||
private static final String APP_FORMAL_MALL_CASH_TO_POINT_RATE = "yichayilu:app:formal:mall.cash.to.point.Rate";
|
||||
private static final String APP_FORMAL_MALL_CUT_AMOUNT_RANG = "yichayilu:app:formal:mall.cut.amount.rang";
|
||||
@@ -72,6 +73,10 @@ public class ParamServiceImpl extends BaseServiceImpl<ParamMapper, Param> implem
|
||||
private Boolean dailySignIsLookAtAds;
|
||||
private WatchVideoTimeRangeDTO watchVideoTimeRangeDTO;
|
||||
|
||||
private String appFormalUserPrivacy;
|
||||
|
||||
private String appFormalUserAgreement;
|
||||
|
||||
@XxlJob("yichayilu-app-userRegisterInfo")
|
||||
@PostConstruct
|
||||
public void initAppUserRegisterInfo() {
|
||||
@@ -80,6 +85,16 @@ public class ParamServiceImpl extends BaseServiceImpl<ParamMapper, Param> implem
|
||||
}
|
||||
|
||||
|
||||
@XxlJob("yichayilu-app-privacy-agreement")
|
||||
@PostConstruct
|
||||
public void initAppUserPrivacyAgreement() {
|
||||
Param privacyParam = this.getOne(Wrappers.<Param>query().lambda().eq(Param::getParamKey, APP_FORMAL_USER_PRIVACY));
|
||||
Param agreementParam = this.getOne(Wrappers.<Param>query().lambda().eq(Param::getParamKey, APP_FORMAL_USER_AGREEMENT));
|
||||
appFormalUserPrivacy = privacyParam.getParamValue();
|
||||
appFormalUserAgreement = agreementParam.getParamValue();
|
||||
}
|
||||
|
||||
|
||||
@XxlJob("yichayilu-dailysign-isLookAds")
|
||||
@PostConstruct
|
||||
public void initDailySignIsLookAds() {
|
||||
@@ -107,8 +122,13 @@ public class ParamServiceImpl extends BaseServiceImpl<ParamMapper, Param> implem
|
||||
|
||||
@Override
|
||||
public String getFormalAppPrivacy() {
|
||||
Param param = this.getOne(Wrappers.<Param>query().lambda().eq(Param::getParamKey, APP_FORMAL_USER_PRIVACY));
|
||||
return param.getParamValue();
|
||||
return appFormalUserPrivacy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String formalAppAgreement() {
|
||||
|
||||
return appFormalUserAgreement;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -32,6 +32,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -60,4 +62,7 @@ public interface UserMallIntegralMapper extends BaseMapper<UserMallIntegralEntit
|
||||
*/
|
||||
List<UserMallIntegralExcel> exportUserMallIntegral(@Param("ew") Wrapper<UserMallIntegralEntity> queryWrapper);
|
||||
|
||||
int subtractAmount(Long userId, BigDecimal amount, Integer version);
|
||||
|
||||
int addAmount(Long userId, BigDecimal amount, Integer version);
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
||||
<select id="selectUserMallIntegralPage" resultMap="mallIntegralResultMap">
|
||||
select * from user_mall_integral where is_deleted = 0
|
||||
</select>
|
||||
@@ -26,4 +27,12 @@
|
||||
SELECT * FROM user_mall_integral ${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
|
||||
<update id="addAmount">
|
||||
update user_mall_integral set amount = amount + #{amount} , version = version + 1 where id = #{userId} and version = #{version}
|
||||
</update>
|
||||
<update id="subtractAmount">
|
||||
update user_mall_integral set amount = amount - #{amount} , version = version + 1 where id = #{userId} and version = #{version}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -31,6 +31,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springblade.core.mp.base.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
@@ -45,6 +46,7 @@ import java.io.Serial;
|
||||
@TableName("user_mall_integral")
|
||||
@Schema(description = "UserMallIntegral对象")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
public class UserMallIntegralEntity extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
|
||||
@@ -32,6 +32,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springblade.core.mp.base.BaseEntity;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
@@ -47,6 +48,7 @@ import java.io.Serial;
|
||||
@TableName("user_mall_integral_log")
|
||||
@Schema(description = "UserMallIntegralLog对象")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
public class UserMallIntegralLogEntity extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
|
||||
@@ -26,11 +26,14 @@
|
||||
package org.springblade.modules.userPoint.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import org.springblade.modules.userPoint.dto.UserAmountDTO;
|
||||
import org.springblade.modules.userPoint.pojo.entity.UserMallIntegralEntity;
|
||||
import org.springblade.modules.userPoint.pojo.vo.UserMallIntegralVO;
|
||||
import org.springblade.modules.userPoint.excel.UserMallIntegralExcel;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseService;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -58,4 +61,11 @@ public interface IUserMallIntegralService extends BaseService<UserMallIntegralEn
|
||||
*/
|
||||
List<UserMallIntegralExcel> exportUserMallIntegral(Wrapper<UserMallIntegralEntity> queryWrapper);
|
||||
|
||||
|
||||
Boolean addAmountNotLog(Long userId, BigDecimal amount , Integer version);
|
||||
Boolean subtractAmountNotLog(Long userId, BigDecimal amount ,Integer version);
|
||||
|
||||
Boolean addAmount(UserAmountDTO dto);
|
||||
Boolean subtractAmount(UserAmountDTO dto);
|
||||
|
||||
}
|
||||
|
||||
@@ -25,15 +25,24 @@
|
||||
*/
|
||||
package org.springblade.modules.userPoint.service.impl;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.common.utils.date.DateUtil;
|
||||
import org.springblade.modules.userPoint.dto.UserAmountDTO;
|
||||
import org.springblade.modules.userPoint.pojo.entity.UserBenefitLogEntity;
|
||||
import org.springblade.modules.userPoint.pojo.entity.UserMallIntegralEntity;
|
||||
import org.springblade.modules.userPoint.pojo.entity.UserMallIntegralLogEntity;
|
||||
import org.springblade.modules.userPoint.pojo.vo.UserMallIntegralVO;
|
||||
import org.springblade.modules.userPoint.excel.UserMallIntegralExcel;
|
||||
import org.springblade.modules.userPoint.mapper.UserMallIntegralMapper;
|
||||
import org.springblade.modules.userPoint.service.IUserMallIntegralLogService;
|
||||
import org.springblade.modules.userPoint.service.IUserMallIntegralService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -43,8 +52,11 @@ import java.util.List;
|
||||
* @since 2026-01-28
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class UserMallIntegralServiceImpl extends BaseServiceImpl<UserMallIntegralMapper, UserMallIntegralEntity> implements IUserMallIntegralService {
|
||||
|
||||
private final IUserMallIntegralLogService userMallIntegralLogService;
|
||||
|
||||
@Override
|
||||
public IPage<UserMallIntegralVO> selectUserMallIntegralPage(IPage<UserMallIntegralVO> page, UserMallIntegralVO mallIntegral) {
|
||||
return page.setRecords(baseMapper.selectUserMallIntegralPage(page, mallIntegral));
|
||||
@@ -60,4 +72,49 @@ public class UserMallIntegralServiceImpl extends BaseServiceImpl<UserMallIntegra
|
||||
return mallIntegralList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean addAmountNotLog(Long userId, BigDecimal amount, Integer version) {
|
||||
return baseMapper.addAmount(userId , amount , version) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean subtractAmountNotLog(Long userId, BigDecimal amount,Integer version) {
|
||||
return baseMapper.subtractAmount(userId , amount , version) > 0;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = RuntimeException.class)
|
||||
@Override
|
||||
public Boolean addAmount(UserAmountDTO dto) {
|
||||
if (baseMapper.addAmount(dto.getUserId() , dto.getAmount() , dto.getVersion() ) > 0 &&
|
||||
userMallIntegralLogService.save(createUserBenefitLog(dto , 1))){
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
throw new RuntimeException("添加用户福利值失败");
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = RuntimeException.class)
|
||||
@Override
|
||||
public Boolean subtractAmount(UserAmountDTO dto) {
|
||||
if (baseMapper.subtractAmount(dto.getUserId() , dto.getAmount() , dto.getVersion() ) > 0 &&
|
||||
userMallIntegralLogService.save(createUserBenefitLog(dto , 2))){
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
throw new RuntimeException("扣除用户福利值失败");
|
||||
}
|
||||
|
||||
private UserMallIntegralLogEntity createUserBenefitLog(UserAmountDTO dto , Integer type){
|
||||
return new UserMallIntegralLogEntity()
|
||||
.setUserId(dto.getUserId())
|
||||
.setUserPhone(dto.getUserPhone())
|
||||
.setUserName(dto.getUserName())
|
||||
.setAmount(dto.getAmount())
|
||||
.setSourceId(dto.getSourceId())
|
||||
.setSourceDetail(dto.getSourceDetail())
|
||||
.setOrderId(0L)
|
||||
.setType(type)
|
||||
.setStatisticalDate(DateUtil.getToday())
|
||||
.setRemark(dto.getRemark());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -63,8 +63,8 @@ blade:
|
||||
aliyun:
|
||||
sms:
|
||||
# 阿里云账号的AccessKey
|
||||
accessKeyId: LTAI5t8BeHdexfRG1nJGiKJq
|
||||
accessKeySecret: fXTJGks85ujS7NfbOvlV8jfDbwnSHx
|
||||
accessKeyId: LTAI5tPYSrdSipANposndbrt
|
||||
accessKeySecret: ldVngFWpwPtTQgKzbJK3GrZoRmPIX2
|
||||
# 区域,默认为杭州
|
||||
regionId: cn-hangzhou
|
||||
# 默认短信签名
|
||||
@@ -87,12 +87,11 @@ xxl:
|
||||
logpath: /Users/ray/dev/xxl-logs
|
||||
logretentiondays: 30
|
||||
|
||||
|
||||
oss:
|
||||
enabled: true
|
||||
name: alioss
|
||||
tenant-mode: false
|
||||
endpoint: https://oss-cn-zhangjiakou.aliyuncs.com
|
||||
access-key: LTAI5tB6gdjNGfh4ijLhkbTE
|
||||
secret-key: quGnzXst0GuopQAIIv8bUlYdzbVBhH
|
||||
bucket-name: letfly
|
||||
endpoint: https://oss-cn-beijing.aliyuncs.com
|
||||
access-key: LTAI5tHgTPu3QbQkP3qPH8EM
|
||||
secret-key: your-secret-key
|
||||
bucket-name: UG1exiMCt31B6OoeSrw3BrW08izrJl
|
||||
|
||||
@@ -241,6 +241,9 @@ blade:
|
||||
- /blade-test/**
|
||||
- /formal-app/base/send-sms-code
|
||||
- /formal-app/base/formal-app-privacy
|
||||
- /formal-app/base/formal-app-agreement
|
||||
- /formal-app/base/find-main-banner
|
||||
- /formal-app/base/find-mall-banner
|
||||
- /formal-app/base/find-category
|
||||
- /formal-app/base/spu-list
|
||||
#授权认证配置
|
||||
@@ -283,13 +286,13 @@ blade:
|
||||
path-patterns:
|
||||
- /blade-saber/**
|
||||
|
||||
- client-id: ${appclient.formal.name}
|
||||
- client-id: appFormal
|
||||
path-patterns:
|
||||
- /formal-app/customer/**
|
||||
- /formal-app/mall/**
|
||||
- /formal-app/order/**
|
||||
|
||||
- client-id: ${appclient.offline.name}
|
||||
- client-id: appOffline
|
||||
path-patterns:
|
||||
- /offline-app/**
|
||||
|
||||
@@ -302,7 +305,7 @@ appclient:
|
||||
#多租户配置
|
||||
tenant:
|
||||
#多租户增强
|
||||
enhance: true
|
||||
enhance: false
|
||||
#多租户授权保护
|
||||
license: false
|
||||
#动态数据库隔离功能
|
||||
@@ -319,11 +322,3 @@ appclient:
|
||||
enabled: false
|
||||
|
||||
|
||||
oss:
|
||||
enabled: true
|
||||
name: alioss
|
||||
tenant-mode: false
|
||||
endpoint: https://oss-cn-zhangjiakou.aliyuncs.com
|
||||
access-key: LTAI5tB6gdjNGfh4ijLhkbTE
|
||||
secret-key: quGnzXst0GuopQAIIv8bUlYdzbVBhH
|
||||
bucket-name: letfly
|
||||
|
||||
@@ -67,6 +67,25 @@ public class ParamTest {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void addAppFormalAgreementParamValue() {
|
||||
|
||||
String paramKey = "yichayilu:app:formal:user:agreement";
|
||||
String paramName = "商城app用户协议";
|
||||
String remark = "商城app用户协议";
|
||||
|
||||
|
||||
Param param = new Param();
|
||||
param.setParamKey(paramKey);
|
||||
param.setParamName(paramName);
|
||||
param.setParamValue("商城app用户协议");
|
||||
param.setRemark(remark);
|
||||
|
||||
paramService.save(param);
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void addAppFormalOrderModelType() {
|
||||
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
package org.springblade.test.userPoint;
|
||||
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.springblade.core.test.BladeBootTest;
|
||||
import org.springblade.core.test.BladeSpringExtension;
|
||||
import org.springblade.modules.userPoint.dto.UserAmountDTO;
|
||||
import org.springblade.modules.userPoint.pojo.entity.UserMallIntegralEntity;
|
||||
import org.springblade.modules.userPoint.service.IUserMallIntegralService;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@ExtendWith(BladeSpringExtension.class)
|
||||
@BladeBootTest(appName = "blade-runner" , profile = "test")
|
||||
public class UserPointTest {
|
||||
|
||||
@Resource
|
||||
private IUserMallIntegralService userMallIntegralService;
|
||||
|
||||
@Test
|
||||
public void addAmount() {
|
||||
|
||||
for (int i = 0; i < 20; i++){
|
||||
UserMallIntegralEntity mallIntegral = userMallIntegralService.getById(2017162601210183681L);
|
||||
Integer version = 1;
|
||||
if (mallIntegral == null){
|
||||
mallIntegral = new UserMallIntegralEntity();
|
||||
mallIntegral.setAmount(BigDecimal.ZERO);
|
||||
mallIntegral.setId(2017162601210183681L);
|
||||
mallIntegral.setVersion(version);
|
||||
userMallIntegralService.save(mallIntegral);
|
||||
}else {
|
||||
version = mallIntegral.getVersion();
|
||||
}
|
||||
UserAmountDTO dto = new UserAmountDTO();
|
||||
dto.setUserId(2017162601210183681L);
|
||||
dto.setAmount(new BigDecimal(666));
|
||||
dto.setOrderId(1L);
|
||||
dto.setSourceId(2017162601210183681L);
|
||||
dto.setSourceDetail("19115988697");
|
||||
dto.setVersion(version);
|
||||
dto.setRemark("测试");
|
||||
|
||||
userMallIntegralService.addAmount(dto);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user