- normal store weixin msg.

This commit is contained in:
gazebo
2018-12-25 21:50:18 +08:00
parent e90d36e827
commit e8ce327fc0
11 changed files with 396 additions and 15 deletions

View File

@@ -337,6 +337,30 @@ func NotifyStoreOpRequestStatus(isAccepted bool, storeID, nameID int, spuName st
return SendMsgToStore(storeID, templateID, fileURL, data)
}
func NotifyStoreMessage(storeID, msgID, msgStatusID int, title, content string) (err error) {
globals.SugarLogger.Debugf("NotifyStoreMessage storeID:%d, msgID:%d, title:%s, content:%s", storeID, msgID, title, content)
templateID := "gIG2olBZtQbjXmp6doNB_dESu60By5xuXYOGxksLv3Y"
fileURL := fmt.Sprintf("%s%d", WX_TO_STORE_SKU_PAGE_URL, storeID)
data := map[string]interface{}{
"first": map[string]interface{}{
"value": title,
"color": "#333333",
},
"keyword1": map[string]interface{}{
"value": content,
"color": "#2E408E",
},
"keyword2": map[string]interface{}{
"value": utils.Time2Str(time.Now()),
"color": "#2E408E",
},
"remark": map[string]interface{}{
"value": "点击查看详情",
},
}
return SendMsgToStore(storeID, templateID, fileURL, data)
}
func FormatDeliveryTime(order *model.GoodsOrder) string {
var tmpTime time.Time
if order.ExpectedDeliveredTime == utils.DefaultTimeValue {