6 changed files with 297 additions and 14 deletions
@ -0,0 +1,106 @@ |
|||||
|
package com.zdxt.enforcementcode.controller.web.supervision; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
import cn.dev33.satoken.annotation.SaIgnore; |
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
import jakarta.servlet.http.HttpServletResponse; |
||||
|
import jakarta.validation.constraints.*; |
||||
|
import cn.dev33.satoken.annotation.SaCheckPermission; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
import org.springframework.validation.annotation.Validated; |
||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit; |
||||
|
import org.dromara.common.log.annotation.Log; |
||||
|
import org.dromara.common.web.core.BaseController; |
||||
|
import org.dromara.common.mybatis.core.page.PageQuery; |
||||
|
import org.dromara.common.core.domain.R; |
||||
|
import org.dromara.common.core.validate.AddGroup; |
||||
|
import org.dromara.common.core.validate.EditGroup; |
||||
|
import org.dromara.common.log.enums.BusinessType; |
||||
|
import org.dromara.common.excel.utils.ExcelUtil; |
||||
|
import com.zdxt.enforcementcode.domain.vo.EnforcementEducationServicesVo; |
||||
|
import com.zdxt.enforcementcode.domain.bo.EnforcementEducationServicesBo; |
||||
|
import com.zdxt.enforcementcode.service.IEnforcementEducationServicesService; |
||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo; |
||||
|
|
||||
|
/** |
||||
|
* 普法服务主表 |
||||
|
* |
||||
|
* @author niujiyi |
||||
|
* @date 2026-05-26 |
||||
|
*/ |
||||
|
@Validated |
||||
|
@RequiredArgsConstructor |
||||
|
@RestController |
||||
|
@RequestMapping("/web/enforcementcode/educationServices") |
||||
|
public class EnforcementEducationServicesController extends BaseController { |
||||
|
|
||||
|
private final IEnforcementEducationServicesService enforcementEducationServicesService; |
||||
|
|
||||
|
/** |
||||
|
* 查询普法服务主表列表 |
||||
|
*/ |
||||
|
//@SaCheckPermission("enforcementcode:educationServices:list")
|
||||
|
@SaIgnore |
||||
|
@GetMapping("/list") |
||||
|
public TableDataInfo<EnforcementEducationServicesVo> list(EnforcementEducationServicesBo bo, PageQuery pageQuery) { |
||||
|
return enforcementEducationServicesService.queryPageList(bo, pageQuery); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 导出普法服务主表列表 |
||||
|
*/ |
||||
|
@SaCheckPermission("enforcementcode:educationServices:export") |
||||
|
@Log(title = "普法服务主表", businessType = BusinessType.EXPORT) |
||||
|
@PostMapping("/export") |
||||
|
public void export(EnforcementEducationServicesBo bo, HttpServletResponse response) { |
||||
|
List<EnforcementEducationServicesVo> list = enforcementEducationServicesService.queryList(bo); |
||||
|
ExcelUtil.exportExcel(list, "普法服务主表", EnforcementEducationServicesVo.class, response); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取普法服务主表详细信息 |
||||
|
* |
||||
|
* @param id 主键 |
||||
|
*/ |
||||
|
//@SaCheckPermission("enforcementcode:educationServices:query")
|
||||
|
@SaIgnore |
||||
|
@GetMapping("/details") |
||||
|
public R<EnforcementEducationServicesVo> details(String id) { |
||||
|
return R.ok(enforcementEducationServicesService.queryEducationServicesById(id)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增普法服务主表 |
||||
|
*/ |
||||
|
//@SaCheckPermission("enforcementcode:educationServices:add")
|
||||
|
@SaIgnore |
||||
|
@Log(title = "普法服务主表", businessType = BusinessType.INSERT) |
||||
|
@PostMapping("/add") |
||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody EnforcementEducationServicesBo bo) { |
||||
|
return toAjax(enforcementEducationServicesService.insertEducationServices(bo)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改普法服务主表 |
||||
|
*/ |
||||
|
//@SaCheckPermission("enforcementcode:educationServices:edit")
|
||||
|
@Log(title = "普法服务主表", businessType = BusinessType.UPDATE) |
||||
|
@SaIgnore |
||||
|
@PostMapping("/edit") |
||||
|
public R<Void> edit(@RequestBody EnforcementEducationServicesBo bo) { |
||||
|
return toAjax(enforcementEducationServicesService.updateByBo(bo)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除普法服务主表 |
||||
|
* |
||||
|
* @param ids 主键串 |
||||
|
*/ |
||||
|
//@SaCheckPermission("enforcementcode:educationServices:remove")
|
||||
|
@SaIgnore |
||||
|
@GetMapping("/remove") |
||||
|
public R<Void> remove(String[] ids) { |
||||
|
return toAjax(enforcementEducationServicesService.deleteWithValidByIds(List.of(ids), true)); |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue