- add Updatetime in JxBadComments
This commit is contained in:
@@ -1,12 +1,16 @@
|
|||||||
package legacymodel
|
package legacymodel
|
||||||
|
|
||||||
|
import "time"
|
||||||
|
|
||||||
type JxBadComments struct {
|
type JxBadComments struct {
|
||||||
Id int `json:"id" orm:"column(id)"`
|
Id int `json:"id" orm:"column(id)"`
|
||||||
|
CreatedAt time.Time `orm:"auto_now_add;type(datetime)" json:"createdAt"`
|
||||||
OrderId string `json:"order_id" orm:"column(order_id);size(25);unique" description:"订单ID"`
|
OrderId string `json:"order_id" orm:"column(order_id);size(25);unique" description:"订单ID"`
|
||||||
Jxstoreid string `json:"jxstoreid" orm:"column(jxstoreid);size(11);index" description:"京西门店ID"`
|
Jxstoreid string `json:"jxstoreid" orm:"column(jxstoreid);size(11);index" description:"京西门店ID"`
|
||||||
Userphone string `json:"userPhone" orm:"column(userphone);size(255);null" description:"评价的用户的联系方式"`
|
Userphone string `json:"userPhone" orm:"column(userphone);size(255);null" description:"评价的用户的联系方式"`
|
||||||
Status int `json:"status" orm:"column(status)" description:"当前评论的状态(0:未解决 1:已解决)"`
|
Status int `json:"status" orm:"column(status)" description:"当前评论的状态(0:未解决 1:已解决)"`
|
||||||
Createtime string `json:"createTime" orm:"column(createtime);size(255);null" description:"评论的创建时间"`
|
Createtime string `json:"createTime" orm:"column(createtime);size(255);null" description:"评论的创建时间"`
|
||||||
|
Updatetime string `json:"updateTime" orm:"column(updatetime);size(255);null" description:"评论的修改时间"`
|
||||||
Maxmodifytime int `json:"maxModifyTime" orm:"column(maxmodifytime);null" description:"评论可修改的最大时间"`
|
Maxmodifytime int `json:"maxModifyTime" orm:"column(maxmodifytime);null" description:"评论可修改的最大时间"`
|
||||||
Score int `json:"score4" orm:"column(score)" description:"评论的星级"`
|
Score int `json:"score4" orm:"column(score)" description:"评论的星级"`
|
||||||
Scorecontent string `json:"score4Content" orm:"column(scorecontent);size(255);null" description:"评论的内容"`
|
Scorecontent string `json:"score4Content" orm:"column(scorecontent);size(255);null" description:"评论的内容"`
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type ModelIDCUL struct {
|
type ModelIDCUL struct {
|
||||||
ID int `orm:"column(id)" json:"id"`
|
ID int64 `orm:"column(id)" json:"id"`
|
||||||
CreatedAt time.Time `orm:"auto_now_add;type(datetime)" json:"createdAt"`
|
CreatedAt time.Time `orm:"auto_now_add;type(datetime)" json:"createdAt"`
|
||||||
UpdatedAt time.Time `orm:"auto_now;type(datetime)" json:"updatedAt"`
|
UpdatedAt time.Time `orm:"auto_now;type(datetime)" json:"updatedAt"`
|
||||||
LastOperator string `orm:"size(32)" json:"lastOperator"` // 最后操作员
|
LastOperator string `orm:"size(32)" json:"lastOperator"` // 最后操作员
|
||||||
|
|||||||
@@ -212,3 +212,20 @@ func (o *Waybill) GetStatusTime() time.Time {
|
|||||||
func (o *OrderStatus) GetStatusTime() time.Time {
|
func (o *OrderStatus) GetStatusTime() time.Time {
|
||||||
return o.StatusTime
|
return o.StatusTime
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type OrderComment struct {
|
||||||
|
ModelIDCUL
|
||||||
|
VendorOrderID string `orm:"column(vendor_order_id);size(48)" json:"vendorOrderID"`
|
||||||
|
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
|
||||||
|
StoreID int
|
||||||
|
|
||||||
|
TagList string
|
||||||
|
Score int8
|
||||||
|
Content string
|
||||||
|
CommentCreatedAt time.Time
|
||||||
|
|
||||||
|
UpdatedTagList string
|
||||||
|
UpdatedScore int8
|
||||||
|
UpdatedContent string
|
||||||
|
CommentUpdatedAt time.Time
|
||||||
|
}
|
||||||
|
|||||||
@@ -107,10 +107,15 @@ func (c *PurchaseHandler) onOrderComment(msg *jdapi.CallbackOrderMsg) (err error
|
|||||||
order, err2 := partner.CurOrderManager.LoadOrder(msg.BillID, model.VendorIDJD)
|
order, err2 := partner.CurOrderManager.LoadOrder(msg.BillID, model.VendorIDJD)
|
||||||
if err = err2; err == nil {
|
if err = err2; err == nil {
|
||||||
comment.Jxstoreid = utils.Int2Str(jxutils.GetSaleStoreIDFromOrder(order))
|
comment.Jxstoreid = utils.Int2Str(jxutils.GetSaleStoreIDFromOrder(order))
|
||||||
|
if order.ConsigneeMobile2 == "" {
|
||||||
comment.Userphone = order.ConsigneeMobile
|
comment.Userphone = order.ConsigneeMobile
|
||||||
|
} else {
|
||||||
|
comment.Userphone = order.ConsigneeMobile2
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
comment.Updatetime = utils.Timestamp2Str(utils.MustInterface2Int64(result["updateTime"].(map[string]interface{})["time"]) / 1000)
|
||||||
comment.UpdatedMsg = string(utils.MustMarshal(result))
|
comment.UpdatedMsg = string(utils.MustMarshal(result))
|
||||||
comment.UpdatedScore = score
|
comment.UpdatedScore = score
|
||||||
comment.UpdatedScorecontent = utils.Interface2String(result["score4Content"])
|
comment.UpdatedScorecontent = utils.Interface2String(result["score4Content"])
|
||||||
|
|||||||
Reference in New Issue
Block a user