| | |
| | | import com.ks.app.service.inter.vip.VIPPriceService; |
| | | import com.ks.app.service.inter.vip.VIPService; |
| | | import com.ks.app.utils.Constant; |
| | | import com.ks.app.utils.annotation.UserLogin; |
| | | import com.ks.app.vo.AcceptData; |
| | | import com.ks.app.vo.user.UserInfoVO; |
| | | import com.ks.app.vo.vip.OrderInfoVO; |
| | |
| | | }).create(); |
| | | JSONObject root = new JSONObject(); |
| | | |
| | | List<OrderRecord> list = orderService.listOrderRecord(uid, type == null ? null : OrderType.valueOf(type), null, page, Constant.PAGE_SIZE); |
| | | List<OrderRecord> list = orderService.listOrderRecord(uid, type == null ? null : OrderType.valueOf(type), OrderRecord.STATE_PAY, page, Constant.PAGE_SIZE); |
| | | |
| | | List<OrderInfoVO> voList = new ArrayList<>(); |
| | | for (OrderRecord record : list) { |
| | | voList.add(OrderInfoVO.create(record)); |
| | | } |
| | | long count = orderService.countOrderRecord(uid, type == null ? null : OrderType.valueOf(type), null); |
| | | long count = orderService.countOrderRecord(uid, type == null ? null : OrderType.valueOf(type), OrderRecord.STATE_PAY); |
| | | root.put("list", gson.toJson(voList)); |
| | | root.put("count", count); |
| | | return JsonUtil.loadTrueResult(root.toString()); |
| | |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | @UserLogin(uid = "#uid") |
| | | @RequestMapping("createOrder") |
| | | @ResponseBody |
| | | public String createOrder(AcceptData acceptData, HttpServletRequest request, Long uid, String priceId, Integer goldCorn, int payWay) { |
| | |
| | | } |
| | | } |
| | | |
| | | @UserLogin(uid = "#uid") |
| | | @RequestMapping("createAdOrder") |
| | | @ResponseBody |
| | | public String createAdOrder(AcceptData acceptData, Long uid) { |
| | | vipService.addExpireTime(uid, 1000 * 60 * 60 * 24L); |
| | | return JsonUtil.loadTrueResult(""); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 检查是否支付 |