基于javaweb+mysql的ssm演唱会售票管理系统(java+ssm+jsp+javascript+jquery+mysql)
运行环境
Java≥8、MySQL≥5.7、Tomcat≥8
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
基于javaweb+mysql的SSM演唱会售票管理系统(java+ssm+jsp+javascript+jquery+mysql)
项目介绍
本项目分为前后台,前台为普通用户登录,后台为管理员登录; 管理员角色包含以下功能: 管理员登录,管理员信息管理,网站用户信息管理,新闻公告信息管理,演唱会类型信息管理,城市信息管理,剧场信息管理,演唱会信息管理,订单信息管理等功能。
用户角色包含以下功能: 用户登录,按分类查看,查看演唱会详情,加入购物车,提交订单,查看我的订单,修改个人信息,提交评论,演唱会评价信息管理等功能。
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可 4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 5.数据库:MySql 5.7版本; 6.是否Maven项目:否;
技术栈
- 后端:Spring+SpringMVC+Mybatis 2. 前端:JSP+CSS+JavaScript+jQuery
使用说明
- 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中springmvc-servlet.xml配置文件中的数据库配置改为自己的配置; 4. 运行项目,在浏览器中输入http://localhost:8080/ 登录 用户账号/密码: user/123456 管理员账号/密码:admin/admin
buffer.append("尾页");
} else {
buffer.append("<a href=\"index/hot.action?number=" + (maxPage - 1) + "\">尾页</a>");
}
html = buffer.toString();
this.getRequest().setAttribute("html", html);
this.getRequest().setAttribute("flimList", flimList);
return "users/list";
}
// 全部产品
@RequestMapping("all.action")
public String all(String number) {
this.front();
List<Jiancai> flimList = new ArrayList<Jiancai>();
List<Jiancai> tempList = this.jiancaiService.getAllJiancai();
int pageNumber = tempList.size();
int maxPage = pageNumber;
if (maxPage % 12 == 0) {
maxPage = maxPage / 12;
} else {
maxPage = maxPage / 12 + 1;
}
if (number == null) {
number = "0";
}
int start = Integer.parseInt(number) * 12;
int over = (Integer.parseInt(number) + 1) * 12;
int count = pageNumber - over;
if (count <= 0) {
over = pageNumber;
}
for (int i = start; i < over; i++) {
Jiancai x = tempList.get(i);
flimList.add(x);
}
String html = "";
StringBuffer buffer = new StringBuffer();
buffer.append(" 共为");
buffer.append(maxPage);
buffer.append("页 共有");
buffer.append(pageNumber);
buffer.append("条 当前为第");
buffer.append((Integer.parseInt(number) + 1));
buffer.append("页 ");
if ((Integer.parseInt(number) + 1) == 1) {
buffer.append("首页");
} else {
buffer.append("<a href=\"index/all.action?number=0\">首页</a>");
}
buffer.append(" ");
if ((Integer.parseInt(number) + 1) == 1) {
buffer.append("上一页");
} else {
}
//定义为控制器
@Controller
// 设置路径
@RequestMapping(value = "/admin", produces = "text/plain;charset=utf-8")
public class AdminAction extends BaseAction {
// 注入Service 由于标签的存在 所以不需要getter setter
@Autowired
@Resource
private AdminService adminService;
// 管理员登录 1 验证用户名是否存在 2 验证密码是否正确
@RequestMapping("login.action")
public String login() {
String username = this.getRequest().getParameter("username");
String password = this.getRequest().getParameter("password");
Admin adminEntity = new Admin();
adminEntity.setUsername(username);
List<Admin> adminlist = this.adminService.getAdminByCond(adminEntity);
if (adminlist.size() == 0) {
this.getRequest().setAttribute("message", "用户名不存在");
return "admin/index";
} else {
Admin admin = adminlist.get(0);
if (password.equals(admin.getPassword())) {
this.getSession().setAttribute("adminid", admin.getAdminid());
this.getSession().setAttribute("adminname", admin.getUsername());
this.getSession().setAttribute("realname", admin.getRealname());
} else {
this.getRequest().setAttribute("message", "密码错误");
return "admin/index";
}
@RequestMapping("network.action")
public String network() {
this.front();
List<Cate> cateList = this.cateService.getCateFront();
List<Cate> frontList = new ArrayList<Cate>();
for (Cate cate : cateList) {
List<Jiancai> flimList = this.jiancaiService.getJiancaiByCate(cate.getCateid());
cate.setFlimList(flimList);
frontList.add(cate);
}
this.getRequest().setAttribute("frontList", frontList);
return "users/network";
}
// 公告
@RequestMapping("article.action")
public String article(String number) {
this.front();
List<Article> articleList = new ArrayList<Article>();
List<Article> tempList = this.articleService.getAllArticle();
int pageNumber = tempList.size();
int maxPage = pageNumber;
if (maxPage % 12 == 0) {
maxPage = maxPage / 12;
} else {
maxPage = maxPage / 12 + 1;
}
if (number == null) {
number = "0";
}
int start = Integer.parseInt(number) * 12;
int over = (Integer.parseInt(number) + 1) * 12;
int count = pageNumber - over;
if (count <= 0) {
over = pageNumber;
}
for (int i = start; i < over; i++) {
Article x = tempList.get(i);
articleList.add(x);
}
String html = "";
StringBuffer buffer = new StringBuffer();
buffer.append(" 共为");
buffer.append(maxPage);
buffer.append("页 共有");
buffer.append(pageNumber);
buffer.append("条 当前为第");
buffer.append((Integer.parseInt(number) + 1));
buffer.append("页 ");
if ((Integer.parseInt(number) + 1) == 1) {
buffer.append("首页");
} else {
buffer.append("<a href=\"index/article.action?number=0\">首页</a>");
public String getAllCate(String number) {
List<Cate> cateList = this.cateService.getAllCate();
PageHelper.getPage(cateList, "cate", null, null, 10, number, this.getRequest(), null);
return "admin/listcate";
}
// 按条件查询数据 (模糊查询)
@RequestMapping("queryCateByCond.action")
public String queryCateByCond(String cond, String name, String number) {
Cate cate = new Cate();
if (cond != null) {
if ("catename".equals(cond)) {
cate.setCatename(name);
}
if ("memo".equals(cond)) {
cate.setMemo(name);
}
if ("addtime".equals(cond)) {
cate.setAddtime(name);
}
}
List<String> nameList = new ArrayList<String>();
List<String> valueList = new ArrayList<String>();
nameList.add(cond);
valueList.add(name);
PageHelper.getPage(this.cateService.getCateByLike(cate), "cate", nameList, valueList, 10, number, this.getRequest(), "query");
name = null;
cond = null;
return "admin/querycate";
}
// 按主键查询数据
@RequestMapping("getCateById.action")
public String getCateById(String id) {
Cate cate = this.cateService.getCateById(id);
this.getRequest().setAttribute("cate", cate);
return "admin/editcate";
}
public CateService getCateService() {
@Controller
@RequestMapping("/upload")
public class UploadAction {
@RequestMapping(value = "/image.action")
public String upload(@RequestParam(value = "image", required = false) MultipartFile file,
HttpServletRequest request, ModelMap model) {
String path = request.getSession().getServletContext().getRealPath("/") + "upfiles/";
String fileName = file.getOriginalFilename();
int i = fileName.lastIndexOf(".");
String name = String.valueOf(VeDate.getStringDatex());
String type = fileName.substring(i + 1);
fileName = name + "." + type;
File targetFile = new File(path, fileName);
if (!targetFile.exists()) {
targetFile.mkdirs();
}
// 保存
try {
file.transferTo(targetFile);
} catch (Exception e) {
e.printStackTrace();
}
model.addAttribute("imageFileName", fileName);
return "saveimage";
}
@RequestMapping(value = "/files.action")
public String files(@RequestParam(value = "image", required = false) MultipartFile file, HttpServletRequest request,
if ("username".equals(cond)) {
admin.setUsername(name);
}
if ("password".equals(cond)) {
admin.setPassword(name);
}
if ("realname".equals(cond)) {
admin.setRealname(name);
}
if ("contact".equals(cond)) {
admin.setContact(name);
}
if ("addtime".equals(cond)) {
admin.setAddtime(name);
}
}
List<String> nameList = new ArrayList<String>();
List<String> valueList = new ArrayList<String>();
nameList.add(cond);
valueList.add(name);
PageHelper.getPage(this.adminService.getAdminByLike(admin), "admin", nameList, valueList, 10, number, this.getRequest(), "query");
name = null;
cond = null;
return "admin/queryadmin";
}
// 按主键查询数据
@RequestMapping("getAdminById.action")
public String getAdminById(String id) {
Admin admin = this.adminService.getAdminById(id);
this.getRequest().setAttribute("admin", admin);
return "admin/editadmin";
}
public AdminService getAdminService() {
return adminService;
}
public void setAdminService(AdminService adminService) {
this.adminService = adminService;
}
buffer.append((Integer.parseInt(number) + 1));
buffer.append("页 ");
if ((Integer.parseInt(number) + 1) == 1) {
buffer.append("首页");
} else {
buffer.append("<a href=\"index/article.action?number=0\">首页</a>");
}
buffer.append(" ");
if ((Integer.parseInt(number) + 1) == 1) {
buffer.append("上一页");
} else {
buffer.append("<a href=\"index/article.action?number=" + (Integer.parseInt(number) - 1) + "\">上一页</a>");
}
buffer.append(" ");
if (maxPage <= (Integer.parseInt(number) + 1)) {
buffer.append("下一页");
} else {
buffer.append("<a href=\"index/article.action?number=" + (Integer.parseInt(number) + 1) + "\">下一页</a>");
}
buffer.append(" ");
if (maxPage <= (Integer.parseInt(number) + 1)) {
buffer.append("尾页");
} else {
buffer.append("<a href=\"index/article.action?number=" + (maxPage - 1) + "\">尾页</a>");
}
html = buffer.toString();
this.getRequest().setAttribute("html", html);
this.getRequest().setAttribute("articleList", articleList);
return "users/article";
}
// 阅读公告
@RequestMapping("read.action")
public String read(String id) {
this.front();
Article article = this.articleService.getArticleById(id);
article.setHits("" + (Integer.parseInt(article.getHits()) + 1));
this.articleService.updateArticle(article);
this.getRequest().setAttribute("article", article);
return "users/read";
}
// 准备登录
@RequestMapping("preLogin.action")
public String prelogin() {
this.front();
return "users/login";
}
// 用户登录
@RequestMapping("login.action")
public String login() {
this.front();
if (number == null) {
number = "0";
}
int start = Integer.parseInt(number) * 12;
int over = (Integer.parseInt(number) + 1) * 12;
int count = pageNumber - over;
if (count <= 0) {
over = pageNumber;
}
for (int i = start; i < over; i++) {
Jiancai x = tempList.get(i);
flimList.add(x);
}
String html = "";
StringBuffer buffer = new StringBuffer();
buffer.append(" 共为");
buffer.append(maxPage);
buffer.append("页 共有");
buffer.append(pageNumber);
buffer.append("条 当前为第");
buffer.append((Integer.parseInt(number) + 1));
buffer.append("页 ");
if ((Integer.parseInt(number) + 1) == 1) {
buffer.append("首页");
} else {
buffer.append("<a href=\"index/recommend.action?number=0\">首页</a>");
}
buffer.append(" ");
if ((Integer.parseInt(number) + 1) == 1) {
buffer.append("上一页");
} else {
buffer.append("<a href=\"index/recommend.action?number=" + (Integer.parseInt(number) - 1) + "\">上一页</a>");
}
buffer.append(" ");
if (maxPage <= (Integer.parseInt(number) + 1)) {
buffer.append("下一页");
} else {
buffer.append("<a href=\"index/recommend.action?number=" + (Integer.parseInt(number) + 1) + "\">下一页</a>");
}
buffer.append(" ");
if (maxPage <= (Integer.parseInt(number) + 1)) {
buffer.append("尾页");
} else {
buffer.append("<a href=\"index/recommend.action?number=" + (maxPage - 1) + "\">尾页</a>");
}
html = buffer.toString();
this.getRequest().setAttribute("html", html);
this.getSession().setAttribute("adminid", admin.getAdminid());
this.getSession().setAttribute("adminname", admin.getUsername());
this.getSession().setAttribute("realname", admin.getRealname());
} else {
this.getRequest().setAttribute("message", "密码错误");
return "admin/index";
}
}
return "admin/main";
}
// 修改密码
@RequestMapping("editpwd.action")
public String editpwd() {
String adminid = (String) this.getSession().getAttribute("adminid");
String password = this.getRequest().getParameter("password");
String repassword = this.getRequest().getParameter("repassword");
Admin admin = this.adminService.getAdminById(adminid);
if (password.equals(admin.getPassword())) {
admin.setPassword(repassword);
this.adminService.updateAdmin(admin);
} else {
this.getRequest().setAttribute("message", "旧密码错误");
}
return "admin/editpwd";
}
// 管理员退出登录
@RequestMapping("exit.action")
public String exit() {
this.getSession().removeAttribute("adminid");
this.getSession().removeAttribute("adminname");
this.getSession().removeAttribute("realname");
return "admin/index";
}
// 准备添加数据
@RequestMapping("createAdmin.action")
public String createAdmin() {
return "admin/addadmin";
}
// 添加数据
@RequestMapping("addAdmin.action")
public String addAdmin(Admin admin) {
admin.setAddtime(VeDate.getStringDateShort());
this.adminService.insertAdmin(admin);
return "redirect:/admin/createAdmin.action";
}
// 通过主键删除数据
@RequestMapping("deleteAdmin.action")
public String deleteAdmin(String id) {
@RequestMapping("article.action")
public String article(String number) {
this.front();
List<Article> articleList = new ArrayList<Article>();
List<Article> tempList = this.articleService.getAllArticle();
int pageNumber = tempList.size();
int maxPage = pageNumber;
if (maxPage % 12 == 0) {
maxPage = maxPage / 12;
} else {
maxPage = maxPage / 12 + 1;
}
if (number == null) {
number = "0";
}
int start = Integer.parseInt(number) * 12;
int over = (Integer.parseInt(number) + 1) * 12;
int count = pageNumber - over;
if (count <= 0) {
over = pageNumber;
}
for (int i = start; i < over; i++) {
Article x = tempList.get(i);
articleList.add(x);
}
String html = "";
StringBuffer buffer = new StringBuffer();
buffer.append(" 共为");
buffer.append(maxPage);
buffer.append("页 共有");
buffer.append(pageNumber);
buffer.append("条 当前为第");
buffer.append((Integer.parseInt(number) + 1));
buffer.append("页 ");
if ((Integer.parseInt(number) + 1) == 1) {
buffer.append("首页");
} else {
buffer.append("<a href=\"index/article.action?number=0\">首页</a>");
}
buffer.append(" ");
if ((Integer.parseInt(number) + 1) == 1) {
buffer.append("上一页");
} else {
buffer.append("<a href=\"index/article.action?number=" + (Integer.parseInt(number) - 1) + "\">上一页</a>");
}
buffer.append(" ");
if (maxPage <= (Integer.parseInt(number) + 1)) {
// 演唱会详情
@RequestMapping("detail.action")
public String detail(String id) {
this.front();
Jiancai goods = this.jiancaiService.getJiancaiById(id);
goods.setHits("" + (Integer.parseInt(goods.getHits()) + 1));
this.jiancaiService.updateJiancai(goods);
this.getRequest().setAttribute("goods", goods);
if (this.getSession().getAttribute("userid") == null) {
return "redirect:/index/preLogin.action";
}
String userid = (String) this.getSession().getAttribute("userid");
Topic topic = new Topic();
topic.setJiancaiid(id);
List<Topic> topicList = this.topicService.getTopicByCond(topic);
this.getRequest().setAttribute("topicList", topicList);
this.getRequest().setAttribute("tnum", topicList.size());
return "users/detail";
}
@RequestMapping("addTopic.action")
public String addTopic(Topic topic) {
this.front();
if (this.getSession().getAttribute("userid") == null) {
return "redirect:/index/preLogin.action";
}
String userid = (String) this.getSession().getAttribute("userid");
topic.setAddtime(VeDate.getStringDateShort());
topic.setContents(this.getRequest().getParameter("contents"));
topic.setJiancaiid(this.getRequest().getParameter("goodsid"));
topic.setNum(this.getRequest().getParameter("num"));
topic.setUsersid(userid);
this.topicService.insertTopic(topic);
return "redirect:/index/detail.action?id=" + topic.getJiancaiid();
}
}
if(cond != null){
if ("username".equals(cond)) {
topic.setUsername(name);
}
if ("jiancainame".equals(cond)) {
topic.setJiancainame(name);
}
if ("num".equals(cond)) {
topic.setNum(name);
}
if ("contents".equals(cond)) {
topic.setContents(name);
}
if ("addtime".equals(cond)) {
topic.setAddtime(name);
}
}
List<String> nameList = new ArrayList<String>();
List<String> valueList = new ArrayList<String>();
nameList.add(cond);
valueList.add(name);
PageHelper.getPage(this.topicService.getTopicByLike(topic), "topic", nameList, valueList, 10, number, this.getRequest(), "query");
name = null;
cond = null;
return "admin/querytopic";
}
// 按主键查询数据
@RequestMapping("getTopicById.action")
public String getTopicById(String id ) {
Topic topic = this.topicService.getTopicById(id);
this.getRequest().setAttribute("topic", topic);
List<Users> usersList = this.usersService.getAllUsers();
this.getRequest().setAttribute("usersList", usersList);
List<Jiancai> jiancaiList = this.jiancaiService.getAllJiancai();
this.getRequest().setAttribute("jiancaiList", jiancaiList);
return "admin/edittopic";
}
// 保存
try {
file.transferTo(targetFile);
} catch (Exception e) {
e.printStackTrace();
}
model.addAttribute("imageFileName", fileName);
return "saveimage";
}
@RequestMapping(value = "/files.action")
public String files(@RequestParam(value = "image", required = false) MultipartFile file, HttpServletRequest request,
ModelMap model) {
String path = request.getSession().getServletContext().getRealPath("/") + "upfiles/";
String fileName = file.getOriginalFilename();
int i = fileName.lastIndexOf(".");
String name = String.valueOf(VeDate.getStringDatex());
String type = fileName.substring(i + 1);
fileName = name + "." + type;
File targetFile = new File(path, fileName);
if (!targetFile.exists()) {
targetFile.mkdirs();
}
// 保存
try {
file.transferTo(targetFile);
} catch (Exception e) {
e.printStackTrace();
}
model.addAttribute("imageFileName", fileName);
return "savefile";
}
}
this.getRequest().setAttribute("cityList", cityList);
List<Peihuo> peihuoList = this.peihuoService.getAllPeihuo();
this.getRequest().setAttribute("peihuoList", peihuoList);
return "admin/adddetails";
}
// 添加数据
@RequestMapping("addDetails.action")
public String addDetails(Details details) {
this.detailsService.insertDetails(details);
return "redirect:/details/createDetails.action";
}
// 通过主键删除数据
@RequestMapping("deleteDetails.action")
public String deleteDetails(String id) {
this.detailsService.deleteDetails(id);
return "redirect:/details/getAllDetails.action";
}
// 批量删除数据
@RequestMapping("deleteDetailsByIds.action")
public String deleteDetailsByIds() {
String[] ids = this.getRequest().getParameterValues("detailsid");
for (String detailsid : ids) {
this.detailsService.deleteDetails(detailsid);
}
return "redirect:/details/getAllDetails.action";
}
// 更新数据
@RequestMapping("updateDetails.action")
public String updateDetails(Details details) {
this.detailsService.updateDetails(details);
return "redirect:/details/getAllDetails.action";
}
// 显示全部数据
@RequestMapping("getAllDetails.action")
public String getAllDetails(String number) {
// 准备修改密码
@RequestMapping("prePwd.action")
public String prePwd() {
this.front();
if (this.getSession().getAttribute("userid") == null) {
return "redirect:/index/preLogin.action";
}
return "users/editpwd";
}
// 修改密码
@RequestMapping("editpwd.action")
public String editpwd() {
this.front();
if (this.getSession().getAttribute("userid") == null) {
return "redirect:/index/preLogin.action";
}
String userid = (String) this.getSession().getAttribute("userid");
String password = this.getRequest().getParameter("password");
String repassword = this.getRequest().getParameter("repassword");
Users users = this.usersService.getUsersById(userid);
if (password.equals(users.getPassword())) {
users.setPassword(repassword);
this.usersService.updateUsers(users);
} else {
this.getSession().setAttribute("message", "旧密码错误");
return "redirect:/index/prePwd.action";
}
return "redirect:/index/prePwd.action";
}
@RequestMapping("usercenter.action")
public String usercenter() {
this.front();
if (this.getSession().getAttribute("userid") == null) {
return "redirect:/index/preLogin.action";
}
return "users/usercenter";
}
@RequestMapping("userinfo.action")
public String userinfo() {
this.front();
if (this.getSession().getAttribute("userid") == null) {
return "redirect:/index/preLogin.action";
}
String userid = (String) this.getSession().getAttribute("userid");
this.getSession().setAttribute("users", this.usersService.getUsersById(userid));
return "users/userinfo";
}
@RequestMapping("personal.action")
public String personal(Users users) {
if ("cityname".equals(cond)) {
city.setCityname(name);
}
}
List<String> nameList = new ArrayList<String>();
List<String> valueList = new ArrayList<String>();
nameList.add(cond);
valueList.add(name);
PageHelper.getPage(this.cityService.getCityByLike(city), "city", nameList, valueList, 10, number, this.getRequest(), "query");
name = null;
cond = null;
return "admin/querycity";
}
// 按主键查询数据
@RequestMapping("getCityById.action")
public String getCityById(String id) {
City city = this.cityService.getCityById(id);
this.getRequest().setAttribute("city", city);
return "admin/editcity";
}
public CityService getCityService() {
return cityService;
}
public void setCityService(CityService cityService) {
this.cityService = cityService;
}
}
public class PageHelper {
public static void getPage(List<?> list, String name, List<String> nameList, List<String> valueList, int pageSize, String number,
HttpServletRequest request, String method) {
StringBuffer buffer = new StringBuffer();
String name2 = name.substring(0, 1).toUpperCase() + name.substring(1);
String path = "";
// 公共方法 提供公共查询数据
private void front() {
this.getRequest().setAttribute("title", "优品演唱会网-力作中国最大的演唱会网站");
List<Cate> cateList = this.cateService.getAllCate();
this.getRequest().setAttribute("cateList", cateList);
List<Jiancai> hotList = this.jiancaiService.getJiancaiByHot();
Collections.shuffle(hotList);
this.getRequest().setAttribute("hotList", hotList);
}
// 首页显示
@RequestMapping("index.action")
public String index() {
this.front();
List<Cate> cateList = this.cateService.getCateFront();
List<Cate> frontList = new ArrayList<Cate>();
for (Cate cate : cateList) {
List<Jiancai> flimList = this.jiancaiService.getJiancaiByCate(cate.getCateid());
cate.setFlimList(flimList);
frontList.add(cate);
}
this.getRequest().setAttribute("frontList", frontList);
return "users/index";
}
// 首页显示
@RequestMapping("network.action")
public String network() {
this.front();
List<Cate> cateList = this.cateService.getCateFront();
List<Cate> frontList = new ArrayList<Cate>();
for (Cate cate : cateList) {
List<Jiancai> flimList = this.jiancaiService.getJiancaiByCate(cate.getCateid());
cate.setFlimList(flimList);
frontList.add(cate);
}
this.getRequest().setAttribute("frontList", frontList);
return "users/network";
}
// 公告
@RequestMapping("article.action")
if (number == null) {
number = "0";
}
int start = Integer.parseInt(number) * 12;
int over = (Integer.parseInt(number) + 1) * 12;
int count = pageNumber - over;
if (count <= 0) {
over = pageNumber;
}
for (int i = start; i < over; i++) {
Jiancai x = tempList.get(i);
flimList.add(x);
}
String html = "";
StringBuffer buffer = new StringBuffer();
buffer.append(" 共为");
buffer.append(maxPage);
buffer.append("页 共有");
buffer.append(pageNumber);
buffer.append("条 当前为第");
buffer.append((Integer.parseInt(number) + 1));
buffer.append("页 ");
if ((Integer.parseInt(number) + 1) == 1) {
buffer.append("首页");
} else {
buffer.append("<a href=\"index/hot.action?number=0\">首页</a>");
}
buffer.append(" ");
if ((Integer.parseInt(number) + 1) == 1) {
buffer.append("上一页");
} else {
buffer.append("<a href=\"index/hot.action?number=" + (Integer.parseInt(number) - 1) + "\">上一页</a>");
}
buffer.append(" ");
if (maxPage <= (Integer.parseInt(number) + 1)) {
buffer.append("下一页");
} else {
buffer.append("<a href=\"index/hot.action?number=" + (Integer.parseInt(number) + 1) + "\">下一页</a>");
}
buffer.append(" ");
if (maxPage <= (Integer.parseInt(number) + 1)) {