|
@ -34,24 +34,35 @@ public class ConsumeController { |
|
|
|
|
|
|
|
|
//消耗明细 |
|
|
//消耗明细 |
|
|
@PostMapping("/selectAll") |
|
|
@PostMapping("/selectAll") |
|
|
public Result selcetAll(@RequestBody Page page) |
|
|
|
|
|
{ |
|
|
|
|
|
if(ObjectUtils.isEmpty(page.getPageNum())){ |
|
|
|
|
|
|
|
|
public Result selcetAll(@RequestBody Page page) { |
|
|
|
|
|
if (ObjectUtils.isEmpty(page.getPageNum())) { |
|
|
return Result.error("页码数为空!"); |
|
|
return Result.error("页码数为空!"); |
|
|
} |
|
|
} |
|
|
if(ObjectUtils.isEmpty(page.getPageSize())){ |
|
|
|
|
|
|
|
|
if (ObjectUtils.isEmpty(page.getPageSize())) { |
|
|
return Result.error("页大小为空!"); |
|
|
return Result.error("页大小为空!"); |
|
|
} |
|
|
|
|
|
else{ |
|
|
|
|
|
|
|
|
} else { |
|
|
return Result.success(consumeService.selectAll(page.getPageNum(), page.getPageSize())); |
|
|
return Result.success(consumeService.selectAll(page.getPageNum(), page.getPageSize())); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//消耗明细筛选 |
|
|
|
|
|
@PostMapping("/selectBy") |
|
|
|
|
|
public Result selcetBy(@RequestBody Page page) { |
|
|
|
|
|
if (ObjectUtils.isEmpty(page.getPageNum())) { |
|
|
|
|
|
return Result.error("页码数为空!"); |
|
|
|
|
|
} |
|
|
|
|
|
if (ObjectUtils.isEmpty(page.getPageSize())) { |
|
|
|
|
|
return Result.error("页大小为空!"); |
|
|
|
|
|
} else { |
|
|
|
|
|
return Result.success(consumeService.selectBy(page.getPageNum(), page.getPageSize(), page.getConsume())); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//消耗金币统计 |
|
|
//消耗金币统计 |
|
|
@PostMapping("/statsGold") |
|
|
@PostMapping("/statsGold") |
|
|
public Result statsGold() |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
public Result statsGold() { |
|
|
Gold gold = consumeService.statsGold(); |
|
|
Gold gold = consumeService.statsGold(); |
|
|
return Result.success(gold); |
|
|
return Result.success(gold); |
|
|
} |
|
|
} |
|
|