Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

findCityByName查询SQL不完整 #44

Closed
ZhenliMao opened this issue Apr 9, 2018 · 0 comments
Closed

findCityByName查询SQL不完整 #44

ZhenliMao opened this issue Apr 9, 2018 · 0 comments

Comments

@ZhenliMao
Copy link

Mybatis Annotation 案例的示例代码中,使用的查询语句@Select("SELECT * FROM city ") 是获取city表的所有数据,当该表数据多余一项时,请求接口会报错。
正确的查询SQL应该是
@Select("SELECT * FROM city where city_name= #{cityName}")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants