作者 yangfu

fix: 增加生产环境配置

@@ -35,9 +35,9 @@ func SyncProduct(ctx context.Context) error { @@ -35,9 +35,9 @@ func SyncProduct(ctx context.Context) error {
35 35
36 log.Logger.Debug("【定时同步同步产品信息】 启动") 36 log.Logger.Debug("【定时同步同步产品信息】 启动")
37 pullK3CloudService := syncdata.PullDataK3CloudService{} 37 pullK3CloudService := syncdata.PullDataK3CloudService{}
38 - t := ctx.Value("fromTime")  
39 var fromTime time.Time 38 var fromTime time.Time
40 if ctx != nil { 39 if ctx != nil {
  40 + t := ctx.Value("fromTime")
41 if t != nil { 41 if t != nil {
42 if v, ok := t.(time.Time); ok { 42 if v, ok := t.(time.Time); ok {
43 fromTime = v 43 fromTime = v
@@ -32,6 +32,7 @@ func newK3cloudClient() (*k3cloud.Client, error) { @@ -32,6 +32,7 @@ func newK3cloudClient() (*k3cloud.Client, error) {
32 ) 32 )
33 if constant.SERVICE_ENV == "prd" { 33 if constant.SERVICE_ENV == "prd" {
34 hostUrl = "https://tianlian.ik3cloud.com/k3cloud" 34 hostUrl = "https://tianlian.ik3cloud.com/k3cloud"
  35 + acctID = "20211118121126059"
35 } 36 }
36 client, err := k3cloud.NewClient(hostUrl, acctID, username, password) 37 client, err := k3cloud.NewClient(hostUrl, acctID, username, password)
37 return client, err 38 return client, err