商品价格审核查询增加types
This commit is contained in:
@@ -56,9 +56,9 @@ const (
|
||||
|
||||
WX_SALE_BILL_TEMPLATE_ID = "eTUuFZMWH7IsVBfcxNMpmaHYaxRkUaD6zG8wSGJDcic"
|
||||
|
||||
WX_NORMAL_STORE_MSG_TEMPLATE_ID = "EUeIJEz2TLUAn4TU2EffOGYLd3dEaYndD_y6Sw9FcSU"
|
||||
// WX_CHANGE_APPROVED_TEMPLATE_ID = "gIG2olBZtQbjXmp6doNB_dESu60By5xuXYOGxksLv3Y"
|
||||
// WX_CHANGE_REJECTED_TEMPLATE_ID = "tn2QXWi4HtSIwaztmtN6Bb2uzNL-jBxWltCZTDNJuYE"
|
||||
WX_NORMAL_STORE_MSG_TEMPLATE_ID = "EUeIJEz2TLUAn4TU2EffOGYLd3dEaYndD_y6Sw9FcSU"
|
||||
WX_CHANGE_APPROVED_TEMPLATE_ID = "gIG2olBZtQbjXmp6doNB_dESu60By5xuXYOGxksLv3Y"
|
||||
WX_CHANGE_REJECTED_TEMPLATE_ID = "tn2QXWi4HtSIwaztmtN6Bb2uzNL-jBxWltCZTDNJuYE"
|
||||
WX_ORDER_APPLY_CANCEL_TEMPLATE_ID = "e6urTtcm4PL0rgDMG_1qWNOwrE3Qxqcm_dx0kWWCmEI"
|
||||
WX_ORDER_ORDER_CANCELED_TEMPLATE_ID = "HXjuSAbIk77Xh18hjgwoxHzbciR9jX3Rn2CpLJz9dZw"
|
||||
|
||||
@@ -460,50 +460,50 @@ func NotifySaleBill(storeID int, title, shopName, fileURL string) (err error) {
|
||||
}
|
||||
|
||||
func NotifyStoreOpRequestStatus(isAccepted bool, storeID, nameID int, spuName string, originalUnitPrice, unitPrice int, rejectReason string) (err error) {
|
||||
// globals.SugarLogger.Debugf("NotifyStoreOpRequestStatus isAccepted:%t, storeID:%d, nameID:%d, spuName:%s, originalUnitPrice:%d, unitPrice:%d, rejectReason:%s", isAccepted, storeID, nameID, spuName, originalUnitPrice, unitPrice, rejectReason)
|
||||
// templateID := ""
|
||||
// fileURL := globals.WxBackstageHost + fmt.Sprintf("%s%d", WX_TO_STORE_SKU_PAGE_URL, storeID)
|
||||
// data := make(map[string]interface{})
|
||||
// if isAccepted {
|
||||
// templateID = WX_CHANGE_APPROVED_TEMPLATE_ID
|
||||
// data = map[string]interface{}{
|
||||
// "first": map[string]interface{}{
|
||||
// "value": fmt.Sprintf("%s%s元,修改为%s元,已经通过审核。^_^", spuName, jxutils.IntPrice2StandardString(int64(originalUnitPrice)), jxutils.IntPrice2StandardString(int64(unitPrice))),
|
||||
// "color": "#333333",
|
||||
// },
|
||||
// "keyword1": map[string]interface{}{
|
||||
// "value": "审核通过",
|
||||
// "color": "#2E408E",
|
||||
// },
|
||||
// "keyword2": map[string]interface{}{
|
||||
// "value": utils.Time2Str(time.Now()),
|
||||
// "color": "#2E408E",
|
||||
// },
|
||||
// "remark": map[string]interface{}{
|
||||
// "value": "点击查看详情",
|
||||
// },
|
||||
// }
|
||||
// } else {
|
||||
// templateID = WX_CHANGE_REJECTED_TEMPLATE_ID
|
||||
// data = map[string]interface{}{
|
||||
// "first": map[string]interface{}{
|
||||
// "value": fmt.Sprintf("您好!抱歉的通知您。%s%s元,修改为%s元,未通过审核。原因:%s", spuName, jxutils.IntPrice2StandardString(int64(originalUnitPrice)), jxutils.IntPrice2StandardString(int64(unitPrice)), rejectReason),
|
||||
// "color": "#E80000",
|
||||
// },
|
||||
// "keyword1": map[string]interface{}{
|
||||
// "value": "1",
|
||||
// "color": "#2E408E",
|
||||
// },
|
||||
// "keyword2": map[string]interface{}{
|
||||
// "value": utils.Time2Str(time.Now()),
|
||||
// "color": "#2E408E",
|
||||
// },
|
||||
// "remark": map[string]interface{}{
|
||||
// "value": "请您及时到商品管理修改价格,修改后请重新提交。",
|
||||
// },
|
||||
// }
|
||||
// }
|
||||
// err = SendMsgToStore(storeID, templateID, fileURL, WX_MINI_TO_STORE_SKU_PAGE_URL, data)
|
||||
globals.SugarLogger.Debugf("NotifyStoreOpRequestStatus isAccepted:%t, storeID:%d, nameID:%d, spuName:%s, originalUnitPrice:%d, unitPrice:%d, rejectReason:%s", isAccepted, storeID, nameID, spuName, originalUnitPrice, unitPrice, rejectReason)
|
||||
templateID := ""
|
||||
fileURL := globals.WxBackstageHost + fmt.Sprintf("%s%d", WX_TO_STORE_SKU_PAGE_URL, storeID)
|
||||
data := make(map[string]interface{})
|
||||
if isAccepted {
|
||||
templateID = WX_CHANGE_APPROVED_TEMPLATE_ID
|
||||
data = map[string]interface{}{
|
||||
"first": map[string]interface{}{
|
||||
"value": fmt.Sprintf("%s%s元,修改为%s元,已经通过审核。^_^", spuName, jxutils.IntPrice2StandardString(int64(originalUnitPrice)), jxutils.IntPrice2StandardString(int64(unitPrice))),
|
||||
"color": "#333333",
|
||||
},
|
||||
"keyword1": map[string]interface{}{
|
||||
"value": "审核通过",
|
||||
"color": "#2E408E",
|
||||
},
|
||||
"keyword2": map[string]interface{}{
|
||||
"value": utils.Time2Str(time.Now()),
|
||||
"color": "#2E408E",
|
||||
},
|
||||
"remark": map[string]interface{}{
|
||||
"value": "点击查看详情",
|
||||
},
|
||||
}
|
||||
} else {
|
||||
templateID = WX_CHANGE_REJECTED_TEMPLATE_ID
|
||||
data = map[string]interface{}{
|
||||
"first": map[string]interface{}{
|
||||
"value": fmt.Sprintf("您好!抱歉的通知您。%s%s元,修改为%s元,未通过审核。原因:%s", spuName, jxutils.IntPrice2StandardString(int64(originalUnitPrice)), jxutils.IntPrice2StandardString(int64(unitPrice)), rejectReason),
|
||||
"color": "#E80000",
|
||||
},
|
||||
"keyword1": map[string]interface{}{
|
||||
"value": "1",
|
||||
"color": "#2E408E",
|
||||
},
|
||||
"keyword2": map[string]interface{}{
|
||||
"value": utils.Time2Str(time.Now()),
|
||||
"color": "#2E408E",
|
||||
},
|
||||
"remark": map[string]interface{}{
|
||||
"value": "请您及时到商品管理修改价格,修改后请重新提交。",
|
||||
},
|
||||
}
|
||||
}
|
||||
err = SendMsgToStore(storeID, templateID, fileURL, WX_MINI_TO_STORE_SKU_PAGE_URL, data)
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user