aa
This commit is contained in:
@@ -1922,6 +1922,10 @@ func TempJob() (err error) {
|
|||||||
return err
|
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) {
|
func ShareUnionLink(ctx *jxcontext.Context, vendorID, linkType int) (link string, err error) {
|
||||||
return partner.GetHandler(vendorID).ShareUnionLink(ctx, linkType)
|
return partner.GetHandler(vendorID).ShareUnionLink(ctx, linkType)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,3 +21,7 @@ func (s *UnionHandler) ShareUnionLink(ctx *jxcontext.Context, linkType int) (lin
|
|||||||
|
|
||||||
return "jds", err
|
return "jds", err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *UnionHandler) GetUnionActList(ctx *jxcontext.Context, actType int) (link interface{}, err error) {
|
||||||
|
return
|
||||||
|
}
|
||||||
@@ -1,23 +1,6 @@
|
|||||||
package mt
|
package mt
|
||||||
|
|
||||||
import (
|
func getAPI() (err error) {
|
||||||
"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 {
|
return err
|
||||||
}
|
|
||||||
|
|
||||||
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
|
|
||||||
}
|
}
|
||||||
|
|||||||
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 {
|
type UnionInterface interface {
|
||||||
ShareUnionLink(ctx *jxcontext.Context, linkType int) (link string, err error)
|
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 {
|
func GetHandler(vendorID int) UnionInterface {
|
||||||
|
|||||||
@@ -41,9 +41,6 @@ var (
|
|||||||
model.VendorIDEBAI: []string{
|
model.VendorIDEBAI: []string{
|
||||||
"image-star.elemecdn.com",
|
"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") {
|
} else if orderIDLen == len("33437032333978492") {
|
||||||
vendorID = model.VendorIDMTWM
|
vendorID = model.VendorIDMTWM
|
||||||
} else if orderIDLen == len("5287873015048") {
|
|
||||||
vendorID = model.VendorIDWSC
|
|
||||||
} else if orderIDLen == len("1000004390") {
|
} else if orderIDLen == len("1000004390") {
|
||||||
vendorID = model.VendorIDJX
|
vendorID = model.VendorIDJX
|
||||||
} else if orderIDLen == len("124557362562000001") || orderIDLen == len("13153183146800000100") {
|
} else if orderIDLen == len("124557362562000001") || orderIDLen == len("13153183146800000100") {
|
||||||
|
|||||||
@@ -12,13 +12,12 @@ const (
|
|||||||
VendorIDPurchaseBegin = 0
|
VendorIDPurchaseBegin = 0
|
||||||
VendorIDJD = 0
|
VendorIDJD = 0
|
||||||
VendorIDMTWM = 1
|
VendorIDMTWM = 1
|
||||||
VendorIDELM = 2
|
VendorIDPDD = 2 //拼多多
|
||||||
VendorIDEBAI = 3
|
VendorIDEBAI = 3
|
||||||
VendorIDYB = 4 //银豹
|
VendorIDTB = 4 //淘宝
|
||||||
VendorIDJDShop = 5 //京东商城
|
VendorIDJDShop = 5 //京东商城
|
||||||
VendorIDWSC = 11 // 微盟微商城
|
VendorIDJX = 9 // 这是一个假的京西VendorID
|
||||||
VendorIDPurchaseEnd = 11
|
VendorIDPurchaseEnd = 10
|
||||||
VendorIDJX = 9 // 这是一个假的京西VendorID
|
|
||||||
VendorIDOther = 999 //其他平台
|
VendorIDOther = 999 //其他平台
|
||||||
|
|
||||||
VendorIDWXPay = 51 // 微信支付
|
VendorIDWXPay = 51 // 微信支付
|
||||||
@@ -66,10 +65,9 @@ var (
|
|||||||
VendorNames = map[int]string{
|
VendorNames = map[int]string{
|
||||||
VendorIDJD: "Jd",
|
VendorIDJD: "Jd",
|
||||||
VendorIDMTWM: "Mtwm",
|
VendorIDMTWM: "Mtwm",
|
||||||
VendorIDELM: "Elm",
|
VendorIDPDD: "Pdd",
|
||||||
VendorIDEBAI: "Ebai",
|
VendorIDEBAI: "Ebai",
|
||||||
VendorIDWSC: "Wsc",
|
VendorIDTB: "Tb",
|
||||||
VendorIDYB: "Yb",
|
|
||||||
VendorIDJX: "Jx",
|
VendorIDJX: "Jx",
|
||||||
VendorIDJDShop: "Jds",
|
VendorIDJDShop: "Jds",
|
||||||
|
|
||||||
@@ -95,11 +93,10 @@ var (
|
|||||||
VendorChineseNames = map[int]string{
|
VendorChineseNames = map[int]string{
|
||||||
VendorIDJD: "京东到家",
|
VendorIDJD: "京东到家",
|
||||||
VendorIDMTWM: "美团外卖",
|
VendorIDMTWM: "美团外卖",
|
||||||
VendorIDELM: "饿了么",
|
VendorIDPDD: "拼多多",
|
||||||
VendorIDEBAI: "饿百新零售",
|
VendorIDEBAI: "饿百新零售",
|
||||||
VendorIDYB: "银豹",
|
VendorIDTB: "淘宝",
|
||||||
VendorIDJDShop: "京东商城",
|
VendorIDJDShop: "京东商城",
|
||||||
VendorIDWSC: "微盟微商城",
|
|
||||||
VendorIDJX: "京西商城",
|
VendorIDJX: "京西商城",
|
||||||
VendorIDOther: "其他平台",
|
VendorIDOther: "其他平台",
|
||||||
|
|
||||||
|
|||||||
@@ -28,10 +28,8 @@ var (
|
|||||||
ShopChineseNames = map[int]string{
|
ShopChineseNames = map[int]string{
|
||||||
VendorIDJD: globals.StoreName,
|
VendorIDJD: globals.StoreName,
|
||||||
VendorIDMTWM: globals.StoreNameMtwm,
|
VendorIDMTWM: globals.StoreNameMtwm,
|
||||||
VendorIDELM: globals.StoreNameEbai,
|
|
||||||
VendorIDEBAI: globals.StoreNameEbai,
|
VendorIDEBAI: globals.StoreNameEbai,
|
||||||
VendorIDJX: fmt.Sprintf("%s商城", globals.StoreName),
|
VendorIDJX: fmt.Sprintf("%s商城", globals.StoreName),
|
||||||
VendorIDWSC: "微盟微商城",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
OrderStatusName = map[int]string{
|
OrderStatusName = map[int]string{
|
||||||
@@ -141,7 +139,6 @@ var (
|
|||||||
MultiStoresVendorMap = map[int]int{
|
MultiStoresVendorMap = map[int]int{
|
||||||
VendorIDJD: 1,
|
VendorIDJD: 1,
|
||||||
VendorIDMTWM: 0,
|
VendorIDMTWM: 0,
|
||||||
VendorIDELM: 0,
|
|
||||||
VendorIDEBAI: 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 分享联盟链接
|
// @Title 分享联盟链接
|
||||||
// @Description 分享联盟链接
|
// @Description 分享联盟链接
|
||||||
// @Param token header string true "认证token"
|
// @Param token header string true "认证token"
|
||||||
|
|||||||
@@ -358,6 +358,15 @@ func init() {
|
|||||||
Filters: nil,
|
Filters: nil,
|
||||||
Params: 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.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JobController"] = append(web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JobController"],
|
||||||
web.ControllerComments{
|
web.ControllerComments{
|
||||||
Method: "AddressDistinguish",
|
Method: "AddressDistinguish",
|
||||||
|
|||||||
Reference in New Issue
Block a user