1
This commit is contained in:
@@ -360,7 +360,6 @@ func IntCoordinate2MarsStandard(gpsLng, gpsLat int, coordinateType int) (marsLng
|
|||||||
Type: coordSys,
|
Type: coordSys,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
globals.SugarLogger.Debugf("--TencentCoordinateChange err := %v", err)
|
|
||||||
return marsLng, marsLat, nil
|
return marsLng, marsLat, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1130,7 +1129,6 @@ func MixWatermarkImg(imgWatermark, img string, exPrefixBegin, exPrefixEnd *time.
|
|||||||
} else {
|
} else {
|
||||||
imgUrl = img + "?imageView2/0/q/75|watermark/1/image/" + baseURL + "/dissolve/100/gravity/Center/dx/0/dy/0"
|
imgUrl = img + "?imageView2/0/q/75|watermark/1/image/" + baseURL + "/dissolve/100/gravity/Center/dx/0/dy/0"
|
||||||
}
|
}
|
||||||
globals.SugarLogger.Debugf("---imgUrl := %s", imgUrl)
|
|
||||||
if resBinary, _, err := DownloadFileByURL(imgUrl); err == nil {
|
if resBinary, _, err := DownloadFileByURL(imgUrl); err == nil {
|
||||||
downloadURL, err := UploadExportContent(resBinary, utils.Int64ToStr(time.Now().Unix())+img[strings.LastIndex(img, "/")+1:len(img)])
|
downloadURL, err := UploadExportContent(resBinary, utils.Int64ToStr(time.Now().Unix())+img[strings.LastIndex(img, "/")+1:len(img)])
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
|||||||
@@ -702,10 +702,6 @@ func GetStoreSkus2(db *DaoDB, vendorID, storeID int, skuIDs []int, mustDirty boo
|
|||||||
}
|
}
|
||||||
sql = fmt.Sprintf(sql, fmtParams...)
|
sql = fmt.Sprintf(sql, fmtParams...)
|
||||||
sql += " ORDER BY t1.price"
|
sql += " ORDER BY t1.price"
|
||||||
if storeID == 669148 {
|
|
||||||
globals.SugarLogger.Debugf("----------sql := %s", sql)
|
|
||||||
globals.SugarLogger.Debugf("----------sqlParams := %s", utils.Format4Output(sqlParams, false))
|
|
||||||
}
|
|
||||||
if err = GetRows(db, &skus, sql, sqlParams...); err != nil {
|
if err = GetRows(db, &skus, sql, sqlParams...); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -400,7 +400,7 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
|||||||
// img5 = storeSku.Img
|
// img5 = storeSku.Img
|
||||||
//}
|
//}
|
||||||
if storeSku.ImgMix != "" && ((storeSku.BrandID == storeSku.ExBrandID && storeSku.ExBrandID != 0) || storeSku.ExBrandID == 0) {
|
if storeSku.ImgMix != "" && ((storeSku.BrandID == storeSku.ExBrandID && storeSku.ExBrandID != 0) || storeSku.ExBrandID == 0) {
|
||||||
foodData["picture"] = strings.Join(jxutils.BatchString2Slice(storeSku.ImgMix, img2, img3, img4, img5), ",")
|
foodData["picture"] = strings.Join(jxutils.BatchString2Slice(storeSku.ImgMix, storeSku.Img, img2, img3, img4, img5), ",")
|
||||||
} else {
|
} else {
|
||||||
foodData["picture"] = strings.Join(jxutils.BatchString2Slice(storeSku.Img, img2, img3, img4, img5), ",")
|
foodData["picture"] = strings.Join(jxutils.BatchString2Slice(storeSku.Img, img2, img3, img4, img5), ",")
|
||||||
}
|
}
|
||||||
@@ -471,10 +471,6 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if storeID == 668530 {
|
|
||||||
globals.SugarLogger.Debugf("------storeSkuList:%s,%s", syncType, utils.Format4Output(storeSkuList, false))
|
|
||||||
globals.SugarLogger.Debugf("------foodDataList:%s", utils.Format4Output(foodDataList, false))
|
|
||||||
}
|
|
||||||
api := getAPI(getStoreVendorOrgCode(storeID), storeID, vendorStoreID)
|
api := getAPI(getStoreVendorOrgCode(storeID), storeID, vendorStoreID)
|
||||||
if globals.EnableMtwmStoreWrite {
|
if globals.EnableMtwmStoreWrite {
|
||||||
if len(foodDataList) == 1 {
|
if len(foodDataList) == 1 {
|
||||||
|
|||||||
@@ -223,26 +223,22 @@ func pushMTWMOrder2GY(value url.Values, msgType string, serverType string) *mtwm
|
|||||||
// ImgCheckOutCallback 针对返图订单,当实拍审核失败时,通过该消息通知三方重新修改实拍
|
// ImgCheckOutCallback 针对返图订单,当实拍审核失败时,通过该消息通知三方重新修改实拍
|
||||||
// http://callback.jxc4.com//mtwm/imgCheckOutCallback
|
// http://callback.jxc4.com//mtwm/imgCheckOutCallback
|
||||||
func (c *MtwmController) ImgCheckOutCallback() {
|
func (c *MtwmController) ImgCheckOutCallback() {
|
||||||
data, err := ioutil.ReadAll(c.Ctx.Request.Body)
|
msg, callbackResponse := api.MtwmAPI.GetCallbackMsg(c.Ctx.Request)
|
||||||
if err != nil {
|
if callbackResponse != nil {
|
||||||
c.Data["json"] = map[string]interface{}{"result_code": -1}
|
c.Data["json"] = map[string]interface{}{"result_code": -1}
|
||||||
c.ServeJSON()
|
c.ServeJSON()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "美团返图审核通知", fmt.Sprintf("美团返图审核:%s", string(data)))
|
|
||||||
globals.SugarLogger.Debugf("-----data := %s", string(data))
|
|
||||||
|
|
||||||
callback := &CheckBackParam{}
|
data := &CheckBackParam{}
|
||||||
if err = json.Unmarshal(data, callback); err != nil {
|
utils.Map2StructByJson(utils.URLValues2Map(msg.FormData), data, false)
|
||||||
globals.SugarLogger.Debugf("-----data := %s", string(data))
|
|
||||||
c.Data["json"] = map[string]interface{}{"result_code": -1}
|
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "ImgCheckOutCallback", fmt.Sprintf("美团返图审核:%s", utils.Format4Output(data, false)))
|
||||||
c.ServeJSON()
|
globals.SugarLogger.Debugf("-----data := %s", utils.Format4Output(data, false))
|
||||||
return
|
|
||||||
}
|
|
||||||
globals.SugarLogger.Debugf("-----data := %s", utils.Format4Output(callback, false))
|
|
||||||
|
|
||||||
c.Data["json"] = map[string]interface{}{"result_code": 1}
|
c.Data["json"] = map[string]interface{}{"result_code": 1}
|
||||||
c.ServeJSON()
|
c.ServeJSON()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type CheckBackParam struct {
|
type CheckBackParam struct {
|
||||||
@@ -258,27 +254,22 @@ type CheckBackParam struct {
|
|||||||
// OrderImgStatusCallback 针对强制返图订单,当订单返图就绪满足发配条件时,通过该消息通知三方是否可发配
|
// OrderImgStatusCallback 针对强制返图订单,当订单返图就绪满足发配条件时,通过该消息通知三方是否可发配
|
||||||
// http://callback.jxc4.com//mtwm/orderImgStatusCallback
|
// http://callback.jxc4.com//mtwm/orderImgStatusCallback
|
||||||
func (c *MtwmController) OrderImgStatusCallback() {
|
func (c *MtwmController) OrderImgStatusCallback() {
|
||||||
data, err := ioutil.ReadAll(c.Ctx.Request.Body)
|
|
||||||
if err != nil {
|
|
||||||
c.Data["json"] = map[string]interface{}{"result_code": -1}
|
|
||||||
c.ServeJSON()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "美团返图发货通知", fmt.Sprintf("美团发货审核:%s", string(data)))
|
|
||||||
globals.SugarLogger.Debugf("-----data := %s", string(data))
|
|
||||||
|
|
||||||
callback := &CanSendDelivery{}
|
msg, callbackResponse := api.MtwmAPI.GetCallbackMsg(c.Ctx.Request)
|
||||||
if err = json.Unmarshal(data, callback); err != nil {
|
if callbackResponse != nil {
|
||||||
globals.SugarLogger.Debugf("-----data := %s", string(data))
|
|
||||||
c.Data["json"] = map[string]interface{}{"result_code": -1}
|
c.Data["json"] = map[string]interface{}{"result_code": -1}
|
||||||
c.ServeJSON()
|
c.ServeJSON()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
globals.SugarLogger.Debugf("-----data := %s", utils.Format4Output(callback, false))
|
|
||||||
|
data := &CanSendDelivery{}
|
||||||
|
utils.Map2StructByJson(utils.URLValues2Map(msg.FormData), data, false)
|
||||||
|
|
||||||
|
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "OrderImgStatusCallback", fmt.Sprintf("美团返图审核可发配:%s", utils.Format4Output(data, false)))
|
||||||
|
globals.SugarLogger.Debugf("-----data := %s", utils.Format4Output(data, false))
|
||||||
|
|
||||||
c.Data["json"] = map[string]interface{}{"result_code": 1}
|
c.Data["json"] = map[string]interface{}{"result_code": 1}
|
||||||
c.ServeJSON()
|
c.ServeJSON()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type CanSendDelivery struct {
|
type CanSendDelivery struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user