示例#1
0
 @RequestMapping("/view")
 public String view(PEProduct paraPEProduct, PEProductCtrlModel peProductCtrlModel, Model model) {
   PEProduct peProduct = peProductService.getPEProductById(paraPEProduct.getId());
   model.addAttribute("peProduct", peProduct);
   model.addAttribute("ctrlData", peProductCtrlModel);
   return "admin/pe/peProduct/view";
 }
示例#2
0
 @RequestMapping("/insertData")
 @ResponseBody
 public Map<String, Object> insertData(
     PEProduct peProduct, PEProductCtrlModel peProductCtrlModel, Model model) {
   Map<String, Object> result = new HashMap<String, Object>();
   if ("0".equals(peProduct.getId())) {
     peProduct.setId(UUIDUtils.getUUIDString());
     int id = peProductService.insertPEProduct(peProduct, peProductCtrlModel);
     result.put("code", "0");
     result.put("bizData", peProduct);
   } else {
     peProductService.updatePEProduct(peProduct, peProductCtrlModel);
     result.put("code", "0");
     result.put("bizData", peProduct);
   }
   return result;
 }