This commit is contained in:
zhengchiliu
2026-09-15 00:53:04 +08:00
parent 32a0b87e9e
commit 112c5f8e46
42 changed files with 1121 additions and 304 deletions
@@ -0,0 +1,3 @@
DROP TABLE IF EXISTS `benefit_revoke_tasks`;
ALTER TABLE `clothes` DROP COLUMN `original_image_path`;
ALTER TABLE `orders` DROP COLUMN `quota_valid_days`, DROP COLUMN `goods_type`;
@@ -0,0 +1,14 @@
ALTER TABLE `orders`
ADD COLUMN `goods_type` TINYINT NOT NULL DEFAULT 0 COMMENT '商品类型快照' AFTER `member_days`,
ADD COLUMN `quota_valid_days` BIGINT NOT NULL DEFAULT 0 COMMENT '额度有效期天数快照' AFTER `goods_type`;
UPDATE `orders` o JOIN `goods` g ON g.id = o.goods_id
SET o.goods_type = g.goods_type, o.quota_valid_days = g.valid_days WHERE o.goods_type = 0;
ALTER TABLE `clothes` ADD COLUMN `original_image_path` VARCHAR(1000) NOT NULL DEFAULT '' COMMENT '待处理原图本地路径' AFTER `processed_image`;
CREATE TABLE `benefit_revoke_tasks` (
`id` BIGINT NOT NULL AUTO_INCREMENT, `created_at` BIGINT NOT NULL DEFAULT 0, `updated_at` BIGINT NOT NULL DEFAULT 0,
`deleted_at` BIGINT NOT NULL DEFAULT 0, `created_by` BIGINT NOT NULL DEFAULT 0, `updated_by` BIGINT NOT NULL DEFAULT 0,
`deleted_by` BIGINT NOT NULL DEFAULT 0, `order_no` VARCHAR(64) NOT NULL DEFAULT '', `user_id` BIGINT NOT NULL DEFAULT 0,
`status` TINYINT NOT NULL DEFAULT 0, `retry_count` INT NOT NULL DEFAULT 0, `max_retry` INT NOT NULL DEFAULT 10,
`last_error` VARCHAR(255) NOT NULL DEFAULT '', PRIMARY KEY (`id`), UNIQUE KEY `uk_benefit_revoke_order` (`order_no`),
KEY `idx_benefit_revoke_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='退款权益回收任务';
+6 -5
View File
@@ -142,11 +142,12 @@ type UserDefaultQuotaSettingS struct {
// 金额为服务端固定值,前端不传金额,从根源杜绝刷额度;各类型金额使用指针以区分
// 「未配置/显式 0」,nil 或非正数表示不发放该类型激励。
type AdRewardSettingS struct {
Enable bool // 是否开启广告激励;关闭时接口返回「广告激励未开启」
Cos *int64 // 广告激励赠送的 Cos 上传额度(固定值)
AI *int64 // 广告激励赠送的 AI 推荐额度(固定值)
OutfitShare *int64 // 广告激励赠送的社区分享额度(固定值)
ClosetShare *int64 // 广告激励赠送的衣柜分享额度(固定值)
Enable bool // 是否开启广告激励;关闭时接口返回「广告激励未开启」
Cos *int64 // 广告激励赠送的 Cos 上传额度(固定值)
AI *int64 // 广告激励赠送的 AI 推荐额度(固定值)
OutfitShare *int64 // 广告激励赠送的社区分享额度(固定值)
ClosetShare *int64 // 广告激励赠送的衣柜分享额度(固定值)
MaxClaimsPerDay int // 单用户、单类型每天最多领取次数;未配置默认 1
}
func (s *Setting) ReadSection(k string, v any) error {