aa
This commit is contained in:
@@ -1922,6 +1922,10 @@ func TempJob() (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
func GetUnionActList(ctx *jxcontext.Context, vendorID, actType int) (link interface{}, err error) {
|
||||
return partner.GetHandler(vendorID).GetUnionActList(ctx, actType)
|
||||
}
|
||||
|
||||
func ShareUnionLink(ctx *jxcontext.Context, vendorID, linkType int) (link string, err error) {
|
||||
return partner.GetHandler(vendorID).ShareUnionLink(ctx, linkType)
|
||||
}
|
||||
|
||||
@@ -21,3 +21,7 @@ func (s *UnionHandler) ShareUnionLink(ctx *jxcontext.Context, linkType int) (lin
|
||||
|
||||
return "jds", err
|
||||
}
|
||||
|
||||
func (s *UnionHandler) GetUnionActList(ctx *jxcontext.Context, actType int) (link interface{}, err error) {
|
||||
return
|
||||
}
|
||||
@@ -1,23 +1,6 @@
|
||||
package mt
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/partner"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
)
|
||||
func getAPI() (err error) {
|
||||
|
||||
type UnionHandler struct {
|
||||
}
|
||||
|
||||
var (
|
||||
unionHandler *UnionHandler
|
||||
)
|
||||
|
||||
func init() {
|
||||
partner.HandlerMap[model.VendorIDMTWM] = unionHandler
|
||||
}
|
||||
|
||||
func (s *UnionHandler) ShareUnionLink(ctx *jxcontext.Context, linkType int) (link string, err error) {
|
||||
|
||||
return "mt", err
|
||||
return err
|
||||
}
|
||||
|
||||
27
business/jxstore/partner/mt/union.go
Normal file
27
business/jxstore/partner/mt/union.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package mt
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/partner"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
)
|
||||
|
||||
type UnionHandler struct {
|
||||
}
|
||||
|
||||
var (
|
||||
unionHandler *UnionHandler
|
||||
)
|
||||
|
||||
func init() {
|
||||
partner.HandlerMap[model.VendorIDMTWM] = unionHandler
|
||||
}
|
||||
|
||||
func (s *UnionHandler) ShareUnionLink(ctx *jxcontext.Context, linkType int) (link string, err error) {
|
||||
|
||||
return "mt", err
|
||||
}
|
||||
|
||||
func (s *UnionHandler) GetUnionActList(ctx *jxcontext.Context, actType int) (link interface{}, err error) {
|
||||
return
|
||||
}
|
||||
@@ -19,6 +19,7 @@ func init() {
|
||||
|
||||
type UnionInterface interface {
|
||||
ShareUnionLink(ctx *jxcontext.Context, linkType int) (link string, err error)
|
||||
GetUnionActList(ctx *jxcontext.Context, actType int) (result interface{}, err error)
|
||||
}
|
||||
|
||||
func GetHandler(vendorID int) UnionInterface {
|
||||
|
||||
@@ -41,9 +41,6 @@ var (
|
||||
model.VendorIDEBAI: []string{
|
||||
"image-star.elemecdn.com",
|
||||
},
|
||||
model.VendorIDYB: []string{
|
||||
"pospalstoreimg.area27.pospal.cn",
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
@@ -116,8 +113,6 @@ func GetPossibleVendorIDFromVendorOrderID(vendorOrderID string) (vendorID int) {
|
||||
}
|
||||
} else if orderIDLen == len("33437032333978492") {
|
||||
vendorID = model.VendorIDMTWM
|
||||
} else if orderIDLen == len("5287873015048") {
|
||||
vendorID = model.VendorIDWSC
|
||||
} else if orderIDLen == len("1000004390") {
|
||||
vendorID = model.VendorIDJX
|
||||
} else if orderIDLen == len("124557362562000001") || orderIDLen == len("13153183146800000100") {
|
||||
|
||||
@@ -12,13 +12,12 @@ const (
|
||||
VendorIDPurchaseBegin = 0
|
||||
VendorIDJD = 0
|
||||
VendorIDMTWM = 1
|
||||
VendorIDELM = 2
|
||||
VendorIDPDD = 2 //拼多多
|
||||
VendorIDEBAI = 3
|
||||
VendorIDYB = 4 //银豹
|
||||
VendorIDJDShop = 5 //京东商城
|
||||
VendorIDWSC = 11 // 微盟微商城
|
||||
VendorIDPurchaseEnd = 11
|
||||
VendorIDJX = 9 // 这是一个假的京西VendorID
|
||||
VendorIDTB = 4 //淘宝
|
||||
VendorIDJDShop = 5 //京东商城
|
||||
VendorIDJX = 9 // 这是一个假的京西VendorID
|
||||
VendorIDPurchaseEnd = 10
|
||||
VendorIDOther = 999 //其他平台
|
||||
|
||||
VendorIDWXPay = 51 // 微信支付
|
||||
@@ -66,10 +65,9 @@ var (
|
||||
VendorNames = map[int]string{
|
||||
VendorIDJD: "Jd",
|
||||
VendorIDMTWM: "Mtwm",
|
||||
VendorIDELM: "Elm",
|
||||
VendorIDPDD: "Pdd",
|
||||
VendorIDEBAI: "Ebai",
|
||||
VendorIDWSC: "Wsc",
|
||||
VendorIDYB: "Yb",
|
||||
VendorIDTB: "Tb",
|
||||
VendorIDJX: "Jx",
|
||||
VendorIDJDShop: "Jds",
|
||||
|
||||
@@ -95,11 +93,10 @@ var (
|
||||
VendorChineseNames = map[int]string{
|
||||
VendorIDJD: "京东到家",
|
||||
VendorIDMTWM: "美团外卖",
|
||||
VendorIDELM: "饿了么",
|
||||
VendorIDPDD: "拼多多",
|
||||
VendorIDEBAI: "饿百新零售",
|
||||
VendorIDYB: "银豹",
|
||||
VendorIDTB: "淘宝",
|
||||
VendorIDJDShop: "京东商城",
|
||||
VendorIDWSC: "微盟微商城",
|
||||
VendorIDJX: "京西商城",
|
||||
VendorIDOther: "其他平台",
|
||||
|
||||
|
||||
@@ -28,10 +28,8 @@ var (
|
||||
ShopChineseNames = map[int]string{
|
||||
VendorIDJD: globals.StoreName,
|
||||
VendorIDMTWM: globals.StoreNameMtwm,
|
||||
VendorIDELM: globals.StoreNameEbai,
|
||||
VendorIDEBAI: globals.StoreNameEbai,
|
||||
VendorIDJX: fmt.Sprintf("%s商城", globals.StoreName),
|
||||
VendorIDWSC: "微盟微商城",
|
||||
}
|
||||
|
||||
OrderStatusName = map[int]string{
|
||||
@@ -141,7 +139,6 @@ var (
|
||||
MultiStoresVendorMap = map[int]int{
|
||||
VendorIDJD: 1,
|
||||
VendorIDMTWM: 0,
|
||||
VendorIDELM: 0,
|
||||
VendorIDEBAI: 0,
|
||||
}
|
||||
|
||||
|
||||
@@ -551,6 +551,21 @@ func (c *JobController) TempJob() {
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 查询联盟任务
|
||||
// @Description 查询联盟任务
|
||||
// @Param token header string true "认证token"
|
||||
// @Param vendorID query int true "平台ID"
|
||||
// @Param actType query int true "活动类型ID"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /GetUnionActList [get]
|
||||
func (c *JobController) GetUnionActList() {
|
||||
c.callGetUnionActList(func(params *tJobGetUnionActListParams) (retVal interface{}, errCode string, err error) {
|
||||
retVal, err = cms.GetUnionActList(params.Ctx, params.VendorID, params.ActType)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 分享联盟链接
|
||||
// @Description 分享联盟链接
|
||||
// @Param token header string true "认证token"
|
||||
|
||||
@@ -358,6 +358,15 @@ func init() {
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JobController"] = append(web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JobController"],
|
||||
web.ControllerComments{
|
||||
Method: "GetUnionActList",
|
||||
Router: `/GetUnionActList`,
|
||||
AllowHTTPMethods: []string{"get"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JobController"] = append(web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JobController"],
|
||||
web.ControllerComments{
|
||||
Method: "AddressDistinguish",
|
||||
|
||||
Reference in New Issue
Block a user