删除日志

This commit is contained in:
邹宗楠
2022-10-24 11:22:38 +08:00
parent 5a47102894
commit 5d6a5a3226
139 changed files with 17 additions and 787 deletions

View File

@@ -211,7 +211,6 @@ func ActStoreSkuParam2Model(ctx *jxcontext.Context, db *dao.DaoDB, act *model.Ac
if act.Type != model.ActSkuFake {
effectActStoreSkuList, err := dao.GetEffectiveActStoreSkuInfo(db, 0, vendorIDs, act.Type, storeIDs, skuIDs, act.BeginAt, act.EndAt)
if err != nil {
globals.SugarLogger.Errorf("GetEffectiveActStoreSkuInfo can not get sku promotion info for error:%v", err)
return nil, nil, nil, nil, err
}
if len(effectActStoreSkuList) > 0 {
@@ -805,9 +804,6 @@ func vendorActInfo2Model(ctx *jxcontext.Context, db *dao.DaoDB, act2 *model.Act2
vendorStoreIDMap[v.VendorStoreID] = 1
vendorSkuIDMap[v.VendorSkuID] = 1
}
// globals.SugarLogger.Debug(utils.Format4Output(vendorStoreIDMap, false))
// globals.SugarLogger.Debug(utils.Format4Output(vendorSkuIDMap, false))
vendorID := act2.VendorID
storeSkuList, err2 := dao.GetStoresSkusInfoByVendorInfo(db, vendorID, jxutils.StringMap2List(vendorStoreIDMap), jxutils.StringMap2List(vendorSkuIDMap))
if err = err2; err != nil {
@@ -855,7 +851,6 @@ func vendorActInfo2Model(ctx *jxcontext.Context, db *dao.DaoDB, act2 *model.Act2
}
func (a *ActManager) CreateActFromVendor(ctx *jxcontext.Context, act2 *model.Act2, actStoreSku []*model.ActStoreSku2) (actID int, err error) {
globals.SugarLogger.Debugf("CreateActFromVendor vendorID:%d, vendorActID:%s", act2.VendorID, act2.VendorActID)
db := dao.GetDB()
return createActFromVendor(ctx, db, act2, actStoreSku)
}
@@ -1185,25 +1180,15 @@ func RefreshPageActs(ctx *jxcontext.Context, vendorIDs []int, createdFrom time.T
if handler, _ := partner.GetPurchasePlatformFromVendorID(vendorID).(partner.IPurchasePlatformPageActHandler); handler != nil {
db := dao.GetDB()
actList, err2 := handler.GetPageActList(ctx, createdFrom)
globals.SugarLogger.Debug(utils.Format4Output(actList, false))
if err = err2; err != nil {
return nil, err
}
// actInfo, err2 := dao.QueryActs(db, 0, 0, -1, -1, "", vendorID, nil, []int{model.ActCreateTypeSpider},
// nil, 0, nil, 0, utils.DefaultTimeValue, utils.DefaultTimeValue, createdFrom, utils.DefaultTimeValue)
vendorActIDs, err2 := dao.GetExistVendorActIDs(db, vendorID)
if err = err2; err != nil {
return nil, err
}
localActMap := jxutils.StringList2Map(vendorActIDs)
// localActMap := make(map[string]*dao.ActVendorInfo)
// for _, v := range vendorActIDs {
// if v.VendorList[0].VendorActID != "" {
// localActMap[v.VendorList[0].VendorActID] = v
// }
// }
var needAddActList []*model.Act2
// var needUpdateActList []*model.Act
for _, v := range actList {
localAct := localActMap[v.VendorActID]
if localAct == 0 {
@@ -1351,7 +1336,6 @@ func DeleteSkusFromAct(ctx *jxcontext.Context, vendorID int, actTypes, skuIDs []
}
}
if len(deleteList) > 0 {
// globals.SugarLogger.Debug(utils.Format4Output(deleteList, false))
originSyncStatus, err2 := DeleteActStoreSkuBind(ctx, db, actID, deleteList)
if err = err2; err == nil && originSyncStatus == 0 {
if _, err = SyncAct(ctx, task, actID, nil, false); err == nil {
@@ -1715,7 +1699,6 @@ func ChangeJxPriceByDiscountAct(ctx *jxcontext.Context) {
db = dao.GetDB()
pageSize = 9999
)
globals.SugarLogger.Debug("ChangeJxPriceByDiscountAct begin:")
page, err := dao.QueryActs(db, 0, 0, pageSize, -1, "", model.VendorIDJX, []int{model.YES}, []int{model.ActSkuDiscount}, nil, 0, nil, 0, utils.ZeroTimeValue, utils.ZeroTimeValue, time.Now().AddDate(0, -3, 0), time.Now())
if err != nil {
return