Bläddra i källkod

Merge branch 'dev_v1.1.2_wh' of moapp/jyPoints into feature/v1.1.2

王浩 1 år sedan
förälder
incheckning
491491f19d
2 ändrade filer med 5 tillägg och 4 borttagningar
  1. 2 2
      resourceBrushLibrary/main.go
  2. 3 2
      resourceBrushLibrary/rpc/message.go

+ 2 - 2
resourceBrushLibrary/main.go

@@ -1,12 +1,11 @@
 package main
 
 import (
+	"github.com/robfig/cron"
 	"log"
 	"resourceBrushLibrary/config"
 	"resourceBrushLibrary/entity"
 	"time"
-
-	"github.com/robfig/cron"
 )
 
 func main() {
@@ -33,6 +32,7 @@ func MonthlyTask() {
 	// 启动Cron调度器
 	c.Start()
 	select {}
+
 }
 
 // 每分钟执行

+ 3 - 2
resourceBrushLibrary/rpc/message.go

@@ -8,6 +8,7 @@ import (
 	"github.com/zeromicro/go-zero/core/discov"
 	"github.com/zeromicro/go-zero/zrpc"
 	"log"
+	"resourceBrushLibrary/config"
 )
 
 var messageClient zrpc.Client
@@ -16,8 +17,8 @@ func init() {
 	var err error
 	messageClient, err = zrpc.NewClient(zrpc.RpcClientConf{
 		Etcd: discov.EtcdConf{
-			Hosts: Config.ResourceEtcdConf.Hosts,
-			Key:   Config.MessageKey,
+			Hosts: config.Config.ResourceEtcdConf.Hosts,
+			Key:   config.Config.MessageKey,
 		},
 	})
 	if err != nil {