1、增加查询未充值的记录和充值成功反馈接口
This commit is contained in:
@ -3,6 +3,7 @@ package com.fastbee.data.controller.waterele;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.fastbee.waterele.domain.vo.UnchargeAmountVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@ -33,19 +34,17 @@ import com.fastbee.common.core.page.TableDataInfo;
|
||||
@RestController
|
||||
@RequestMapping("/waterele/rechargerecord")
|
||||
@Api(tags = "充值记录")
|
||||
public class MaRechargerecordController extends BaseController
|
||||
{
|
||||
public class MaRechargerecordController extends BaseController {
|
||||
@Autowired
|
||||
private IMaRechargerecordService maRechargerecordService;
|
||||
|
||||
/**
|
||||
* 查询充值记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('waterele:rechargerecord:list')")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询充值记录列表")
|
||||
public TableDataInfo list(MaRechargerecord maRechargerecord)
|
||||
{
|
||||
/**
|
||||
* 查询充值记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('waterele:rechargerecord:list')")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询充值记录列表")
|
||||
public TableDataInfo list(MaRechargerecord maRechargerecord) {
|
||||
startPage();
|
||||
List<MaRechargerecord> list = maRechargerecordService.selectMaRechargerecordList(maRechargerecord);
|
||||
return getDataTable(list);
|
||||
@ -57,8 +56,7 @@ public class MaRechargerecordController extends BaseController
|
||||
@ApiOperation("导出充值记录列表")
|
||||
@PreAuthorize("@ss.hasPermi('waterele:rechargerecord:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, MaRechargerecord maRechargerecord)
|
||||
{
|
||||
public void export(HttpServletResponse response, MaRechargerecord maRechargerecord) {
|
||||
List<MaRechargerecord> list = maRechargerecordService.selectMaRechargerecordList(maRechargerecord);
|
||||
ExcelUtil<MaRechargerecord> util = new ExcelUtil<MaRechargerecord>(MaRechargerecord.class);
|
||||
util.exportExcel(response, list, "充值记录数据");
|
||||
@ -70,8 +68,7 @@ public class MaRechargerecordController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('waterele:rechargerecord:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiOperation("获取充值记录详细信息")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(maRechargerecordService.selectMaRechargerecordById(id));
|
||||
}
|
||||
|
||||
@ -81,8 +78,7 @@ public class MaRechargerecordController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('waterele:rechargerecord:add')")
|
||||
@PostMapping
|
||||
@ApiOperation("新增充值记录")
|
||||
public AjaxResult add(@RequestBody MaRechargerecord maRechargerecord)
|
||||
{
|
||||
public AjaxResult add(@RequestBody MaRechargerecord maRechargerecord) {
|
||||
return toAjax(maRechargerecordService.insertMaRechargerecord(maRechargerecord));
|
||||
}
|
||||
|
||||
@ -92,8 +88,7 @@ public class MaRechargerecordController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('waterele:rechargerecord:edit')")
|
||||
@PutMapping
|
||||
@ApiOperation("修改充值记录")
|
||||
public AjaxResult edit(@RequestBody MaRechargerecord maRechargerecord)
|
||||
{
|
||||
public AjaxResult edit(@RequestBody MaRechargerecord maRechargerecord) {
|
||||
return toAjax(maRechargerecordService.updateMaRechargerecord(maRechargerecord));
|
||||
}
|
||||
|
||||
@ -103,8 +98,26 @@ public class MaRechargerecordController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('waterele:rechargerecord:remove')")
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除充值记录")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(maRechargerecordService.deleteMaRechargerecordByIds(ids));
|
||||
}
|
||||
|
||||
//通过卡ID和区域号查询未充值的记录,返回总充值金额
|
||||
// @PreAuthorize("@ss.hasPermi('waterele:rechargerecord:queryUnchargeAmount')")
|
||||
@GetMapping("/queryUnchargeAmount")
|
||||
@ApiOperation("查询未充值的记录")
|
||||
public AjaxResult queryUnchargeAmount(MaRechargerecord maRechargerecord) {
|
||||
UnchargeAmountVo amount = maRechargerecordService.queryUnchargeAmount(maRechargerecord);
|
||||
return AjaxResult.success(amount);
|
||||
}
|
||||
|
||||
|
||||
//充值成功后提交充值成功接口,修改卡ID、区域号对应的未充值记录
|
||||
// @PreAuthorize("@ss.hasPermi('waterele:rechargerecord:rechargeReply')")
|
||||
@GetMapping("/rechargeReply")
|
||||
@ApiOperation("充值成功反馈")
|
||||
public AjaxResult rechargeReply(MaRechargerecord maRechargerecord) {
|
||||
String msg = maRechargerecordService.rechargeReply(maRechargerecord);
|
||||
return AjaxResult.success(msg);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user