Files
lone-services/services/wecom/internal/dao/message.go
T

85 lines
2.3 KiB
Go

package dao
import (
"lone-services/pkg/wecom/message"
"lone-services/pkg/wecomrpc"
)
const (
WecomTypeReview = 1 // 审核应用
WecomTypeNotify = 2 // 通知应用
)
const (
EditLogTypeProduct = wecomrpc.BizTypeProduct
EditLogTypeStore = wecomrpc.BizTypeStore
EditLogTypeAddress = wecomrpc.BizTypeAddress
EditLogTypeSales = wecomrpc.BizTypeSales
ProductApplyReview = wecomrpc.ProductApplyReview
ProductNeedReview = wecomrpc.ProductNeedReview
ProductSubmitReview = wecomrpc.ProductSubmitReview
ProductFirstReview = wecomrpc.ProductFirstReview
ProductSecondReview = wecomrpc.ProductSecondReview
ProductOrdinaryReview = wecomrpc.ProductOrdinaryReview
StoreApplyReview = wecomrpc.StoreApplyReview
StoreNeedReview = wecomrpc.StoreNeedReview
StoreSubmitReview = wecomrpc.StoreSubmitReview
StoreFirstReview = wecomrpc.StoreFirstReview
StoreSecondReview = wecomrpc.StoreSecondReview
AddressApplyReview = wecomrpc.AddressApplyReview
AddressSubmitReview = wecomrpc.AddressSubmitReview
AddressFirstReview = wecomrpc.AddressFirstReview
AddressSecondReview = wecomrpc.AddressSecondReview
SalesApplyReview = wecomrpc.SalesApplyReview
ActionNone = wecomrpc.ActionNone
ActionPass = wecomrpc.ActionPass
ActionReject = wecomrpc.ActionReject
)
type MessageConfig struct {
Title string
Desc string
SourceDesc string
}
type FieldConfig struct {
Field string
Label string
}
type WeComJob struct {
BizId int `json:"biz_id"`
BizType uint8 `json:"biz_type"` // 1:产品,2:门店,3:地址
Type uint8 `json:"type"`
Action uint8 `json:"action"`
Ext map[string]any `json:"ext"` // 备注,理由,时间等字段
// reason 理由
// key 按钮需要的key
}
type ReviewActionRequest struct {
AgentId int64 `json:"agentid"`
ResponseCode string `json:"response_code"`
Action string `json:"action"`
TaskId string `json:"task_id"`
}
type Horizontal struct {
Content []message.HorizontalContent `json:"content"`
TaskId string `json:"task_id"`
DetailUrl string `json:"detail_url"`
Key string `json:"key"`
}
type DiffItem struct {
Field string
Label string
Old string
New string
}