From 3357b58f367e76e92bc8e08c15e7e704e7b6f54f Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Wed, 13 Nov 2024 21:31:58 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E5=B9=B3=E5=8F=B0=E8=90=A5=E6=94=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- enum/sys_cfg.go | 52 +++++++++++++++++++ go.mod | 2 +- go.sum | 1 + rule/egg_energy/enum/platform_revenue_data.go | 26 ++++++++++ 4 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 rule/egg_energy/enum/platform_revenue_data.go diff --git a/enum/sys_cfg.go b/enum/sys_cfg.go index 32558fb..25379c1 100644 --- a/enum/sys_cfg.go +++ b/enum/sys_cfg.go @@ -1 +1,53 @@ package enum + +// AliyunOss 阿里云对象存储枚举类 +type AliyunOss int32 + +const ( + AliyunOssEndpoint = 1 + AliyunOssBucketName = 2 + AliyunOssBucketScheme = 3 + AliyunOssAccessKeyID = 4 + AliyunOssAccessKeySecret = 5 + AliyunOssDomain = 6 +) + +func (gt AliyunOss) String() string { + switch gt { + case AliyunOssEndpoint: + return "oss_endpoint" + case AliyunOssBucketName: + return "oss_bucket_name" + case AliyunOssBucketScheme: + return "oss_bucket_scheme" + case AliyunOssAccessKeyID: + return "oss_access_key_id" + case AliyunOssAccessKeySecret: + return "oss_access_key_secret" + case AliyunOssDomain: + return "oss_domain" + + default: + return "未知" + } +} + +// VideoReward 视频激励设置 +type VideoReward int32 + +const ( + VideoRewardUnitPrice = 1 + VideoRewardECMP = 2 +) + +func (gt VideoReward) String() string { + switch gt { + case VideoRewardUnitPrice: + return "video_reward_unit_price" + case VideoRewardECMP: + return "video_reward_ecmp" + + default: + return "未知" + } +} diff --git a/go.mod b/go.mod index ae58852..ad1a1ce 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ replace code.fnuoos.com/EggPlanet/egg_models.git => E:/company/Egg/egg_models require ( code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5 github.com/go-redis/redis v6.15.9+incompatible - github.com/gomodule/redigo v1.9.2 + github.com/gomodule/redigo v2.0.0+incompatible github.com/shopspring/decimal v1.3.1 github.com/syyongx/php2go v0.9.8 go.uber.org/zap v1.13.0 diff --git a/go.sum b/go.sum index de894ce..66e263b 100644 --- a/go.sum +++ b/go.sum @@ -101,6 +101,7 @@ github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gomodule/redigo v1.9.2 h1:HrutZBLhSIU8abiSfW8pj8mPhOyMYjZT/wcA4/L9L9s= github.com/gomodule/redigo v1.9.2/go.mod h1:KsU3hiK/Ay8U42qpaJk+kuNa3C+spxapWpM+ywhcgtw= +github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= diff --git a/rule/egg_energy/enum/platform_revenue_data.go b/rule/egg_energy/enum/platform_revenue_data.go new file mode 100644 index 0000000..3c95100 --- /dev/null +++ b/rule/egg_energy/enum/platform_revenue_data.go @@ -0,0 +1,26 @@ +package enum + +// PlatformRevenueDataKind 平台营收-其他广告-种类 +type PlatformRevenueDataKind int + +const ( + AppOpenAds PlatformRevenueDataKind = iota + 1 + BannerAds + InFeedAds + InterstitialAds +) + +func (kind PlatformRevenueDataKind) String() string { + switch kind { + case AppOpenAds: + return "开屏广告" + case BannerAds: + return "banner 广告" + case InFeedAds: + return "信息流广告" + case InterstitialAds: + return "插屏广告" + default: + return "未知状态" + } +}