test
This commit is contained in:
@@ -23,7 +23,7 @@ func CreateOrder(ctx *jxcontext.Context, orderType, price int, lng, lat float64)
|
||||
db = dao.GetDB()
|
||||
order *model.Order
|
||||
)
|
||||
authBinds, err := dao.GetUserBindAuthInfo(db, ctx.GetUserID(), model.AuthBindTypeAuth, []string{"weixinapp,weixinmini"}, "", "", "")
|
||||
authBinds, err := dao.GetUserBindAuthInfo(db, ctx.GetUserID(), model.AuthBindTypeAuth, []string{"weixinapp", "weixinmini"}, "", "", "")
|
||||
if len(authBinds) == 0 {
|
||||
return "", fmt.Errorf("请绑定微信认证方式!")
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ func GetAuthBind(db *DaoDB, bindType int, authType, authID string) (authBind *mo
|
||||
}
|
||||
|
||||
func GetUserBindAuthInfo(db *DaoDB, userID string, bindType int, typeList []string, authID, authID2, typeID string) (authList []*model.AuthBind, err error) {
|
||||
var auth []*model.AuthBind
|
||||
sql := `
|
||||
SELECT *
|
||||
FROM auth_bind t1
|
||||
@@ -62,6 +61,6 @@ func GetUserBindAuthInfo(db *DaoDB, userID string, bindType int, typeList []stri
|
||||
sqlParams = append(sqlParams, typeID)
|
||||
}
|
||||
sql += " ORDER BY t1.type"
|
||||
err = GetRows(db, &auth, sql, sqlParams...)
|
||||
return auth, err
|
||||
err = GetRows(db, &authList, sql, sqlParams...)
|
||||
return authList, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user