diff --git a/enum/sys_cfg.go b/enum/sys_cfg.go index 9421d36..ffd68d0 100644 --- a/enum/sys_cfg.go +++ b/enum/sys_cfg.go @@ -36,19 +36,19 @@ func (gt AliyunOss) String() string { } // VideoReward 视频激励设置 -type VideoReward int32 +type VideoReward string const ( - VideoRewardUnitPrice = 1 - VideoRewardECMP = 2 + VideoRewardUnitPrice = "video_reward_unit_price" + VideoRewardECPM = "video_reward_ecpm" ) func (gt VideoReward) String() string { switch gt { case VideoRewardUnitPrice: - return "video_reward_unit_price" - case VideoRewardECMP: - return "video_reward_ecmp" + return "激励视频单价" + case VideoRewardECPM: + return "激励视屏ecpm值" default: return "未知" diff --git a/enum/user.go b/enum/user.go new file mode 100644 index 0000000..12db0e2 --- /dev/null +++ b/enum/user.go @@ -0,0 +1,20 @@ +package enum + +// UserState 用户状态 +type UserState int + +const ( + UserStateForNormal UserState = iota + 1 + UserStateForFreeze +) + +func (kind UserState) String() string { + switch kind { + case UserStateForNormal: + return "正常" + case UserStateForFreeze: + return "冻结" + default: + return "未知状态" + } +} diff --git a/go.mod b/go.mod index 791778f..3fc120d 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ go 1.19 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.16.0 @@ -25,7 +25,7 @@ require ( ) require ( - code.fnuoos.com/EggPlanet/egg_models.git v0.0.1 + code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241119072710-bbf44c7edfcf github.com/goccy/go-json v0.10.2 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/json-iterator/go v1.1.12 // indirect diff --git a/go.sum b/go.sum index a97415a..321eac0 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,10 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= code.fnuoos.com/EggPlanet/egg_models.git v0.0.1 h1:lvpFnimk6Ikldg+Ub27oEp0BL0Zau0Y0XJ5g6QyNvbM= code.fnuoos.com/EggPlanet/egg_models.git v0.0.1/go.mod h1:TPnXGn1gfhH1MRT0WsmSLlKr7Z7hXG9+yPEHXu97hHY= -code.fnuoos.com/EggPlanet/egg_models.git v0.0.2 h1:W++LIXvdENvUMp8CgcclkPk5G2Hp8DQaUpe/MTi444A= -code.fnuoos.com/EggPlanet/egg_models.git v0.0.2/go.mod h1:k31pGms+r3WXkQm11QobqWKisfcSJ0W2JtW7edGOPbo= +code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241118081439-70519d0b030c h1:7tGw6nQTw0c9qZYqSwtLGQZI+f5ajcu5ZBAsxPPA28U= +code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241118081439-70519d0b030c/go.mod h1:k31pGms+r3WXkQm11QobqWKisfcSJ0W2JtW7edGOPbo= +code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241119072710-bbf44c7edfcf h1:3kqG+2gsVR6vtxb5cg262G1n4M3fMPrcdOFooYCJx3c= +code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241119072710-bbf44c7edfcf/go.mod h1:k31pGms+r3WXkQm11QobqWKisfcSJ0W2JtW7edGOPbo= code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5 h1:dqvWJqlJi0WXCwTxbWPLvSOsKPjP+iEDBVgLcAl9nOE= code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5/go.mod h1:TTcCnFn/LhBGapnutpezlW+GXkLRNPMWkziOoCsXQqY= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= @@ -114,7 +116,6 @@ 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 h1:K/R+8tc58AaqLkqG2Ol3Qk+DR/TlNuhuh457pBFPtt0= 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= @@ -371,7 +372,7 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE= github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= github.com/syyongx/php2go v0.9.8 h1:FNwV1y+RaZxl7KTm/ICh0Zrhca/70d5JRMpwByuQ1FM=