| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | import javax.xml.crypto.Data; |
| | | import java.math.BigDecimal; |
| | |
| | | } |
| | | |
| | | // 检查账户状态 |
| | | if (!"ACTIVE".equals(account.getAccountStatus())) { |
| | | if (!"ACTIVE".equals(account.getAccountStatus().name())) { |
| | | return Result.error("保单已失效"); |
| | | } |
| | | |
| | |
| | | return Result.success("领取成功"); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | log.error("领取保险金出错:"+e.getMessage()); |
| | | }finally { |
| | | accountLock.unlock(); |
| | |
| | | return Result.success(false); |
| | | } |
| | | // 检查账户状态 |
| | | if (!"ACTIVE".equals(account.getAccountStatus())) { |
| | | if (!"ACTIVE".equals(account.getAccountStatus().name())) { |
| | | return Result.success(false); |
| | | } |
| | | // 检查账户有效期 |