1
This commit is contained in:
@@ -706,8 +706,9 @@ func GetActEbaiVendorSkus(db *DaoDB, storeIDs, skuIDs []int) (actEbaiVendorSku [
|
|||||||
func GetActMtwmVendorPage(db *DaoDB, storeIDs, skuIDs []int, keyword string, beginAt, endAt time.Time, actType, offset, pageSize int) (page *model.PagedInfo, err error) {
|
func GetActMtwmVendorPage(db *DaoDB, storeIDs, skuIDs []int, keyword string, beginAt, endAt time.Time, actType, offset, pageSize int) (page *model.PagedInfo, err error) {
|
||||||
var (
|
var (
|
||||||
acts []*model.ActMtwmVendor
|
acts []*model.ActMtwmVendor
|
||||||
pageInfo *model.PagedInfo
|
|
||||||
)
|
)
|
||||||
|
pageInfo := &model.PagedInfo{}
|
||||||
|
|
||||||
sql := `
|
sql := `
|
||||||
SELECT SQL_CALC_FOUND_ROWS b.name store_name ,a.*
|
SELECT SQL_CALC_FOUND_ROWS b.name store_name ,a.*
|
||||||
FROM act_mtwm_vendor a
|
FROM act_mtwm_vendor a
|
||||||
@@ -753,10 +754,7 @@ func GetActMtwmVendorPage(db *DaoDB, storeIDs, skuIDs []int, keyword string, beg
|
|||||||
}()
|
}()
|
||||||
|
|
||||||
if err = GetRowsTx(txDB, &acts, sql, sqlParams...); err == nil && len(acts) != 0 {
|
if err = GetRowsTx(txDB, &acts, sql, sqlParams...); err == nil && len(acts) != 0 {
|
||||||
globals.SugarLogger.Debugf("len := %d", len(acts))
|
pageInfo.TotalCount = GetLastTotalRowCount2(db, txDB)
|
||||||
aa := GetLastTotalRowCount2(db, txDB)
|
|
||||||
globals.SugarLogger.Debugf("aa := %d", aa)
|
|
||||||
pageInfo.TotalCount = aa
|
|
||||||
pageInfo.Data = acts
|
pageInfo.Data = acts
|
||||||
}
|
}
|
||||||
Commit(db, txDB)
|
Commit(db, txDB)
|
||||||
|
|||||||
Reference in New Issue
Block a user