| | |
| | | model.addAttribute("couponList", new ArrayList<Coupon>()); |
| | | } |
| | | } |
| | | else{ |
| | | model.addAttribute("ticketList", new ArrayList<Coupon>()); |
| | | |
| | | } |
| | | |
| | | if (vip.getTicketJson() != null && !vip.getTicketJson().isEmpty()){ |
| | | String ticketJson = vip.getTicketJson(); |
| | | // 转化为jsonArray |
| | |
| | | ticketDetailVOS.add(ticketDetailVO); |
| | | } |
| | | model.addAttribute("ticketList", ticketDetailVOS); |
| | | |
| | | }else{ |
| | | model.addAttribute("ticketList", new ArrayList<TicketDetailVO>()); |
| | | |
| | | } |
| | | |
| | | return PREFIX + "vip_edit.html"; |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | String temp = "[{\"id\":\"36\",\"value\":\"1\"}]"; |
| | | JSONArray couponJsonArray = JSONArray.parseArray(temp); |
| | | for (Object o : couponJsonArray) { |
| | | JSONObject couponJsonObject = (JSONObject) o; |
| | | Integer couponId = couponJsonObject.getInteger("id"); |
| | | } |
| | | } |
| | | // public static void main(String[] args) { |
| | | // String temp = "[{\"id\":\"36\",\"value\":\"1\"}]"; |
| | | // JSONArray couponJsonArray = JSONArray.parseArray(temp); |
| | | // for (Object o : couponJsonArray) { |
| | | // JSONObject couponJsonObject = (JSONObject) o; |
| | | // Integer couponId = couponJsonObject.getInteger("id"); |
| | | // } |
| | | // } |
| | | @RequestMapping("/detail/{id}") |
| | | public String detail(@PathVariable("id")Integer id, Model model) { |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |