| | |
| | | import com.yeshi.buwan.domain.vip.VIPPrice; |
| | | import com.yeshi.buwan.domain.vip.VIPPriceType; |
| | | import com.yeshi.buwan.exception.vip.VIPException; |
| | | import com.yeshi.buwan.pptv.PPTVVipManager; |
| | | import com.yeshi.buwan.service.inter.vip.VIPPriceService; |
| | | import com.yeshi.buwan.service.inter.vip.VIPService; |
| | | import com.yeshi.buwan.util.Constant; |
| | |
| | | @Resource |
| | | private VIPService vipService; |
| | | |
| | | @Resource |
| | | private PPTVVipManager pptvVipManager; |
| | | |
| | | @Test |
| | | public void addVIPPrice() { |
| | | VIPPrice price = new VIPPrice(); |
| | | price.setActualPrice(new BigDecimal("8.8")); |
| | | price.setPrice(new BigDecimal("14.8")); |
| | | price.setType(VIPPriceType.month); |
| | | price.setPptvGoodsNo("DA7559531560894"); |
| | |
| | | } |
| | | |
| | | price = new VIPPrice(); |
| | | price.setActualPrice(new BigDecimal("22.8")); |
| | | price.setPrice(new BigDecimal("37.8")); |
| | | price.setType(VIPPriceType.season); |
| | | price.setPptvGoodsNo("DA7559574625089"); |
| | |
| | | |
| | | |
| | | price = new VIPPrice(); |
| | | price.setActualPrice(new BigDecimal("42")); |
| | | price.setPrice(new BigDecimal("68.8")); |
| | | price.setType(VIPPriceType.halfYear); |
| | | price.setPptvGoodsNo("DA6989580247516"); |
| | |
| | | |
| | | |
| | | price = new VIPPrice(); |
| | | price.setActualPrice(new BigDecimal("77.8")); |
| | | price.setPrice(new BigDecimal("128.8")); |
| | | price.setType(VIPPriceType.year); |
| | | price.setPptvGoodsNo("DA8129574268091"); |
| | |
| | | public void addOrderRecord() { |
| | | VIPPrice price = vipPriceService.selectByPrimaryKey("172a8327fcd3685ab3c0f740d031da09"); |
| | | VIPOrderRecord record = new VIPOrderRecord(); |
| | | record.setMoney(price.getPrice()); |
| | | record.setMoney(price.getActualPrice()); |
| | | record.setType(price.getType()); |
| | | record.setUid(766693 + ""); |
| | | |
| | |
| | | |
| | | @Test |
| | | public void paySuccess() { |
| | | try { |
| | | vipService.checkOrderPayState(23 + ""); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | // try { |
| | | // vipService.paySuccess("",VIPOrderRecord.PAY_WAY_WX,new BigDecimal("14.8"),) |
| | | // } catch (Exception e) { |
| | | // e.printStackTrace(); |
| | | // } |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | |
| | | |
| | | @Test |
| | | public void test3() throws Exception { |
| | | |
| | | vipService.checkOrderPayState(54+""); |
| | | |
| | | VIPOrderRecord record = vipService.getOrderRecord("82"); |
| | | pptvVipManager.buyVIP(record); |
| | | } |
| | | |
| | | } |