| | |
| | | coupon.setIllustrate(dataVo.getIllustrate()); |
| | | coupon.setDistributionMethod(dataVo.getDistributionMethod()); |
| | | coupon.setRedemptionMethod(dataVo.getExchangeMethod()); |
| | | if (dataVo.getExchangeMethod() != null) { |
| | | if (dataVo.getExchangeMethod() != null&&dataVo.getDistributionMethod()!=4) { |
| | | switch (dataVo.getExchangeMethod()) { |
| | | case 1: |
| | | coupon.setIntegral(BigDecimal.valueOf(dataVo.getRequiredPoints())); |
| | | break; |
| | | |
| | | case 2: |
| | | coupon.setIntegral(BigDecimal.valueOf(dataVo.getRequiredPoints())); |
| | | coupon.setCash(dataVo.getRequiredCash()); |
| | | break; |
| | | case 3: |
| | | coupon.setCash(dataVo.getRequiredCash()); |
| | | break; |
| | |
| | | } |
| | | return true; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return false; |
| | | } |
| | | } |