Merge branch 'jdshop' of e.coding.net:rosydev/jx-callback into jdshop
This commit is contained in:
@@ -399,7 +399,7 @@ func NotifyUserApplyCancel(order *model.GoodsOrder, cancelReason string) (err er
|
||||
"color": WX_NEW_ORDER_TEMPLATE_COLOR,
|
||||
},
|
||||
"keyword1": map[string]interface{}{ // 订单编号
|
||||
"value": fmt.Sprintf("%s第%d号订单, %s", model.VendorChineseNames[order.VendorID], order.OrderSeq, order.VendorOrderID),
|
||||
"value": fmt.Sprintf("storeDetail.Name,%s#%d号订单, %s", model.VendorChineseNames[order.VendorID], order.OrderSeq, order.VendorOrderID),
|
||||
"color": VendorColors[order.VendorID],
|
||||
},
|
||||
"keyword2": map[string]interface{}{ // 订单日期
|
||||
|
||||
@@ -190,7 +190,7 @@ type SkuName struct {
|
||||
Video string `json:"video"` //商品视频地址
|
||||
VideoID string `orm:"column(video_id)" json:"videoID"` //商品视频美团ID
|
||||
TiktokAttribute string `orm:"column(tiktok_attribute);size(1024)" json:"tiktokAttribute"` //抖音分类属性的存储
|
||||
MtAttribute string `orm:"column(mt_attribute);size(1024)" json:"MtAttribute"` //美团分类属性的存储
|
||||
MtAttribute string `orm:"column(mt_attribute);size(1024)" json:"mtAttribute"` //美团分类属性的存储
|
||||
}
|
||||
|
||||
func (*SkuName) TableUnique() [][]string {
|
||||
|
||||
@@ -25,7 +25,7 @@ func SendVendorV2(data SendData) (err error) {
|
||||
if data.VendorID == model.VendorIDMTWM {
|
||||
dataStr, _ := json.Marshal(data.Data)
|
||||
temp := string(dataStr)
|
||||
fmt.Println(temp)
|
||||
globals.SugarLogger.Debugf("SendVendorV2 temp=%s", temp)
|
||||
if _, err = api.MtwmAPI.MsgSend(string(dataStr)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -537,12 +537,11 @@ func SwitchAttr(apiObj *mtwmapi.API, vendorStoreID string, vendorCatID int64, na
|
||||
}}
|
||||
}
|
||||
}
|
||||
attrValues = append(attrValues, attrValue)
|
||||
}
|
||||
}
|
||||
attrValues = append(attrValues, attrValue)
|
||||
temp, _ := json.Marshal(attrValues)
|
||||
attrs = string(temp)
|
||||
globals.SugarLogger.Debugf("SwitchAttr attrValues=%s", utils.Format4Output(attrValues, false))
|
||||
} else {
|
||||
switch vendorCatID { //兜底处理
|
||||
case 200002727:
|
||||
|
||||
@@ -5,6 +5,8 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/im"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
@@ -85,3 +87,32 @@ func (c *IMController) SendToVendorV2() {
|
||||
return nil, "", nil
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 查询美团门店IM单聊开关状态
|
||||
// @Description 查询美团门店IM单聊开关状态
|
||||
// @Param token header string true "认证token"
|
||||
// @Param appPoiCode query string true "美团门店id"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /GetPoiIMStatus [get]
|
||||
func (c *IMController) GetPoiIMStatus() {
|
||||
c.callGetPoiIMStatus(func(params *tImGetPoiIMStatusParams) (interface{}, string, error) {
|
||||
retVal, err := api.MtwmAPI.GetPoiIMStatus(params.AppPoiCode)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 设置美团门店IM线上状态
|
||||
// @Description 设置美团门店IM线上状态
|
||||
// @Param token header string true "认证token"
|
||||
// @Param appPoiCode formData string true "美团门店id"
|
||||
// @Param imStatus formData int true "状态 0-关闭 1-开启"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /SetPoiIMStatus [post]
|
||||
func (c *IMController) SetPoiIMStatus() {
|
||||
c.callSetPoiIMStatus(func(params *tImSetPoiIMStatusParams) (interface{}, string, error) {
|
||||
err := api.MtwmAPI.SetPoiIMStatus(params.AppPoiCode, params.ImStatus)
|
||||
return nil, "", err
|
||||
})
|
||||
}
|
||||
|
||||
@@ -4463,7 +4463,22 @@ func init() {
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:IMController"] = append(web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:IMController"],
|
||||
web.ControllerComments{
|
||||
Method: "GetPoiIMStatus",
|
||||
Router: `/GetPoiIMStatus`,
|
||||
AllowHTTPMethods: []string{"get"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:IMController"] = append(web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:IMController"],
|
||||
web.ControllerComments{
|
||||
Method: "SetPoiIMStatus",
|
||||
Router: `/SetPoiIMStatus`,
|
||||
AllowHTTPMethods: []string{"post"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
//web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:FnController"] = append(web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:FnController"],
|
||||
// web.ControllerComments{
|
||||
// Method: "FnStore",
|
||||
|
||||
Reference in New Issue
Block a user