| | |
| | | public String detailOfCoupon(@PathVariable Integer id, Model model){ |
| | | model.addAttribute("id",id); |
| | | Coupon coupon = client.queryCouponById(id); |
| | | Integer auditStatus1 = coupon.getAuditStatus(); |
| | | model.addAttribute("state",auditStatus1); |
| | | String content = coupon.getContent(); |
| | | JSONObject jsonObject = JSONObject.parseObject(content); |
| | | String one =""; |
| | |
| | | for (String s : productImages.split(",")) { |
| | | strings.add(s); |
| | | } |
| | | |
| | | model.addAttribute("integral",coupon.getIntegral()); |
| | | model.addAttribute("cash",coupon.getCash()); |
| | | model.addAttribute("img",strings); |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | System.out.println(objectType); |
| | | model.addAttribute("item",coupon); |
| | | model.addAttribute("objectType",objectType); |
| | | Integer auditStatus = coupon.getAuditStatus(); |
| | | switch (auditStatus){ |
| | | case 1: |
| | | model.addAttribute("state","待审核"); |
| | | break; |
| | | case 2: |
| | | model.addAttribute("state","已拒绝"); |
| | | break; |
| | | case 3: |
| | | model.addAttribute("state","未通过"); |
| | | break; |
| | | } |
| | | model.addAttribute("cover",coupon.getCover()); |
| | | model.addAttribute("productImages",coupon.getProductImages()); |
| | | return PREFIX + "TCouponExamineInfo.html"; |
| | | } |
| | | |