调整依赖结构,jxutils不依赖于dao,dao依赖于jxutils

This commit is contained in:
gazebo
2019-11-29 08:43:36 +08:00
parent 211ff82517
commit 3756ac67b2
10 changed files with 104 additions and 111 deletions

View File

@@ -5,6 +5,7 @@ import (
"time"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/business/jxutils"
"git.rosy.net.cn/jx-callback/business/model"
)
@@ -38,8 +39,8 @@ func GetUserByID(db *DaoDB, fieldName, fieldValue string) (user *model.User, err
}
func GetUsers(db *DaoDB, userType int, keyword string, userIDs []string, userID2, mobile string, offset, pageSize int) (userList []*model.User, totalCount int, err error) {
offset = FormalizePageOffset(offset)
pageSize = FormalizePageSize(pageSize)
offset = jxutils.FormalizePageOffset(offset)
pageSize = jxutils.FormalizePageSize(pageSize)
if userType == 0 {
userType = 255
}
@@ -182,8 +183,8 @@ func QueryUserDeliveryAddress(db *DaoDB, addressID int64, userIDs []string, offs
sql += " AND t1.user_id IN (" + GenQuestionMarks(len(userIDs)) + ")"
sqlParams = append(sqlParams, userIDs)
}
offset = FormalizePageOffset(offset)
pageSize = FormalizePageSize(pageSize)
offset = jxutils.FormalizePageOffset(offset)
pageSize = jxutils.FormalizePageSize(pageSize)
sql += `
ORDER BY t1.is_default DESC, t1.consignee_name
LIMIT ? OFFSET ?`