This commit is contained in:
苏尹岚
2021-04-01 16:26:15 +08:00
parent f9ff953e0a
commit a33fa55f8c
4 changed files with 26 additions and 8 deletions

View File

@@ -1923,7 +1923,6 @@ func TempJob() (err error) {
return err return err
} }
func ShareUnionLink(ctx *jxcontext.Context, vendorID, linkType int) (err error) { func ShareUnionLink(ctx *jxcontext.Context, vendorID, linkType int) (link string, err error) {
vendor.GetHandler(vendorID).ShareUnionLink(ctx, linkType) return vendor.GetHandler(vendorID).ShareUnionLink(ctx, linkType)
return err
} }

View File

@@ -2,6 +2,7 @@ package jds
import ( import (
"git.rosy.net.cn/jx-callback/business/jxstore/vendor" "git.rosy.net.cn/jx-callback/business/jxstore/vendor"
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
"git.rosy.net.cn/jx-callback/business/model" "git.rosy.net.cn/jx-callback/business/model"
) )
@@ -9,9 +10,14 @@ type UnionHandler struct {
} }
var ( var (
UnionInterfaceHandler vendor.UnionInterface unionHandler *UnionHandler
) )
func init() { func init() {
vendor.HandlerMap[model.VendorIDJDShop] = UnionInterfaceHandler vendor.HandlerMap[model.VendorIDJDShop] = unionHandler
}
func (s *UnionHandler) ShareUnionLink(ctx *jxcontext.Context, linkType int) (link string, err error) {
return "jds", err
} }

View File

@@ -10,14 +10,14 @@ type UnionHandler struct {
} }
var ( var (
UnionInterfaceHandler vendor.UnionInterface unionHandler *UnionHandler
) )
func init() { func init() {
vendor.HandlerMap[model.VendorIDMTWM] = UnionInterfaceHandler vendor.HandlerMap[model.VendorIDMTWM] = unionHandler
} }
func (s *UnionHandler) ShareUnionLink(ctx *jxcontext.Context, linkType int) (link string, err error) { func (s *UnionHandler) ShareUnionLink(ctx *jxcontext.Context, linkType int) (link string, err error) {
return link, err return "mt", err
} }

View File

@@ -550,3 +550,16 @@ func (c *JobController) TempJob() {
return retVal, "", err return retVal, "", err
}) })
} }
// @Title 分享联盟链接
// @Description 分享联盟链接
// @Param token header string true "认证token"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /ShareUnionLink [post]
func (c *JobController) ShareUnionLink() {
c.callShareUnionLink(func(params *tJobShareUnionLinkParams) (retVal interface{}, errCode string, err error) {
retVal, err = cms.ShareUnionLink(params.Ctx, 1, 1)
return retVal, "", err
})
}