!-- flowchart 箭头图标 勿删 --
加粗样式
public void checkAccount(HttpServletRequest request,HttpServletResponse response) throws IOException {
String account = request.getParameter("account");
Staff staff = staffService.getByAccount(account);
JSONObject jsonObject = null;
if (null != staff){
//数据库已存在该账号,则返回信息给ajax
jsonObject = new JSONObject("{accountFlag:true}");
}else {
//数据库未存在该账号
jsonObject = new JSONObject("{accountFlag:false}");
}
response.getOutputStream().write(jsonObject.toString().getBytes("utf-8"));
}
pu