This commit is contained in:
苏尹岚
2020-11-20 15:57:33 +08:00
parent 9e65eded68
commit 487c34e6a9
2 changed files with 3 additions and 4 deletions

View File

@@ -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("请绑定微信认证方式!")
} }

View File

@@ -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
} }