dd
This commit is contained in:
@@ -33,7 +33,6 @@ func GetUserBindAuthInfo(db *DaoDB, userID string, bindType int, typeList []stri
|
||||
SELECT *
|
||||
FROM auth_bind t1
|
||||
WHERE t1.deleted_at = ? AND t1.status = ?`
|
||||
globals.SugarLogger.Debug("输出一下传入的utils.DefaultTimeValue,model.UserStatusNormal", utils.DefaultTimeValue, model.UserStatusNormal)
|
||||
sqlParams := []interface{}{
|
||||
utils.DefaultTimeValue,
|
||||
model.UserStatusNormal,
|
||||
@@ -42,7 +41,6 @@ func GetUserBindAuthInfo(db *DaoDB, userID string, bindType int, typeList []stri
|
||||
sql += " AND t1.user_id = ?"
|
||||
sqlParams = append(sqlParams, userID)
|
||||
}
|
||||
globals.SugarLogger.Debug("输出一下传入的bindType", bindType)
|
||||
if bindType != model.AuthBindTypeAll {
|
||||
sql += " AND t1.bind_type = ?"
|
||||
sqlParams = append(sqlParams, bindType)
|
||||
@@ -52,7 +50,6 @@ func GetUserBindAuthInfo(db *DaoDB, userID string, bindType int, typeList []stri
|
||||
// sql += " AND t1.type IN (" + GenQuestionMarks(len(typeList)) + ")"
|
||||
// sqlParams = append(sqlParams, typeList)
|
||||
//}
|
||||
globals.SugarLogger.Debug("输出一下传入的authID,authID2", authID, authID2)
|
||||
if authID != "" || authID2 != "" {
|
||||
sql += " AND ( t1.auth_id = ? OR t1.auth_id2 = ? )"
|
||||
sqlParams = append(sqlParams, authID, authID2)
|
||||
@@ -65,15 +62,16 @@ func GetUserBindAuthInfo(db *DaoDB, userID string, bindType int, typeList []stri
|
||||
// sql += " AND t1.auth_id2 = ?"
|
||||
// sqlParams = append(sqlParams, authID2)
|
||||
//}
|
||||
globals.SugarLogger.Debug("输出一下传入的GenQuestionMarks(len(typeIDs))", GenQuestionMarks(len(typeIDs)))
|
||||
if len(typeIDs) > 0 {
|
||||
globals.SugarLogger.Debug("我进来了typeID")
|
||||
sql += " AND t1.type_id IN (" + GenQuestionMarks(len(typeIDs)) + ")"
|
||||
sqlParams = append(sqlParams, typeIDs)
|
||||
}
|
||||
sql += " ORDER BY t1.type"
|
||||
err = GetRows(db, &authList, sql, sqlParams...)
|
||||
globals.SugarLogger.Debug("输出一下sql", sql)
|
||||
err = GetRows(db, &authList, sql, sqlParams)
|
||||
globals.SugarLogger.Debug("authList==================", authList)
|
||||
globals.SugarLogger.Debug("param==================", sqlParams)
|
||||
globals.SugarLogger.Debug("err==================", err)
|
||||
globals.SugarLogger.Debug("err==================", err)
|
||||
return authList, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user