| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @GetMapping("/inner/list-by-company") |
| | | public R<List<TAppUserWhitelist>> listByCompany(@RequestParam("companyId") Integer companyId) { |
| | | return R.ok(whitelistService.listByCompany(companyId)); |
| | | } |
| | | |
| | | @ApiOperation("内部接口:锁定白名单账户余额(企业账户流程-分配模式,实扣冻结)") |
| | | @PostMapping("/inner/lock-balance") |
| | | public R<BigDecimal> lockBalance(@RequestParam("whitelistId") Long whitelistId, |
| | | @RequestParam("amount") BigDecimal amount) { |
| | | return R.ok(whitelistService.lockBalance(whitelistId, amount)); |
| | | } |
| | | |
| | | @ApiOperation("内部接口:结算白名单账户余额(解锁锁定额并按实际消费扣减)") |
| | | @PostMapping("/inner/settle-balance") |
| | | public R<BigDecimal> settleBalance(@RequestParam("whitelistId") Long whitelistId, |
| | | @RequestParam("lockedAmount") BigDecimal lockedAmount, |
| | | @RequestParam("actualAmount") BigDecimal actualAmount) { |
| | | return R.ok(whitelistService.settleBalance(whitelistId, lockedAmount, actualAmount)); |
| | | } |
| | | |
| | | @ApiOperation("内部接口:释放白名单账户锁定金额") |
| | | @PostMapping("/inner/unlock-balance") |
| | | public R<BigDecimal> unlockBalance(@RequestParam("whitelistId") Long whitelistId, |
| | | @RequestParam("amount") BigDecimal amount) { |
| | | return R.ok(whitelistService.unlockBalance(whitelistId, amount)); |
| | | } |
| | | |
| | | @ApiOperation("新增或修改白名单用户") |
| | |
| | | public void importTemplate(HttpServletResponse response) { |
| | | ExcelUtil<AppUserWhitelistImportDTO> util = new ExcelUtil<>(AppUserWhitelistImportDTO.class); |
| | | util.importTemplateExcel(response, "白名单用户导入模板", |
| | | "填写说明:用户手机号填写11位手机号,如:13800138000。导入后默认享受全部免费权益、适用于全部电站。"); |
| | | "填写说明:用户手机号填写11位手机号,如:13800138000。导入后适用于全部电站。"); |
| | | } |
| | | |
| | | @ApiOperation("导入白名单用户") |