| | |
| | | import javax.annotation.Resource; |
| | | import java.io.IOException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | |
| | |
| | | client.insertIntoData(dataVo); |
| | | return new SuccessTip<>(); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 商品详情 |
| | | * @param pointMerchandiseId 商品Id |
| | | * @param quantityIssued 发放数量 |
| | | * @param pickUpQuantity 限领数量 |
| | | * @param redemptionInstructions 说明 |
| | | * @param cover 封面图 |
| | | * @param productImages 商品图片 |
| | | * @param sort 排序 |
| | | * @return |
| | | */ |
| | | @PostMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update( Integer id,Integer num,Integer num1,String text){ |
| | | Coupon coupon = client.queryCouponById(id); |
| | | coupon.setQuantityIssued(num); |
| | | coupon.setPickUpQuantity(num1); |
| | | coupon.setIllustrate(text); |
| | | client.updateCouponData(coupon); |
| | | public Object update( Integer pointMerchandiseId,Integer quantityIssued,Integer pickUpQuantity,String redemptionInstructions,String cover,String productImages,Integer sort){ |
| | | Map<String, Object> stringObjectHashMap = new HashMap<>(); |
| | | stringObjectHashMap.put("pointMerchandiseId",pointMerchandiseId); |
| | | stringObjectHashMap.put("quantityIssued",quantityIssued); |
| | | stringObjectHashMap.put("pickUpQuantity",pickUpQuantity); |
| | | stringObjectHashMap.put("redemptionInstructions",redemptionInstructions); |
| | | stringObjectHashMap.put("cover",cover); |
| | | stringObjectHashMap.put("productImages",productImages); |
| | | stringObjectHashMap.put("sort",sort); |
| | | System.out.println(stringObjectHashMap); |
| | | pointMercharsClient.updateGoodsDetail(stringObjectHashMap); |
| | | return new SuccessTip<>(); |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * 跳转到修改车辆管理 |
| | | * 跳转到修改商品详情 |
| | | */ |
| | | @RequestMapping("/tGoods_update/{id}") |
| | | public String tCityUpdate(@PathVariable Integer id, Model model) { |
| | |
| | | PointMercharsVo pointMercharsVo = pointMercharsClient.queryPointMerchaseDetailOfId(id); |
| | | System.out.println("pointMercharsVo:"+pointMercharsVo); |
| | | String[] split = pointMercharsVo.getPics().split(","); |
| | | List<String> list = Arrays.asList(split); |
| | | model.addAttribute("id",id); |
| | | model.addAttribute("item",pointMercharsVo); |
| | | model.addAttribute("pictures",split); |
| | | model.addAttribute("pictures",list); |
| | | System.out.println(list); |
| | | return PREFIX + "TGoods_edit.html"; |
| | | } |
| | | |