Store添加AutoReplyType,用于标识(订单)自动回复类型
This commit is contained in:
@@ -85,7 +85,10 @@ func (c *OrderManager) OnOrderComments(orderCommentList []*model.OrderComment) (
|
||||
isNewComment = true
|
||||
if orderComment.IsReplied == 0 && time.Now().Sub(orderComment.CommentCreatedAt) < time.Duration(orderComment.ModifyDuration)*time.Hour {
|
||||
if storeDetail, err2 := dao.GetStoreDetail(db, orderComment.StoreID, orderComment.VendorID); err2 == nil {
|
||||
c.replyOrderComment(storeDetail.VendorOrgCode, orderComment)
|
||||
if storeDetail.AutoReplyType == model.AutoReplyAll ||
|
||||
orderComment.Score > JX_BAD_COMMENTS_MAX_LEVEL && storeDetail.AutoReplyType == model.AutoReplyGoodComment {
|
||||
c.replyOrderComment(storeDetail.VendorOrgCode, orderComment)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,6 +100,7 @@ func InitServiceInfo(version string, buildTime time.Time, gitCommit string) {
|
||||
"storePriceTypeName": model.StorePriceTypeName,
|
||||
"payStatusName": model.PayStatusName,
|
||||
"refundStatusName": model.RefundStatusName,
|
||||
"autoReplyTypeName": model.AutoReplyTypeName,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,6 +49,12 @@ const (
|
||||
StoreChangePriceTypeManagedStore = 3 // 直营门店,禁止改价
|
||||
)
|
||||
|
||||
const (
|
||||
AutoReplyAll = 0 // 全部自动回复
|
||||
AutoReplyGoodComment = 1 // 禁止差评自动回复
|
||||
AutoReplyDisabled = 2 // 禁止自动回复
|
||||
)
|
||||
|
||||
var (
|
||||
StoreStatusName = map[int]string{
|
||||
StoreStatusDisabled: "禁用",
|
||||
@@ -240,6 +246,11 @@ var (
|
||||
StoreChangePriceTypeBossDisabled: "普通门店禁止改价",
|
||||
StoreChangePriceTypeManagedStore: "直营门店禁止改价",
|
||||
}
|
||||
AutoReplyTypeName = map[int]string{
|
||||
AutoReplyAll: "全部自动回复",
|
||||
AutoReplyGoodComment: "禁止差评自动回复",
|
||||
AutoReplyDisabled: "禁止自动回复",
|
||||
}
|
||||
)
|
||||
|
||||
type Store struct {
|
||||
@@ -264,6 +275,7 @@ type Store struct {
|
||||
AutoEnableAt *time.Time `orm:"type(datetime);null" json:"autoEnableAt"` // 自动营业时间(临时休息用)
|
||||
ChangePriceType int8 `json:"changePriceType"` // 修改价格类型,即是否需要审核
|
||||
SMSNotify int8 `orm:"column(sms_notify);" json:"smsNotify"` // 是否通过短信接收订单消息
|
||||
AutoReplyType int8 `json:"autoReplyType"` // 订单评价自动回复类型
|
||||
|
||||
PrinterDisabled int8 `orm:"default(0)" json:"printerDisabled"` // 是否禁用网络打印机
|
||||
PrinterFontSize int8 `orm:"default(0)" json:"printerFontSize"` // 打印字体-1:小,0:正常,1:大
|
||||
|
||||
Reference in New Issue
Block a user