- fix bug in GetUsers
This commit is contained in:
@@ -49,7 +49,7 @@ func GetUsers(db *DaoDB, userType int, keyword string, userIDs []string, userID2
|
|||||||
}
|
}
|
||||||
if keyword != "" {
|
if keyword != "" {
|
||||||
keywordLike := "%" + keyword + "%"
|
keywordLike := "%" + keyword + "%"
|
||||||
sql += " AND (t1.user_id2 LIKE % OR t1.mobile LIKE % OR t1.email LIKE ? OR t1.name LIKE ?)"
|
sql += " AND (t1.user_id2 LIKE ? OR t1.mobile LIKE ? OR t1.email LIKE ? OR t1.name LIKE ?)"
|
||||||
sqlParams = append(sqlParams, keywordLike, keywordLike, keywordLike, keywordLike)
|
sqlParams = append(sqlParams, keywordLike, keywordLike, keywordLike, keywordLike)
|
||||||
}
|
}
|
||||||
err = GetRows(db, &userList, sql, sqlParams...)
|
err = GetRows(db, &userList, sql, sqlParams...)
|
||||||
|
|||||||
@@ -240,10 +240,10 @@ func (c *Auth2Controller) AddAuthBind() {
|
|||||||
// @Title 删除认证方式
|
// @Title 删除认证方式
|
||||||
// @Description 删除认证方式
|
// @Description 删除认证方式
|
||||||
// @Param token header string true "认证token"
|
// @Param token header string true "认证token"
|
||||||
// @Param authType formData string true "登录类型,参见Login的描述"
|
// @Param authType query string true "登录类型,参见Login的描述"
|
||||||
// @Success 200 {object} controllers.CallResult
|
// @Success 200 {object} controllers.CallResult
|
||||||
// @Failure 200 {object} controllers.CallResult
|
// @Failure 200 {object} controllers.CallResult
|
||||||
// @router /RemoveAuthBind [post]
|
// @router /RemoveAuthBind [delete]
|
||||||
func (c *Auth2Controller) RemoveAuthBind() {
|
func (c *Auth2Controller) RemoveAuthBind() {
|
||||||
c.callRemoveAuthBind(func(params *tAuth2RemoveAuthBindParams) (retVal interface{}, errCode string, err error) {
|
c.callRemoveAuthBind(func(params *tAuth2RemoveAuthBindParams) (retVal interface{}, errCode string, err error) {
|
||||||
authInfo, err2 := params.Ctx.GetV2AuthInfo()
|
authInfo, err2 := params.Ctx.GetV2AuthInfo()
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ func (c *User2Controller) GetBindAuthInfo() {
|
|||||||
func (c *User2Controller) GetUsers() {
|
func (c *User2Controller) GetUsers() {
|
||||||
c.callGetUsers(func(params *tUser2GetUsersParams) (retVal interface{}, errCode string, err error) {
|
c.callGetUsers(func(params *tUser2GetUsersParams) (retVal interface{}, errCode string, err error) {
|
||||||
var userIDs []string
|
var userIDs []string
|
||||||
if err := jxutils.Strings2Objs(params.UserIDs, &userIDs); err == nil {
|
if err = jxutils.Strings2Objs(params.UserIDs, &userIDs); err == nil {
|
||||||
retVal, err = cms.GetUsers(params.Ctx, params.UserType, params.Keyword, userIDs, params.UserID2, params.Mobile)
|
retVal, err = cms.GetUsers(params.Ctx, params.UserType, params.Keyword, userIDs, params.UserID2, params.Mobile)
|
||||||
}
|
}
|
||||||
return retVal, "", err
|
return retVal, "", err
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ func init() {
|
|||||||
beego.ControllerComments{
|
beego.ControllerComments{
|
||||||
Method: "RemoveAuthBind",
|
Method: "RemoveAuthBind",
|
||||||
Router: `/RemoveAuthBind`,
|
Router: `/RemoveAuthBind`,
|
||||||
AllowHTTPMethods: []string{"post"},
|
AllowHTTPMethods: []string{"delete"},
|
||||||
MethodParams: param.Make(),
|
MethodParams: param.Make(),
|
||||||
Filters: nil,
|
Filters: nil,
|
||||||
Params: nil})
|
Params: nil})
|
||||||
|
|||||||
Reference in New Issue
Block a user