|
|
@ -46,10 +46,15 @@ public class RechargeServiceImpl implements RechargeService { |
|
|
|
|
|
|
|
@CacheEvict(value = "recharge",allEntries = true) |
|
|
|
public int add(Recharge recharge) throws Exception { |
|
|
|
|
|
|
|
User sUser = userMapper.select(recharge.getJwcode()); |
|
|
|
if(ObjectUtils.isEmpty(sUser)){ |
|
|
|
throw new Exception("无此精网号"); |
|
|
|
} else if (recharge.getJwcode()==null||recharge.getJwcode().equals("")) { |
|
|
|
throw new Exception("精网号不能为空"); |
|
|
|
} else if (recharge.getActivityId()==null||recharge.getActivityId()<=0) { |
|
|
|
throw new Exception("活动ID错误或为空"); |
|
|
|
} else if (recharge.getPayWay()==null||recharge.getPayWay().equals("")) { |
|
|
|
throw new Exception("支付方式不能为空"); |
|
|
|
} |
|
|
|
// return rechargeMapper.insert(recharge); |
|
|
|
|
|
|
|