package com.hxzk.controller;
|
|
import com.github.pagehelper.PageInfo;
|
import com.hxzk.pojo.TbAcHistoryPower;
|
import com.hxzk.pojo.TbHistoryPower;
|
import com.hxzk.service.TbHistroyPowerService;
|
import com.hxzk.util.result;
|
import com.hxzk.util.resultutil;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import java.util.List;
|
|
@RestController
|
@RequestMapping("/")
|
public class HistoryPowerController {
|
@Autowired
|
TbHistroyPowerService histroyPowerService;
|
|
@GetMapping("findHistoryPower")
|
result<List<TbHistoryPower>> findanchor(Integer page, Integer limit){
|
PageInfo<TbHistoryPower> cz= histroyPowerService.findAll(page, limit);
|
return resultutil.returnSuccess(cz.getTotal(), cz.getList());
|
}
|
|
@PostMapping("findTagPowerSearch")
|
result<List<TbHistoryPower>> findTagPowerSearch(Integer page, Integer limit,TbHistoryPower historyPower){
|
PageInfo<TbHistoryPower> cz= histroyPowerService.findSearch(page, limit,historyPower);
|
return resultutil.returnSuccess(cz.getTotal(), cz.getList());
|
}
|
}
|