- add remark on table promotion
This commit is contained in:
@@ -397,16 +397,20 @@ func CreateJdPromotion(ctx *jxcontext.Context, isIDJd bool, isAsync, isContinueW
|
|||||||
} else if step == 3 {
|
} else if step == 3 {
|
||||||
err = promotionHandler.ConfirmPromotion(infoId, "")
|
err = promotionHandler.ConfirmPromotion(infoId, "")
|
||||||
if err == nil {
|
if err == nil {
|
||||||
promotion.Status = model.PromotionStatusRemoteCreated
|
db := dao.GetDB()
|
||||||
} else {
|
if _, err = dao.UpdateEntityLogically(db, promotion, map[string]interface{}{
|
||||||
promotion.Status = model.PromotionStatusRemoteFailed
|
model.FieldStatus: model.PromotionStatusRemoteCreated,
|
||||||
|
}, ctx.GetUserName(), nil); err == nil {
|
||||||
|
RefreshJdPromotionLockStatus(promotion.ID)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if err != nil {
|
||||||
db := dao.GetDB()
|
db := dao.GetDB()
|
||||||
if _, err = dao.UpdateEntityLogically(db, promotion, map[string]interface{}{
|
dao.UpdateEntityLogically(db, promotion, map[string]interface{}{
|
||||||
"Status": promotion.Status,
|
model.FieldStatus: model.PromotionStatusRemoteFailed,
|
||||||
}, ctx.GetUserName(), nil); err == nil {
|
model.FieldRemark: err.Error(),
|
||||||
RefreshJdPromotionLockStatus(promotion.ID)
|
}, ctx.GetUserName(), nil)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return nil, err
|
return nil, err
|
||||||
}, 4)
|
}, 4)
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ const (
|
|||||||
FieldSpecQuality = "SpecQuality"
|
FieldSpecQuality = "SpecQuality"
|
||||||
FieldSpecUnit = "SpecUnit"
|
FieldSpecUnit = "SpecUnit"
|
||||||
FieldName = "Name"
|
FieldName = "Name"
|
||||||
|
FieldRemark = "Remark"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ModelIDCUL struct {
|
type ModelIDCUL struct {
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ type Promotion struct {
|
|||||||
VendorPromotionID string `orm:"size(64);column(vendor_promotion_id);index" json:"vendorPromotionID"`
|
VendorPromotionID string `orm:"size(64);column(vendor_promotion_id);index" json:"vendorPromotionID"`
|
||||||
BeginAt time.Time `orm:"type(datetime);index" json:"beginAt"`
|
BeginAt time.Time `orm:"type(datetime);index" json:"beginAt"`
|
||||||
EndAt time.Time `orm:"type(datetime);index" json:"endAt"`
|
EndAt time.Time `orm:"type(datetime);index" json:"endAt"`
|
||||||
|
Remark string `orm:"type(text)" json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|||||||
Reference in New Issue
Block a user