This commit is contained in:
苏尹岚
2021-04-19 14:16:26 +08:00
parent f442644bdd
commit 89417e6f6d
5 changed files with 17 additions and 3 deletions

View File

@@ -3,6 +3,7 @@ package cms
import (
"encoding/json"
"fmt"
"git.rosy.net.cn/baseapi/platformapi/mtunionapi"
"reflect"
"regexp"
"strconv"
@@ -96,6 +97,11 @@ func InitServiceInfo(version string, buildTime time.Time, gitCommit string) {
"cashbackName": model.CashbackName,
"consumeName": model.ConsumeName,
"txWaybillNames": model.TxWaybillNames,
"unionActTypeNames": map[int]map[int]interface{}{
model.VendorIDMTWM: map[int]interface{}{
mtunionapi.ActTypeQB: "券包推广",
},
},
},
}
}

View File

@@ -1922,7 +1922,7 @@ func TempJob() (err error) {
return err
}
func GetUnionActList(ctx *jxcontext.Context, vendorID, actType int) (link interface{}, err error) {
func GetUnionActList(ctx *jxcontext.Context, vendorID, actType int) (actList []*partner.ActivityList, err error) {
return partner.GetHandler(vendorID).GetUnionActList(ctx, actType)
}

View File

@@ -1,8 +1,10 @@
package mt
import (
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/business/jxstore/partner"
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
"strings"
)
func (s *UnionHandler) ShareUnionLink(ctx *jxcontext.Context, linkType int) (link string, err error) {
@@ -18,6 +20,11 @@ func (s *UnionHandler) GetUnionActList(ctx *jxcontext.Context, actType int) (act
ActDes: v.ActDes,
Ratio: v.Ratio,
ActSrc: v.ActSrc,
Img: v.URL,
}
if v.DateBound != "" {
act.DateBegin = utils.Str2Time(v.DateBound[:strings.LastIndex(v.DateBound, "至")-1])
act.DateEnd = utils.Str2Time(v.DateBound[strings.LastIndex(v.DateBound, "至")+4:])
}
actList = append(actList, act)
}

View File

@@ -23,6 +23,7 @@ type ActivityList struct {
DateBegin time.Time `json:"dateBegin"`
DateEnd time.Time `json:"dateEnd"`
ActSrc string `json:"actSrc"` //物料?
Img string `json:"img"` //活动图
}
func init() {

View File

@@ -551,8 +551,8 @@ func (c *JobController) TempJob() {
})
}
// @Title 查询联盟任务
// @Description 查询联盟任务
// @Title 查询联盟活动
// @Description 查询联盟活动
// @Param token header string true "认证token"
// @Param vendorID query int true "平台ID"
// @Param actType query int true "活动类型ID"