作者 tangxuhui

微调

@@ -4,10 +4,9 @@ import ( @@ -4,10 +4,9 @@ import (
4 "github.com/beego/beego/v2/server/web" 4 "github.com/beego/beego/v2/server/web"
5 "github.com/linmadan/egglib-go/log/logrus" 5 "github.com/linmadan/egglib-go/log/logrus"
6 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/constant" 6 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/constant"
7 - _ "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/constant"  
8 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/cache" 7 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/cache"
9 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" 8 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log"
10 - _ "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" 9 +
11 _ "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego" 10 _ "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego"
12 ) 11 )
13 12
@@ -20,5 +19,6 @@ func main() { @@ -20,5 +19,6 @@ func main() {
20 w, _ := logrus.NewKafkaWriter(constant.KAFKA_HOST, constant.TOPIC_LOG_STASH, false) 19 w, _ := logrus.NewKafkaWriter(constant.KAFKA_HOST, constant.TOPIC_LOG_STASH, false)
21 log.Logger.AddHook(w) 20 log.Logger.AddHook(w)
22 } 21 }
  22 +
23 web.Run() 23 web.Run()
24 } 24 }
@@ -3,6 +3,7 @@ package pg @@ -3,6 +3,7 @@ package pg
3 import ( 3 import (
4 "context" 4 "context"
5 "fmt" 5 "fmt"
  6 +
6 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/pg/models" 7 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/pg/models"
7 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" 8 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log"
8 9
@@ -152,6 +152,7 @@ func (repository *LoginAccessRepository) Find(queryOptions map[string]interface{ @@ -152,6 +152,7 @@ func (repository *LoginAccessRepository) Find(queryOptions map[string]interface{
152 } 152 }
153 return int64(count), loginAccesss, nil 153 return int64(count), loginAccesss, nil
154 } 154 }
  155 +
155 } 156 }
156 func NewLoginAccessRepository(transactionContext *pgTransaction.TransactionContext) (*LoginAccessRepository, error) { 157 func NewLoginAccessRepository(transactionContext *pgTransaction.TransactionContext) (*LoginAccessRepository, error) {
157 if transactionContext == nil { 158 if transactionContext == nil {