1
This commit is contained in:
@@ -31,6 +31,7 @@ const (
|
|||||||
VendorIDMTPS = 102 // 美团配送
|
VendorIDMTPS = 102 // 美团配送
|
||||||
VendorIDFengNiao = 103 // 蜂鸟配送
|
VendorIDFengNiao = 103 // 蜂鸟配送
|
||||||
VendorIDDYPS = 104 // 抖音配送
|
VendorIDDYPS = 104 // 抖音配送
|
||||||
|
VendorIDUUPT = 105 //uu跑腿
|
||||||
VendorJXFakeWL = 300 // 京西假物流
|
VendorJXFakeWL = 300 // 京西假物流
|
||||||
VendorIDJDWL = 401 // 京东物流
|
VendorIDJDWL = 401 // 京东物流
|
||||||
VendorIDTotalWl = 402 // (综合物流[京东,圆通,申通....])
|
VendorIDTotalWl = 402 // (综合物流[京东,圆通,申通....])
|
||||||
|
|||||||
@@ -1,5 +1,14 @@
|
|||||||
package uupt
|
package uupt
|
||||||
|
|
||||||
|
import (
|
||||||
|
"git.rosy.net.cn/baseapi/platformapi/mtpsapi"
|
||||||
|
"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/dao"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/partner"
|
||||||
|
"git.rosy.net.cn/jx-callback/globals/api"
|
||||||
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
//errCode 错误码说明
|
//errCode 错误码说明
|
||||||
ErrorParameter1 = -101 //参数格式校验错误
|
ErrorParameter1 = -101 //参数格式校验错误
|
||||||
@@ -76,5 +85,59 @@ type DeliveryHandler struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
//if api.
|
if api.UuAPI != nil {
|
||||||
|
curDeliveryHandler = new(DeliveryHandler)
|
||||||
|
partner.RegisterDeliveryPlatform(curDeliveryHandler, true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (d DeliveryHandler) GetVendorID() int {
|
||||||
|
return model.VendorIDUUPT
|
||||||
|
}
|
||||||
|
|
||||||
|
func (d DeliveryHandler) CreateStore(ctx *jxcontext.Context, storeDetail *dao.StoreDetail2) (vendorStoreID string, status int, err error) {
|
||||||
|
//TODO implement me
|
||||||
|
panic("implement me")
|
||||||
|
}
|
||||||
|
|
||||||
|
func (d DeliveryHandler) GetStore(ctx *jxcontext.Context, storeID int, vendorStoreID string) (storeDetail *dao.StoreDetail2, err error) {
|
||||||
|
//TODO implement me
|
||||||
|
panic("implement me")
|
||||||
|
}
|
||||||
|
|
||||||
|
func (d DeliveryHandler) IsErrStoreNotExist(err error) bool {
|
||||||
|
//TODO implement me
|
||||||
|
panic("implement me")
|
||||||
|
}
|
||||||
|
|
||||||
|
func (d DeliveryHandler) IsErrStoreExist(err error) bool {
|
||||||
|
//TODO implement me
|
||||||
|
panic("implement me")
|
||||||
|
}
|
||||||
|
|
||||||
|
func (d DeliveryHandler) CreateWaybill(order *model.GoodsOrder, maxDeliveryFee int64) (bill *model.Waybill, err error) {
|
||||||
|
//TODO implement me
|
||||||
|
panic("implement me")
|
||||||
|
}
|
||||||
|
|
||||||
|
func (d DeliveryHandler) CancelWaybill(bill *model.Waybill, cancelReasonID int, cancelReason string) (err error) {
|
||||||
|
//if err = api.UuAPI.CancelOrder(bill.VendorWaybillID, uuptapi.CancelReasonNormal); err != nil {
|
||||||
|
//
|
||||||
|
//}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (d DeliveryHandler) GetWaybillFee(order *model.GoodsOrder) (deliveryFeeInfo *partner.WaybillFeeInfo, err error) {
|
||||||
|
//TODO implement me
|
||||||
|
panic("implement me")
|
||||||
|
}
|
||||||
|
|
||||||
|
func (d DeliveryHandler) ComplaintRider(bill *model.Waybill, resonID int, resonContent string) (err error) {
|
||||||
|
//TODO implement me
|
||||||
|
panic("implement me")
|
||||||
|
}
|
||||||
|
|
||||||
|
func (d DeliveryHandler) GetRiderInfo(orderId string, deliveryId int64, mtPeisongId string) (rider *mtpsapi.RiderInfo, err error) {
|
||||||
|
//TODO implement me
|
||||||
|
panic("implement me")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -200,6 +200,11 @@ fnCode = "uDEyAmTbrfS2qjYbgi20Jm"
|
|||||||
fnMerchantId= "51658"
|
fnMerchantId= "51658"
|
||||||
fnCallbackURL = "http://callback.jxc4.com/fn/msg"
|
fnCallbackURL = "http://callback.jxc4.com/fn/msg"
|
||||||
|
|
||||||
|
#uu跑腿
|
||||||
|
uuAppID="55c4542ae60e4d348edcfc93b06dd302"
|
||||||
|
uuAppKey="76b362c06b1b4baa9e47bab6387a5356"
|
||||||
|
uuOpenID="8d8464e7c9354c1e88a3f5afa2a7922e"
|
||||||
|
|
||||||
weixinAppID = "wxbf235770edaabc5c"
|
weixinAppID = "wxbf235770edaabc5c"
|
||||||
weixinSecret = "ba32b269a068a5b72486a0beafd171e8"
|
weixinSecret = "ba32b269a068a5b72486a0beafd171e8"
|
||||||
weixinToken = "17_roSCZgkCxhRnyFVtei0KdfHwdGP8PmLzJFhCieka4_X4_d-lgfaTxF6oIS6FE5lkgLbrtstSsO6HyDNHKsHJmpB8YOtJYN4sO-AezdWLF78M2phL0K8xCRjB9YE9-Ci64GCqS50o6LcVqux8ORVbACAFIM"
|
weixinToken = "17_roSCZgkCxhRnyFVtei0KdfHwdGP8PmLzJFhCieka4_X4_d-lgfaTxF6oIS6FE5lkgLbrtstSsO6HyDNHKsHJmpB8YOtJYN4sO-AezdWLF78M2phL0K8xCRjB9YE9-Ci64GCqS50o6LcVqux8ORVbACAFIM"
|
||||||
@@ -338,9 +343,10 @@ fnCode = "uDEyAmTbrfS2qjYbgi20Jm"
|
|||||||
fnMerchantId= "51658"
|
fnMerchantId= "51658"
|
||||||
fnCallbackURL = "http://callback.jxc4.com/fn/msg"
|
fnCallbackURL = "http://callback.jxc4.com/fn/msg"
|
||||||
|
|
||||||
uuPtAppID="55c4542ae60e4d348edcfc93b06dd302"
|
#uu跑腿
|
||||||
uuPtAppKey="76b362c06b1b4baa9e47bab6387a5356"
|
uuAppID="55c4542ae60e4d348edcfc93b06dd302"
|
||||||
uuPtOpenId="8d8464e7c9354c1e88a3f5afa2a7922e"
|
uuAppKey="76b362c06b1b4baa9e47bab6387a5356"
|
||||||
|
uuOpenID="8d8464e7c9354c1e88a3f5afa2a7922e"
|
||||||
|
|
||||||
|
|
||||||
jxPrintAppID = "1000"
|
jxPrintAppID = "1000"
|
||||||
@@ -450,6 +456,10 @@ fnAppSecret = "a8248088-a742-4c33-a0db-03aeae00ca7d"
|
|||||||
fnMerchantId = "51658"
|
fnMerchantId = "51658"
|
||||||
fnCode = "uDEyAmTbrfS2qjYbgi20Jm"
|
fnCode = "uDEyAmTbrfS2qjYbgi20Jm"
|
||||||
fnCallbackURL = "http://callback-jxgy.jxc4.com/fn/msg"
|
fnCallbackURL = "http://callback-jxgy.jxc4.com/fn/msg"
|
||||||
|
#uu跑腿
|
||||||
|
uuAppID="55c4542ae60e4d348edcfc93b06dd302"
|
||||||
|
uuAppKey="76b362c06b1b4baa9e47bab6387a5356"
|
||||||
|
uuOpenID="8d8464e7c9354c1e88a3f5afa2a7922e"
|
||||||
|
|
||||||
jxPrintAppID = "1000"
|
jxPrintAppID = "1000"
|
||||||
jxPrintAppKey = "rfBd56ti2SMtYvSg"
|
jxPrintAppKey = "rfBd56ti2SMtYvSg"
|
||||||
@@ -644,7 +654,10 @@ fnAppSecret = "c1e6c280-e618-4103-9d0a-673bc54fb22e"
|
|||||||
fnCode = "uDEyAmTbrfS2qjYbgi20Jm"
|
fnCode = "uDEyAmTbrfS2qjYbgi20Jm"
|
||||||
fnMerchantId= "51658"
|
fnMerchantId= "51658"
|
||||||
fnCallbackURL = "http://callback.jxc4.com/fn/msg"
|
fnCallbackURL = "http://callback.jxc4.com/fn/msg"
|
||||||
|
#uu跑腿
|
||||||
|
uuAppID="55c4542ae60e4d348edcfc93b06dd302"
|
||||||
|
uuAppKey="76b362c06b1b4baa9e47bab6387a5356"
|
||||||
|
uuOpenID="8d8464e7c9354c1e88a3f5afa2a7922e"
|
||||||
jxPrintAppID = "1000"
|
jxPrintAppID = "1000"
|
||||||
jxPrintAppKey = "rfBd56ti2SMtYvSg"
|
jxPrintAppKey = "rfBd56ti2SMtYvSg"
|
||||||
|
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
package controllers
|
|
||||||
|
|
||||||
import (
|
|
||||||
"git.rosy.net.cn/baseapi/platformapi/tiktok_shop/tiktok_api"
|
|
||||||
"git.rosy.net.cn/jx-callback/globals/api"
|
|
||||||
"github.com/astaxie/beego/server/web"
|
|
||||||
"net/http"
|
|
||||||
"strings"
|
|
||||||
)
|
|
||||||
|
|
||||||
type DYPSController struct {
|
|
||||||
web.Controller
|
|
||||||
}
|
|
||||||
|
|
||||||
//抖音运力配送 回调
|
|
||||||
func (d *DYPSController) CallbackDYPSDeliveryMsg() {
|
|
||||||
resp, byteList := api.TiktokStore.EventSignChange(d.Ctx.Request)
|
|
||||||
if resp.Code != 0 {
|
|
||||||
d.Data["json"] = resp
|
|
||||||
d.ServeJSON()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if strings.Contains(string(byteList), "\"msg_id\":\"0\"") {
|
|
||||||
d.Data["json"] = tiktok_api.CallbackResponse{Code: tiktok_api.CallbackSuccessCode, Msg: tiktok_api.CallbackSuccess}
|
|
||||||
d.ServeJSON()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if d.Ctx.Input.Method() == http.MethodPost {
|
|
||||||
//msg,callbaskResponse:=api.TiktokStore.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
30
controllers/uupt_callback.go
Normal file
30
controllers/uupt_callback.go
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
package controllers
|
||||||
|
|
||||||
|
import (
|
||||||
|
"git.rosy.net.cn/baseapi/platformapi/uuptapi"
|
||||||
|
"git.rosy.net.cn/jx-callback/globals/api"
|
||||||
|
"github.com/astaxie/beego/server/web"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
type UuPtController struct {
|
||||||
|
web.Controller
|
||||||
|
}
|
||||||
|
|
||||||
|
//运单状态回调
|
||||||
|
func (c *UuPtController) UuWaybillCallback() {
|
||||||
|
if c.Ctx.Input.Method() == http.MethodPost {
|
||||||
|
resp, callbackResponse := api.UuAPI.WaybillCallback(c.Ctx.Request)
|
||||||
|
if callbackResponse.ReturnCode == uuptapi.ReturnFail {
|
||||||
|
c.Data["code"] = callbackResponse
|
||||||
|
c.ServeJSON()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
//callbackResponse=uuptapi.
|
||||||
|
c.Data["code"] = callbackResponse
|
||||||
|
c.ServeJSON()
|
||||||
|
} else {
|
||||||
|
c.Abort("404")
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,6 +7,7 @@ import (
|
|||||||
"git.rosy.net.cn/baseapi/platformapi/qywxapi"
|
"git.rosy.net.cn/baseapi/platformapi/qywxapi"
|
||||||
"git.rosy.net.cn/baseapi/platformapi/tiktok"
|
"git.rosy.net.cn/baseapi/platformapi/tiktok"
|
||||||
tiktokShop "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/tiktok_api"
|
tiktokShop "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/tiktok_api"
|
||||||
|
"git.rosy.net.cn/baseapi/platformapi/uuptapi"
|
||||||
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -86,7 +87,7 @@ var (
|
|||||||
WxpayAPI *wxpayapi.API // 微信支付API
|
WxpayAPI *wxpayapi.API // 微信支付API
|
||||||
TLpayAPI *tonglianpayapi.API //通联收银宝api
|
TLpayAPI *tonglianpayapi.API //通联收银宝api
|
||||||
FnAPI *fnpsapi.API //蜂鸟配送api
|
FnAPI *fnpsapi.API //蜂鸟配送api
|
||||||
|
UuAPI *uuptapi.API //uu跑腿api
|
||||||
YinBaoAPI *yinbaoapi.API //银豹平台api
|
YinBaoAPI *yinbaoapi.API //银豹平台api
|
||||||
|
|
||||||
WeixinPageAPI *weixinapi.API // 用户微信扫码登录
|
WeixinPageAPI *weixinapi.API // 用户微信扫码登录
|
||||||
@@ -296,6 +297,7 @@ func Init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
FnAPI = fnpsapi.New(beego.AppConfig.DefaultString("fnAppID", ""), beego.AppConfig.DefaultString("fnAppSecret", ""), beego.AppConfig.DefaultString("fnMerchantId", ""), beego.AppConfig.DefaultString("fnCode", ""))
|
FnAPI = fnpsapi.New(beego.AppConfig.DefaultString("fnAppID", ""), beego.AppConfig.DefaultString("fnAppSecret", ""), beego.AppConfig.DefaultString("fnMerchantId", ""), beego.AppConfig.DefaultString("fnCode", ""))
|
||||||
|
UuAPI = uuptapi.New(beego.AppConfig.DefaultString("uuAppID", ""), beego.AppConfig.DefaultString("uuAppKey", ""), beego.AppConfig.DefaultString("uuOpenID", ""))
|
||||||
FeieAPI = feieapi.New(beego.AppConfig.DefaultString("feieUser", ""), beego.AppConfig.DefaultString("feieKey", ""))
|
FeieAPI = feieapi.New(beego.AppConfig.DefaultString("feieUser", ""), beego.AppConfig.DefaultString("feieKey", ""))
|
||||||
XiaoWMAPI = xiaowmapi.New(beego.AppConfig.DefaultInt("xiaoWMAppID", 0), beego.AppConfig.DefaultString("xiaoWMAppKey", ""))
|
XiaoWMAPI = xiaowmapi.New(beego.AppConfig.DefaultInt("xiaoWMAppID", 0), beego.AppConfig.DefaultString("xiaoWMAppKey", ""))
|
||||||
YilianyunAPI = yilianyunapi.New(beego.AppConfig.DefaultString("yilianyunClientID", ""), beego.AppConfig.DefaultString("yilianyunClientSecret", ""))
|
YilianyunAPI = yilianyunapi.New(beego.AppConfig.DefaultString("yilianyunClientID", ""), beego.AppConfig.DefaultString("yilianyunClientSecret", ""))
|
||||||
|
|||||||
Reference in New Issue
Block a user