src/main/java/controller/AdminController.java
(开头部分) 18KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
package controller;
import model.*;
import org.apache.commons.io.FileUtils;
import org.apache.log4j.Logger;
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 org.springframework.web.servlet.ModelAndView;
import service.*;
import util.ExportExcel;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.util.ArrayList;
import java.util.List;
@Controller
@RequestMapping("/admin")
public class AdminController {
@Autowired
private UserService userService;
@Autowired
private CategoryService categoryService;
@Autowired
private OrderItemService orderItemService;
@Autowired
private OrderService orderService;
@Autowired
private ProductService productService;
private static Logger logger = Logger.getLogger(AdminController.class);
private ModelAndView mav = new ModelAndView();
private ModelAndView listProduct(Integer cid) {
List<Product> products = productService.listProducts(cid);
mav.addObject("ps",products);
mav.addObject("c",categoryService.getCategory(cid));
mav.setViewName("/admin/listProduct");
return mav;
}
//查询所有房间分类
@RequestMapping(value = "/admin_category_list",produces = "text/html;charset=UTF-8")
@ResponseBody
public ModelAndView listCategory(){
List<Category> categories = categoryService.listAll();
mav.addObject("thecs", categories);
mav.setViewName("admin/listCategory");
return mav;
}
后面还有 420 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
