刪除权限注解

dongdingding
董丁丁 2 years ago
parent cde3e999aa
commit b51c077f83

@ -1,26 +1,17 @@
package com.ruoyi.zongzhi.controller;
import java.util.List;
import io.swagger.annotations.Api;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
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.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.zongzhi.domain.TcDtSx;
import com.ruoyi.zongzhi.service.ITcDtSxService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* Controller
@ -31,18 +22,16 @@ import com.ruoyi.common.core.page.TableDataInfo;
@RestController
@RequestMapping("/zongzhi/sx")
@Api(tags = " 动态筛选")
public class TcDtSxController extends BaseController
{
public class TcDtSxController extends BaseController {
@Autowired
private ITcDtSxService tcDtSxService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:sx:list')")
@GetMapping("/list")
public TableDataInfo list(TcDtSx tcDtSx)
{
public TableDataInfo list(TcDtSx tcDtSx) {
startPage();
List<TcDtSx> list = tcDtSxService.selectTcDtSxList(tcDtSx);
return getDataTable(list);
@ -51,11 +40,9 @@ public class TcDtSxController extends BaseController
/**
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:sx:export')")
@Log(title = "动态筛选", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, TcDtSx tcDtSx)
{
public void export(HttpServletResponse response, TcDtSx tcDtSx) {
List<TcDtSx> list = tcDtSxService.selectTcDtSxList(tcDtSx);
ExcelUtil<TcDtSx> util = new ExcelUtil<TcDtSx>(TcDtSx.class);
util.exportExcel(response, list, "动态筛选数据");
@ -64,43 +51,36 @@ public class TcDtSxController extends BaseController
/**
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:sx:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(tcDtSxService.selectTcDtSxById(id));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:sx:add')")
@Log(title = "动态筛选", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TcDtSx tcDtSx)
{
public AjaxResult add(@RequestBody TcDtSx tcDtSx) {
return toAjax(tcDtSxService.insertTcDtSx(tcDtSx));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:sx:edit')")
@Log(title = "动态筛选", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TcDtSx tcDtSx)
{
public AjaxResult edit(@RequestBody TcDtSx tcDtSx) {
return toAjax(tcDtSxService.updateTcDtSx(tcDtSx));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:sx:remove')")
@Log(title = "动态筛选", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(tcDtSxService.deleteTcDtSxByIds(ids));
}
}

@ -1,26 +1,17 @@
package com.ruoyi.zongzhi.controller;
import java.util.List;
import io.swagger.annotations.Api;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
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.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.zongzhi.domain.TcNetworkSentiment;
import com.ruoyi.zongzhi.service.ITcNetworkSentimentService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* Controller
@ -31,8 +22,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
@RestController
@RequestMapping("/zongzhi/sentiment")
@Api(tags = " 网络舆情")
public class TcNetworkSentimentController extends BaseController
{
public class TcNetworkSentimentController extends BaseController {
@Autowired
private ITcNetworkSentimentService tcNetworkSentimentService;
@ -41,8 +31,7 @@ public class TcNetworkSentimentController extends BaseController
*/
@GetMapping("/list")
public TableDataInfo list(TcNetworkSentiment tcNetworkSentiment)
{
public TableDataInfo list(TcNetworkSentiment tcNetworkSentiment) {
startPage();
List<TcNetworkSentiment> list = tcNetworkSentimentService.selectTcNetworkSentimentList(tcNetworkSentiment);
return getDataTable(list);
@ -53,8 +42,7 @@ public class TcNetworkSentimentController extends BaseController
*/
@PostMapping("/export")
public void export(HttpServletResponse response, TcNetworkSentiment tcNetworkSentiment)
{
public void export(HttpServletResponse response, TcNetworkSentiment tcNetworkSentiment) {
List<TcNetworkSentiment> list = tcNetworkSentimentService.selectTcNetworkSentimentList(tcNetworkSentiment);
ExcelUtil<TcNetworkSentiment> util = new ExcelUtil<TcNetworkSentiment>(TcNetworkSentiment.class);
util.exportExcel(response, list, "网络舆情数据");
@ -65,8 +53,7 @@ public class TcNetworkSentimentController extends BaseController
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(tcNetworkSentimentService.selectTcNetworkSentimentById(id));
}
@ -75,8 +62,7 @@ public class TcNetworkSentimentController extends BaseController
*/
@PostMapping
public AjaxResult add(@RequestBody TcNetworkSentiment tcNetworkSentiment)
{
public AjaxResult add(@RequestBody TcNetworkSentiment tcNetworkSentiment) {
return toAjax(tcNetworkSentimentService.insertTcNetworkSentiment(tcNetworkSentiment));
}
@ -85,8 +71,7 @@ public class TcNetworkSentimentController extends BaseController
*/
@PutMapping
public AjaxResult edit(@RequestBody TcNetworkSentiment tcNetworkSentiment)
{
public AjaxResult edit(@RequestBody TcNetworkSentiment tcNetworkSentiment) {
return toAjax(tcNetworkSentimentService.updateTcNetworkSentiment(tcNetworkSentiment));
}
@ -94,9 +79,8 @@ public class TcNetworkSentimentController extends BaseController
*
*/
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(tcNetworkSentimentService.deleteTcNetworkSentimentByIds(ids));
}
}

@ -39,7 +39,6 @@ public class TcQlzxxdsjController extends BaseController
/**
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:qlzxxdsj:list')")
@GetMapping("/list")
public TableDataInfo list(TcQlzxxdsj tcQlzxxdsj)
{
@ -51,8 +50,6 @@ public class TcQlzxxdsjController extends BaseController
/**
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:qlzxxdsj:export')")
@Log(title = "清郎专项行动数据统计", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, TcQlzxxdsj tcQlzxxdsj)
{
@ -64,7 +61,7 @@ public class TcQlzxxdsjController extends BaseController
/**
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:qlzxxdsj:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
@ -74,8 +71,7 @@ public class TcQlzxxdsjController extends BaseController
/**
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:qlzxxdsj:add')")
@Log(title = "清郎专项行动数据统计", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TcQlzxxdsj tcQlzxxdsj)
{
@ -85,8 +81,7 @@ public class TcQlzxxdsjController extends BaseController
/**
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:qlzxxdsj:edit')")
@Log(title = "清郎专项行动数据统计", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TcQlzxxdsj tcQlzxxdsj)
{
@ -96,8 +91,7 @@ public class TcQlzxxdsjController extends BaseController
/**
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:qlzxxdsj:remove')")
@Log(title = "清郎专项行动数据统计", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{

@ -1,26 +1,17 @@
package com.ruoyi.zongzhi.controller;
import java.util.List;
import io.swagger.annotations.Api;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
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.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.zongzhi.domain.TcTb;
import com.ruoyi.zongzhi.service.ITcTbService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* Controller
@ -31,8 +22,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
@RestController
@RequestMapping("/zongzhi/tb")
@Api(tags = " 通报")
public class TcTbController extends BaseController
{
public class TcTbController extends BaseController {
@Autowired
private ITcTbService tcTbService;
@ -41,8 +31,7 @@ public class TcTbController extends BaseController
*/
@GetMapping("/list")
public TableDataInfo list(TcTb tcTb)
{
public TableDataInfo list(TcTb tcTb) {
startPage();
List<TcTb> list = tcTbService.selectTcTbList(tcTb);
return getDataTable(list);
@ -53,8 +42,7 @@ public class TcTbController extends BaseController
*/
@PostMapping("/export")
public void export(HttpServletResponse response, TcTb tcTb)
{
public void export(HttpServletResponse response, TcTb tcTb) {
List<TcTb> list = tcTbService.selectTcTbList(tcTb);
ExcelUtil<TcTb> util = new ExcelUtil<TcTb>(TcTb.class);
util.exportExcel(response, list, "通报数据");
@ -65,8 +53,7 @@ public class TcTbController extends BaseController
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(tcTbService.selectTcTbById(id));
}
@ -75,8 +62,7 @@ public class TcTbController extends BaseController
*/
@PostMapping
public AjaxResult add(@RequestBody TcTb tcTb)
{
public AjaxResult add(@RequestBody TcTb tcTb) {
return toAjax(tcTbService.insertTcTb(tcTb));
}
@ -85,8 +71,7 @@ public class TcTbController extends BaseController
*/
@PutMapping
public AjaxResult edit(@RequestBody TcTb tcTb)
{
public AjaxResult edit(@RequestBody TcTb tcTb) {
return toAjax(tcTbService.updateTcTb(tcTb));
}
@ -94,9 +79,8 @@ public class TcTbController extends BaseController
*
*/
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(tcTbService.deleteTcTbByIds(ids));
}
}

@ -1,26 +1,17 @@
package com.ruoyi.zongzhi.controller;
import java.util.List;
import io.swagger.annotations.Api;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
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.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.zongzhi.domain.TcWpyrwwcl;
import com.ruoyi.zongzhi.service.ITcWpyrwwclService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* Controller
@ -31,18 +22,16 @@ import com.ruoyi.common.core.page.TableDataInfo;
@RestController
@RequestMapping("/zongzhi/wpyrwwcl")
@Api(tags = " 网评员任务完成率心")
public class TcWpyrwwclController extends BaseController
{
public class TcWpyrwwclController extends BaseController {
@Autowired
private ITcWpyrwwclService tcWpyrwwclService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:wpyrwwcl:list')")
@GetMapping("/list")
public TableDataInfo list(TcWpyrwwcl tcWpyrwwcl)
{
public TableDataInfo list(TcWpyrwwcl tcWpyrwwcl) {
startPage();
List<TcWpyrwwcl> list = tcWpyrwwclService.selectTcWpyrwwclList(tcWpyrwwcl);
return getDataTable(list);
@ -51,11 +40,9 @@ public class TcWpyrwwclController extends BaseController
/**
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:wpyrwwcl:export')")
@Log(title = "网评员任务完成率心", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, TcWpyrwwcl tcWpyrwwcl)
{
public void export(HttpServletResponse response, TcWpyrwwcl tcWpyrwwcl) {
List<TcWpyrwwcl> list = tcWpyrwwclService.selectTcWpyrwwclList(tcWpyrwwcl);
ExcelUtil<TcWpyrwwcl> util = new ExcelUtil<TcWpyrwwcl>(TcWpyrwwcl.class);
util.exportExcel(response, list, "网评员任务完成率心数据");
@ -64,43 +51,36 @@ public class TcWpyrwwclController extends BaseController
/**
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:wpyrwwcl:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(tcWpyrwwclService.selectTcWpyrwwclById(id));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:wpyrwwcl:add')")
@Log(title = "网评员任务完成率心", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TcWpyrwwcl tcWpyrwwcl)
{
public AjaxResult add(@RequestBody TcWpyrwwcl tcWpyrwwcl) {
return toAjax(tcWpyrwwclService.insertTcWpyrwwcl(tcWpyrwwcl));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:wpyrwwcl:edit')")
@Log(title = "网评员任务完成率心", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TcWpyrwwcl tcWpyrwwcl)
{
public AjaxResult edit(@RequestBody TcWpyrwwcl tcWpyrwwcl) {
return toAjax(tcWpyrwwclService.updateTcWpyrwwcl(tcWpyrwwcl));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:wpyrwwcl:remove')")
@Log(title = "网评员任务完成率心", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(tcWpyrwwclService.deleteTcWpyrwwclByIds(ids));
}
}

@ -1,26 +1,17 @@
package com.ruoyi.zongzhi.controller;
import java.util.List;
import io.swagger.annotations.Api;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
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.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.zongzhi.domain.TcYqFl;
import com.ruoyi.zongzhi.service.ITcYqFlService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* Controller
@ -31,18 +22,16 @@ import com.ruoyi.common.core.page.TableDataInfo;
@RestController
@RequestMapping("/zongzhi/fl")
@Api(tags = " 舆情分类")
public class TcYqFlController extends BaseController
{
public class TcYqFlController extends BaseController {
@Autowired
private ITcYqFlService tcYqFlService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:fl:list')")
@GetMapping("/list")
public TableDataInfo list(TcYqFl tcYqFl)
{
public TableDataInfo list(TcYqFl tcYqFl) {
startPage();
List<TcYqFl> list = tcYqFlService.selectTcYqFlList(tcYqFl);
return getDataTable(list);
@ -51,11 +40,9 @@ public class TcYqFlController extends BaseController
/**
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:fl:export')")
@Log(title = "舆情分类", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, TcYqFl tcYqFl)
{
public void export(HttpServletResponse response, TcYqFl tcYqFl) {
List<TcYqFl> list = tcYqFlService.selectTcYqFlList(tcYqFl);
ExcelUtil<TcYqFl> util = new ExcelUtil<TcYqFl>(TcYqFl.class);
util.exportExcel(response, list, "舆情分类数据");
@ -64,43 +51,36 @@ public class TcYqFlController extends BaseController
/**
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:fl:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(tcYqFlService.selectTcYqFlById(id));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:fl:add')")
@Log(title = "舆情分类", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TcYqFl tcYqFl)
{
public AjaxResult add(@RequestBody TcYqFl tcYqFl) {
return toAjax(tcYqFlService.insertTcYqFl(tcYqFl));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:fl:edit')")
@Log(title = "舆情分类", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TcYqFl tcYqFl)
{
public AjaxResult edit(@RequestBody TcYqFl tcYqFl) {
return toAjax(tcYqFlService.updateTcYqFl(tcYqFl));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:fl:remove')")
@Log(title = "舆情分类", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(tcYqFlService.deleteTcYqFlByIds(ids));
}
}

@ -1,26 +1,17 @@
package com.ruoyi.zongzhi.controller;
import java.util.List;
import io.swagger.annotations.Api;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
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.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.zongzhi.domain.TcYqZs;
import com.ruoyi.zongzhi.service.ITcYqZsService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* Controller
@ -31,18 +22,15 @@ import com.ruoyi.common.core.page.TableDataInfo;
@RestController
@RequestMapping("/zongzhi/zs")
@Api(tags = " 舆情走势图")
public class TcYqZsController extends BaseController
{
public class TcYqZsController extends BaseController {
@Autowired
private ITcYqZsService tcYqZsService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:zs:list')")
@GetMapping("/list")
public TableDataInfo list(TcYqZs tcYqZs)
{
public TableDataInfo list(TcYqZs tcYqZs) {
startPage();
List<TcYqZs> list = tcYqZsService.selectTcYqZsList(tcYqZs);
return getDataTable(list);
@ -51,11 +39,9 @@ public class TcYqZsController extends BaseController
/**
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:zs:export')")
@Log(title = "舆情走势图", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, TcYqZs tcYqZs)
{
public void export(HttpServletResponse response, TcYqZs tcYqZs) {
List<TcYqZs> list = tcYqZsService.selectTcYqZsList(tcYqZs);
ExcelUtil<TcYqZs> util = new ExcelUtil<TcYqZs>(TcYqZs.class);
util.exportExcel(response, list, "舆情走势图数据");
@ -64,43 +50,36 @@ public class TcYqZsController extends BaseController
/**
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:zs:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(tcYqZsService.selectTcYqZsById(id));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:zs:add')")
@Log(title = "舆情走势图", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TcYqZs tcYqZs)
{
public AjaxResult add(@RequestBody TcYqZs tcYqZs) {
return toAjax(tcYqZsService.insertTcYqZs(tcYqZs));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:zs:edit')")
@Log(title = "舆情走势图", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TcYqZs tcYqZs)
{
public AjaxResult edit(@RequestBody TcYqZs tcYqZs) {
return toAjax(tcYqZsService.updateTcYqZs(tcYqZs));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:zs:remove')")
@Log(title = "舆情走势图", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(tcYqZsService.deleteTcYqZsByIds(ids));
}
}

Loading…
Cancel
Save