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