src/com/xx/supermarket/controller/ProductController.java
(开头部分) 14KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
package com.xx.supermarket.controller;
import java.io.File;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.commons.CommonsMultipartFile;
import com.xx.supermarket.base.BaseController;
import com.xx.supermarket.utils.JsonUtil2;
import com.xx.supermarket.utils.Pager;
import net.sf.json.JSONObject;
import java.util.*;
import com.xx.supermarket.entity.*;
import com.xx.supermarket.dao.*;
import com.xx.supermarket.service.*;
/**
* @ClassName:
* @Description:
* @author administrator
* @date 2015年12月24日 下午1:46:33 - 2017年02月28日 22时35分12秒
*/
@Controller
@RequestMapping("/product")
public class ProductController extends BaseController {
/**
* 依赖注入 start dao/service/===
*/
@Autowired
private ProductService productService;
@Autowired
private CategoryService categoryService;
@Autowired
private CategorySecService categorySecService;
// --------------------------------------- 华丽分割线 ------------------------------
/**
* 根据商品的ID进行查询商品:执行方法
*/
@RequestMapping("/findByPid.do")
public String findByPid(Model model, HttpSession session,Product product) {
List<Category> categoryList = categoryService.listAll();
model.addAttribute("categoryList", categoryList);
List<CategorySec> categorySecList = categorySecService.listAll();
model.addAttribute("categorySecList", categorySecList);
Map<String, Object> map = getMap();
map.put("id",product.getId());
后面还有 400 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。