| | |
| | | import com.ruoyi.system.domain.dto.UserPolicyDto; |
| | | import com.ruoyi.im.service.UserPolicyService; |
| | | import com.ruoyi.system.domain.out.UserTeamAndPositionOut; |
| | | import com.ruoyi.system.service.FundsLogService; |
| | | import com.ruoyi.system.service.PaymentRecordService; |
| | | import com.ruoyi.system.service.UserAccountService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | |
| | | @Autowired |
| | | PaymentRecordService paymentRecordService; |
| | | |
| | | @Autowired |
| | | FundsLogService fundsLogService; |
| | | |
| | | @Value("${pay.key}") |
| | | private String key; |
| | |
| | | |
| | | userAccount.setBalance(userAccount.getBalance().add(userPolicy.getPremium())); |
| | | userAccountService.updateById(userAccount); |
| | | fundsLogService.addLog(userAccount.getId(), userAccount.getAccount(), userPolicy.getPremium(), OperationType.REFUND); |
| | | |
| | | return AjaxResult.success("审批成功"); |
| | | } |
| | | |
| | |
| | | return AjaxResult.success("删除成功"); |
| | | } |
| | | |
| | | /** |
| | | * 保单列表 |
| | | */ |
| | | @GetMapping("/getFundsLogList") |
| | | public TableDataInfo getFundsLogList(@RequestParam(value = "account",required = false) String account,@RequestParam(value = "operationType",required = false) Integer operationType) { |
| | | startPage(); |
| | | |
| | | LambdaQueryWrapper<FundsLog> wrapper = new LambdaQueryWrapper<>(); |
| | | |
| | | if(StringUtils.isNotEmpty(account)){ |
| | | wrapper.eq(FundsLog::getAccount,account); |
| | | } |
| | | if (ObjectUtil.isNotEmpty(operationType)){ |
| | | wrapper.eq(FundsLog::getOperationType,operationType); |
| | | } |
| | | wrapper.orderByDesc(FundsLog::getCreateTime); |
| | | List<FundsLog> list = fundsLogService.list(wrapper); |
| | | return getDataTable(list); |
| | | } |
| | | } |