getusers
This commit is contained in:
@@ -284,6 +284,10 @@ func GetUsers(ctx *jxcontext.Context, userType int, keyword string, userIDs []st
|
||||
return pagedInfo, err
|
||||
}
|
||||
|
||||
func GetUser(ctx *jxcontext.Context, userID string) (user *model.User, err error) {
|
||||
return user, err
|
||||
}
|
||||
|
||||
func checkUserType(userID string, userType int8) (err error) {
|
||||
userList, _, err := dao.GetUsers(dao.GetDB(), 0, "", []string{userID}, nil, nil, 0, 0)
|
||||
if err != nil {
|
||||
|
||||
@@ -67,7 +67,7 @@ func GetUsers(db *DaoDB, userType int, keyword string, userIDs, userID2s, mobile
|
||||
sqlParams := []interface{}{}
|
||||
sql := `
|
||||
SELECT SQL_CALC_FOUND_ROWS
|
||||
t1.*, t2.accept_order_count, t3.finished_order_count
|
||||
t1.*, IF(t2.accept_order_count is NULL, 0, t2.accept_order_count), IF(t3.finished_order_count is NULL, 0, t3.finished_order_count)
|
||||
FROM user t1
|
||||
LEFT JOIN (SELECT user_id, COUNT(user_id) accept_order_count FROM job_order`
|
||||
if len(userIDs) > 0 {
|
||||
@@ -110,6 +110,9 @@ func GetUsers(db *DaoDB, userType int, keyword string, userIDs, userID2s, mobile
|
||||
return userList, totalCount, err
|
||||
}
|
||||
|
||||
type GetUserResult struct {
|
||||
}
|
||||
|
||||
func DeleteUsers(db *DaoDB, userIDs []string) (num int64, err error) {
|
||||
if len(userIDs) > 0 {
|
||||
sql := `
|
||||
|
||||
Reference in New Issue
Block a user