aa
This commit is contained in:
@@ -317,7 +317,7 @@ func ActStoreSkuParam2Model(ctx *jxcontext.Context, db *dao.DaoDB, act *model.Ac
|
||||
}
|
||||
|
||||
func addActStoreSkuBind(ctx *jxcontext.Context, db *dao.DaoDB, actStoreSkuList []*model.ActStoreSku, actStoreSkuMapList []*model.ActStoreSkuMap) (err error) {
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
@@ -395,7 +395,7 @@ func AddActStoreSkuBind(ctx *jxcontext.Context, db *dao.DaoDB, actID int, actSto
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil || err != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
@@ -565,7 +565,7 @@ func CreateAct(ctx *jxcontext.Context, act *model.Act, vendorIDs []int, vendorOr
|
||||
// TODO
|
||||
// 事务应该从ActStoreSkuParam2Model之后开始
|
||||
// 创建Act也应该往后放
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
@@ -722,7 +722,7 @@ func createActFromVendor(ctx *jxcontext.Context, db *dao.DaoDB, act2 *model.Act2
|
||||
err = nil
|
||||
}
|
||||
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
@@ -838,7 +838,7 @@ func DeleteActStoreSkuBind(ctx *jxcontext.Context, db *dao.DaoDB, actID int, act
|
||||
return 0, fmt.Errorf("当前活动状态:%s,不能进行此操作,或已过期", model.ActStatusName[act.Status])
|
||||
}
|
||||
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil || err != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
@@ -1069,7 +1069,7 @@ func RefreshPageActs(ctx *jxcontext.Context, vendorIDs []int, createdFrom time.T
|
||||
needAddActSkuMap[actStoreSku.VendorActID] = append(needAddActSkuMap[actStoreSku.VendorActID], actStoreSku)
|
||||
}
|
||||
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil || err != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
@@ -1308,7 +1308,7 @@ func ForceUpdateVendorPrice(ctx *jxcontext.Context, vendorID int, actType int, s
|
||||
}
|
||||
|
||||
func SyncActStoreSku2StoreSkuAct(ctx *jxcontext.Context, db *dao.DaoDB, parentTask tasksch.ITask, act *model.Act2) (err error) {
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil || err != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
@@ -1589,7 +1589,7 @@ func ChangeJxPriceByDiscountAct(ctx *jxcontext.Context) {
|
||||
continue
|
||||
}
|
||||
actualStockOut, err = dao.GetOrderStoreSkusCount(db, actStoreSkuMap.StoreID, actStoreSkuMap.SkuID, time.Now().Add(-time.Minute*10), time.Now())
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil || err != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
@@ -1804,9 +1804,11 @@ func GetNewVendorPopActs(ctx *jxcontext.Context) (err error) {
|
||||
for _, v := range storeMaps {
|
||||
cList, _ := api.MtwmAPI.GetCenterList(v.VendorStoreID)
|
||||
for _, vv := range cList {
|
||||
result, _ := api.MtwmAPI.GetInviteDetail(vv.ID, v.VendorStoreID)
|
||||
if result.Status != 2 {
|
||||
send(model.VendorIDMTWM, vv.Name, result.BriefIntroduction)
|
||||
if vv != nil {
|
||||
result, _ := api.MtwmAPI.GetInviteDetail(vv.ID, v.VendorStoreID)
|
||||
if result.Status != 2 {
|
||||
send(model.VendorIDMTWM, vv.Name, result.BriefIntroduction)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user