| | |
| | | package com.yeshi.buwan.controller; |
| | | |
| | | import com.yeshi.buwan.domain.DetailSystem; |
| | | import com.yeshi.buwan.domain.vip.VIPOrderRecord; |
| | | import com.yeshi.buwan.domain.system.DetailSystem; |
| | | import com.yeshi.buwan.domain.vip.OrderRecord; |
| | | import com.yeshi.buwan.exception.PPTVException; |
| | | import com.yeshi.buwan.exception.vip.VIPException; |
| | | import com.yeshi.buwan.funtv.FunTVUtil; |
| | | import com.yeshi.buwan.service.imp.ConfigService; |
| | | import com.yeshi.buwan.service.imp.DetailSystemConfigService; |
| | | import com.yeshi.buwan.service.imp.SearchService; |
| | | import com.yeshi.buwan.service.inter.order.OrderService; |
| | | import com.yeshi.buwan.service.inter.vip.VIPService; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.yeshi.utils.JsonUtil; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.PrintWriter; |
| | |
| | | @RequestMapping("test") |
| | | public class TestController { |
| | | @Resource |
| | | private ConfigService configService; |
| | | private DetailSystemConfigService configService; |
| | | |
| | | @Resource |
| | | private FunTVUtil funTVUtil; |
| | |
| | | |
| | | @Resource |
| | | private VIPService vipService; |
| | | |
| | | @Resource |
| | | private OrderService orderService; |
| | | |
| | | @Resource |
| | | private SearchService searchService; |
| | | |
| | | Logger logger = LoggerFactory.getLogger(TestController.class); |
| | | |
| | |
| | | |
| | | @RequestMapping("vipPay") |
| | | public void vipPay(String id) { |
| | | VIPOrderRecord record = vipService.getOrderRecord(id); |
| | | OrderRecord record = orderService.getOrderRecord(id); |
| | | try { |
| | | vipService.paySuccess(record.getId(), VIPOrderRecord.PAY_WAY_ALIPAY, record.getMoney(), new Date()); |
| | | orderService.paySuccess(record.getId(), OrderRecord.PAY_WAY_ALIPAY, record.getMoney(), new Date()); |
| | | } catch (VIPException e) { |
| | | e.printStackTrace(); |
| | | } catch (PPTVException e) { |
| | |
| | | } |
| | | } |
| | | |
| | | @RequestMapping("searchAlbum") |
| | | public void searchAlbum(String key, PrintWriter out) { |
| | | SearchService.SearchResult result = searchService.searchAlbum(0, key, 1, 20); |
| | | out.print(JsonUtil.loadTrueResult(result)); |
| | | } |
| | | |
| | | |
| | | } |