aa
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
"git.rosy.net.cn/baseapi/platformapi/mtunionapi"
|
||||
"git.rosy.net.cn/baseapi/platformapi/tbunionapi"
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/partner/mt"
|
||||
"math"
|
||||
"regexp"
|
||||
"strings"
|
||||
@@ -2159,11 +2160,10 @@ func MtUnionJobAutoUpdate(ctx *jxcontext.Context) (err error) {
|
||||
return err
|
||||
}
|
||||
//再查美团联盟上的所有活动
|
||||
acts, err := api.MtUnionAPI.ActivityList(1, 20, 0)
|
||||
acts, err := mt.GetAPI().ActivityList(1, 20, 0)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
fmt.Println(utils.Format4Output(acts, true))
|
||||
for _, v := range acts {
|
||||
if v.DateBound != "" {
|
||||
dateBegin := utils.Str2Time(v.DateBound[:strings.LastIndex(v.DateBound, "至")-1])
|
||||
|
||||
@@ -25,3 +25,10 @@ func getAPI() (apiobj *mtunionapi.API) {
|
||||
}
|
||||
return api.MtUnionAPI
|
||||
}
|
||||
|
||||
func GetAPI() (apiobj *mtunionapi.API) {
|
||||
if configs, err := dao.QueryConfigs(dao.GetDB(), "mtunionCookie", model.ConfigTypeCookie, ""); err == nil {
|
||||
api.MtUnionAPI.SetCookieWithStr(configs[0].Value)
|
||||
}
|
||||
return api.MtUnionAPI
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user