* @throws IOException
*/
@RequestMapping
String manageradd(HttpServletRequest request, HttpServletResponse response)
throws IOException {
User user = (User) request.getSession().getAttribute("userLogin");
if (null == user || User.CUSTOMER == user.getType()) {
return "login";
}
String username = request.getParameter("username");
String telephone = request.getParameter("telephone");
if (null == username || null == telephone) {
return "manageradd";
}
User user1 = new User();
user1.setUsername(username);
user1.setTelephone(telephone);
if (!userService.isExist(username)) {
request.setAttribute("errMsg", "该用户不存在!");
return "manageradd";
}
userService.createOrder(user1);