update 站点白名单

This commit is contained in:
2023-04-20 15:20:07 +08:00
parent 582640e5a0
commit a89870bea9
3 changed files with 80 additions and 70 deletions

View File

@@ -24,82 +24,75 @@ import java.util.List;
/**
* 站点白名单Controller
*
*
* @author jsowell
* @date 2023-04-20
*/
@RestController
@RequestMapping("/pile/whitelist")
public class PileStationWhitelistController extends BaseController
{
@Autowired
private IPileStationWhitelistService pileStationWhitelistService;
public class PileStationWhitelistController extends BaseController {
@Autowired
private IPileStationWhitelistService pileStationWhitelistService;
/**
* 查询站点白名单列表
*/
@PreAuthorize("@ss.hasPermi('pile:whitelist:list')")
@GetMapping("/list")
public TableDataInfo list(PileStationWhitelist pileStationWhitelist)
{
startPage();
List<PileStationWhitelist> list = pileStationWhitelistService.selectPileStationWhitelistList(pileStationWhitelist);
return getDataTable(list);
}
/**
* 查询站点白名单列表
*/
@PreAuthorize("@ss.hasPermi('pile:whitelist:list')")
@GetMapping("/list")
public TableDataInfo list(PileStationWhitelist pileStationWhitelist) {
startPage();
List<PileStationWhitelist> list = pileStationWhitelistService.selectPileStationWhitelistList(pileStationWhitelist);
return getDataTable(list);
}
/**
* 导出站点白名单列表
*/
@PreAuthorize("@ss.hasPermi('pile:whitelist:export')")
@Log(title = "站点白名单", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, PileStationWhitelist pileStationWhitelist)
{
List<PileStationWhitelist> list = pileStationWhitelistService.selectPileStationWhitelistList(pileStationWhitelist);
ExcelUtil<PileStationWhitelist> util = new ExcelUtil<PileStationWhitelist>(PileStationWhitelist.class);
util.exportExcel(response, list, "站点白名单数据");
}
/**
* 导出站点白名单列表
*/
@PreAuthorize("@ss.hasPermi('pile:whitelist:export')")
@Log(title = "站点白名单", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, PileStationWhitelist pileStationWhitelist) {
List<PileStationWhitelist> list = pileStationWhitelistService.selectPileStationWhitelistList(pileStationWhitelist);
ExcelUtil<PileStationWhitelist> util = new ExcelUtil<PileStationWhitelist>(PileStationWhitelist.class);
util.exportExcel(response, list, "站点白名单数据");
}
/**
* 获取站点白名单详细信息
*/
@PreAuthorize("@ss.hasPermi('pile:whitelist:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(pileStationWhitelistService.selectPileStationWhitelistById(id));
}
/**
* 获取站点白名单详细信息
*/
@PreAuthorize("@ss.hasPermi('pile:whitelist:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(pileStationWhitelistService.selectPileStationWhitelistById(id));
}
/**
* 新增站点白名单
*/
@PreAuthorize("@ss.hasPermi('pile:whitelist:add')")
@Log(title = "站点白名单", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody PileStationWhitelist pileStationWhitelist)
{
return toAjax(pileStationWhitelistService.insertPileStationWhitelist(pileStationWhitelist));
}
/**
* 新增站点白名单
*/
@PreAuthorize("@ss.hasPermi('pile:whitelist:add')")
@Log(title = "站点白名单", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody PileStationWhitelist pileStationWhitelist) {
return toAjax(pileStationWhitelistService.insertPileStationWhitelist(pileStationWhitelist));
}
/**
* 修改站点白名单
*/
@PreAuthorize("@ss.hasPermi('pile:whitelist:edit')")
@Log(title = "站点白名单", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody PileStationWhitelist pileStationWhitelist)
{
return toAjax(pileStationWhitelistService.updatePileStationWhitelist(pileStationWhitelist));
}
/**
* 修改站点白名单
*/
@PreAuthorize("@ss.hasPermi('pile:whitelist:edit')")
@Log(title = "站点白名单", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody PileStationWhitelist pileStationWhitelist) {
return toAjax(pileStationWhitelistService.updatePileStationWhitelist(pileStationWhitelist));
}
/**
* 删除站点白名单
*/
@PreAuthorize("@ss.hasPermi('pile:whitelist:remove')")
@Log(title = "站点白名单", businessType = BusinessType.DELETE)
/**
* 删除站点白名单
*/
@PreAuthorize("@ss.hasPermi('pile:whitelist:remove')")
@Log(title = "站点白名单", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(pileStationWhitelistService.deletePileStationWhitelistByIds(ids));
}
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(pileStationWhitelistService.deletePileStationWhitelistByIds(ids));
}
}