//
// Decompiled by Procyon v0.5.29
//
package com.action;
import com.entity.Topic;
import com.entity.Orders;
import com.entity.Details;
import com.entity.City;
import com.entity.Cart;
import com.util.VeDate;
import com.entity.Users;
import com.entity.Article;
import java.util.Iterator;
import java.util.ArrayList;
import com.entity.Jiancai;
import com.entity.Cate;
import java.util.List;
import java.util.Collections;
import com.service.TopicService;
import com.service.DetailsService;
import com.service.OrdersService;
import com.service.CartService;
import com.service.JiancaiService;
import com.service.PeihuoService;
import com.service.CityService;
import com.service.CateService;
import com.service.ArticleService;
import javax.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import com.service.UsersService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
@Controller
@RequestMapping({ "/index" })
public class IndexAction extends BaseAction
{
@Autowired
@Resource
private UsersService usersService;
@Autowired
@Resource
private ArticleService articleService;
@Autowired
@Resource
private CateService cateService;
@Autowired
@Resource
private CityService cityService;
@Autowired
@Resource
private PeihuoService peihuoService;
@Autowired
@Resource
private JiancaiService jiancaiService;
@Autowired
@Resource
private CartService cartService;
@Autowired
@Resource
private OrdersService ordersService;
@Autowired
@Resource
private DetailsService detailsService;
@Autowired
@Resource
private TopicService topicService;
private void front() {
this.getRequest().setAttribute("title", (Object)"\u9f99\u57ce\u5efa\u6750\u7f51-\u529b\u4f5c\u4e2d\u56fd\u6700\u5927\u7684\u5efa\u6750\u7f51\u7ad9");
final List<Cate> cateList = this.cateService.getAllCate();
this.getRequest().setAttribute("cateList", (Object)cateList);
final List<Jiancai> hotList = this.jiancaiService.getJiancaiByHot();
Collections.shuffle(hotList);
this.getRequest().setAttribute("hotList", (Object)hotList);
}
@RequestMapping({ "index.action" })
public String index() {
this.front();
final List<Cate> cateList = this.cateService.getCateFront();
final List<Cate> frontList = new ArrayList<Cate>();
for (final Cate cate : cateList) {
final List<Jiancai> flimList = this.jiancaiService.getJiancaiByCate(cate.getCateid());
cate.setFlimList(flimList);
frontList.add(cate);
}
this.getRequest().setAttribute("frontList", (Object)frontList);
return "users/index";
}
@RequestMapping({ "network.action" })
public String network() {
this.front();
final List<Cate> cateList = this.cateService.getCateFront();
final List<Cate> frontList = new ArrayList<Cate>();
for (final Cate cate : cateList) {
final List<Jiancai> flimList = this.jiancaiService.getJiancaiByCate(cate.getCateid());
cate.setFlimList(flimList);
frontList.add(cate);
}
this.getRequest().setAttribute("frontList", (Object)frontList);
return "users/network";
}
@RequestMapping({ "article.action" })
public String article(String number) {
this.front();
final List<Article> articleList = new ArrayList<Article>();
final List<Article> tempList = this.articleService.getAllArticle();
int maxPage;
final int pageNumber = maxPage = tempList.size();
if (maxPage % 12 == 0) {
maxPage /= 12;
}
else {
maxPage = maxPage / 12 + 1;
}
if (number == null) {
number = "0";
}
final int start = Integer.parseInt(number) * 12;
int over = (Integer.parseInt(number) + 1) * 12;
final int count = pageNumber - over;
if (count <= 0) {
over = pageNumber;
}
for (int i = start; i < over; ++i) {
final Article x = tempList.get(i);
articleList.add(x);
}
String html = "";
final StringBuffer buffer = new StringBuffer();
buffer.append(" \u5171\u4e3a");
buffer.append(maxPage);
buffer.append("\u9875 \u5171\u6709");
buffer.append(pageNumber);
buffer.append("\u6761 \u5f53\u524d\u4e3a\u7b2c");
buffer.append(Integer.parseInt(number) + 1);
buffer.append("\u9875 ");
if (Integer.parseInt(number) + 1 == 1) {
buffer.append("\u9996\u9875");
}
else {
buffer.append("<a href=\"index/article.action?number=0\">\u9996\u9875</a>");
}
buffer.append(" ");
if (Integer.parseInt(number) + 1 == 1) {
buffer.append("\u4e0a\u4e00\u9875");
}
else {
buffer.append("<a href=\"index/article.action?number=" + (Integer.parseInt(number) - 1) + "\">\u4e0a\u4e00\u9875</a>");
}
buffer.append(" ");
if (maxPage <= Integer.parseInt(number) + 1) {
buffer.append("\u4e0b\u4e00\u9875");
}
else {
buffer.append("<a href=\"index/article.action?number=" + (Integer.parseInt(number) + 1) + "\">\u4e0b\u4e00\u9875</a>");
}
buffer.append(" ");
if (maxPage <= Integer.parseInt(number) + 1) {
buffer.append("\u5c3e\u9875");
}
else {
buffer.append("<a href=\"index/article.action?number=" + (maxPage - 1) + "\">\u5c3e\u9875</a>");
}
html = buffer.toString();
this.getRequest().setAttribute("html", (Object)html);
this.getRequest().setAttribute("articleList", (Object)articleList);
return "users/article";
}
@RequestMapping({ "read.action" })
public String read(final String id) {
this.front();
final Article article = this.articleService.getArticleById(id);
article.setHits(new StringBuilder().append(Integer.parseInt(article.getHits()) + 1).toString());
this.articleService.updateArticle(article);
this.getRequest().setAttribute("article", (Object)article);
return "users/read";
}
@RequestMapping({ "preLogin.action" })
public String prelogin() {
this.front();
return "users/login";
}
@RequestMapping({ "login.action" })
public String login() {
this.front();
final String username = this.getRequest().getParameter("username");
final String password = this.getRequest().getParameter("password");
final Users u = new Users();
u.setUsername(username);
final List<Users> usersList = this.usersService.getUsersByCond(u);
if (usersList.size() == 0) {
this.getSession().setAttribute("message", (Object)"\u7528\u6237\u540d\u4e0d\u5b58\u5728");
return "redirect:/index/preLogin.action";
}
final Users users = usersList.get(0);
if (password.equals(users.getPassword())) {
this.getSession().setAttribute("userid", (Object)users.getUsersid());
this.getSession().setAttribute("username", (Object)users.getUsername());
this.getSession().setAttribute("users", (Object)users);
return "redirect:/index/index.action";
}
this.getSession().setAttribute("message", (Object)"\u5bc6\u7801\u9519\u8bef");
return "redirect:/index/preLogin.action";
}
@RequestMapping({ "preReg.action" })
public String preReg() {
this.front();
return "users/register";
}
@RequestMapping({ "register.action" })
public String register(final Users users) {
this.front();
final Users u = new
没有合适的资源?快使用搜索试试~ 我知道了~
JSP基于SSM建材商城购物网站设计毕业源码案例设计.zip
![preview](https://csdnimg.cn/release/downloadcmsfe/public/img/white-bg.ca8570fa.png)
共2000个文件
png:1133个
js:268个
gif:174个
![preview-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/scale.ab9e0183.png)
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 29 浏览量
2024-02-14
10:12:51
上传
评论
收藏 28.9MB ZIP 举报
温馨提示
JSP基于SSM建材商城购物网站设计毕业源码案例设计.zip
资源推荐
资源详情
资源评论
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![py](https://img-home.csdnimg.cn/images/20210720083646.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
收起资源包目录
![package](https://csdnimg.cn/release/downloadcmsfe/public/img/package.f3fc750b.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/5e18b54ba0f643e4947e42b1ba993bf5_rubys007.jpg!1)
白如意i
- 粉丝: 7086
- 资源: 3230
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)