添加通知

detached
杨赟 2 years ago
parent 27da6cc990
commit b2a28ba46f

@ -0,0 +1,41 @@
package user
import (
"context"
"git.oa00.com/supply-chain/service/client"
)
type message struct {
}
var (
MessageTypeOrder = messageType{
Type: 1,
TypeName: "零售订单",
}
MessageTypeAfterOrder = messageType{
Type: 2,
TypeName: "售后订单",
}
)
type messageType struct {
Type uint
TypeName string
}
type ArgsMessagePublish struct {
CustomerId uint // 客户id
Message string // 消息内容
Type messageType // 消息类型
TypeId uint // 消息来源id
}
// Publish @Title 推送消息
func (m *message) Publish(ctx context.Context, args ArgsMessagePublish) error {
reply := 0
xClient, err := client.GetClient(m)
if err != nil {
return err
}
return xClient.Call(ctx, "Publish", args, &reply)
}

@ -5,4 +5,5 @@ type User struct {
DepositAudit depositAudit // 充值审核
Wallet wallet // 钱包
Cash cash // 余额提现
Message message // 消息
}

Loading…
Cancel
Save