diff --git a/app/admin/svc/svc_make_record.go b/app/admin/svc/svc_make_record.go index 3a9f72d..ae69354 100644 --- a/app/admin/svc/svc_make_record.go +++ b/app/admin/svc/svc_make_record.go @@ -32,6 +32,9 @@ func MarkRecord(c *gin.Context) { if ok1 { adminName = adminMap[v.AdminId].Name } + if adminName == "" { + adminName = v.AdminName + } var tmp = map[string]string{ "id": utils.IntToStr(v.Id), "state_str": stateArr[v.State], diff --git a/app/db/model/order_goods_doing_flow.go b/app/db/model/order_goods_doing_flow.go index a024717..d7b178c 100644 --- a/app/db/model/order_goods_doing_flow.go +++ b/app/db/model/order_goods_doing_flow.go @@ -17,4 +17,5 @@ type OrderGoodsDoingFlow struct { AdminId int `json:"admin_id" xorm:"default 0 comment('admin 的id') INT(11)"` Sku string `json:"sku" xorm:"comment('规格数据') VARCHAR(1000)"` GoodsTitle string `json:"goods_title" xorm:"comment('商品标题') VARCHAR(255)"` + AdminName string `json:"admin_name" xorm:"comment('') VARCHAR(255)"` } diff --git a/app/ipad/svc/svc_order_make.go b/app/ipad/svc/svc_order_make.go index 45dd688..77a3ad5 100644 --- a/app/ipad/svc/svc_order_make.go +++ b/app/ipad/svc/svc_order_make.go @@ -158,6 +158,9 @@ func commNewMake(c *gin.Context, args map[string]string) { GoodsTitle: orderGoods.GoodsTitle, Sku: orderGoods.Sku, } + var admin model.Staff + sess.Where("id=?", recordFlow.AdminId).Get(&admin) + recordFlow.AdminName = admin.Name one, err := sess.InsertOne(recordFlow) if one == 0 || err != nil { sess.Rollback()