- 京东CreatePromotionSku超限处理
- 活动名字防重复 - 活动限购设置
This commit is contained in:
@@ -12,10 +12,6 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
)
|
||||
|
||||
const (
|
||||
ActionTypeNA = 0
|
||||
)
|
||||
|
||||
type ActOrderRuleParam struct {
|
||||
SalePrice int64 `orm:"" json:"salePrice"` // 满的价格
|
||||
DeductPrice int64 `orm:"" json:"deductPrice"` // 减的价格
|
||||
@@ -23,8 +19,6 @@ type ActOrderRuleParam struct {
|
||||
|
||||
type ActStoreSkuParam struct {
|
||||
model.ActStoreSku
|
||||
|
||||
Action int // -1删除,1修改,2新增
|
||||
}
|
||||
|
||||
type ActDetail struct {
|
||||
@@ -199,7 +193,10 @@ func CreateAct(ctx *jxcontext.Context, act *model.Act, vendorIDs []int, actRules
|
||||
panic(r)
|
||||
}
|
||||
}()
|
||||
|
||||
if act.LimitCount == 0 {
|
||||
act.LimitCount = 1 // 缺省限购一份,如果确定不限,明确给一个很大的值
|
||||
}
|
||||
act.Status = model.ActStatusCreated
|
||||
dao.WrapAddIDCULDEntity(act, ctx.GetUserName())
|
||||
err = dao.CreateEntity(db, act)
|
||||
if err != nil {
|
||||
@@ -318,7 +315,6 @@ func deleteActStoreBind(ctx *jxcontext.Context, db *dao.DaoDB, actID int, actSto
|
||||
}
|
||||
}
|
||||
if isDeleteAll || isDeleteAtLeastOne {
|
||||
// globals.SugarLogger.Debugf("isDeleteAll:%t", isDeleteAll)
|
||||
syncStatus := model.SyncFlagModifiedMask
|
||||
if isDeleteAll {
|
||||
syncStatus = model.SyncFlagDeletedMask
|
||||
|
||||
Reference in New Issue
Block a user