1
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"git.rosy.net.cn/baseapi/platformapi/dingdingapi"
|
||||
"git.rosy.net.cn/baseapi/platformapi/weixinapi"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/ddmsg"
|
||||
"git.rosy.net.cn/jx-callback/business/partner"
|
||||
"strings"
|
||||
@@ -156,6 +157,42 @@ func onTLpayFinished(call *tonglianpayapi.CallBackResult) (err error) {
|
||||
}
|
||||
//weixinmsg.SendUserMessage(jxcontext.AdminCtx, "商户购买物料信息推送", fmt.Sprintf("门店%s:%d,在物料商城下单了:%s,请注意查看", store.Name, store.ID, order.VendorOrderID), userID, true, true)
|
||||
}
|
||||
authList, _ := dao.GetUserBindAuthInfo(db, order.UserID, 0, nil, "", "", []string{api.WeixinMiniAppID2})
|
||||
if authList != nil && len(authList) != 0 {
|
||||
param := &weixinapi.SNSSendOrderParameter{
|
||||
OrderKey: struct {
|
||||
OrderNumberType int `json:"order_number_type"`
|
||||
TransactionId string `json:"transaction_id"`
|
||||
Mchid string `json:"mchid"`
|
||||
OutTradeNo string `json:"out_trade_no"`
|
||||
}{
|
||||
OrderNumberType: 2,
|
||||
TransactionId: call.ChnlTrxID,
|
||||
},
|
||||
LogisticsType: 1,
|
||||
DeliveryMode: 1,
|
||||
IsAllDelivered: false,
|
||||
ShippingList: append([]weixinapi.ShippingList{}, weixinapi.ShippingList{
|
||||
TrackingNo: order.VendorOrderID,
|
||||
ExpressCompany: "YD",
|
||||
ItemDesc: "背心袋",
|
||||
Contact: struct {
|
||||
ConsignorContact string `json:"consignor_contact"`
|
||||
ReceiverContact string `json:"receiver_contact"`
|
||||
}{},
|
||||
}),
|
||||
UploadTime: time.Now().Format(time.RFC3339),
|
||||
Payer: struct {
|
||||
Openid string `json:"openid"`
|
||||
}{
|
||||
Openid: authList[0].AuthID,
|
||||
},
|
||||
}
|
||||
if err = api.WeixinMiniAPI.SNSSendGoodsOrder(param); err != nil {
|
||||
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "物料发货推送", fmt.Sprintf("物料商城下单,发货错误:%s,请注意查看,err:%s", order.VendorOrderID, err.Error()))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user