| | |
| | | if (claim == null || (claim.getDeleted() != null && claim.getDeleted() != 0)) { |
| | | throw new BusinessException(ErrorCode.NOT_FOUND, "观影权益领取记录不存在"); |
| | | } |
| | | if (!"ISSUED".equals(upper(claim.getStatus()))) { |
| | | throw new BusinessException(ErrorCode.CONFLICT, "观影权益已核销或已失效"); |
| | | // 已核销的观影券仍然返回二维码:使用记录详情要按原型继续展示这张码(核销时服务端会拒掉重复核销), |
| | | // 只有过期/作废才不给。 |
| | | if (!"ISSUED".equals(upper(claim.getStatus())) && !"USED".equals(upper(claim.getStatus()))) { |
| | | throw new BusinessException(ErrorCode.CONFLICT, "观影权益已失效"); |
| | | } |
| | | if (expiredDate(claim.getValidEnd())) { |
| | | throw new BusinessException(ErrorCode.CONFLICT, "观影权益已过期"); |