题目要求+界面+代码
付费代码链接:基于ssm的超市订单管理系统,如需讲解,请私聊
界面
代码
基于ssm的超市订单管理系统
部分代码
/**
* 通过条件查询-productList
* @param proName
* @param proNumber
* @param currentPageNo
* @param pageSize
* @return
* @throws Exception
*/
public List<Product> getProductList(@Param("proName")String proName,@Param("proNumber")String proNumber,
@Param("from")Integer currentPageNo, @Param("pageSize")Integer pageSize)throws Exception;
/**
* 根据product id 获取信息
* @param id
* @return
* @throws Exception
*/
public Product getProductById(@Param("id")Integer id)throws Exception;
ProductController.java,增加查看商品明细的处理方法view()。
@RequestMapping(value="/modify/{id}",method=RequestMethod.GET)
public String getProductById(@PathVariable Integer id,Model model,HttpServletRequest request,
@RequestParam(value="queryProNumber",required=false) String queryProNumber,
@RequestParam(value="queryProName",required=false) String queryProName,
@RequestParam(value="pageIndex",required=false) String pageIndex)throws Exception
{
logger.debug("getProductById id===================== "+id);
Product product = new Product();
List<Provider> productList=new ArrayList<>();;
try {
product = productService.getProductById(id);
productList=productService.getProviderList(null, null, 0, 0);
} catch (NumberFormatException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
//
try{
}catch(Exception e){
System.out.println(e.getMessage());
}
for (Provider product : productList) {
System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"+product.getProName());
}
model.addAttribute("productList", productList);
model.addAttribute(product);
return "productmodify";
}