1
This commit is contained in:
@@ -327,6 +327,7 @@ func QueryActs(db *DaoDB, actID int, offset, pageSize int, syncStatus int, keywo
|
||||
var idList []int
|
||||
|
||||
txDB, _ := Begin(db)
|
||||
defer Commit(db, txDB)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
Rollback(db, txDB)
|
||||
@@ -339,7 +340,6 @@ func QueryActs(db *DaoDB, actID int, offset, pageSize int, syncStatus int, keywo
|
||||
return pagedInfo, err
|
||||
}
|
||||
pagedInfo.TotalCount = GetLastTotalRowCount2(db, txDB)
|
||||
Commit(db, txDB)
|
||||
|
||||
sql = `
|
||||
SELECT
|
||||
@@ -784,6 +784,7 @@ func GetActMtwmVendorPage(db *DaoDB, storeIDs, skuIDs []int, keyword string, beg
|
||||
`
|
||||
sqlParams = append(sqlParams, pageSize, (offset-1)*pageSize)
|
||||
txDB, _ := Begin(db)
|
||||
defer Commit(db, txDB)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
Rollback(db, txDB)
|
||||
@@ -795,7 +796,6 @@ func GetActMtwmVendorPage(db *DaoDB, storeIDs, skuIDs []int, keyword string, beg
|
||||
pageInfo.TotalCount = GetLastTotalRowCount2(db, txDB)
|
||||
pageInfo.Data = acts
|
||||
}
|
||||
Commit(db, txDB)
|
||||
return pageInfo, err
|
||||
}
|
||||
|
||||
@@ -848,6 +848,7 @@ func GetActMtwmVendorSkuPage(db *DaoDB, storeID int, keyword string, actType, of
|
||||
`
|
||||
sqlParams = append(sqlParams, (offset-1)*pageSize, pageSize)
|
||||
txDB, _ := Begin(db)
|
||||
defer Commit(db, txDB)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
Rollback(db, txDB)
|
||||
@@ -858,7 +859,6 @@ func GetActMtwmVendorSkuPage(db *DaoDB, storeID int, keyword string, actType, of
|
||||
page.TotalCount = GetLastTotalRowCount2(db, txDB)
|
||||
page.Data = acts
|
||||
}
|
||||
Commit(db, txDB)
|
||||
return page, err
|
||||
}
|
||||
|
||||
@@ -903,6 +903,7 @@ func GetActEbaiVendorPage(db *DaoDB, storeIDs, skuIDs []int, keyword string, beg
|
||||
`
|
||||
sqlParams = append(sqlParams, pageSize, offset)
|
||||
txDB, _ := Begin(db)
|
||||
defer Commit(db, txDB)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
Rollback(db, txDB)
|
||||
@@ -913,7 +914,6 @@ func GetActEbaiVendorPage(db *DaoDB, storeIDs, skuIDs []int, keyword string, beg
|
||||
page.TotalCount = GetLastTotalRowCount2(db, txDB)
|
||||
page.Data = acts
|
||||
}
|
||||
Commit(db, txDB)
|
||||
return page, err
|
||||
}
|
||||
|
||||
@@ -936,6 +936,7 @@ func GetActEbaiVendorSkuPage(db *DaoDB, actID, keyword string, offset, pageSize
|
||||
`
|
||||
sqlParams = append(sqlParams, pageSize, offset)
|
||||
txDB, _ := Begin(db)
|
||||
defer Commit(db, txDB)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
Rollback(db, txDB)
|
||||
@@ -946,6 +947,5 @@ func GetActEbaiVendorSkuPage(db *DaoDB, actID, keyword string, offset, pageSize
|
||||
page.TotalCount = GetLastTotalRowCount2(db, txDB)
|
||||
page.Data = acts
|
||||
}
|
||||
Commit(db, txDB)
|
||||
return page, err
|
||||
}
|
||||
|
||||
@@ -127,6 +127,7 @@ func GetEwalletWithDraw(db *DaoDB, mercId, drawJnl string) (*model.LakalaWithdra
|
||||
func GetIncoming(storeID int, merchantNo string, offset, pageSize int) (pagedInfo *model.PagedInfo, err error) {
|
||||
db := GetDB()
|
||||
txDB, _ := Begin(db)
|
||||
defer Commit(db, txDB)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
Rollback(db, txDB)
|
||||
@@ -167,6 +168,7 @@ func GetIncoming(storeID int, merchantNo string, offset, pageSize int) (pagedInf
|
||||
func GetRecipientList(orgCode, receiverNo, receiverName string, offset, pageSize int) (pagedInfo *model.PagedInfo, err error) {
|
||||
db := GetDB()
|
||||
txDB, _ := Begin(db)
|
||||
defer Commit(db, txDB)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
Rollback(db, txDB)
|
||||
@@ -230,6 +232,7 @@ func GetSeparateAmtByOrderID(vendorOrderID string, cmdType string, logNo string)
|
||||
func GetSeparateAmt(merchantNo, cmdType, status, separateNo, vendorOrderID string, storeId int, separateTimeStart, separateTimeEnd time.Time, offset, pageSize int) (pagedInfo *model.PagedInfo, err error) {
|
||||
db := GetDB()
|
||||
txDB, _ := Begin(db)
|
||||
defer Commit(db, txDB)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
Rollback(db, txDB)
|
||||
@@ -293,6 +296,7 @@ func GetSeparateAmt(merchantNo, cmdType, status, separateNo, vendorOrderID strin
|
||||
func WithdrawalList(merchantNo, drawJnl, acctName string, startTime, endTime time.Time, pageSize, offset int) (pagedInfo *model.PagedInfo, err error) {
|
||||
db := GetDB()
|
||||
txDB, _ := Begin(db)
|
||||
defer Commit(db, txDB)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
Rollback(db, txDB)
|
||||
@@ -346,6 +350,7 @@ func WithdrawalList(merchantNo, drawJnl, acctName string, startTime, endTime tim
|
||||
func QueryApplyContractList(orderNo string, storeID, pageSize, offset int) (pagedInfo *model.PagedInfo, err error) {
|
||||
db := GetDB()
|
||||
txDB, _ := Begin(db)
|
||||
defer Commit(db, txDB)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
Rollback(db, txDB)
|
||||
|
||||
Reference in New Issue
Block a user