public\ void\ activeUser(String\ code){\n try\ {\n int\ i\ =\ dao.updateUserState(code);\n }\ catch\ (SQLException\ e)\ {\n throw\ new\ RuntimeException(e);\n }\n\n }\n /**\n * 登录\n * @param username\n * @return\n * */\n public\ boolean\ checkUsername(String\ username)\ {\n //调用dao判断是否存在\n Long\ aLong\ =\ null;\n try\ {\n aLong\ =\ dao.queryUserByUsername(username);\n }\ catch\ (SQLException\ e)\ {\n throw\ new\ RuntimeException(e);\n }\n return\ aLong\ ==\ 0l\ ?\ false\ :\ true;\n\n }


原文地址: https://www.cveoy.top/t/topic/p8RC 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录