新增字段
This commit is contained in:
parent
25dafdf7e5
commit
cc4957813b
|
|
@ -1067,11 +1067,63 @@ func (p DefParty) orderGoodsUpdate() web_iris.Party {
|
|||
}}
|
||||
}
|
||||
|
||||
// 支付
|
||||
func (p DefParty) orderPay() web_iris.Party {
|
||||
return web_iris.Party{Prefix: p.Prefix, PartyFunc: func(index iris.Party) {
|
||||
index.Post(OrderBase+"/orderPay", func(ctx *context.Context) {
|
||||
type OrderMarkRecord struct {
|
||||
OrderId string
|
||||
Lab1 int
|
||||
Lab2 int
|
||||
Lab3 int
|
||||
Message string
|
||||
}
|
||||
|
||||
// 评价
|
||||
func (p DefParty) orderMarkRecord() web_iris.Party {
|
||||
return web_iris.Party{Prefix: p.Prefix, PartyFunc: func(index iris.Party) {
|
||||
index.Post(OrderBase+"/orderMarkRecord", func(ctx *context.Context) {
|
||||
headerBaseInfo := GetHeaderBaseInfo(ctx)
|
||||
body, _ := io.ReadAll(ctx.Request().Body)
|
||||
var orderMarkRecordRequest OrderMarkRecord
|
||||
json.Unmarshal(body, &orderMarkRecordRequest)
|
||||
if len(orderMarkRecordRequest.OrderId) == 0 {
|
||||
OrderExistError.Fail(ctx, orderMarkRecordRequest)
|
||||
return
|
||||
}
|
||||
|
||||
serviceUserMarkRecord1 := models.ServiceUserMarkRecord{
|
||||
Uid: headerBaseInfo.Uid,
|
||||
OrderId: orderMarkRecordRequest.OrderId,
|
||||
ServiceStar: orderMarkRecordRequest.Lab1,
|
||||
ServiceLabels: "1",
|
||||
Status: 1,
|
||||
}
|
||||
database.Instance().Model(&models.ServiceUserMarkRecord{}).Create(&serviceUserMarkRecord1)
|
||||
|
||||
serviceUserMarkRecord2 := models.ServiceUserMarkRecord{
|
||||
Uid: headerBaseInfo.Uid,
|
||||
OrderId: orderMarkRecordRequest.OrderId,
|
||||
ServiceStar: orderMarkRecordRequest.Lab2,
|
||||
ServiceLabels: "2",
|
||||
Status: 1,
|
||||
}
|
||||
database.Instance().Model(&models.ServiceUserMarkRecord{}).Create(&serviceUserMarkRecord2)
|
||||
|
||||
serviceUserMarkRecord3 := models.ServiceUserMarkRecord{
|
||||
Uid: headerBaseInfo.Uid,
|
||||
OrderId: orderMarkRecordRequest.OrderId,
|
||||
ServiceStar: orderMarkRecordRequest.Lab2,
|
||||
ServiceLabels: "3",
|
||||
Status: 1,
|
||||
}
|
||||
database.Instance().Model(&models.ServiceUserMarkRecord{}).Create(&serviceUserMarkRecord3)
|
||||
|
||||
serviceUserMarkRecord4 := models.ServiceUserMarkRecord{
|
||||
Uid: headerBaseInfo.Uid,
|
||||
OrderId: orderMarkRecordRequest.OrderId,
|
||||
ServiceStar: orderMarkRecordRequest.Lab2,
|
||||
ServiceLabels: "4",
|
||||
Status: 1,
|
||||
}
|
||||
database.Instance().Model(&models.ServiceUserMarkRecord{}).Create(&serviceUserMarkRecord4)
|
||||
Success(ctx, orderMarkRecordRequest, nil)
|
||||
})
|
||||
}}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -144,6 +144,7 @@ type OrderMain struct {
|
|||
PayType int `json:"payType"` //支付方式 1线下 2线上 3会员余额
|
||||
Status int `json:"status1"` //信息状态
|
||||
PayOrderId string `json:"payOrderId"` //支付订单号
|
||||
MarkStatus int `gorm:"default:0" json:"markStatus"` //评价状态
|
||||
}
|
||||
|
||||
// OrderSub 子订单
|
||||
|
|
@ -253,11 +254,13 @@ type ServiceUserMark struct {
|
|||
type ServiceUserMarkRecord struct {
|
||||
Id int64 `gorm:"primaryKey;autoIncrement" json:"id"` //id
|
||||
Uid int64 `gorm:"index;not null" json:"uid"` //评价用户
|
||||
OrderId string `gorm:"not null" json:"orderId"` //订单ID
|
||||
ServiceStar int `gorm:"default:5" json:"serviceStar"` //服务星级
|
||||
ServiceLabels string `json:"serviceLabels"` //服务标签
|
||||
MarkContext string `json:"markContext"` //评价内容
|
||||
CreateTime time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP" json:"-"` //创建时间
|
||||
UpdateTime time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP" json:"-"` //更新时间
|
||||
Status int `json:"status"` //信息状态
|
||||
}
|
||||
|
||||
// ReserveTimeFilter 服务过滤时间
|
||||
|
|
|
|||
Loading…
Reference in New Issue