This commit is contained in:
richboo111
2023-07-12 17:53:14 +08:00
parent c2be67e175
commit de40be335c
2 changed files with 7 additions and 7 deletions

View File

@@ -116,7 +116,7 @@ func NotifyOrderCanceled(order *model.GoodsOrder) (err error) {
}
// NotifyImNewMessage IM 新消息通知
func NotifyImNewMessage(vendorStoreID string, vendorID int) error {
func NotifyImNewMessage(vendorStoreID string, vendorID int, offMsg string) error {
if len(vendorStoreID) == 0 {
return nil
}
@@ -137,9 +137,9 @@ func NotifyImNewMessage(vendorStoreID string, vendorID int) error {
msg.VendorName = model.VendorChineseNames[vendorID]
msg.StoreTitle = store.Name
msg.Context = "老板,你有新的用户消息,请及时查看!"
context, _ := json.Marshal(msg)
//context, _ := json.Marshal(msg)
body := fmt.Sprintf(msg.Context+"(%s)", model.VendorChineseNames[vendorID])
pushMsgByUniApp(store.ID, store.Name, cid, string(context), body, SoundsFileNewImMsg, FlagIm)
pushMsgByUniApp(store.ID, store.Name, cid, offMsg, body, SoundsFileNewImMsg, FlagIm)
return err
}