• 大小: 32.94MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-06-22
  • 语言: Java
  • 标签: java  spring  

资源简介

java新闻管理系统 +sql (2018完整)

资源截图

代码片段和文件信息

package com.ivfox.goods.user.controller;

import java.awt.Image;

import java.io.File;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.List;
import java.util.Map;
import java.util.UUID;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.swing.ImageIcon;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

import cn.itcast.commons.CommonUtils;

import com.ivfox.goods.user.entity.Book;
import com.ivfox.goods.user.entity.Category;
import com.ivfox.goods.user.pager.Page;
import com.ivfox.goods.user.service.BookService;
import com.ivfox.goods.user.service.CategoryService;

@Controller
public class AdminBookController{

@Autowired
private BookService bookService;
@Autowired
private CategoryService categoryService;

@RequestMapping(“adminBookManage“)
public String adminBookManage(HttpServletRequest requestHttpServletResponse response){
return “adminjsps/admin/book/main“;
}

@RequestMapping(“adminfindCategoryAll“)
public String findCategoryAll(HttpServletRequest requestHttpServletResponse response){
List categoryList = categoryService.findCategoryList();
System.out.println(categoryList.toString());
request.setAttribute(“categoryList“ categoryList);
return “adminjsps/admin/book/left“;
}

/**
 * ��ȡ����ҳ
 * @param request
 * @return
 */
public int getPageNow(HttpServletRequest request){
int pageNow =1;
 String  parma=request.getParameter(“pageNow“);
 if(parma!=null&& !parma.isEmpty()){
 try {
 pageNow=Integer.parseInt(parma);
} catch (RuntimeException e) {

}
 }
return pageNow;
}
/**
 * ��ȡ�����url
 * @param request
 * @return
 * @throws UnsupportedEncodingException 
 */

public String getUrl(HttpServletRequest request) throws UnsupportedEncodingException {
String url=request.getRequestURI()+“?“+request.getQueryString();
 int index = url.lastIndexOf(“&pageNow=“);
 if(index!=-1){
 url=url.substring(0index);
 }
return url;
}
/**
 * �������ѯ
 * @param request
 * @param response
 * @param map
 * @return
 * @throws UnsupportedEncodingException 
 */
@RequestMapping(“adminfindBookListByCagegory“)
public String findBookListByCagegory(HttpServletRequest requestHttpServletResponse responseMap map) throws UnsupportedEncodingException{
//��ȡ����ҳ
Page page =new Page();
int pageNow=getPageNow(request);
String cid=request.getParameter(“cid“);
String url=getUrl(request);
Book book= new Book();
book.setCid(cid);
page.setPageNow(pageNow);
page.setPageSize(10

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-04-22 21:32  1\
     目录           0  2018-04-22 21:32  1\goods\
     文件        7153  2018-04-22 21:28  1\goods\.classpath
     文件        1038  2016-12-15 15:20  1\goods\.project
     目录           0  2018-04-22 21:32  1\goods\.settings\
     文件         503  2016-12-15 15:20  1\goods\.settings\.jsdtscope
     文件         261  2018-04-11 18:10  1\goods\.settings\org.eclipse.core.resources.prefs
     文件        7752  2018-04-11 18:20  1\goods\.settings\org.eclipse.jdt.core.prefs
     文件         467  2016-12-15 15:20  1\goods\.settings\org.eclipse.wst.common.component
     文件         345  2018-04-22 21:28  1\goods\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2016-12-15 15:20  1\goods\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2016-12-15 15:20  1\goods\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2018-04-22 21:32  1\goods\build\
     目录           0  2018-04-22 21:32  1\goods\build\classes\
     目录           0  2018-04-22 21:32  1\goods\build\classes\com\
     目录           0  2018-04-22 21:32  1\goods\build\classes\com\ivfox\
     目录           0  2018-04-22 21:32  1\goods\build\classes\com\ivfox\goods\
     目录           0  2018-04-22 21:32  1\goods\build\classes\com\ivfox\goods\user\
     目录           0  2018-04-22 21:32  1\goods\build\classes\com\ivfox\goods\user\controller\
     文件       12061  2018-04-22 21:28  1\goods\build\classes\com\ivfox\goods\user\controller\AdminBookController.class
     文件        6772  2018-04-22 21:28  1\goods\build\classes\com\ivfox\goods\user\controller\AdminController.class
     文件        4269  2018-04-22 21:28  1\goods\build\classes\com\ivfox\goods\user\controller\AdminOrderController.class
     文件        5448  2018-04-22 21:28  1\goods\build\classes\com\ivfox\goods\user\controller\BookController.class
     文件        5061  2018-04-22 21:28  1\goods\build\classes\com\ivfox\goods\user\controller\CartItemController.class
     文件        1465  2018-04-22 21:28  1\goods\build\classes\com\ivfox\goods\user\controller\CategoryController.class
     文件        2972  2018-04-22 21:28  1\goods\build\classes\com\ivfox\goods\user\controller\DepartmentController.class
     文件       11002  2018-04-22 21:28  1\goods\build\classes\com\ivfox\goods\user\controller\OrderController.class
     文件         432  2018-04-22 21:28  1\goods\build\classes\com\ivfox\goods\user\controller\OrderitemController.class
     文件        4611  2018-04-22 21:28  1\goods\build\classes\com\ivfox\goods\user\controller\PaymentUtil.class
     文件        2869  2018-04-22 21:28  1\goods\build\classes\com\ivfox\goods\user\controller\RecordController.class
     文件       11742  2018-04-22 21:28  1\goods\build\classes\com\ivfox\goods\user\controller\UserController.class
............此处省略824个文件信息

评论

共有 条评论