| | |
| | | package com.ruoyi.other.controller; |
| | | |
| | | import com.ruoyi.common.core.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.common.log.annotation.Log; |
| | | import com.ruoyi.common.log.enums.BusinessType; |
| | | import com.ruoyi.common.security.annotation.Logical; |
| | | import com.ruoyi.common.security.annotation.RequiresPermissions; |
| | | import com.ruoyi.other.api.dto.CompanyRechargeRecordExcelDTO; |
| | | import com.ruoyi.other.api.dto.CompanyRechargeRecordQueryDTO; |
| | | import com.ruoyi.other.api.model.TCompanyRechargeRecord; |
| | | import com.ruoyi.other.service.TCompanyRechargeRecordService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | private TCompanyRechargeRecordService rechargeRecordService; |
| | | |
| | | /** |
| | | * 公司充值 |
| | | * 公司充值(公司管理主页面「充值」按钮触发) |
| | | */ |
| | | @RequiresPermissions(value = {"/companyManagement/list"}, logical = Logical.OR) |
| | | @RequiresPermissions("/companyManagement/list") |
| | | @PostMapping("/recharge") |
| | | @ApiOperation(tags = {"管理后台-公司管理"}, value = "公司充值") |
| | | @Log(title = "【公司管理】公司充值", businessType = BusinessType.INSERT) |
| | |
| | | } |
| | | |
| | | /** |
| | | * 充值记录分页 |
| | | * 充值记录分页(公司管理-充值记录) |
| | | */ |
| | | @RequiresPermissions(value = {"/companyManagement/list"}, logical = Logical.OR) |
| | | @GetMapping("/page") |
| | | @RequiresPermissions("/company/rechargeRecord") |
| | | @PostMapping("/page") |
| | | @ApiOperation(tags = {"管理后台-公司管理"}, value = "公司充值记录分页") |
| | | public AjaxResult<PageInfo<TCompanyRechargeRecord>> page(@RequestParam(value = "current", defaultValue = "1") Integer current, |
| | | @RequestParam(value = "size", defaultValue = "10") Integer size, |
| | | @RequestParam(value = "companyId", required = false) Integer companyId) { |
| | | return AjaxResult.success(rechargeRecordService.pageList(current, size, companyId, null)); |
| | | public AjaxResult<PageInfo<TCompanyRechargeRecord>> page(@RequestBody CompanyRechargeRecordQueryDTO query) { |
| | | return AjaxResult.success(rechargeRecordService.pageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 充值记录导出(公司管理-充值记录) |
| | | */ |
| | | @RequiresPermissions("/company/rechargeRecord/export") |
| | | @PutMapping("/export") |
| | | @ApiOperation(tags = {"管理后台-公司管理"}, value = "公司充值记录导出") |
| | | public void export(HttpServletResponse response, @RequestBody(required = false) CompanyRechargeRecordQueryDTO query) { |
| | | ExcelUtil<CompanyRechargeRecordExcelDTO> util = new ExcelUtil<>(CompanyRechargeRecordExcelDTO.class); |
| | | util.exportExcel(response, rechargeRecordService.selectExportList(query), "公司充值记录"); |
| | | } |
| | | } |