| | |
| | | |
| | | import com.yeshi.buwan.dao.vip.VIPPriceDao; |
| | | 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.service.inter.vip.VIPPriceService; |
| | | import com.yeshi.buwan.util.StringUtil; |
| | |
| | | |
| | | @Override |
| | | public void addPrice(VIPPrice price) throws VIPException { |
| | | if (price == null || price.getPrice() == null || price.getType() == null) { |
| | | if (price == null || price.getActualPrice() == null || price.getType() == null) { |
| | | throw new VIPException(1, "参数不完整"); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | if (price.getOrder() == null) { |
| | | price.setOrder(price.getPrice().multiply(new BigDecimal(100)).intValue()); |
| | | price.setOrder(price.getActualPrice().multiply(new BigDecimal(100)).intValue()); |
| | | } |
| | | |
| | | |
| | |
| | | return vipPriceDao.get(id); |
| | | } |
| | | |
| | | @Override |
| | | public VIPPrice selectByType(VIPPriceType type) { |
| | | return vipPriceDao.selectByType(type); |
| | | } |
| | | |
| | | @Override |
| | | public VIPPrice selectByIOSProductId(String productId) { |
| | | |
| | | return vipPriceDao.selectByIOSProductId(productId); |
| | | } |
| | | |
| | | } |