还原到标准service
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
gfcli:
|
||||
gen:
|
||||
service:
|
||||
dstFolder: "service2"
|
||||
dstFolder: "service"
|
||||
pb:
|
||||
path: "manifest/protobuf"
|
||||
api: "api"
|
||||
|
||||
@@ -3,7 +3,7 @@ package act
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/ayflying/utility_go/aycache"
|
||||
"github.com/ayflying/utility_go/service2"
|
||||
"github.com/ayflying/utility_go/service"
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/os/gctx"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
@@ -24,7 +24,7 @@ func GetCacheKey(uid int64, actId int) string {
|
||||
func RefreshCache(uid int64, actId int) {
|
||||
|
||||
Cache.Remove(gctx.New(), GetCacheKey(uid, actId))
|
||||
service2.GameAct().RefreshGetRedDotCache(uid)
|
||||
service.GameAct().RefreshGetRedDotCache(uid)
|
||||
}
|
||||
|
||||
func GetRedDot(uid int64, actId int) *gvar.Var {
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"github.com/ayflying/utility_go/internal/game/act"
|
||||
"github.com/ayflying/utility_go/internal/model/do"
|
||||
"github.com/ayflying/utility_go/internal/model/entity"
|
||||
"github.com/ayflying/utility_go/service2"
|
||||
service2 "github.com/ayflying/utility_go/service"
|
||||
"github.com/ayflying/utility_go/tools"
|
||||
"github.com/gogf/gf/v2/container/gset"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
@@ -3,7 +3,7 @@ package systemCron
|
||||
import (
|
||||
"context"
|
||||
"github.com/ayflying/utility_go/api/system/v1"
|
||||
"github.com/ayflying/utility_go/service2"
|
||||
"github.com/ayflying/utility_go/service"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gcron"
|
||||
"github.com/gogf/gf/v2/os/gctx"
|
||||
@@ -57,7 +57,7 @@ func New() *sSystemCron {
|
||||
}
|
||||
|
||||
func init() {
|
||||
service2.RegisterSystemCron(New())
|
||||
service.RegisterSystemCron(New())
|
||||
}
|
||||
|
||||
// AddCron 添加一个定时任务到相应的调度列表中。
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// You can delete these comments if you wish manually maintain this interface file.
|
||||
// ================================================================================
|
||||
|
||||
package service2
|
||||
package service
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
@@ -3,7 +3,7 @@
|
||||
// You can delete these comments if you wish manually maintain this interface file.
|
||||
// ================================================================================
|
||||
|
||||
package service2
|
||||
package service
|
||||
|
||||
import (
|
||||
v1 "github.com/ayflying/utility_go/api/system/v1"
|
||||
@@ -3,7 +3,7 @@ package utility_go
|
||||
import (
|
||||
v1 "github.com/ayflying/utility_go/api/system/v1"
|
||||
_ "github.com/ayflying/utility_go/internal/logic"
|
||||
"github.com/ayflying/utility_go/service2"
|
||||
"github.com/ayflying/utility_go/service"
|
||||
|
||||
"github.com/ayflying/utility_go/config"
|
||||
)
|
||||
@@ -13,11 +13,11 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
service2.SystemCron().StartCron()
|
||||
service.SystemCron().StartCron()
|
||||
|
||||
//用户活动持久化
|
||||
service2.SystemCron().AddCron(v1.CronType_DAILY, func() error {
|
||||
service2.GameAct().Saves()
|
||||
service.SystemCron().AddCron(v1.CronType_DAILY, func() error {
|
||||
service.GameAct().Saves()
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user