添加模块

dongdingding
吴顺杰 2 years ago
parent 277592a75a
commit 912534deae

@ -72,17 +72,11 @@
<version>${oshi.version}</version> <version>${oshi.version}</version>
</dependency> </dependency>
<!-- Swagger3依赖 --> <!--引入Knife4j的官方start包,该指南选择Spring Boot版本<3.0,开发者需要注意-->
<dependency> <dependency>
<groupId>io.springfox</groupId> <groupId>com.github.xiaoymin</groupId>
<artifactId>springfox-boot-starter</artifactId> <artifactId>knife4j-openapi2-spring-boot-starter</artifactId>
<version>${swagger.version}</version> <version>4.0.0</version>
<exclusions>
<exclusion>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<!-- io常用工具类 --> <!-- io常用工具类 -->

@ -1,5 +1,7 @@
package com.ruoyi.web.core.config; package com.ruoyi.web.core.config;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.config.RuoYiConfig; import com.ruoyi.common.config.RuoYiConfig;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -62,7 +64,10 @@ public class SwaggerConfig {
// 扫描所有 .apis(RequestHandlerSelectors.any()) // 扫描所有 .apis(RequestHandlerSelectors.any())
.paths(PathSelectors.any()) .paths(PathSelectors.any())
.build() .build()
.ignoredParameterTypes(Page.class, IPage.class)
.pathMapping(pathMapping); .pathMapping(pathMapping);
// 排除mybatis-plus的分页参数
} }

@ -1,38 +1,35 @@
package com.ruoyi.zongzhi.controller; package com.ruoyi.zongzhi.controller;
import java.util.List; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.zongzhi.domain.TcAttack;
import com.ruoyi.zongzhi.service.ITcAttackService;
import io.swagger.annotations.Api; 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.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; 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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.domain.AjaxResult; import java.util.List;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.zongzhi.domain.TcAttack;
import com.ruoyi.zongzhi.service.ITcAttackService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/** /**
* Controller * Controller
* *
* @author ruoyi * @author ruoyi
* @date 2023-08-21 * @date 2023-08-21
*/ */
@RestController @RestController
@RequestMapping("/zongzhi/attack") @RequestMapping("/zongzhi/attack")
@Api(tags = " 地区受攻击") @Api(tags = " 地区受攻击")
public class TcAttackController extends BaseController public class TcAttackController extends BaseController {
{
@Autowired @Autowired
private ITcAttackService tcAttackService; private ITcAttackService tcAttackService;
@ -41,8 +38,7 @@ public class TcAttackController extends BaseController
*/ */
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TcAttack tcAttack) public TableDataInfo list(TcAttack tcAttack) {
{
startPage(); startPage();
List<TcAttack> list = tcAttackService.selectTcAttackList(tcAttack); List<TcAttack> list = tcAttackService.selectTcAttackList(tcAttack);
return getDataTable(list); return getDataTable(list);
@ -53,8 +49,7 @@ public class TcAttackController extends BaseController
*/ */
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, TcAttack tcAttack) public void export(HttpServletResponse response, TcAttack tcAttack) {
{
List<TcAttack> list = tcAttackService.selectTcAttackList(tcAttack); List<TcAttack> list = tcAttackService.selectTcAttackList(tcAttack);
ExcelUtil<TcAttack> util = new ExcelUtil<TcAttack>(TcAttack.class); ExcelUtil<TcAttack> util = new ExcelUtil<TcAttack>(TcAttack.class);
util.exportExcel(response, list, "地区受攻击数据"); util.exportExcel(response, list, "地区受攻击数据");
@ -65,8 +60,7 @@ public class TcAttackController extends BaseController
*/ */
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) {
{
return success(tcAttackService.selectTcAttackById(id)); return success(tcAttackService.selectTcAttackById(id));
} }
@ -76,8 +70,7 @@ public class TcAttackController extends BaseController
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TcAttack tcAttack) public AjaxResult add(@RequestBody TcAttack tcAttack) {
{
return toAjax(tcAttackService.insertTcAttack(tcAttack)); return toAjax(tcAttackService.insertTcAttack(tcAttack));
} }
@ -86,8 +79,7 @@ public class TcAttackController extends BaseController
*/ */
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TcAttack tcAttack) public AjaxResult edit(@RequestBody TcAttack tcAttack) {
{
return toAjax(tcAttackService.updateTcAttack(tcAttack)); return toAjax(tcAttackService.updateTcAttack(tcAttack));
} }
@ -95,9 +87,8 @@ public class TcAttackController extends BaseController
* *
*/ */
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids) {
{
return toAjax(tcAttackService.deleteTcAttackByIds(ids)); return toAjax(tcAttackService.deleteTcAttackByIds(ids));
} }
} }

@ -1,38 +1,35 @@
package com.ruoyi.zongzhi.controller; package com.ruoyi.zongzhi.controller;
import java.util.List; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.zongzhi.domain.TcBjsj;
import com.ruoyi.zongzhi.service.ITcBjsjService;
import io.swagger.annotations.Api; 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.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; 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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.domain.AjaxResult; import java.util.List;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.zongzhi.domain.TcBjsj;
import com.ruoyi.zongzhi.service.ITcBjsjService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/** /**
* ()Controller * ()Controller
* *
* @author ruoyi * @author ruoyi
* @date 2023-08-28 * @date 2023-08-28
*/ */
@RestController @RestController
@RequestMapping("/zongzhi/bjsj") @RequestMapping("/zongzhi/bjsj")
@Api(tags = " 本级上级网评指令比列 (月)") @Api(tags = " 本级上级网评指令比列 (月)")
public class TcBjsjController extends BaseController public class TcBjsjController extends BaseController {
{
@Autowired @Autowired
private ITcBjsjService tcBjsjService; private ITcBjsjService tcBjsjService;
@ -41,8 +38,7 @@ public class TcBjsjController extends BaseController
*/ */
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TcBjsj tcBjsj) public TableDataInfo list(TcBjsj tcBjsj) {
{
startPage(); startPage();
List<TcBjsj> list = tcBjsjService.selectTcBjsjList(tcBjsj); List<TcBjsj> list = tcBjsjService.selectTcBjsjList(tcBjsj);
return getDataTable(list); return getDataTable(list);
@ -53,8 +49,7 @@ public class TcBjsjController extends BaseController
*/ */
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, TcBjsj tcBjsj) public void export(HttpServletResponse response, TcBjsj tcBjsj) {
{
List<TcBjsj> list = tcBjsjService.selectTcBjsjList(tcBjsj); List<TcBjsj> list = tcBjsjService.selectTcBjsjList(tcBjsj);
ExcelUtil<TcBjsj> util = new ExcelUtil<TcBjsj>(TcBjsj.class); ExcelUtil<TcBjsj> util = new ExcelUtil<TcBjsj>(TcBjsj.class);
util.exportExcel(response, list, "本级上级网评指令比列 (月)数据"); util.exportExcel(response, list, "本级上级网评指令比列 (月)数据");
@ -65,8 +60,7 @@ public class TcBjsjController extends BaseController
*/ */
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) {
{
return success(tcBjsjService.selectTcBjsjById(id)); return success(tcBjsjService.selectTcBjsjById(id));
} }
@ -75,8 +69,7 @@ public class TcBjsjController extends BaseController
*/ */
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TcBjsj tcBjsj) public AjaxResult add(@RequestBody TcBjsj tcBjsj) {
{
return toAjax(tcBjsjService.insertTcBjsj(tcBjsj)); return toAjax(tcBjsjService.insertTcBjsj(tcBjsj));
} }
@ -85,8 +78,7 @@ public class TcBjsjController extends BaseController
*/ */
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TcBjsj tcBjsj) public AjaxResult edit(@RequestBody TcBjsj tcBjsj) {
{
return toAjax(tcBjsjService.updateTcBjsj(tcBjsj)); return toAjax(tcBjsjService.updateTcBjsj(tcBjsj));
} }
@ -94,9 +86,8 @@ public class TcBjsjController extends BaseController
* () * ()
*/ */
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids) {
{
return toAjax(tcBjsjService.deleteTcBjsjByIds(ids)); return toAjax(tcBjsjService.deleteTcBjsjByIds(ids));
} }
} }

@ -1,38 +1,35 @@
package com.ruoyi.zongzhi.controller; package com.ruoyi.zongzhi.controller;
import java.util.List; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.zongzhi.domain.TcCommentator;
import com.ruoyi.zongzhi.service.ITcCommentatorService;
import io.swagger.annotations.Api; 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.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; 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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.domain.AjaxResult; import java.util.List;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.zongzhi.domain.TcCommentator;
import com.ruoyi.zongzhi.service.ITcCommentatorService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/** /**
* Controller * Controller
* *
* @author ruoyi * @author ruoyi
* @date 2023-08-10 * @date 2023-08-10
*/ */
@RestController @RestController
@RequestMapping("/zongzhi/commentator") @RequestMapping("/zongzhi/commentator")
@Api(tags = " 网评员") @Api(tags = " 网评员")
public class TcCommentatorController extends BaseController public class TcCommentatorController extends BaseController {
{
@Autowired @Autowired
private ITcCommentatorService tcCommentatorService; private ITcCommentatorService tcCommentatorService;
@ -41,8 +38,7 @@ public class TcCommentatorController extends BaseController
*/ */
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TcCommentator tcCommentator) public TableDataInfo list(TcCommentator tcCommentator) {
{
startPage(); startPage();
List<TcCommentator> list = tcCommentatorService.selectTcCommentatorList(tcCommentator); List<TcCommentator> list = tcCommentatorService.selectTcCommentatorList(tcCommentator);
return getDataTable(list); return getDataTable(list);
@ -54,8 +50,7 @@ public class TcCommentatorController extends BaseController
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, TcCommentator tcCommentator) public void export(HttpServletResponse response, TcCommentator tcCommentator) {
{
List<TcCommentator> list = tcCommentatorService.selectTcCommentatorList(tcCommentator); List<TcCommentator> list = tcCommentatorService.selectTcCommentatorList(tcCommentator);
ExcelUtil<TcCommentator> util = new ExcelUtil<TcCommentator>(TcCommentator.class); ExcelUtil<TcCommentator> util = new ExcelUtil<TcCommentator>(TcCommentator.class);
util.exportExcel(response, list, "网评员数据"); util.exportExcel(response, list, "网评员数据");
@ -66,8 +61,7 @@ public class TcCommentatorController extends BaseController
*/ */
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) {
{
return success(tcCommentatorService.selectTcCommentatorById(id)); return success(tcCommentatorService.selectTcCommentatorById(id));
} }
@ -77,8 +71,7 @@ public class TcCommentatorController extends BaseController
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TcCommentator tcCommentator) public AjaxResult add(@RequestBody TcCommentator tcCommentator) {
{
return toAjax(tcCommentatorService.insertTcCommentator(tcCommentator)); return toAjax(tcCommentatorService.insertTcCommentator(tcCommentator));
} }
@ -87,8 +80,7 @@ public class TcCommentatorController extends BaseController
*/ */
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TcCommentator tcCommentator) public AjaxResult edit(@RequestBody TcCommentator tcCommentator) {
{
return toAjax(tcCommentatorService.updateTcCommentator(tcCommentator)); return toAjax(tcCommentatorService.updateTcCommentator(tcCommentator));
} }
@ -96,9 +88,8 @@ public class TcCommentatorController extends BaseController
* *
*/ */
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids) {
{
return toAjax(tcCommentatorService.deleteTcCommentatorByIds(ids)); return toAjax(tcCommentatorService.deleteTcCommentatorByIds(ids));
} }
} }

@ -1,38 +1,37 @@
package com.ruoyi.zongzhi.controller; package com.ruoyi.zongzhi.controller;
import java.util.List; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.zongzhi.domain.TcDataSource;
import com.ruoyi.zongzhi.service.ITcDataSourceService;
import io.swagger.annotations.Api; 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.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; 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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.domain.AjaxResult; import java.util.Arrays;
import com.ruoyi.common.enums.BusinessType; import java.util.List;
import com.ruoyi.zongzhi.domain.TcDataSource;
import com.ruoyi.zongzhi.service.ITcDataSourceService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/** /**
* Controller * Controller
* *
* @author ruoyi * @author ruoyi
* @date 2023-08-10 * @date 2023-08-10
*/ */
@RestController @RestController
@RequestMapping("/zongzhi/source") @RequestMapping("/zongzhi/source")
@Api(tags = " 数据来源") @Api(tags = " 数据来源")
public class TcDataSourceController extends BaseController public class TcDataSourceController extends BaseController {
{
@Autowired @Autowired
private ITcDataSourceService tcDataSourceService; private ITcDataSourceService tcDataSourceService;
@ -41,9 +40,12 @@ public class TcDataSourceController extends BaseController
*/ */
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TcDataSource tcDataSource) public TableDataInfo list(TcDataSource tcDataSource) {
{
startPage(); startPage();
if (StringUtils.isNotEmpty(tcDataSource.getNotType())) {
List<String> list = Arrays.asList(tcDataSource.getNotType().split(","));
tcDataSource.setNotTypeList(list);
}
List<TcDataSource> list = tcDataSourceService.selectTcDataSourceList(tcDataSource); List<TcDataSource> list = tcDataSourceService.selectTcDataSourceList(tcDataSource);
return getDataTable(list); return getDataTable(list);
} }
@ -54,8 +56,7 @@ public class TcDataSourceController extends BaseController
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, TcDataSource tcDataSource) public void export(HttpServletResponse response, TcDataSource tcDataSource) {
{
List<TcDataSource> list = tcDataSourceService.selectTcDataSourceList(tcDataSource); List<TcDataSource> list = tcDataSourceService.selectTcDataSourceList(tcDataSource);
ExcelUtil<TcDataSource> util = new ExcelUtil<TcDataSource>(TcDataSource.class); ExcelUtil<TcDataSource> util = new ExcelUtil<TcDataSource>(TcDataSource.class);
util.exportExcel(response, list, "数据来源数据"); util.exportExcel(response, list, "数据来源数据");
@ -66,8 +67,7 @@ public class TcDataSourceController extends BaseController
*/ */
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) {
{
return success(tcDataSourceService.selectTcDataSourceById(id)); return success(tcDataSourceService.selectTcDataSourceById(id));
} }
@ -75,8 +75,7 @@ public class TcDataSourceController extends BaseController
* *
*/ */
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TcDataSource tcDataSource) public AjaxResult add(@RequestBody TcDataSource tcDataSource) {
{
return toAjax(tcDataSourceService.insertTcDataSource(tcDataSource)); return toAjax(tcDataSourceService.insertTcDataSource(tcDataSource));
} }
@ -85,8 +84,7 @@ public class TcDataSourceController extends BaseController
*/ */
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TcDataSource tcDataSource) public AjaxResult edit(@RequestBody TcDataSource tcDataSource) {
{
return toAjax(tcDataSourceService.updateTcDataSource(tcDataSource)); return toAjax(tcDataSourceService.updateTcDataSource(tcDataSource));
} }
@ -95,9 +93,8 @@ public class TcDataSourceController extends BaseController
*/ */
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids) {
{
return toAjax(tcDataSourceService.deleteTcDataSourceByIds(ids)); return toAjax(tcDataSourceService.deleteTcDataSourceByIds(ids));
} }
} }

@ -0,0 +1,105 @@
package com.ruoyi.zongzhi.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.zongzhi.domain.TcDataSourceTj;
import com.ruoyi.zongzhi.service.TcDataSourceTjService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;
/**
* (TcDataSourceTj)
*
* @author wu
* @since 2023-09-12 14:55:53
*/
@RestController
@RequestMapping("zongzhi/tcDataSourceTj")
@Api(tags = "数据来源统计表")
@Transactional(rollbackFor = Exception.class)
public class TcDataSourceTjController extends BaseController {
/**
*
*/
@Resource
private TcDataSourceTjService tcDataSourceTjService;
/**
*
*
* @param page
* @param tcDataSourceTj
* @return
*/
@GetMapping
@ApiOperation(value = "分页条件查询数据来源统计表", response = TcDataSourceTj.class)
public AjaxResult page(Page<TcDataSourceTj> page, TcDataSourceTj tcDataSourceTj) {
return success(tcDataSourceTjService.page(page, new QueryWrapper<>(tcDataSourceTj)));
}
/**
*
*
* @param id
* @return
*/
@GetMapping("{id}")
@ApiOperation(value = "通过主键查询单条数据来源统计表", response = TcDataSourceTj.class)
public AjaxResult getById(@PathVariable Serializable id) {
return success(tcDataSourceTjService.getById(id));
}
/**
*
*
* @param tcDataSourceTj
* @return
*/
@PostMapping
@ApiOperation(value = "新增数据来源统计表", response = TcDataSourceTj.class)
public AjaxResult insert(@RequestBody TcDataSourceTj tcDataSourceTj) {
return success(tcDataSourceTjService.save(tcDataSourceTj));
}
/**
*
*
* @param tcDataSourceTj
* @return
*/
@PutMapping
@ApiOperation(value = "修改数据来源统计表")
public AjaxResult update(@RequestBody TcDataSourceTj tcDataSourceTj) {
return success(tcDataSourceTjService.updateById(tcDataSourceTj));
}
/**
*
*
* @param idList
* @return
*/
@DeleteMapping
@ApiOperation(value = "删除数据来源统计表")
public AjaxResult delete(@RequestParam("idList") List<Long> idList) {
return success(tcDataSourceTjService.removeByIds(idList));
}
}

@ -1,38 +1,35 @@
package com.ruoyi.zongzhi.controller; package com.ruoyi.zongzhi.controller;
import java.util.List; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.zongzhi.domain.TcDengbaoSystem;
import com.ruoyi.zongzhi.service.ITcDengbaoSystemService;
import io.swagger.annotations.Api; 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.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; 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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.domain.AjaxResult; import java.util.List;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.zongzhi.domain.TcDengbaoSystem;
import com.ruoyi.zongzhi.service.ITcDengbaoSystemService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/** /**
* Controller * Controller
* *
* @author ruoyi * @author ruoyi
* @date 2023-08-10 * @date 2023-08-10
*/ */
@RestController @RestController
@RequestMapping("/zongzhi/system") @RequestMapping("/zongzhi/system")
@Api(tags = " 等保系统") @Api(tags = " 等保系统")
public class TcDengbaoSystemController extends BaseController public class TcDengbaoSystemController extends BaseController {
{
@Autowired @Autowired
private ITcDengbaoSystemService tcDengbaoSystemService; private ITcDengbaoSystemService tcDengbaoSystemService;
@ -41,8 +38,7 @@ public class TcDengbaoSystemController extends BaseController
*/ */
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TcDengbaoSystem tcDengbaoSystem) public TableDataInfo list(TcDengbaoSystem tcDengbaoSystem) {
{
startPage(); startPage();
List<TcDengbaoSystem> list = tcDengbaoSystemService.selectTcDengbaoSystemList(tcDengbaoSystem); List<TcDengbaoSystem> list = tcDengbaoSystemService.selectTcDengbaoSystemList(tcDengbaoSystem);
return getDataTable(list); return getDataTable(list);
@ -53,8 +49,7 @@ public class TcDengbaoSystemController extends BaseController
*/ */
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, TcDengbaoSystem tcDengbaoSystem) public void export(HttpServletResponse response, TcDengbaoSystem tcDengbaoSystem) {
{
List<TcDengbaoSystem> list = tcDengbaoSystemService.selectTcDengbaoSystemList(tcDengbaoSystem); List<TcDengbaoSystem> list = tcDengbaoSystemService.selectTcDengbaoSystemList(tcDengbaoSystem);
ExcelUtil<TcDengbaoSystem> util = new ExcelUtil<TcDengbaoSystem>(TcDengbaoSystem.class); ExcelUtil<TcDengbaoSystem> util = new ExcelUtil<TcDengbaoSystem>(TcDengbaoSystem.class);
util.exportExcel(response, list, "等保系统数据"); util.exportExcel(response, list, "等保系统数据");
@ -65,8 +60,7 @@ public class TcDengbaoSystemController extends BaseController
*/ */
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) {
{
return success(tcDengbaoSystemService.selectTcDengbaoSystemById(id)); return success(tcDengbaoSystemService.selectTcDengbaoSystemById(id));
} }
@ -75,8 +69,7 @@ public class TcDengbaoSystemController extends BaseController
*/ */
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TcDengbaoSystem tcDengbaoSystem) public AjaxResult add(@RequestBody TcDengbaoSystem tcDengbaoSystem) {
{
return toAjax(tcDengbaoSystemService.insertTcDengbaoSystem(tcDengbaoSystem)); return toAjax(tcDengbaoSystemService.insertTcDengbaoSystem(tcDengbaoSystem));
} }
@ -85,8 +78,7 @@ public class TcDengbaoSystemController extends BaseController
*/ */
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TcDengbaoSystem tcDengbaoSystem) public AjaxResult edit(@RequestBody TcDengbaoSystem tcDengbaoSystem) {
{
return toAjax(tcDengbaoSystemService.updateTcDengbaoSystem(tcDengbaoSystem)); return toAjax(tcDengbaoSystemService.updateTcDengbaoSystem(tcDengbaoSystem));
} }
@ -94,9 +86,8 @@ public class TcDengbaoSystemController extends BaseController
* *
*/ */
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids) {
{
return toAjax(tcDengbaoSystemService.deleteTcDengbaoSystemByIds(ids)); return toAjax(tcDengbaoSystemService.deleteTcDengbaoSystemByIds(ids));
} }
} }

@ -8,7 +8,14 @@ import com.ruoyi.zongzhi.domain.TcDengbaoUnit;
import com.ruoyi.zongzhi.service.ITcDengbaoUnitService; import com.ruoyi.zongzhi.service.ITcDengbaoUnitService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;

@ -8,7 +8,14 @@ import com.ruoyi.zongzhi.domain.TcDtSx;
import com.ruoyi.zongzhi.service.ITcDtSxService; import com.ruoyi.zongzhi.service.ITcDtSxService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;

@ -1,39 +1,35 @@
package com.ruoyi.zongzhi.controller; package com.ruoyi.zongzhi.controller;
import java.util.List; import com.ruoyi.common.core.controller.BaseController;
import javax.servlet.http.HttpServletResponse; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.zongzhi.domain.TcExtworkSafetyadmin;
import com.ruoyi.zongzhi.service.ITcExtworkSafetyadminService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; 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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.domain.AjaxResult; import java.util.List;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.zongzhi.domain.TcExtworkSafetyadmin;
import com.ruoyi.zongzhi.service.ITcExtworkSafetyadminService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/** /**
* Controller * Controller
* *
* @author ruoyi * @author ruoyi
* @date 2023-08-10 * @date 2023-08-10
*/ */
@RestController @RestController
@RequestMapping("/zongzhi/safetyadmin") @RequestMapping("/zongzhi/safetyadmin")
@Api(tags = "网络安全官") @Api(tags = "网络安全官")
public class TcExtworkSafetyadminController extends BaseController public class TcExtworkSafetyadminController extends BaseController {
{
@Autowired @Autowired
private ITcExtworkSafetyadminService tcExtworkSafetyadminService; private ITcExtworkSafetyadminService tcExtworkSafetyadminService;
@ -42,8 +38,7 @@ public class TcExtworkSafetyadminController extends BaseController
*/ */
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TcExtworkSafetyadmin tcExtworkSafetyadmin) public TableDataInfo list(TcExtworkSafetyadmin tcExtworkSafetyadmin) {
{
startPage(); startPage();
List<TcExtworkSafetyadmin> list = tcExtworkSafetyadminService.selectTcExtworkSafetyadminList(tcExtworkSafetyadmin); List<TcExtworkSafetyadmin> list = tcExtworkSafetyadminService.selectTcExtworkSafetyadminList(tcExtworkSafetyadmin);
return getDataTable(list); return getDataTable(list);
@ -54,8 +49,7 @@ public class TcExtworkSafetyadminController extends BaseController
*/ */
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, TcExtworkSafetyadmin tcExtworkSafetyadmin) public void export(HttpServletResponse response, TcExtworkSafetyadmin tcExtworkSafetyadmin) {
{
List<TcExtworkSafetyadmin> list = tcExtworkSafetyadminService.selectTcExtworkSafetyadminList(tcExtworkSafetyadmin); List<TcExtworkSafetyadmin> list = tcExtworkSafetyadminService.selectTcExtworkSafetyadminList(tcExtworkSafetyadmin);
ExcelUtil<TcExtworkSafetyadmin> util = new ExcelUtil<TcExtworkSafetyadmin>(TcExtworkSafetyadmin.class); ExcelUtil<TcExtworkSafetyadmin> util = new ExcelUtil<TcExtworkSafetyadmin>(TcExtworkSafetyadmin.class);
util.exportExcel(response, list, "网络安全官数据"); util.exportExcel(response, list, "网络安全官数据");
@ -66,8 +60,7 @@ public class TcExtworkSafetyadminController extends BaseController
*/ */
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) {
{
return success(tcExtworkSafetyadminService.selectTcExtworkSafetyadminById(id)); return success(tcExtworkSafetyadminService.selectTcExtworkSafetyadminById(id));
} }
@ -76,8 +69,7 @@ public class TcExtworkSafetyadminController extends BaseController
*/ */
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TcExtworkSafetyadmin tcExtworkSafetyadmin) public AjaxResult add(@RequestBody TcExtworkSafetyadmin tcExtworkSafetyadmin) {
{
return toAjax(tcExtworkSafetyadminService.insertTcExtworkSafetyadmin(tcExtworkSafetyadmin)); return toAjax(tcExtworkSafetyadminService.insertTcExtworkSafetyadmin(tcExtworkSafetyadmin));
} }
@ -86,8 +78,7 @@ public class TcExtworkSafetyadminController extends BaseController
*/ */
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TcExtworkSafetyadmin tcExtworkSafetyadmin) public AjaxResult edit(@RequestBody TcExtworkSafetyadmin tcExtworkSafetyadmin) {
{
return toAjax(tcExtworkSafetyadminService.updateTcExtworkSafetyadmin(tcExtworkSafetyadmin)); return toAjax(tcExtworkSafetyadminService.updateTcExtworkSafetyadmin(tcExtworkSafetyadmin));
} }
@ -95,9 +86,8 @@ public class TcExtworkSafetyadminController extends BaseController
* *
*/ */
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids) {
{
return toAjax(tcExtworkSafetyadminService.deleteTcExtworkSafetyadminByIds(ids)); return toAjax(tcExtworkSafetyadminService.deleteTcExtworkSafetyadminByIds(ids));
} }
} }

@ -1,38 +1,35 @@
package com.ruoyi.zongzhi.controller; package com.ruoyi.zongzhi.controller;
import java.util.List; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.zongzhi.domain.TcGovernmentWeb;
import com.ruoyi.zongzhi.service.ITcGovernmentWebService;
import io.swagger.annotations.Api; 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.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; 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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.domain.AjaxResult; import java.util.List;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.zongzhi.domain.TcGovernmentWeb;
import com.ruoyi.zongzhi.service.ITcGovernmentWebService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/** /**
* Controller * Controller
* *
* @author ruoyi * @author ruoyi
* @date 2023-08-10 * @date 2023-08-10
*/ */
@RestController @RestController
@RequestMapping("/zongzhi/web") @RequestMapping("/zongzhi/web")
@Api(tags = " 政府网站") @Api(tags = " 政府网站")
public class TcGovernmentWebController extends BaseController public class TcGovernmentWebController extends BaseController {
{
@Autowired @Autowired
private ITcGovernmentWebService tcGovernmentWebService; private ITcGovernmentWebService tcGovernmentWebService;
@ -40,8 +37,7 @@ public class TcGovernmentWebController extends BaseController
* *
*/ */
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TcGovernmentWeb tcGovernmentWeb) public TableDataInfo list(TcGovernmentWeb tcGovernmentWeb) {
{
startPage(); startPage();
List<TcGovernmentWeb> list = tcGovernmentWebService.selectTcGovernmentWebList(tcGovernmentWeb); List<TcGovernmentWeb> list = tcGovernmentWebService.selectTcGovernmentWebList(tcGovernmentWeb);
return getDataTable(list); return getDataTable(list);
@ -52,8 +48,7 @@ public class TcGovernmentWebController extends BaseController
*/ */
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, TcGovernmentWeb tcGovernmentWeb) public void export(HttpServletResponse response, TcGovernmentWeb tcGovernmentWeb) {
{
List<TcGovernmentWeb> list = tcGovernmentWebService.selectTcGovernmentWebList(tcGovernmentWeb); List<TcGovernmentWeb> list = tcGovernmentWebService.selectTcGovernmentWebList(tcGovernmentWeb);
ExcelUtil<TcGovernmentWeb> util = new ExcelUtil<TcGovernmentWeb>(TcGovernmentWeb.class); ExcelUtil<TcGovernmentWeb> util = new ExcelUtil<TcGovernmentWeb>(TcGovernmentWeb.class);
util.exportExcel(response, list, "政府网站数据"); util.exportExcel(response, list, "政府网站数据");
@ -64,8 +59,7 @@ public class TcGovernmentWebController extends BaseController
*/ */
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) {
{
return success(tcGovernmentWebService.selectTcGovernmentWebById(id)); return success(tcGovernmentWebService.selectTcGovernmentWebById(id));
} }
@ -74,8 +68,7 @@ public class TcGovernmentWebController extends BaseController
*/ */
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TcGovernmentWeb tcGovernmentWeb) public AjaxResult add(@RequestBody TcGovernmentWeb tcGovernmentWeb) {
{
return toAjax(tcGovernmentWebService.insertTcGovernmentWeb(tcGovernmentWeb)); return toAjax(tcGovernmentWebService.insertTcGovernmentWeb(tcGovernmentWeb));
} }
@ -84,8 +77,7 @@ public class TcGovernmentWebController extends BaseController
*/ */
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TcGovernmentWeb tcGovernmentWeb) public AjaxResult edit(@RequestBody TcGovernmentWeb tcGovernmentWeb) {
{
return toAjax(tcGovernmentWebService.updateTcGovernmentWeb(tcGovernmentWeb)); return toAjax(tcGovernmentWebService.updateTcGovernmentWeb(tcGovernmentWeb));
} }
@ -93,9 +85,8 @@ public class TcGovernmentWebController extends BaseController
* *
*/ */
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids) {
{
return toAjax(tcGovernmentWebService.deleteTcGovernmentWebByIds(ids)); return toAjax(tcGovernmentWebService.deleteTcGovernmentWebByIds(ids));
} }
} }

@ -1,38 +1,35 @@
package com.ruoyi.zongzhi.controller; package com.ruoyi.zongzhi.controller;
import java.util.List; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.zongzhi.domain.TcIdcUnit;
import com.ruoyi.zongzhi.service.ITcIdcUnitService;
import io.swagger.annotations.Api; 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.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; 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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.domain.AjaxResult; import java.util.List;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.zongzhi.domain.TcIdcUnit;
import com.ruoyi.zongzhi.service.ITcIdcUnitService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/** /**
* IDCController * IDCController
* *
* @author ruoyi * @author ruoyi
* @date 2023-08-10 * @date 2023-08-10
*/ */
@RestController @RestController
@RequestMapping("/zongzhi/idcunit") @RequestMapping("/zongzhi/idcunit")
@Api(tags = " IDC单位") @Api(tags = " IDC单位")
public class TcIdcUnitController extends BaseController public class TcIdcUnitController extends BaseController {
{
@Autowired @Autowired
private ITcIdcUnitService tcIdcUnitService; private ITcIdcUnitService tcIdcUnitService;
@ -41,8 +38,7 @@ public class TcIdcUnitController extends BaseController
*/ */
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TcIdcUnit tcIdcUnit) public TableDataInfo list(TcIdcUnit tcIdcUnit) {
{
startPage(); startPage();
List<TcIdcUnit> list = tcIdcUnitService.selectTcIdcUnitList(tcIdcUnit); List<TcIdcUnit> list = tcIdcUnitService.selectTcIdcUnitList(tcIdcUnit);
return getDataTable(list); return getDataTable(list);
@ -53,8 +49,7 @@ public class TcIdcUnitController extends BaseController
*/ */
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, TcIdcUnit tcIdcUnit) public void export(HttpServletResponse response, TcIdcUnit tcIdcUnit) {
{
List<TcIdcUnit> list = tcIdcUnitService.selectTcIdcUnitList(tcIdcUnit); List<TcIdcUnit> list = tcIdcUnitService.selectTcIdcUnitList(tcIdcUnit);
ExcelUtil<TcIdcUnit> util = new ExcelUtil<TcIdcUnit>(TcIdcUnit.class); ExcelUtil<TcIdcUnit> util = new ExcelUtil<TcIdcUnit>(TcIdcUnit.class);
util.exportExcel(response, list, "IDC单位数据"); util.exportExcel(response, list, "IDC单位数据");
@ -65,8 +60,7 @@ public class TcIdcUnitController extends BaseController
*/ */
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) {
{
return success(tcIdcUnitService.selectTcIdcUnitById(id)); return success(tcIdcUnitService.selectTcIdcUnitById(id));
} }
@ -75,8 +69,7 @@ public class TcIdcUnitController extends BaseController
*/ */
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TcIdcUnit tcIdcUnit) public AjaxResult add(@RequestBody TcIdcUnit tcIdcUnit) {
{
return toAjax(tcIdcUnitService.insertTcIdcUnit(tcIdcUnit)); return toAjax(tcIdcUnitService.insertTcIdcUnit(tcIdcUnit));
} }
@ -85,8 +78,7 @@ public class TcIdcUnitController extends BaseController
*/ */
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TcIdcUnit tcIdcUnit) public AjaxResult edit(@RequestBody TcIdcUnit tcIdcUnit) {
{
return toAjax(tcIdcUnitService.updateTcIdcUnit(tcIdcUnit)); return toAjax(tcIdcUnitService.updateTcIdcUnit(tcIdcUnit));
} }
@ -94,9 +86,8 @@ public class TcIdcUnitController extends BaseController
* IDC * IDC
*/ */
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids) {
{
return toAjax(tcIdcUnitService.deleteTcIdcUnitByIds(ids)); return toAjax(tcIdcUnitService.deleteTcIdcUnitByIds(ids));
} }
} }

@ -1,38 +1,35 @@
package com.ruoyi.zongzhi.controller; package com.ruoyi.zongzhi.controller;
import java.util.List; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.zongzhi.domain.TcNetworkArticle;
import com.ruoyi.zongzhi.service.ITcNetworkArticleService;
import io.swagger.annotations.Api; 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.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; 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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.domain.AjaxResult; import java.util.List;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.zongzhi.domain.TcNetworkArticle;
import com.ruoyi.zongzhi.service.ITcNetworkArticleService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/** /**
* Controller * Controller
* *
* @author ruoyi * @author ruoyi
* @date 2023-08-10 * @date 2023-08-10
*/ */
@RestController @RestController
@RequestMapping("/zongzhi/article") @RequestMapping("/zongzhi/article")
@Api(tags = " 网络文章") @Api(tags = " 网络文章")
public class TcNetworkArticleController extends BaseController public class TcNetworkArticleController extends BaseController {
{
@Autowired @Autowired
private ITcNetworkArticleService tcNetworkArticleService; private ITcNetworkArticleService tcNetworkArticleService;
@ -41,8 +38,7 @@ public class TcNetworkArticleController extends BaseController
*/ */
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TcNetworkArticle tcNetworkArticle) public TableDataInfo list(TcNetworkArticle tcNetworkArticle) {
{
startPage(); startPage();
List<TcNetworkArticle> list = tcNetworkArticleService.selectTcNetworkArticleList(tcNetworkArticle); List<TcNetworkArticle> list = tcNetworkArticleService.selectTcNetworkArticleList(tcNetworkArticle);
return getDataTable(list); return getDataTable(list);
@ -53,8 +49,7 @@ public class TcNetworkArticleController extends BaseController
*/ */
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, TcNetworkArticle tcNetworkArticle) public void export(HttpServletResponse response, TcNetworkArticle tcNetworkArticle) {
{
List<TcNetworkArticle> list = tcNetworkArticleService.selectTcNetworkArticleList(tcNetworkArticle); List<TcNetworkArticle> list = tcNetworkArticleService.selectTcNetworkArticleList(tcNetworkArticle);
ExcelUtil<TcNetworkArticle> util = new ExcelUtil<TcNetworkArticle>(TcNetworkArticle.class); ExcelUtil<TcNetworkArticle> util = new ExcelUtil<TcNetworkArticle>(TcNetworkArticle.class);
util.exportExcel(response, list, "网络文章数据"); util.exportExcel(response, list, "网络文章数据");
@ -65,8 +60,7 @@ public class TcNetworkArticleController extends BaseController
*/ */
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) {
{
return success(tcNetworkArticleService.selectTcNetworkArticleById(id)); return success(tcNetworkArticleService.selectTcNetworkArticleById(id));
} }
@ -75,8 +69,7 @@ public class TcNetworkArticleController extends BaseController
*/ */
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TcNetworkArticle tcNetworkArticle) public AjaxResult add(@RequestBody TcNetworkArticle tcNetworkArticle) {
{
return toAjax(tcNetworkArticleService.insertTcNetworkArticle(tcNetworkArticle)); return toAjax(tcNetworkArticleService.insertTcNetworkArticle(tcNetworkArticle));
} }
@ -85,8 +78,7 @@ public class TcNetworkArticleController extends BaseController
*/ */
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TcNetworkArticle tcNetworkArticle) public AjaxResult edit(@RequestBody TcNetworkArticle tcNetworkArticle) {
{
return toAjax(tcNetworkArticleService.updateTcNetworkArticle(tcNetworkArticle)); return toAjax(tcNetworkArticleService.updateTcNetworkArticle(tcNetworkArticle));
} }
@ -94,9 +86,8 @@ public class TcNetworkArticleController extends BaseController
* *
*/ */
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids) {
{
return toAjax(tcNetworkArticleService.deleteTcNetworkArticleByIds(ids)); return toAjax(tcNetworkArticleService.deleteTcNetworkArticleByIds(ids));
} }
} }

@ -1,38 +1,35 @@
package com.ruoyi.zongzhi.controller; package com.ruoyi.zongzhi.controller;
import java.util.List; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.zongzhi.domain.TcNetworkEvaluate;
import com.ruoyi.zongzhi.service.ITcNetworkEvaluateService;
import io.swagger.annotations.Api; 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.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; 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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.domain.AjaxResult; import java.util.List;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.zongzhi.domain.TcNetworkEvaluate;
import com.ruoyi.zongzhi.service.ITcNetworkEvaluateService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/** /**
* Controller * Controller
* *
* @author ruoyi * @author ruoyi
* @date 2023-08-10 * @date 2023-08-10
*/ */
@RestController @RestController
@RequestMapping("/zongzhi/evaluate") @RequestMapping("/zongzhi/evaluate")
@Api(tags = " 网评") @Api(tags = " 网评")
public class TcNetworkEvaluateController extends BaseController public class TcNetworkEvaluateController extends BaseController {
{
@Autowired @Autowired
private ITcNetworkEvaluateService tcNetworkEvaluateService; private ITcNetworkEvaluateService tcNetworkEvaluateService;
@ -41,8 +38,7 @@ public class TcNetworkEvaluateController extends BaseController
*/ */
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TcNetworkEvaluate tcNetworkEvaluate) public TableDataInfo list(TcNetworkEvaluate tcNetworkEvaluate) {
{
startPage(); startPage();
List<TcNetworkEvaluate> list = tcNetworkEvaluateService.selectTcNetworkEvaluateList(tcNetworkEvaluate); List<TcNetworkEvaluate> list = tcNetworkEvaluateService.selectTcNetworkEvaluateList(tcNetworkEvaluate);
return getDataTable(list); return getDataTable(list);
@ -53,8 +49,7 @@ public class TcNetworkEvaluateController extends BaseController
*/ */
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, TcNetworkEvaluate tcNetworkEvaluate) public void export(HttpServletResponse response, TcNetworkEvaluate tcNetworkEvaluate) {
{
List<TcNetworkEvaluate> list = tcNetworkEvaluateService.selectTcNetworkEvaluateList(tcNetworkEvaluate); List<TcNetworkEvaluate> list = tcNetworkEvaluateService.selectTcNetworkEvaluateList(tcNetworkEvaluate);
ExcelUtil<TcNetworkEvaluate> util = new ExcelUtil<TcNetworkEvaluate>(TcNetworkEvaluate.class); ExcelUtil<TcNetworkEvaluate> util = new ExcelUtil<TcNetworkEvaluate>(TcNetworkEvaluate.class);
util.exportExcel(response, list, "网评数据"); util.exportExcel(response, list, "网评数据");
@ -65,8 +60,7 @@ public class TcNetworkEvaluateController extends BaseController
*/ */
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) {
{
return success(tcNetworkEvaluateService.selectTcNetworkEvaluateById(id)); return success(tcNetworkEvaluateService.selectTcNetworkEvaluateById(id));
} }
@ -75,8 +69,7 @@ public class TcNetworkEvaluateController extends BaseController
*/ */
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TcNetworkEvaluate tcNetworkEvaluate) public AjaxResult add(@RequestBody TcNetworkEvaluate tcNetworkEvaluate) {
{
return toAjax(tcNetworkEvaluateService.insertTcNetworkEvaluate(tcNetworkEvaluate)); return toAjax(tcNetworkEvaluateService.insertTcNetworkEvaluate(tcNetworkEvaluate));
} }
@ -86,8 +79,7 @@ public class TcNetworkEvaluateController extends BaseController
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TcNetworkEvaluate tcNetworkEvaluate) public AjaxResult edit(@RequestBody TcNetworkEvaluate tcNetworkEvaluate) {
{
return toAjax(tcNetworkEvaluateService.updateTcNetworkEvaluate(tcNetworkEvaluate)); return toAjax(tcNetworkEvaluateService.updateTcNetworkEvaluate(tcNetworkEvaluate));
} }
@ -95,9 +87,8 @@ public class TcNetworkEvaluateController extends BaseController
* *
*/ */
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids) {
{
return toAjax(tcNetworkEvaluateService.deleteTcNetworkEvaluateByIds(ids)); return toAjax(tcNetworkEvaluateService.deleteTcNetworkEvaluateByIds(ids));
} }
} }

@ -1,38 +1,35 @@
package com.ruoyi.zongzhi.controller; package com.ruoyi.zongzhi.controller;
import java.util.List; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.zongzhi.domain.TcNetworkMqPrincipal;
import com.ruoyi.zongzhi.service.ITcNetworkMqPrincipalService;
import io.swagger.annotations.Api; 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.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; 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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.domain.AjaxResult; import java.util.List;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.zongzhi.domain.TcNetworkMqPrincipal;
import com.ruoyi.zongzhi.service.ITcNetworkMqPrincipalService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/** /**
* Controller * Controller
* *
* @author ruoyi * @author ruoyi
* @date 2023-08-10 * @date 2023-08-10
*/ */
@RestController @RestController
@RequestMapping("/zongzhi/principal") @RequestMapping("/zongzhi/principal")
@Api(tags = " 网络民情责任人") @Api(tags = " 网络民情责任人")
public class TcNetworkMqPrincipalController extends BaseController public class TcNetworkMqPrincipalController extends BaseController {
{
@Autowired @Autowired
private ITcNetworkMqPrincipalService tcNetworkMqPrincipalService; private ITcNetworkMqPrincipalService tcNetworkMqPrincipalService;
@ -41,8 +38,7 @@ public class TcNetworkMqPrincipalController extends BaseController
*/ */
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TcNetworkMqPrincipal tcNetworkMqPrincipal) public TableDataInfo list(TcNetworkMqPrincipal tcNetworkMqPrincipal) {
{
startPage(); startPage();
List<TcNetworkMqPrincipal> list = tcNetworkMqPrincipalService.selectTcNetworkMqPrincipalList(tcNetworkMqPrincipal); List<TcNetworkMqPrincipal> list = tcNetworkMqPrincipalService.selectTcNetworkMqPrincipalList(tcNetworkMqPrincipal);
return getDataTable(list); return getDataTable(list);
@ -53,8 +49,7 @@ public class TcNetworkMqPrincipalController extends BaseController
*/ */
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, TcNetworkMqPrincipal tcNetworkMqPrincipal) public void export(HttpServletResponse response, TcNetworkMqPrincipal tcNetworkMqPrincipal) {
{
List<TcNetworkMqPrincipal> list = tcNetworkMqPrincipalService.selectTcNetworkMqPrincipalList(tcNetworkMqPrincipal); List<TcNetworkMqPrincipal> list = tcNetworkMqPrincipalService.selectTcNetworkMqPrincipalList(tcNetworkMqPrincipal);
ExcelUtil<TcNetworkMqPrincipal> util = new ExcelUtil<TcNetworkMqPrincipal>(TcNetworkMqPrincipal.class); ExcelUtil<TcNetworkMqPrincipal> util = new ExcelUtil<TcNetworkMqPrincipal>(TcNetworkMqPrincipal.class);
util.exportExcel(response, list, "网络民情责任人数据"); util.exportExcel(response, list, "网络民情责任人数据");
@ -65,8 +60,7 @@ public class TcNetworkMqPrincipalController extends BaseController
*/ */
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) {
{
return success(tcNetworkMqPrincipalService.selectTcNetworkMqPrincipalById(id)); return success(tcNetworkMqPrincipalService.selectTcNetworkMqPrincipalById(id));
} }
@ -75,8 +69,7 @@ public class TcNetworkMqPrincipalController extends BaseController
*/ */
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TcNetworkMqPrincipal tcNetworkMqPrincipal) public AjaxResult add(@RequestBody TcNetworkMqPrincipal tcNetworkMqPrincipal) {
{
return toAjax(tcNetworkMqPrincipalService.insertTcNetworkMqPrincipal(tcNetworkMqPrincipal)); return toAjax(tcNetworkMqPrincipalService.insertTcNetworkMqPrincipal(tcNetworkMqPrincipal));
} }
@ -85,8 +78,7 @@ public class TcNetworkMqPrincipalController extends BaseController
*/ */
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TcNetworkMqPrincipal tcNetworkMqPrincipal) public AjaxResult edit(@RequestBody TcNetworkMqPrincipal tcNetworkMqPrincipal) {
{
return toAjax(tcNetworkMqPrincipalService.updateTcNetworkMqPrincipal(tcNetworkMqPrincipal)); return toAjax(tcNetworkMqPrincipalService.updateTcNetworkMqPrincipal(tcNetworkMqPrincipal));
} }
@ -94,9 +86,8 @@ public class TcNetworkMqPrincipalController extends BaseController
* *
*/ */
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids) {
{
return toAjax(tcNetworkMqPrincipalService.deleteTcNetworkMqPrincipalByIds(ids)); return toAjax(tcNetworkMqPrincipalService.deleteTcNetworkMqPrincipalByIds(ids));
} }
} }

@ -1,38 +1,35 @@
package com.ruoyi.zongzhi.controller; package com.ruoyi.zongzhi.controller;
import java.util.List; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.zongzhi.domain.TcNetworkPingtai;
import com.ruoyi.zongzhi.service.ITcNetworkPingtaiService;
import io.swagger.annotations.Api; 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.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; 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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.domain.AjaxResult; import java.util.List;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.zongzhi.domain.TcNetworkPingtai;
import com.ruoyi.zongzhi.service.ITcNetworkPingtaiService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/** /**
* Controller * Controller
* *
* @author ruoyi * @author ruoyi
* @date 2023-08-10 * @date 2023-08-10
*/ */
@RestController @RestController
@RequestMapping("/zongzhi/pingtai") @RequestMapping("/zongzhi/pingtai")
@Api(tags = " 网络平台") @Api(tags = " 网络平台")
public class TcNetworkPingtaiController extends BaseController public class TcNetworkPingtaiController extends BaseController {
{
@Autowired @Autowired
private ITcNetworkPingtaiService tcNetworkPingtaiService; private ITcNetworkPingtaiService tcNetworkPingtaiService;
@ -41,8 +38,7 @@ public class TcNetworkPingtaiController extends BaseController
*/ */
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TcNetworkPingtai tcNetworkPingtai) public TableDataInfo list(TcNetworkPingtai tcNetworkPingtai) {
{
startPage(); startPage();
List<TcNetworkPingtai> list = tcNetworkPingtaiService.selectTcNetworkPingtaiList(tcNetworkPingtai); List<TcNetworkPingtai> list = tcNetworkPingtaiService.selectTcNetworkPingtaiList(tcNetworkPingtai);
return getDataTable(list); return getDataTable(list);
@ -53,8 +49,7 @@ public class TcNetworkPingtaiController extends BaseController
*/ */
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, TcNetworkPingtai tcNetworkPingtai) public void export(HttpServletResponse response, TcNetworkPingtai tcNetworkPingtai) {
{
List<TcNetworkPingtai> list = tcNetworkPingtaiService.selectTcNetworkPingtaiList(tcNetworkPingtai); List<TcNetworkPingtai> list = tcNetworkPingtaiService.selectTcNetworkPingtaiList(tcNetworkPingtai);
ExcelUtil<TcNetworkPingtai> util = new ExcelUtil<TcNetworkPingtai>(TcNetworkPingtai.class); ExcelUtil<TcNetworkPingtai> util = new ExcelUtil<TcNetworkPingtai>(TcNetworkPingtai.class);
util.exportExcel(response, list, "网络平台数据"); util.exportExcel(response, list, "网络平台数据");
@ -65,8 +60,7 @@ public class TcNetworkPingtaiController extends BaseController
*/ */
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) {
{
return success(tcNetworkPingtaiService.selectTcNetworkPingtaiById(id)); return success(tcNetworkPingtaiService.selectTcNetworkPingtaiById(id));
} }
@ -75,8 +69,7 @@ public class TcNetworkPingtaiController extends BaseController
*/ */
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TcNetworkPingtai tcNetworkPingtai) public AjaxResult add(@RequestBody TcNetworkPingtai tcNetworkPingtai) {
{
return toAjax(tcNetworkPingtaiService.insertTcNetworkPingtai(tcNetworkPingtai)); return toAjax(tcNetworkPingtaiService.insertTcNetworkPingtai(tcNetworkPingtai));
} }
@ -85,8 +78,7 @@ public class TcNetworkPingtaiController extends BaseController
*/ */
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TcNetworkPingtai tcNetworkPingtai) public AjaxResult edit(@RequestBody TcNetworkPingtai tcNetworkPingtai) {
{
return toAjax(tcNetworkPingtaiService.updateTcNetworkPingtai(tcNetworkPingtai)); return toAjax(tcNetworkPingtaiService.updateTcNetworkPingtai(tcNetworkPingtai));
} }
@ -94,9 +86,8 @@ public class TcNetworkPingtaiController extends BaseController
* *
*/ */
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids) {
{
return toAjax(tcNetworkPingtaiService.deleteTcNetworkPingtaiByIds(ids)); return toAjax(tcNetworkPingtaiService.deleteTcNetworkPingtaiByIds(ids));
} }
} }

@ -1,38 +1,35 @@
package com.ruoyi.zongzhi.controller; package com.ruoyi.zongzhi.controller;
import java.util.List; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.zongzhi.domain.TcNetworkReport;
import com.ruoyi.zongzhi.service.ITcNetworkReportService;
import io.swagger.annotations.Api; 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.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; 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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.domain.AjaxResult; import java.util.List;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.zongzhi.domain.TcNetworkReport;
import com.ruoyi.zongzhi.service.ITcNetworkReportService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/** /**
* Controller * Controller
* *
* @author ruoyi * @author ruoyi
* @date 2023-08-10 * @date 2023-08-10
*/ */
@RestController @RestController
@RequestMapping("/zongzhi/report") @RequestMapping("/zongzhi/report")
@Api(tags = " 网络举报") @Api(tags = " 网络举报")
public class TcNetworkReportController extends BaseController public class TcNetworkReportController extends BaseController {
{
@Autowired @Autowired
private ITcNetworkReportService tcNetworkReportService; private ITcNetworkReportService tcNetworkReportService;
@ -40,8 +37,7 @@ public class TcNetworkReportController extends BaseController
* *
*/ */
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TcNetworkReport tcNetworkReport) public TableDataInfo list(TcNetworkReport tcNetworkReport) {
{
startPage(); startPage();
List<TcNetworkReport> list = tcNetworkReportService.selectTcNetworkReportList(tcNetworkReport); List<TcNetworkReport> list = tcNetworkReportService.selectTcNetworkReportList(tcNetworkReport);
return getDataTable(list); return getDataTable(list);
@ -52,8 +48,7 @@ public class TcNetworkReportController extends BaseController
*/ */
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, TcNetworkReport tcNetworkReport) public void export(HttpServletResponse response, TcNetworkReport tcNetworkReport) {
{
List<TcNetworkReport> list = tcNetworkReportService.selectTcNetworkReportList(tcNetworkReport); List<TcNetworkReport> list = tcNetworkReportService.selectTcNetworkReportList(tcNetworkReport);
ExcelUtil<TcNetworkReport> util = new ExcelUtil<TcNetworkReport>(TcNetworkReport.class); ExcelUtil<TcNetworkReport> util = new ExcelUtil<TcNetworkReport>(TcNetworkReport.class);
util.exportExcel(response, list, "网络举报数据"); util.exportExcel(response, list, "网络举报数据");
@ -64,8 +59,7 @@ public class TcNetworkReportController extends BaseController
*/ */
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) {
{
return success(tcNetworkReportService.selectTcNetworkReportById(id)); return success(tcNetworkReportService.selectTcNetworkReportById(id));
} }
@ -73,8 +67,7 @@ public class TcNetworkReportController extends BaseController
* *
*/ */
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TcNetworkReport tcNetworkReport) public AjaxResult add(@RequestBody TcNetworkReport tcNetworkReport) {
{
return toAjax(tcNetworkReportService.insertTcNetworkReport(tcNetworkReport)); return toAjax(tcNetworkReportService.insertTcNetworkReport(tcNetworkReport));
} }
@ -83,8 +76,7 @@ public class TcNetworkReportController extends BaseController
*/ */
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TcNetworkReport tcNetworkReport) public AjaxResult edit(@RequestBody TcNetworkReport tcNetworkReport) {
{
return toAjax(tcNetworkReportService.updateTcNetworkReport(tcNetworkReport)); return toAjax(tcNetworkReportService.updateTcNetworkReport(tcNetworkReport));
} }
@ -92,9 +84,8 @@ public class TcNetworkReportController extends BaseController
* *
*/ */
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids) {
{
return toAjax(tcNetworkReportService.deleteTcNetworkReportByIds(ids)); return toAjax(tcNetworkReportService.deleteTcNetworkReportByIds(ids));
} }
} }

@ -8,7 +8,14 @@ import com.ruoyi.zongzhi.domain.TcNetworkSentiment;
import com.ruoyi.zongzhi.service.ITcNetworkSentimentService; import com.ruoyi.zongzhi.service.ITcNetworkSentimentService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;

@ -1,38 +1,35 @@
package com.ruoyi.zongzhi.controller; package com.ruoyi.zongzhi.controller;
import java.util.List; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.zongzhi.domain.TcNetworkSupportUnit;
import com.ruoyi.zongzhi.service.ITcNetworkSupportUnitService;
import io.swagger.annotations.Api; 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.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; 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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.domain.AjaxResult; import java.util.List;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.zongzhi.domain.TcNetworkSupportUnit;
import com.ruoyi.zongzhi.service.ITcNetworkSupportUnitService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/** /**
* Controller * Controller
* *
* @author ruoyi * @author ruoyi
* @date 2023-08-10 * @date 2023-08-10
*/ */
@RestController @RestController
@RequestMapping("/zongzhi/supportunit") @RequestMapping("/zongzhi/supportunit")
@Api(tags = " 网络安全支持单位") @Api(tags = " 网络安全支持单位")
public class TcNetworkSupportUnitController extends BaseController public class TcNetworkSupportUnitController extends BaseController {
{
@Autowired @Autowired
private ITcNetworkSupportUnitService tcNetworkSupportUnitService; private ITcNetworkSupportUnitService tcNetworkSupportUnitService;
@ -41,8 +38,7 @@ public class TcNetworkSupportUnitController extends BaseController
*/ */
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TcNetworkSupportUnit tcNetworkSupportUnit) public TableDataInfo list(TcNetworkSupportUnit tcNetworkSupportUnit) {
{
startPage(); startPage();
List<TcNetworkSupportUnit> list = tcNetworkSupportUnitService.selectTcNetworkSupportUnitList(tcNetworkSupportUnit); List<TcNetworkSupportUnit> list = tcNetworkSupportUnitService.selectTcNetworkSupportUnitList(tcNetworkSupportUnit);
return getDataTable(list); return getDataTable(list);
@ -54,8 +50,7 @@ public class TcNetworkSupportUnitController extends BaseController
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, TcNetworkSupportUnit tcNetworkSupportUnit) public void export(HttpServletResponse response, TcNetworkSupportUnit tcNetworkSupportUnit) {
{
List<TcNetworkSupportUnit> list = tcNetworkSupportUnitService.selectTcNetworkSupportUnitList(tcNetworkSupportUnit); List<TcNetworkSupportUnit> list = tcNetworkSupportUnitService.selectTcNetworkSupportUnitList(tcNetworkSupportUnit);
ExcelUtil<TcNetworkSupportUnit> util = new ExcelUtil<TcNetworkSupportUnit>(TcNetworkSupportUnit.class); ExcelUtil<TcNetworkSupportUnit> util = new ExcelUtil<TcNetworkSupportUnit>(TcNetworkSupportUnit.class);
util.exportExcel(response, list, "网络安全支持单位数据"); util.exportExcel(response, list, "网络安全支持单位数据");
@ -66,8 +61,7 @@ public class TcNetworkSupportUnitController extends BaseController
*/ */
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) {
{
return success(tcNetworkSupportUnitService.selectTcNetworkSupportUnitById(id)); return success(tcNetworkSupportUnitService.selectTcNetworkSupportUnitById(id));
} }
@ -76,8 +70,7 @@ public class TcNetworkSupportUnitController extends BaseController
*/ */
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TcNetworkSupportUnit tcNetworkSupportUnit) public AjaxResult add(@RequestBody TcNetworkSupportUnit tcNetworkSupportUnit) {
{
return toAjax(tcNetworkSupportUnitService.insertTcNetworkSupportUnit(tcNetworkSupportUnit)); return toAjax(tcNetworkSupportUnitService.insertTcNetworkSupportUnit(tcNetworkSupportUnit));
} }
@ -86,8 +79,7 @@ public class TcNetworkSupportUnitController extends BaseController
*/ */
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TcNetworkSupportUnit tcNetworkSupportUnit) public AjaxResult edit(@RequestBody TcNetworkSupportUnit tcNetworkSupportUnit) {
{
return toAjax(tcNetworkSupportUnitService.updateTcNetworkSupportUnit(tcNetworkSupportUnit)); return toAjax(tcNetworkSupportUnitService.updateTcNetworkSupportUnit(tcNetworkSupportUnit));
} }
@ -95,9 +87,8 @@ public class TcNetworkSupportUnitController extends BaseController
* *
*/ */
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids) {
{
return toAjax(tcNetworkSupportUnitService.deleteTcNetworkSupportUnitByIds(ids)); return toAjax(tcNetworkSupportUnitService.deleteTcNetworkSupportUnitByIds(ids));
} }
} }

@ -1,38 +1,35 @@
package com.ruoyi.zongzhi.controller; package com.ruoyi.zongzhi.controller;
import java.util.List; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.zongzhi.domain.TcNetworkVolunteer;
import com.ruoyi.zongzhi.service.ITcNetworkVolunteerService;
import io.swagger.annotations.Api; 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.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; 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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.domain.AjaxResult; import java.util.List;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.zongzhi.domain.TcNetworkVolunteer;
import com.ruoyi.zongzhi.service.ITcNetworkVolunteerService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/** /**
* Controller * Controller
* *
* @author ruoyi * @author ruoyi
* @date 2023-08-10 * @date 2023-08-10
*/ */
@RestController @RestController
@RequestMapping("/zongzhi/volunteer") @RequestMapping("/zongzhi/volunteer")
@Api(tags = " 网络文明自愿者") @Api(tags = " 网络文明自愿者")
public class TcNetworkVolunteerController extends BaseController public class TcNetworkVolunteerController extends BaseController {
{
@Autowired @Autowired
private ITcNetworkVolunteerService tcNetworkVolunteerService; private ITcNetworkVolunteerService tcNetworkVolunteerService;
@ -41,8 +38,7 @@ public class TcNetworkVolunteerController extends BaseController
*/ */
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TcNetworkVolunteer tcNetworkVolunteer) public TableDataInfo list(TcNetworkVolunteer tcNetworkVolunteer) {
{
startPage(); startPage();
List<TcNetworkVolunteer> list = tcNetworkVolunteerService.selectTcNetworkVolunteerList(tcNetworkVolunteer); List<TcNetworkVolunteer> list = tcNetworkVolunteerService.selectTcNetworkVolunteerList(tcNetworkVolunteer);
return getDataTable(list); return getDataTable(list);
@ -53,8 +49,7 @@ public class TcNetworkVolunteerController extends BaseController
*/ */
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, TcNetworkVolunteer tcNetworkVolunteer) public void export(HttpServletResponse response, TcNetworkVolunteer tcNetworkVolunteer) {
{
List<TcNetworkVolunteer> list = tcNetworkVolunteerService.selectTcNetworkVolunteerList(tcNetworkVolunteer); List<TcNetworkVolunteer> list = tcNetworkVolunteerService.selectTcNetworkVolunteerList(tcNetworkVolunteer);
ExcelUtil<TcNetworkVolunteer> util = new ExcelUtil<TcNetworkVolunteer>(TcNetworkVolunteer.class); ExcelUtil<TcNetworkVolunteer> util = new ExcelUtil<TcNetworkVolunteer>(TcNetworkVolunteer.class);
util.exportExcel(response, list, "网络文明自愿者数据"); util.exportExcel(response, list, "网络文明自愿者数据");
@ -65,8 +60,7 @@ public class TcNetworkVolunteerController extends BaseController
*/ */
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) {
{
return success(tcNetworkVolunteerService.selectTcNetworkVolunteerById(id)); return success(tcNetworkVolunteerService.selectTcNetworkVolunteerById(id));
} }
@ -76,8 +70,7 @@ public class TcNetworkVolunteerController extends BaseController
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TcNetworkVolunteer tcNetworkVolunteer) public AjaxResult add(@RequestBody TcNetworkVolunteer tcNetworkVolunteer) {
{
return toAjax(tcNetworkVolunteerService.insertTcNetworkVolunteer(tcNetworkVolunteer)); return toAjax(tcNetworkVolunteerService.insertTcNetworkVolunteer(tcNetworkVolunteer));
} }
@ -86,8 +79,7 @@ public class TcNetworkVolunteerController extends BaseController
*/ */
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TcNetworkVolunteer tcNetworkVolunteer) public AjaxResult edit(@RequestBody TcNetworkVolunteer tcNetworkVolunteer) {
{
return toAjax(tcNetworkVolunteerService.updateTcNetworkVolunteer(tcNetworkVolunteer)); return toAjax(tcNetworkVolunteerService.updateTcNetworkVolunteer(tcNetworkVolunteer));
} }
@ -95,9 +87,8 @@ public class TcNetworkVolunteerController extends BaseController
* *
*/ */
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids) {
{
return toAjax(tcNetworkVolunteerService.deleteTcNetworkVolunteerByIds(ids)); return toAjax(tcNetworkVolunteerService.deleteTcNetworkVolunteerByIds(ids));
} }
} }

@ -1,38 +1,35 @@
package com.ruoyi.zongzhi.controller; package com.ruoyi.zongzhi.controller;
import java.util.List; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.zongzhi.domain.TcQinglangZhuanxiang;
import com.ruoyi.zongzhi.service.ITcQinglangZhuanxiangService;
import io.swagger.annotations.Api; 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.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; 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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.domain.AjaxResult; import java.util.List;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.zongzhi.domain.TcQinglangZhuanxiang;
import com.ruoyi.zongzhi.service.ITcQinglangZhuanxiangService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/** /**
* Controller * Controller
* *
* @author ruoyi * @author ruoyi
* @date 2023-08-10 * @date 2023-08-10
*/ */
@RestController @RestController
@RequestMapping("/zongzhi/zhuanxiang") @RequestMapping("/zongzhi/zhuanxiang")
@Api(tags = " 清朗专项") @Api(tags = " 清朗专项")
public class TcQinglangZhuanxiangController extends BaseController public class TcQinglangZhuanxiangController extends BaseController {
{
@Autowired @Autowired
private ITcQinglangZhuanxiangService tcQinglangZhuanxiangService; private ITcQinglangZhuanxiangService tcQinglangZhuanxiangService;
@ -41,8 +38,7 @@ public class TcQinglangZhuanxiangController extends BaseController
*/ */
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TcQinglangZhuanxiang tcQinglangZhuanxiang) public TableDataInfo list(TcQinglangZhuanxiang tcQinglangZhuanxiang) {
{
startPage(); startPage();
List<TcQinglangZhuanxiang> list = tcQinglangZhuanxiangService.selectTcQinglangZhuanxiangList(tcQinglangZhuanxiang); List<TcQinglangZhuanxiang> list = tcQinglangZhuanxiangService.selectTcQinglangZhuanxiangList(tcQinglangZhuanxiang);
return getDataTable(list); return getDataTable(list);
@ -53,8 +49,7 @@ public class TcQinglangZhuanxiangController extends BaseController
*/ */
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, TcQinglangZhuanxiang tcQinglangZhuanxiang) public void export(HttpServletResponse response, TcQinglangZhuanxiang tcQinglangZhuanxiang) {
{
List<TcQinglangZhuanxiang> list = tcQinglangZhuanxiangService.selectTcQinglangZhuanxiangList(tcQinglangZhuanxiang); List<TcQinglangZhuanxiang> list = tcQinglangZhuanxiangService.selectTcQinglangZhuanxiangList(tcQinglangZhuanxiang);
ExcelUtil<TcQinglangZhuanxiang> util = new ExcelUtil<TcQinglangZhuanxiang>(TcQinglangZhuanxiang.class); ExcelUtil<TcQinglangZhuanxiang> util = new ExcelUtil<TcQinglangZhuanxiang>(TcQinglangZhuanxiang.class);
util.exportExcel(response, list, "清朗专项数据"); util.exportExcel(response, list, "清朗专项数据");
@ -65,8 +60,7 @@ public class TcQinglangZhuanxiangController extends BaseController
*/ */
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) {
{
return success(tcQinglangZhuanxiangService.selectTcQinglangZhuanxiangById(id)); return success(tcQinglangZhuanxiangService.selectTcQinglangZhuanxiangById(id));
} }
@ -75,8 +69,7 @@ public class TcQinglangZhuanxiangController extends BaseController
*/ */
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TcQinglangZhuanxiang tcQinglangZhuanxiang) public AjaxResult add(@RequestBody TcQinglangZhuanxiang tcQinglangZhuanxiang) {
{
return toAjax(tcQinglangZhuanxiangService.insertTcQinglangZhuanxiang(tcQinglangZhuanxiang)); return toAjax(tcQinglangZhuanxiangService.insertTcQinglangZhuanxiang(tcQinglangZhuanxiang));
} }
@ -85,8 +78,7 @@ public class TcQinglangZhuanxiangController extends BaseController
*/ */
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TcQinglangZhuanxiang tcQinglangZhuanxiang) public AjaxResult edit(@RequestBody TcQinglangZhuanxiang tcQinglangZhuanxiang) {
{
return toAjax(tcQinglangZhuanxiangService.updateTcQinglangZhuanxiang(tcQinglangZhuanxiang)); return toAjax(tcQinglangZhuanxiangService.updateTcQinglangZhuanxiang(tcQinglangZhuanxiang));
} }
@ -94,9 +86,8 @@ public class TcQinglangZhuanxiangController extends BaseController
* *
*/ */
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids) {
{
return toAjax(tcQinglangZhuanxiangService.deleteTcQinglangZhuanxiangByIds(ids)); return toAjax(tcQinglangZhuanxiangService.deleteTcQinglangZhuanxiangByIds(ids));
} }
} }

@ -1,38 +1,35 @@
package com.ruoyi.zongzhi.controller; package com.ruoyi.zongzhi.controller;
import java.util.List; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.zongzhi.domain.TcQlzxxdsj;
import com.ruoyi.zongzhi.service.ITcQlzxxdsjService;
import io.swagger.annotations.Api; 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.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; 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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.domain.AjaxResult; import java.util.List;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.zongzhi.domain.TcQlzxxdsj;
import com.ruoyi.zongzhi.service.ITcQlzxxdsjService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/** /**
* Controller * Controller
* *
* @author ruoyi * @author ruoyi
* @date 2023-08-28 * @date 2023-08-28
*/ */
@RestController @RestController
@RequestMapping("/zongzhi/qlzxxdsj") @RequestMapping("/zongzhi/qlzxxdsj")
@Api(tags = " 清郎专项行动数据统计") @Api(tags = " 清郎专项行动数据统计")
public class TcQlzxxdsjController extends BaseController public class TcQlzxxdsjController extends BaseController {
{
@Autowired @Autowired
private ITcQlzxxdsjService tcQlzxxdsjService; private ITcQlzxxdsjService tcQlzxxdsjService;
@ -40,8 +37,7 @@ public class TcQlzxxdsjController extends BaseController
* *
*/ */
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TcQlzxxdsj tcQlzxxdsj) public TableDataInfo list(TcQlzxxdsj tcQlzxxdsj) {
{
startPage(); startPage();
List<TcQlzxxdsj> list = tcQlzxxdsjService.selectTcQlzxxdsjList(tcQlzxxdsj); List<TcQlzxxdsj> list = tcQlzxxdsjService.selectTcQlzxxdsjList(tcQlzxxdsj);
return getDataTable(list); return getDataTable(list);
@ -51,8 +47,7 @@ public class TcQlzxxdsjController extends BaseController
* *
*/ */
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, TcQlzxxdsj tcQlzxxdsj) public void export(HttpServletResponse response, TcQlzxxdsj tcQlzxxdsj) {
{
List<TcQlzxxdsj> list = tcQlzxxdsjService.selectTcQlzxxdsjList(tcQlzxxdsj); List<TcQlzxxdsj> list = tcQlzxxdsjService.selectTcQlzxxdsjList(tcQlzxxdsj);
ExcelUtil<TcQlzxxdsj> util = new ExcelUtil<TcQlzxxdsj>(TcQlzxxdsj.class); ExcelUtil<TcQlzxxdsj> util = new ExcelUtil<TcQlzxxdsj>(TcQlzxxdsj.class);
util.exportExcel(response, list, "清郎专项行动数据统计数据"); util.exportExcel(response, list, "清郎专项行动数据统计数据");
@ -63,8 +58,7 @@ public class TcQlzxxdsjController extends BaseController
*/ */
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) {
{
return success(tcQlzxxdsjService.selectTcQlzxxdsjById(id)); return success(tcQlzxxdsjService.selectTcQlzxxdsjById(id));
} }
@ -73,8 +67,7 @@ public class TcQlzxxdsjController extends BaseController
*/ */
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TcQlzxxdsj tcQlzxxdsj) public AjaxResult add(@RequestBody TcQlzxxdsj tcQlzxxdsj) {
{
return toAjax(tcQlzxxdsjService.insertTcQlzxxdsj(tcQlzxxdsj)); return toAjax(tcQlzxxdsjService.insertTcQlzxxdsj(tcQlzxxdsj));
} }
@ -83,8 +76,7 @@ public class TcQlzxxdsjController extends BaseController
*/ */
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TcQlzxxdsj tcQlzxxdsj) public AjaxResult edit(@RequestBody TcQlzxxdsj tcQlzxxdsj) {
{
return toAjax(tcQlzxxdsjService.updateTcQlzxxdsj(tcQlzxxdsj)); return toAjax(tcQlzxxdsjService.updateTcQlzxxdsj(tcQlzxxdsj));
} }
@ -92,9 +84,8 @@ public class TcQlzxxdsjController extends BaseController
* *
*/ */
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids) {
{
return toAjax(tcQlzxxdsjService.deleteTcQlzxxdsjByIds(ids)); return toAjax(tcQlzxxdsjService.deleteTcQlzxxdsjByIds(ids));
} }
} }

@ -1,38 +1,35 @@
package com.ruoyi.zongzhi.controller; package com.ruoyi.zongzhi.controller;
import java.util.List; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.zongzhi.domain.TcSafetyDanger;
import com.ruoyi.zongzhi.service.ITcSafetyDangerService;
import io.swagger.annotations.Api; 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.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; 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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.domain.AjaxResult; import java.util.List;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.zongzhi.domain.TcSafetyDanger;
import com.ruoyi.zongzhi.service.ITcSafetyDangerService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/** /**
* Controller * Controller
* *
* @author ruoyi * @author ruoyi
* @date 2023-08-10 * @date 2023-08-10
*/ */
@RestController @RestController
@RequestMapping("/zongzhi/danger") @RequestMapping("/zongzhi/danger")
@Api(tags = " 安全隐患") @Api(tags = " 安全隐患")
public class TcSafetyDangerController extends BaseController public class TcSafetyDangerController extends BaseController {
{
@Autowired @Autowired
private ITcSafetyDangerService tcSafetyDangerService; private ITcSafetyDangerService tcSafetyDangerService;
@ -41,8 +38,7 @@ public class TcSafetyDangerController extends BaseController
*/ */
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TcSafetyDanger tcSafetyDanger) public TableDataInfo list(TcSafetyDanger tcSafetyDanger) {
{
startPage(); startPage();
List<TcSafetyDanger> list = tcSafetyDangerService.selectTcSafetyDangerList(tcSafetyDanger); List<TcSafetyDanger> list = tcSafetyDangerService.selectTcSafetyDangerList(tcSafetyDanger);
return getDataTable(list); return getDataTable(list);
@ -53,8 +49,7 @@ public class TcSafetyDangerController extends BaseController
*/ */
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, TcSafetyDanger tcSafetyDanger) public void export(HttpServletResponse response, TcSafetyDanger tcSafetyDanger) {
{
List<TcSafetyDanger> list = tcSafetyDangerService.selectTcSafetyDangerList(tcSafetyDanger); List<TcSafetyDanger> list = tcSafetyDangerService.selectTcSafetyDangerList(tcSafetyDanger);
ExcelUtil<TcSafetyDanger> util = new ExcelUtil<TcSafetyDanger>(TcSafetyDanger.class); ExcelUtil<TcSafetyDanger> util = new ExcelUtil<TcSafetyDanger>(TcSafetyDanger.class);
util.exportExcel(response, list, "监管单位数据"); util.exportExcel(response, list, "监管单位数据");
@ -65,8 +60,7 @@ public class TcSafetyDangerController extends BaseController
*/ */
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) {
{
return success(tcSafetyDangerService.selectTcSafetyDangerById(id)); return success(tcSafetyDangerService.selectTcSafetyDangerById(id));
} }
@ -75,8 +69,7 @@ public class TcSafetyDangerController extends BaseController
*/ */
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TcSafetyDanger tcSafetyDanger) public AjaxResult add(@RequestBody TcSafetyDanger tcSafetyDanger) {
{
return toAjax(tcSafetyDangerService.insertTcSafetyDanger(tcSafetyDanger)); return toAjax(tcSafetyDangerService.insertTcSafetyDanger(tcSafetyDanger));
} }
@ -85,8 +78,7 @@ public class TcSafetyDangerController extends BaseController
*/ */
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TcSafetyDanger tcSafetyDanger) public AjaxResult edit(@RequestBody TcSafetyDanger tcSafetyDanger) {
{
return toAjax(tcSafetyDangerService.updateTcSafetyDanger(tcSafetyDanger)); return toAjax(tcSafetyDangerService.updateTcSafetyDanger(tcSafetyDanger));
} }
@ -94,9 +86,8 @@ public class TcSafetyDangerController extends BaseController
* *
*/ */
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids) {
{
return toAjax(tcSafetyDangerService.deleteTcSafetyDangerByIds(ids)); return toAjax(tcSafetyDangerService.deleteTcSafetyDangerByIds(ids));
} }
} }

@ -1,39 +1,35 @@
package com.ruoyi.zongzhi.controller; package com.ruoyi.zongzhi.controller;
import java.util.List; import com.ruoyi.common.core.controller.BaseController;
import javax.servlet.http.HttpServletResponse; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.zongzhi.domain.TcSafetyDetection;
import com.ruoyi.zongzhi.service.ITcSafetyDetectionService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; 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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.domain.AjaxResult; import java.util.List;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.zongzhi.domain.TcSafetyDetection;
import com.ruoyi.zongzhi.service.ITcSafetyDetectionService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/** /**
* Controller * Controller
* *
* @author ruoyi * @author ruoyi
* @date 2023-08-10 * @date 2023-08-10
*/ */
@RestController @RestController
@RequestMapping("/zongzhi/detection") @RequestMapping("/zongzhi/detection")
@Api(tags = "安全检测") @Api(tags = "安全检测")
public class TcSafetyDetectionController extends BaseController public class TcSafetyDetectionController extends BaseController {
{
@Autowired @Autowired
private ITcSafetyDetectionService tcSafetyDetectionService; private ITcSafetyDetectionService tcSafetyDetectionService;
@ -42,8 +38,7 @@ public class TcSafetyDetectionController extends BaseController
*/ */
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TcSafetyDetection tcSafetyDetection) public TableDataInfo list(TcSafetyDetection tcSafetyDetection) {
{
startPage(); startPage();
List<TcSafetyDetection> list = tcSafetyDetectionService.selectTcSafetyDetectionList(tcSafetyDetection); List<TcSafetyDetection> list = tcSafetyDetectionService.selectTcSafetyDetectionList(tcSafetyDetection);
return getDataTable(list); return getDataTable(list);
@ -55,8 +50,7 @@ public class TcSafetyDetectionController extends BaseController
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, TcSafetyDetection tcSafetyDetection) public void export(HttpServletResponse response, TcSafetyDetection tcSafetyDetection) {
{
List<TcSafetyDetection> list = tcSafetyDetectionService.selectTcSafetyDetectionList(tcSafetyDetection); List<TcSafetyDetection> list = tcSafetyDetectionService.selectTcSafetyDetectionList(tcSafetyDetection);
ExcelUtil<TcSafetyDetection> util = new ExcelUtil<TcSafetyDetection>(TcSafetyDetection.class); ExcelUtil<TcSafetyDetection> util = new ExcelUtil<TcSafetyDetection>(TcSafetyDetection.class);
util.exportExcel(response, list, "安全检测数据"); util.exportExcel(response, list, "安全检测数据");
@ -67,8 +61,7 @@ public class TcSafetyDetectionController extends BaseController
*/ */
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) {
{
return success(tcSafetyDetectionService.selectTcSafetyDetectionById(id)); return success(tcSafetyDetectionService.selectTcSafetyDetectionById(id));
} }
@ -77,8 +70,7 @@ public class TcSafetyDetectionController extends BaseController
*/ */
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TcSafetyDetection tcSafetyDetection) public AjaxResult add(@RequestBody TcSafetyDetection tcSafetyDetection) {
{
return toAjax(tcSafetyDetectionService.insertTcSafetyDetection(tcSafetyDetection)); return toAjax(tcSafetyDetectionService.insertTcSafetyDetection(tcSafetyDetection));
} }
@ -87,8 +79,7 @@ public class TcSafetyDetectionController extends BaseController
*/ */
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TcSafetyDetection tcSafetyDetection) public AjaxResult edit(@RequestBody TcSafetyDetection tcSafetyDetection) {
{
return toAjax(tcSafetyDetectionService.updateTcSafetyDetection(tcSafetyDetection)); return toAjax(tcSafetyDetectionService.updateTcSafetyDetection(tcSafetyDetection));
} }
@ -96,9 +87,8 @@ public class TcSafetyDetectionController extends BaseController
* *
*/ */
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids) {
{
return toAjax(tcSafetyDetectionService.deleteTcSafetyDetectionByIds(ids)); return toAjax(tcSafetyDetectionService.deleteTcSafetyDetectionByIds(ids));
} }
} }

@ -0,0 +1,105 @@
package com.ruoyi.zongzhi.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.zongzhi.domain.TcSgjTj;
import com.ruoyi.zongzhi.service.TcSgjTjService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;
/**
* (TcSgjTj)
*
* @author wu
* @since 2023-09-11 15:42:21
*/
@RestController
@RequestMapping("zongzhi/tcSgjTj")
@Api(tags = "安全监测受攻击统计")
@Transactional(rollbackFor = Exception.class)
public class TcSgjTjController extends BaseController {
/**
*
*/
@Resource
private TcSgjTjService tcSgjTjService;
/**
*
*
* @param page
* @param tcSgjTj
* @return
*/
@GetMapping
@ApiOperation(value = "分页条件查询安全监测受攻击统计", response = TcSgjTj.class)
public AjaxResult page(Page<TcSgjTj> page, TcSgjTj tcSgjTj) {
return success(tcSgjTjService.page(page, new QueryWrapper<>(tcSgjTj)));
}
/**
*
*
* @param id
* @return
*/
@GetMapping("{id}")
@ApiOperation(value = "通过主键查询单条安全监测受攻击统计", response = TcSgjTj.class)
public AjaxResult getById(@PathVariable Serializable id) {
return success(tcSgjTjService.getById(id));
}
/**
*
*
* @param tcSgjTj
* @return
*/
@PostMapping
@ApiOperation(value = "新增安全监测受攻击统计", response = TcSgjTj.class)
public AjaxResult insert(@RequestBody TcSgjTj tcSgjTj) {
return success(tcSgjTjService.save(tcSgjTj));
}
/**
*
*
* @param tcSgjTj
* @return
*/
@PutMapping
@ApiOperation(value = "修改安全监测受攻击统计")
public AjaxResult update(@RequestBody TcSgjTj tcSgjTj) {
return success(tcSgjTjService.updateById(tcSgjTj));
}
/**
*
*
* @param idList
* @return
*/
@DeleteMapping
@ApiOperation(value = "删除安全监测受攻击统计")
public AjaxResult delete(@RequestParam("idList") List<Long> idList) {
return success(tcSgjTjService.removeByIds(idList));
}
}

@ -8,7 +8,14 @@ import com.ruoyi.zongzhi.domain.TcTb;
import com.ruoyi.zongzhi.service.ITcTbService; import com.ruoyi.zongzhi.service.ITcTbService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;

@ -9,7 +9,14 @@ import com.ruoyi.zongzhi.service.ITcTownService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;

@ -8,22 +8,28 @@ import com.ruoyi.zongzhi.domain.TcWorkDongtai;
import com.ruoyi.zongzhi.service.ITcWorkDongtaiService; import com.ruoyi.zongzhi.service.ITcWorkDongtaiService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
/** /**
* Controller * Controller
* *
* @author ruoyi * @author ruoyi
* @date 2023-08-10 * @date 2023-08-10
*/ */
@RestController @RestController
@RequestMapping("/zongzhi/dongtai") @RequestMapping("/zongzhi/dongtai")
@Api(tags = "工作动态") @Api(tags = "工作动态")
public class TcWorkDongtaiController extends BaseController public class TcWorkDongtaiController extends BaseController {
{
@Autowired @Autowired
private ITcWorkDongtaiService tcWorkDongtaiService; private ITcWorkDongtaiService tcWorkDongtaiService;
@ -32,8 +38,7 @@ public class TcWorkDongtaiController extends BaseController
*/ */
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TcWorkDongtai tcWorkDongtai) public TableDataInfo list(TcWorkDongtai tcWorkDongtai) {
{
startPage(); startPage();
List<TcWorkDongtai> list = tcWorkDongtaiService.selectTcWorkDongtaiList(tcWorkDongtai); List<TcWorkDongtai> list = tcWorkDongtaiService.selectTcWorkDongtaiList(tcWorkDongtai);
return getDataTable(list); return getDataTable(list);
@ -44,8 +49,7 @@ public class TcWorkDongtaiController extends BaseController
*/ */
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, TcWorkDongtai tcWorkDongtai) public void export(HttpServletResponse response, TcWorkDongtai tcWorkDongtai) {
{
List<TcWorkDongtai> list = tcWorkDongtaiService.selectTcWorkDongtaiList(tcWorkDongtai); List<TcWorkDongtai> list = tcWorkDongtaiService.selectTcWorkDongtaiList(tcWorkDongtai);
ExcelUtil<TcWorkDongtai> util = new ExcelUtil<TcWorkDongtai>(TcWorkDongtai.class); ExcelUtil<TcWorkDongtai> util = new ExcelUtil<TcWorkDongtai>(TcWorkDongtai.class);
util.exportExcel(response, list, "工作动态数据"); util.exportExcel(response, list, "工作动态数据");
@ -56,8 +60,7 @@ public class TcWorkDongtaiController extends BaseController
*/ */
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) {
{
return success(tcWorkDongtaiService.selectTcWorkDongtaiById(id)); return success(tcWorkDongtaiService.selectTcWorkDongtaiById(id));
} }
@ -66,8 +69,7 @@ public class TcWorkDongtaiController extends BaseController
*/ */
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TcWorkDongtai tcWorkDongtai) public AjaxResult add(@RequestBody TcWorkDongtai tcWorkDongtai) {
{
return toAjax(tcWorkDongtaiService.insertTcWorkDongtai(tcWorkDongtai)); return toAjax(tcWorkDongtaiService.insertTcWorkDongtai(tcWorkDongtai));
} }
@ -76,8 +78,7 @@ public class TcWorkDongtaiController extends BaseController
*/ */
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TcWorkDongtai tcWorkDongtai) public AjaxResult edit(@RequestBody TcWorkDongtai tcWorkDongtai) {
{
return toAjax(tcWorkDongtaiService.updateTcWorkDongtai(tcWorkDongtai)); return toAjax(tcWorkDongtaiService.updateTcWorkDongtai(tcWorkDongtai));
} }
@ -85,13 +86,10 @@ public class TcWorkDongtaiController extends BaseController
* *
*/ */
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids) {
{
return toAjax(tcWorkDongtaiService.deleteTcWorkDongtaiByIds(ids)); return toAjax(tcWorkDongtaiService.deleteTcWorkDongtaiByIds(ids));
} }
} }

@ -8,7 +8,14 @@ import com.ruoyi.zongzhi.domain.TcWpyrwwcl;
import com.ruoyi.zongzhi.service.ITcWpyrwwclService; import com.ruoyi.zongzhi.service.ITcWpyrwwclService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;

@ -8,7 +8,14 @@ import com.ruoyi.zongzhi.domain.TcYqFl;
import com.ruoyi.zongzhi.service.ITcYqFlService; import com.ruoyi.zongzhi.service.ITcYqFlService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;

@ -8,7 +8,14 @@ import com.ruoyi.zongzhi.domain.TcYqZs;
import com.ruoyi.zongzhi.service.ITcYqZsService; import com.ruoyi.zongzhi.service.ITcYqZsService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;

@ -1,39 +1,35 @@
package com.ruoyi.zongzhi.controller; package com.ruoyi.zongzhi.controller;
import java.util.List; import com.ruoyi.common.core.controller.BaseController;
import javax.servlet.http.HttpServletResponse; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.zongzhi.domain.TcZhongdianDomain;
import com.ruoyi.zongzhi.service.ITcZhongdianDomainService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; 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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.domain.AjaxResult; import java.util.List;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.zongzhi.domain.TcZhongdianDomain;
import com.ruoyi.zongzhi.service.ITcZhongdianDomainService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/** /**
* Controller * Controller
* *
* @author ruoyi * @author ruoyi
* @date 2023-08-10 * @date 2023-08-10
*/ */
@RestController @RestController
@RequestMapping("/zongzhi/domain") @RequestMapping("/zongzhi/domain")
@Api(tags = "重点领域监管") @Api(tags = "重点领域监管")
public class TcZhongdianDomainController extends BaseController public class TcZhongdianDomainController extends BaseController {
{
@Autowired @Autowired
private ITcZhongdianDomainService tcZhongdianDomainService; private ITcZhongdianDomainService tcZhongdianDomainService;
@ -42,8 +38,7 @@ public class TcZhongdianDomainController extends BaseController
*/ */
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TcZhongdianDomain tcZhongdianDomain) public TableDataInfo list(TcZhongdianDomain tcZhongdianDomain) {
{
startPage(); startPage();
List<TcZhongdianDomain> list = tcZhongdianDomainService.selectTcZhongdianDomainList(tcZhongdianDomain); List<TcZhongdianDomain> list = tcZhongdianDomainService.selectTcZhongdianDomainList(tcZhongdianDomain);
return getDataTable(list); return getDataTable(list);
@ -54,8 +49,7 @@ public class TcZhongdianDomainController extends BaseController
*/ */
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, TcZhongdianDomain tcZhongdianDomain) public void export(HttpServletResponse response, TcZhongdianDomain tcZhongdianDomain) {
{
List<TcZhongdianDomain> list = tcZhongdianDomainService.selectTcZhongdianDomainList(tcZhongdianDomain); List<TcZhongdianDomain> list = tcZhongdianDomainService.selectTcZhongdianDomainList(tcZhongdianDomain);
ExcelUtil<TcZhongdianDomain> util = new ExcelUtil<TcZhongdianDomain>(TcZhongdianDomain.class); ExcelUtil<TcZhongdianDomain> util = new ExcelUtil<TcZhongdianDomain>(TcZhongdianDomain.class);
util.exportExcel(response, list, "重点领域监管数据"); util.exportExcel(response, list, "重点领域监管数据");
@ -66,8 +60,7 @@ public class TcZhongdianDomainController extends BaseController
*/ */
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) {
{
return success(tcZhongdianDomainService.selectTcZhongdianDomainById(id)); return success(tcZhongdianDomainService.selectTcZhongdianDomainById(id));
} }
@ -76,8 +69,7 @@ public class TcZhongdianDomainController extends BaseController
*/ */
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TcZhongdianDomain tcZhongdianDomain) public AjaxResult add(@RequestBody TcZhongdianDomain tcZhongdianDomain) {
{
return toAjax(tcZhongdianDomainService.insertTcZhongdianDomain(tcZhongdianDomain)); return toAjax(tcZhongdianDomainService.insertTcZhongdianDomain(tcZhongdianDomain));
} }
@ -86,8 +78,7 @@ public class TcZhongdianDomainController extends BaseController
*/ */
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TcZhongdianDomain tcZhongdianDomain) public AjaxResult edit(@RequestBody TcZhongdianDomain tcZhongdianDomain) {
{
return toAjax(tcZhongdianDomainService.updateTcZhongdianDomain(tcZhongdianDomain)); return toAjax(tcZhongdianDomainService.updateTcZhongdianDomain(tcZhongdianDomain));
} }
@ -95,9 +86,8 @@ public class TcZhongdianDomainController extends BaseController
* *
*/ */
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids) {
{
return toAjax(tcZhongdianDomainService.deleteTcZhongdianDomainByIds(ids)); return toAjax(tcZhongdianDomainService.deleteTcZhongdianDomainByIds(ids));
} }
} }

@ -1,39 +1,35 @@
package com.ruoyi.zongzhi.controller; package com.ruoyi.zongzhi.controller;
import java.util.List; import com.ruoyi.common.core.controller.BaseController;
import javax.servlet.http.HttpServletResponse; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.zongzhi.domain.TcZhongdianEnterprise;
import com.ruoyi.zongzhi.service.ITcZhongdianEnterpriseService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; 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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.domain.AjaxResult; import java.util.List;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.zongzhi.domain.TcZhongdianEnterprise;
import com.ruoyi.zongzhi.service.ITcZhongdianEnterpriseService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/** /**
* Controller * Controller
* *
* @author ruoyi * @author ruoyi
* @date 2023-08-10 * @date 2023-08-10
*/ */
@RestController @RestController
@RequestMapping("/zongzhi/enterprise") @RequestMapping("/zongzhi/enterprise")
@Api(tags = "重点企业名录") @Api(tags = "重点企业名录")
public class TcZhongdianEnterpriseController extends BaseController public class TcZhongdianEnterpriseController extends BaseController {
{
@Autowired @Autowired
private ITcZhongdianEnterpriseService tcZhongdianEnterpriseService; private ITcZhongdianEnterpriseService tcZhongdianEnterpriseService;
@ -42,8 +38,7 @@ public class TcZhongdianEnterpriseController extends BaseController
*/ */
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TcZhongdianEnterprise tcZhongdianEnterprise) public TableDataInfo list(TcZhongdianEnterprise tcZhongdianEnterprise) {
{
startPage(); startPage();
List<TcZhongdianEnterprise> list = tcZhongdianEnterpriseService.selectTcZhongdianEnterpriseList(tcZhongdianEnterprise); List<TcZhongdianEnterprise> list = tcZhongdianEnterpriseService.selectTcZhongdianEnterpriseList(tcZhongdianEnterprise);
return getDataTable(list); return getDataTable(list);
@ -55,8 +50,7 @@ public class TcZhongdianEnterpriseController extends BaseController
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, TcZhongdianEnterprise tcZhongdianEnterprise) public void export(HttpServletResponse response, TcZhongdianEnterprise tcZhongdianEnterprise) {
{
List<TcZhongdianEnterprise> list = tcZhongdianEnterpriseService.selectTcZhongdianEnterpriseList(tcZhongdianEnterprise); List<TcZhongdianEnterprise> list = tcZhongdianEnterpriseService.selectTcZhongdianEnterpriseList(tcZhongdianEnterprise);
ExcelUtil<TcZhongdianEnterprise> util = new ExcelUtil<TcZhongdianEnterprise>(TcZhongdianEnterprise.class); ExcelUtil<TcZhongdianEnterprise> util = new ExcelUtil<TcZhongdianEnterprise>(TcZhongdianEnterprise.class);
util.exportExcel(response, list, "重点企业名录数据"); util.exportExcel(response, list, "重点企业名录数据");
@ -67,8 +61,7 @@ public class TcZhongdianEnterpriseController extends BaseController
*/ */
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) {
{
return success(tcZhongdianEnterpriseService.selectTcZhongdianEnterpriseById(id)); return success(tcZhongdianEnterpriseService.selectTcZhongdianEnterpriseById(id));
} }
@ -77,8 +70,7 @@ public class TcZhongdianEnterpriseController extends BaseController
*/ */
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TcZhongdianEnterprise tcZhongdianEnterprise) public AjaxResult add(@RequestBody TcZhongdianEnterprise tcZhongdianEnterprise) {
{
return toAjax(tcZhongdianEnterpriseService.insertTcZhongdianEnterprise(tcZhongdianEnterprise)); return toAjax(tcZhongdianEnterpriseService.insertTcZhongdianEnterprise(tcZhongdianEnterprise));
} }
@ -87,8 +79,7 @@ public class TcZhongdianEnterpriseController extends BaseController
*/ */
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TcZhongdianEnterprise tcZhongdianEnterprise) public AjaxResult edit(@RequestBody TcZhongdianEnterprise tcZhongdianEnterprise) {
{
return toAjax(tcZhongdianEnterpriseService.updateTcZhongdianEnterprise(tcZhongdianEnterprise)); return toAjax(tcZhongdianEnterpriseService.updateTcZhongdianEnterprise(tcZhongdianEnterprise));
} }
@ -96,9 +87,8 @@ public class TcZhongdianEnterpriseController extends BaseController
* *
*/ */
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids) {
{
return toAjax(tcZhongdianEnterpriseService.deleteTcZhongdianEnterpriseByIds(ids)); return toAjax(tcZhongdianEnterpriseService.deleteTcZhongdianEnterpriseByIds(ids));
} }
} }

@ -1,39 +1,35 @@
package com.ruoyi.zongzhi.controller; package com.ruoyi.zongzhi.controller;
import java.util.List; import com.ruoyi.common.core.controller.BaseController;
import javax.servlet.http.HttpServletResponse; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.zongzhi.domain.TcZhongdianWork;
import com.ruoyi.zongzhi.service.ITcZhongdianWorkService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; 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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.domain.AjaxResult; import java.util.List;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.zongzhi.domain.TcZhongdianWork;
import com.ruoyi.zongzhi.service.ITcZhongdianWorkService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/** /**
* Controller * Controller
* *
* @author ruoyi * @author ruoyi
* @date 2023-08-10 * @date 2023-08-10
*/ */
@RestController @RestController
@RequestMapping("/zongzhi/work") @RequestMapping("/zongzhi/work")
@Api(tags = "重点工作项目") @Api(tags = "重点工作项目")
public class TcZhongdianWorkController extends BaseController public class TcZhongdianWorkController extends BaseController {
{
@Autowired @Autowired
private ITcZhongdianWorkService tcZhongdianWorkService; private ITcZhongdianWorkService tcZhongdianWorkService;
@ -42,8 +38,7 @@ public class TcZhongdianWorkController extends BaseController
*/ */
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TcZhongdianWork tcZhongdianWork) public TableDataInfo list(TcZhongdianWork tcZhongdianWork) {
{
startPage(); startPage();
List<TcZhongdianWork> list = tcZhongdianWorkService.selectTcZhongdianWorkList(tcZhongdianWork); List<TcZhongdianWork> list = tcZhongdianWorkService.selectTcZhongdianWorkList(tcZhongdianWork);
return getDataTable(list); return getDataTable(list);
@ -54,8 +49,7 @@ public class TcZhongdianWorkController extends BaseController
*/ */
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, TcZhongdianWork tcZhongdianWork) public void export(HttpServletResponse response, TcZhongdianWork tcZhongdianWork) {
{
List<TcZhongdianWork> list = tcZhongdianWorkService.selectTcZhongdianWorkList(tcZhongdianWork); List<TcZhongdianWork> list = tcZhongdianWorkService.selectTcZhongdianWorkList(tcZhongdianWork);
ExcelUtil<TcZhongdianWork> util = new ExcelUtil<TcZhongdianWork>(TcZhongdianWork.class); ExcelUtil<TcZhongdianWork> util = new ExcelUtil<TcZhongdianWork>(TcZhongdianWork.class);
util.exportExcel(response, list, "重点工作项目数据"); util.exportExcel(response, list, "重点工作项目数据");
@ -66,8 +60,7 @@ public class TcZhongdianWorkController extends BaseController
*/ */
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) {
{
return success(tcZhongdianWorkService.selectTcZhongdianWorkById(id)); return success(tcZhongdianWorkService.selectTcZhongdianWorkById(id));
} }
@ -77,8 +70,7 @@ public class TcZhongdianWorkController extends BaseController
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TcZhongdianWork tcZhongdianWork) public AjaxResult add(@RequestBody TcZhongdianWork tcZhongdianWork) {
{
return toAjax(tcZhongdianWorkService.insertTcZhongdianWork(tcZhongdianWork)); return toAjax(tcZhongdianWorkService.insertTcZhongdianWork(tcZhongdianWork));
} }
@ -87,8 +79,7 @@ public class TcZhongdianWorkController extends BaseController
*/ */
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TcZhongdianWork tcZhongdianWork) public AjaxResult edit(@RequestBody TcZhongdianWork tcZhongdianWork) {
{
return toAjax(tcZhongdianWorkService.updateTcZhongdianWork(tcZhongdianWork)); return toAjax(tcZhongdianWorkService.updateTcZhongdianWork(tcZhongdianWork));
} }
@ -96,9 +87,8 @@ public class TcZhongdianWorkController extends BaseController
* *
*/ */
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids) {
{
return toAjax(tcZhongdianWorkService.deleteTcZhongdianWorkByIds(ids)); return toAjax(tcZhongdianWorkService.deleteTcZhongdianWorkByIds(ids));
} }
} }

@ -1,11 +1,12 @@
package com.ruoyi.zongzhi.domain; package com.ruoyi.zongzhi.domain;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
/** /**
* tc_data_source * tc_data_source
@ -14,6 +15,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
* @date 2023-08-10 * @date 2023-08-10
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true)
public class TcDataSource extends BaseEntity { public class TcDataSource extends BaseEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -40,6 +42,22 @@ public class TcDataSource extends BaseEntity {
@Excel(name = "类型") @Excel(name = "类型")
private Long type; private Long type;
/**
* 1.
* 2. APTM
* 3.
* 4.
* 5.
*/
@ApiModelProperty(value = "类型 1.云断监管 2APTM 3.硬探针 4.软探针 5.监管单位 6.网站监测 7.系统监测")
private String notType;
/**
*
*/
@ApiModelProperty(value = "用于后台处理无需传值")
private List<String> notTypeList;
/** /**
* *
*/ */

@ -0,0 +1,97 @@
package com.ruoyi.zongzhi.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* (TcDataSourceTj)
*
* @author wu
* @since 2023-09-12 14:55:53
*/
@Data
@ApiModel("数据来源统计表实体类")
@TableName(value = "TcDataSourceTj")
public class TcDataSourceTj implements Serializable {
private static final long serialVersionUID = 304828068144976883L;
/**
* id
*/
@ApiModelProperty(value = "主键id")
private Long id;
/**
* id
*/
@ApiModelProperty(value = "区域id")
private Long areaId;
/**
* (G)
*/
@ApiModelProperty(value = "云端监测(G)")
private String lable1;
/**
* APT(M)
*/
@ApiModelProperty(value = "APT(M)")
private String lable2;
/**
* id
*/
@ApiModelProperty(value = "创建人id")
private Long createId;
/**
*
*/
@ApiModelProperty(value = "创建人名称")
private String createBy;
/**
*
*/
@ApiModelProperty(value = "创建时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd ")
private Date createTime;
/**
* id
*/
@ApiModelProperty(value = "最后更新人id")
private Long updateId;
/**
*
*/
@ApiModelProperty(value = "最后更新人名称")
private String updateBy;
/**
*
*/
@ApiModelProperty(value = "最后更新时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd ")
private Date updateTime;
/**
*
*/
@ApiModelProperty(value = "备注")
private String remark;
}

@ -1,14 +1,13 @@
package com.ruoyi.zongzhi.domain; package com.ruoyi.zongzhi.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/** /**
* tc_network_report * tc_network_report
@ -17,6 +16,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
* @date 2023-08-10 * @date 2023-08-10
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true)
public class TcNetworkReport extends BaseEntity { public class TcNetworkReport extends BaseEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

@ -0,0 +1,115 @@
package com.ruoyi.zongzhi.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* (TcSgjTj)
*
* @author wu
* @since 2023-09-11 15:42:22
*/
@Data
@ApiModel("安全监测受攻击统计实体类")
@TableName(value = "tc_sgj_tj")
public class TcSgjTj implements Serializable {
private static final long serialVersionUID = -71243947099429961L;
/**
* id
*/
@ApiModelProperty(value = "主键id")
private Long id;
/**
* ID
*/
@ApiModelProperty(value = "所属镇ID")
private Long townId;
/**
* ID
*/
@ApiModelProperty(value = "所属村ID")
private Long villageId;
/**
*
*/
@ApiModelProperty(value = "网络攻击(次)")
private Integer totalSum;
/**
*
*/
@ApiModelProperty(value = "入侵攻击")
private Integer rqSum;
/**
*
*/
@ApiModelProperty(value = "恶意扫描")
private Integer eySum;
/**
*
*/
@ApiModelProperty(value = "僵木蠕病毒")
private Integer jmrSum;
/**
* id
*/
@ApiModelProperty(value = "创建人id")
private Long createId;
/**
*
*/
@ApiModelProperty(value = "创建人名称")
private String createBy;
/**
*
*/
@ApiModelProperty(value = "创建时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd ")
private Date createTime;
/**
* id
*/
@ApiModelProperty(value = "最后更新人id")
private Long updateId;
/**
*
*/
@ApiModelProperty(value = "最后更新人名称")
private String updateBy;
/**
*
*/
@ApiModelProperty(value = "最后更新时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd ")
private Date updateTime;
/**
*
*/
@ApiModelProperty(value = "备注")
private String remark;
}

@ -0,0 +1,15 @@
package com.ruoyi.zongzhi.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.zongzhi.domain.TcDataSourceTj;
/**
* (TcDataSourceTj)访
*
* @author wu
* @since 2023-09-12 14:55:53
*/
public interface TcDataSourceTjMapper extends BaseMapper<TcDataSourceTj> {
}

@ -0,0 +1,15 @@
package com.ruoyi.zongzhi.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.zongzhi.domain.TcSgjTj;
/**
* (TcSgjTj)访
*
* @author wu
* @since 2023-09-11 15:42:22
*/
public interface TcSgjTjMapper extends BaseMapper<TcSgjTj> {
}

@ -0,0 +1,15 @@
package com.ruoyi.zongzhi.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.zongzhi.domain.TcDataSourceTj;
/**
* (TcDataSourceTj)
*
* @author wu
* @since 2023-09-12 14:55:53
*/
public interface TcDataSourceTjService extends IService<TcDataSourceTj> {
}

@ -0,0 +1,15 @@
package com.ruoyi.zongzhi.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.zongzhi.domain.TcSgjTj;
/**
* (TcSgjTj)
*
* @author wu
* @since 2023-09-11 15:42:25
*/
public interface TcSgjTjService extends IService<TcSgjTj> {
}

@ -1,96 +1,90 @@
package com.ruoyi.zongzhi.service.impl; package com.ruoyi.zongzhi.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.zongzhi.mapper.TcDataSourceMapper;
import com.ruoyi.zongzhi.domain.TcDataSource; import com.ruoyi.zongzhi.domain.TcDataSource;
import com.ruoyi.zongzhi.mapper.TcDataSourceMapper;
import com.ruoyi.zongzhi.service.ITcDataSourceService; import com.ruoyi.zongzhi.service.ITcDataSourceService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/** /**
* Service * Service
* *
* @author ruoyi * @author ruoyi
* @date 2023-08-10 * @date 2023-08-10
*/ */
@Service @Service
public class TcDataSourceServiceImpl implements ITcDataSourceService public class TcDataSourceServiceImpl implements ITcDataSourceService {
{ @Resource
@Autowired
private TcDataSourceMapper tcDataSourceMapper; private TcDataSourceMapper tcDataSourceMapper;
/** /**
* *
* *
* @param id * @param id
* @return * @return
*/ */
@Override @Override
public TcDataSource selectTcDataSourceById(Long id) public TcDataSource selectTcDataSourceById(Long id) {
{
return tcDataSourceMapper.selectTcDataSourceById(id); return tcDataSourceMapper.selectTcDataSourceById(id);
} }
/** /**
* *
* *
* @param tcDataSource * @param tcDataSource
* @return * @return
*/ */
@Override @Override
public List<TcDataSource> selectTcDataSourceList(TcDataSource tcDataSource) public List<TcDataSource> selectTcDataSourceList(TcDataSource tcDataSource) {
{
return tcDataSourceMapper.selectTcDataSourceList(tcDataSource); return tcDataSourceMapper.selectTcDataSourceList(tcDataSource);
} }
/** /**
* *
* *
* @param tcDataSource * @param tcDataSource
* @return * @return
*/ */
@Override @Override
public int insertTcDataSource(TcDataSource tcDataSource) public int insertTcDataSource(TcDataSource tcDataSource) {
{
tcDataSource.setCreateTime(DateUtils.getNowDate()); tcDataSource.setCreateTime(DateUtils.getNowDate());
return tcDataSourceMapper.insertTcDataSource(tcDataSource); return tcDataSourceMapper.insertTcDataSource(tcDataSource);
} }
/** /**
* *
* *
* @param tcDataSource * @param tcDataSource
* @return * @return
*/ */
@Override @Override
public int updateTcDataSource(TcDataSource tcDataSource) public int updateTcDataSource(TcDataSource tcDataSource) {
{
tcDataSource.setUpdateTime(DateUtils.getNowDate()); tcDataSource.setUpdateTime(DateUtils.getNowDate());
return tcDataSourceMapper.updateTcDataSource(tcDataSource); return tcDataSourceMapper.updateTcDataSource(tcDataSource);
} }
/** /**
* *
* *
* @param ids * @param ids
* @return * @return
*/ */
@Override @Override
public int deleteTcDataSourceByIds(Long[] ids) public int deleteTcDataSourceByIds(Long[] ids) {
{
return tcDataSourceMapper.deleteTcDataSourceByIds(ids); return tcDataSourceMapper.deleteTcDataSourceByIds(ids);
} }
/** /**
* *
* *
* @param id * @param id
* @return * @return
*/ */
@Override @Override
public int deleteTcDataSourceById(Long id) public int deleteTcDataSourceById(Long id) {
{
return tcDataSourceMapper.deleteTcDataSourceById(id); return tcDataSourceMapper.deleteTcDataSourceById(id);
} }
} }

@ -0,0 +1,19 @@
package com.ruoyi.zongzhi.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.zongzhi.domain.TcDataSourceTj;
import com.ruoyi.zongzhi.mapper.TcDataSourceTjMapper;
import com.ruoyi.zongzhi.service.TcDataSourceTjService;
import org.springframework.stereotype.Service;
/**
* (TcDataSourceTj)
*
* @author wu
* @since 2023-09-12 14:55:53
*/
@Service("tcDataSourceTjService")
public class TcDataSourceTjServiceImpl extends ServiceImpl<TcDataSourceTjMapper, TcDataSourceTj> implements TcDataSourceTjService {
}

@ -0,0 +1,19 @@
package com.ruoyi.zongzhi.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.zongzhi.domain.TcSgjTj;
import com.ruoyi.zongzhi.mapper.TcSgjTjMapper;
import com.ruoyi.zongzhi.service.TcSgjTjService;
import org.springframework.stereotype.Service;
/**
* (TcSgjTj)
*
* @author wu
* @since 2023-09-11 15:42:25
*/
@Service("tcSgjTjService")
public class TcSgjTjServiceImpl extends ServiceImpl<TcSgjTjMapper, TcSgjTj> implements TcSgjTjService {
}

@ -104,14 +104,16 @@ token:
expireTime: 30 expireTime: 30
# MyBatis配置 # MyBatis配置
mybatis: mybatis-plus:
# 搜索指定包别名 # 搜索指定包别名
typeAliasesPackage: com.ruoyi.**.domain typeAliasesPackage: com.ruoyi.**.domain
# 配置mapper的扫描找到所有的mapper.xml映射文件 # 配置mapper的扫描找到所有的mapper.xml映射文件
mapperLocations: classpath*:mapper/**/*Mapper.xml mapperLocations: classpath*:mapper/**/*Mapper.xml
# 加载全局的配置文件 configuration:
configLocation: classpath:mybatis/mybatis-config.xml cache-enabled: true
use-generated-keys: true
default-executor-type: simple
log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl
# PageHelper分页插件 # PageHelper分页插件
pagehelper: pagehelper:
helperDialect: mysql helperDialect: mysql

@ -17,6 +17,13 @@
<dependencies> <dependencies>
<!-- mybatis-plus -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.5.3.2</version>
</dependency>
<!-- Spring框架基本的核心工具 --> <!-- Spring框架基本的核心工具 -->
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
@ -129,11 +136,11 @@
<groupId>org.projectlombok</groupId> <groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId> <artifactId>lombok</artifactId>
</dependency> </dependency>
<!--引入Knife4j的官方start包,该指南选择Spring Boot版本<3.0,开发者需要注意-->
<dependency> <dependency>
<groupId>io.swagger</groupId> <groupId>com.github.xiaoymin</groupId>
<artifactId>swagger-annotations</artifactId> <artifactId>knife4j-openapi2-spring-boot-starter</artifactId>
<version>1.6.6</version> <version>4.0.0</version>
<scope>compile</scope>
</dependency> </dependency>
</dependencies> </dependencies>

@ -1,20 +1,11 @@
package com.ruoyi.framework.config; package com.ruoyi.framework.config;
import java.io.IOException; import com.baomidou.mybatisplus.annotation.DbType;
import java.util.ArrayList; import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import java.util.Arrays; import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor;
import java.util.HashSet; import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import java.util.List;
import javax.sql.DataSource;
import org.apache.ibatis.io.VFS;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.mybatis.spring.boot.autoconfigure.SpringBootVFS;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.core.io.DefaultResourceLoader;
import org.springframework.core.io.Resource; import org.springframework.core.io.Resource;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver; import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.io.support.ResourcePatternResolver; import org.springframework.core.io.support.ResourcePatternResolver;
@ -22,90 +13,69 @@ import org.springframework.core.type.classreading.CachingMetadataReaderFactory;
import org.springframework.core.type.classreading.MetadataReader; import org.springframework.core.type.classreading.MetadataReader;
import org.springframework.core.type.classreading.MetadataReaderFactory; import org.springframework.core.type.classreading.MetadataReaderFactory;
import org.springframework.util.ClassUtils; import org.springframework.util.ClassUtils;
import com.ruoyi.common.utils.StringUtils;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
/** /**
* Mybatis* * Mybatis*
* *
* @author ruoyi * @author ruoyi
*/ */
@Configuration @Configuration
public class MyBatisConfig public class MyBatisConfig {
{
@Autowired
private Environment env;
static final String DEFAULT_RESOURCE_PATTERN = "**/*.class"; static final String DEFAULT_RESOURCE_PATTERN = "**/*.class";
public static String setTypeAliasesPackage(String typeAliasesPackage) public static String setTypeAliasesPackage(String typeAliasesPackage) {
{ ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
ResourcePatternResolver resolver = (ResourcePatternResolver) new PathMatchingResourcePatternResolver();
MetadataReaderFactory metadataReaderFactory = new CachingMetadataReaderFactory(resolver); MetadataReaderFactory metadataReaderFactory = new CachingMetadataReaderFactory(resolver);
List<String> allResult = new ArrayList<String>(); List<String> allResult = new ArrayList<String>();
try try {
{ for (String aliasesPackage : typeAliasesPackage.split(",")) {
for (String aliasesPackage : typeAliasesPackage.split(","))
{
List<String> result = new ArrayList<String>(); List<String> result = new ArrayList<String>();
aliasesPackage = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX aliasesPackage = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX + ClassUtils.convertClassNameToResourcePath(aliasesPackage.trim()) + "/" + DEFAULT_RESOURCE_PATTERN;
+ ClassUtils.convertClassNameToResourcePath(aliasesPackage.trim()) + "/" + DEFAULT_RESOURCE_PATTERN;
Resource[] resources = resolver.getResources(aliasesPackage); Resource[] resources = resolver.getResources(aliasesPackage);
if (resources != null && resources.length > 0) if (resources != null && resources.length > 0) {
{
MetadataReader metadataReader = null; MetadataReader metadataReader = null;
for (Resource resource : resources) for (Resource resource : resources) {
{ if (resource.isReadable()) {
if (resource.isReadable())
{
metadataReader = metadataReaderFactory.getMetadataReader(resource); metadataReader = metadataReaderFactory.getMetadataReader(resource);
try try {
{
result.add(Class.forName(metadataReader.getClassMetadata().getClassName()).getPackage().getName()); result.add(Class.forName(metadataReader.getClassMetadata().getClassName()).getPackage().getName());
} } catch (ClassNotFoundException e) {
catch (ClassNotFoundException e)
{
e.printStackTrace(); e.printStackTrace();
} }
} }
} }
} }
if (result.size() > 0) if (result.size() > 0) {
{
HashSet<String> hashResult = new HashSet<String>(result); HashSet<String> hashResult = new HashSet<String>(result);
allResult.addAll(hashResult); allResult.addAll(hashResult);
} }
} }
if (allResult.size() > 0) if (allResult.size() > 0) {
{
typeAliasesPackage = String.join(",", (String[]) allResult.toArray(new String[0])); typeAliasesPackage = String.join(",", (String[]) allResult.toArray(new String[0]));
} } else {
else
{
throw new RuntimeException("mybatis typeAliasesPackage 路径扫描错误,参数typeAliasesPackage:" + typeAliasesPackage + "未找到任何包"); throw new RuntimeException("mybatis typeAliasesPackage 路径扫描错误,参数typeAliasesPackage:" + typeAliasesPackage + "未找到任何包");
} }
} } catch (IOException e) {
catch (IOException e)
{
e.printStackTrace(); e.printStackTrace();
} }
return typeAliasesPackage; return typeAliasesPackage;
} }
public Resource[] resolveMapperLocations(String[] mapperLocations) public Resource[] resolveMapperLocations(String[] mapperLocations) {
{
ResourcePatternResolver resourceResolver = new PathMatchingResourcePatternResolver(); ResourcePatternResolver resourceResolver = new PathMatchingResourcePatternResolver();
List<Resource> resources = new ArrayList<Resource>(); List<Resource> resources = new ArrayList<>();
if (mapperLocations != null) if (mapperLocations != null) {
{ for (String mapperLocation : mapperLocations) {
for (String mapperLocation : mapperLocations) try {
{
try
{
Resource[] mappers = resourceResolver.getResources(mapperLocation); Resource[] mappers = resourceResolver.getResources(mapperLocation);
resources.addAll(Arrays.asList(mappers)); resources.addAll(Arrays.asList(mappers));
} } catch (IOException e) {
catch (IOException e)
{
// ignore // ignore
} }
} }
@ -113,20 +83,12 @@ public class MyBatisConfig
return resources.toArray(new Resource[resources.size()]); return resources.toArray(new Resource[resources.size()]);
} }
@Bean
public SqlSessionFactory sqlSessionFactory(DataSource dataSource) throws Exception
{
String typeAliasesPackage = env.getProperty("mybatis.typeAliasesPackage");
String mapperLocations = env.getProperty("mybatis.mapperLocations");
String configLocation = env.getProperty("mybatis.configLocation");
typeAliasesPackage = setTypeAliasesPackage(typeAliasesPackage);
VFS.addImplClass(SpringBootVFS.class);
final SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean(); @Bean
sessionFactory.setDataSource(dataSource); public MybatisPlusInterceptor mybatisPlusInterceptor() {
sessionFactory.setTypeAliasesPackage(typeAliasesPackage); MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
sessionFactory.setMapperLocations(resolveMapperLocations(StringUtils.split(mapperLocations, ","))); interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.DM));
sessionFactory.setConfigLocation(new DefaultResourceLoader().getResource(configLocation)); interceptor.addInnerInterceptor(new OptimisticLockerInnerInterceptor());
return sessionFactory.getObject(); return interceptor;
} }
} }

@ -33,21 +33,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectTcDataSourceList" parameterType="TcDataSource" resultMap="TcDataSourceResult"> <select id="selectTcDataSourceList" parameterType="TcDataSource" resultMap="TcDataSourceResult">
<include refid="selectTcDataSourceVo"/> <include refid="selectTcDataSourceVo"/>
<where> <where>
<if test="areaId != null "> and area_id = #{areaId}</if> <if test="areaId != null ">and area_id = #{areaId}</if>
<if test="type != null "> and type = #{type}</if> <if test="notTypeList != null and notTypeList.size() > 0">
<if test="assetName != null and assetName != ''"> and asset_name like concat('%', #{assetName}, '%')</if> and type NOT IN
<if test="affUnit != null and affUnit != ''"> and aff_unit = #{affUnit}</if> <foreach item="item" collection="notTypeList" open="(" separator="," close=")">
<if test="affGroups != null and affGroups != ''"> and aff_groups = #{affGroups}</if> #{item}
<if test="systeamName != null and systeamName != ''"> and systeam_name like concat('%', #{systeamName}, '%')</if> </foreach>
<if test="url != null and url != ''"> and url = #{url}</if> </if>
<if test="ipAddress != null and ipAddress != ''"> and ip_address = #{ipAddress}</if> <if test="type != null ">and type = #{type}</if>
<if test="os != null "> and os = #{os}</if> <if test="assetName != null and assetName != ''">and asset_name like concat('%', #{assetName}, '%')</if>
<if test="versions != null and versions != ''"> and versions = #{versions}</if> <if test="affUnit != null and affUnit != ''">and aff_unit = #{affUnit}</if>
<if test="isFocus != null "> and is_focus = #{isFocus}</if> <if test="affGroups != null and affGroups != ''">and aff_groups = #{affGroups}</if>
<if test="level != null "> and level = #{level}</if> <if test="systeamName != null and systeamName != ''">and systeam_name like concat('%', #{systeamName},
<if test="createId != null "> and create_id = #{createId}</if> '%')
<if test="updateId != null "> and update_id = #{updateId}</if> </if>
<if test="url != null and url != ''">and url = #{url}</if>
<if test="ipAddress != null and ipAddress != ''">and ip_address = #{ipAddress}</if>
<if test="os != null ">and os = #{os}</if>
<if test="versions != null and versions != ''">and versions = #{versions}</if>
<if test="isFocus != null ">and is_focus = #{isFocus}</if>
<if test="level != null ">and level = #{level}</if>
<if test="createId != null ">and create_id = #{createId}</if>
<if test="updateId != null ">and update_id = #{updateId}</if>
</where> </where>
</select> </select>

Loading…
Cancel
Save