From a3b99e41f2790c95c37de6334afd7324e59ad76b Mon Sep 17 00:00:00 2001 From: wangxy <1481820854@qq.com> Date: Tue, 24 Sep 2024 10:52:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=BD=BD=E4=BD=93=E4=B8=8B=E5=8F=91?= =?UTF-8?q?=E7=99=BB=E8=AE=B0=E6=8E=A5=E5=8F=A3=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../issued/CarrierIssuedController.java | 100 +++++++++++++++++- .../ruoyi/framework/config/ShiroConfig.java | 1 + .../mapper/carrier/TdCarrierIssuedMapper.java | 8 ++ .../carrier/TdCarrierIssuedService.java | 9 ++ .../impl/TdCarrierIssuedServiceImpl.java | 15 +++ .../mapper/system/TdCarrierIssuedMapper.xml | 61 +++++++++++ 6 files changed, 193 insertions(+), 1 deletion(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/carrier/issued/CarrierIssuedController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/carrier/issued/CarrierIssuedController.java index cec01ba..7075a3f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/carrier/issued/CarrierIssuedController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/carrier/issued/CarrierIssuedController.java @@ -1,11 +1,19 @@ package com.ruoyi.web.controller.carrier.issued; +import com.ruoyi.common.annotation.Log; 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.enums.BusinessType; +import com.ruoyi.system.domain.carrier.TdCarrierIssued; import com.ruoyi.web.controller.manager.CarrierIssuedManager; +import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; +import java.util.List; /** * ClassName: CarrierIssuedController @@ -26,4 +34,94 @@ public class CarrierIssuedController extends BaseController { private CarrierIssuedManager carrierIssuedManager; + @RequiresPermissions("system:carrierIssued:view") + @GetMapping() + public String carrierIssued() { + return prefix + "/carrierIssued"; + } + + + + /** + * 载体列表 + */ + @RequiresPermissions("system:carrierIssued:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(TdCarrierIssued tdCarrierIssued) { + startPage(); + List carriers = carrierIssuedManager.selectTdCarrierList(tdCarrierIssued); + return getDataTable(carriers); + } + + + /** + * 新增载体 + */ + @GetMapping("/add") + public String add() { + return prefix + "/add"; + } + + + /** + * 新增载体 + */ + @RequiresPermissions("system:carrierIssued:add") + @Log(title = "国家秘密载体登记", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(TdCarrierIssued tdCarrierIssued) { + return toAjax(carrierIssuedManager.saveOrUpdate(tdCarrierIssued)); + } + + /** + * 修改场国家秘密载体 + */ + @RequiresPermissions("system:carrierIssued:edit") + @GetMapping("/edit/{id}") + public String edit(@PathVariable("id") String id, ModelMap mmap) { + TdCarrierIssued tdCarrierIssued = carrierIssuedManager.selectTdCarrier(id); + mmap.put("tdCarrierIssued", tdCarrierIssued); + return prefix + "/edit"; + } + + /** + * 修改国家秘密载体 + */ + @RequiresPermissions("system:carrierIssued:edit") + @Log(title = "国家秘密载体修改", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(TdCarrierIssued tdCarrierIssued) { + return toAjax(carrierIssuedManager.saveOrUpdate(tdCarrierIssued)); + } + + /** + * 详情国家秘密载体 + */ + @RequiresPermissions("system:carrierIssued:detail") + @GetMapping("/detail/{id}") + public String detail(@PathVariable("id") String id, ModelMap mmap) { + TdCarrierIssued tdCarrierIssued = carrierIssuedManager.selectTdCarrier(id); + mmap.put("tdCarrierIssued", tdCarrierIssued); + return prefix + "/detail"; + } + + + /** + * 删除国家秘密载体 + */ + @RequiresPermissions("system:carrier:remove") + @Log(title = "国家秘密载体", businessType = BusinessType.DELETE) + @PostMapping("/remove") + @ResponseBody + public AjaxResult remove(String ids) { + return toAjax(carrierIssuedManager.deletedTdCarrierByids(ids)); + } + + + + + } diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java index 40a6c13..ba0ec0d 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java @@ -304,6 +304,7 @@ public class ShiroConfig filterChainDefinitionMap.put("/register", "anon,captchaValidate"); filterChainDefinitionMap.put("/license/**", "anon,captchaValidate"); + filterChainDefinitionMap.put("/monitor/**", "anon,captchaValidate"); // 系统权限列表 // filterChainDefinitionMap.putAll(SpringUtils.getBean(IMenuService.class).selectPermsAll()); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/carrier/TdCarrierIssuedMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/carrier/TdCarrierIssuedMapper.java index 72ec28b..2b32397 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/carrier/TdCarrierIssuedMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/carrier/TdCarrierIssuedMapper.java @@ -4,6 +4,8 @@ package com.ruoyi.system.mapper.carrier; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.system.domain.carrier.TdCarrierIssued; +import java.util.List; + /** * @author Administrator * @description 针对表【td_carrier_issued(载体下发)】的数据库操作Mapper @@ -12,6 +14,12 @@ import com.ruoyi.system.domain.carrier.TdCarrierIssued; */ public interface TdCarrierIssuedMapper extends BaseMapper { + + public List selectTdCarrierList(TdCarrierIssued tdCarrierIssued); + + + public List selectTdCarrierUpdateList(TdCarrierIssued tdCarrierIssued); + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/carrier/TdCarrierIssuedService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/carrier/TdCarrierIssuedService.java index 6cc9093..cb287ea 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/carrier/TdCarrierIssuedService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/carrier/TdCarrierIssuedService.java @@ -2,8 +2,11 @@ package com.ruoyi.system.service.carrier; import com.baomidou.mybatisplus.extension.service.IService; +import com.ruoyi.system.domain.carrier.TdCarrier; import com.ruoyi.system.domain.carrier.TdCarrierIssued; +import java.util.List; + /** * @author Administrator * @description 针对表【td_carrier_issued(载体下发)】的数据库操作Service @@ -11,4 +14,10 @@ import com.ruoyi.system.domain.carrier.TdCarrierIssued; */ public interface TdCarrierIssuedService extends IService { + + public List selectTdCarrierList(TdCarrierIssued tdCarrierIssued); + + + public List selectTdCarrierUpdateList(TdCarrierIssued tdCarrierIssued); + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/carrier/impl/TdCarrierIssuedServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/carrier/impl/TdCarrierIssuedServiceImpl.java index c533913..f94f6f5 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/carrier/impl/TdCarrierIssuedServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/carrier/impl/TdCarrierIssuedServiceImpl.java @@ -3,9 +3,13 @@ package com.ruoyi.system.service.carrier.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ruoyi.system.domain.carrier.TdCarrierIssued; import com.ruoyi.system.mapper.carrier.TdCarrierIssuedMapper; +import com.ruoyi.system.mapper.carrier.TdCarrierMapper; import com.ruoyi.system.service.carrier.TdCarrierIssuedService; import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.List; + /** * @author Administrator * @description 针对表【td_carrier_issued(载体下发)】的数据库操作Service实现 @@ -15,6 +19,17 @@ import org.springframework.stereotype.Service; public class TdCarrierIssuedServiceImpl extends ServiceImpl implements TdCarrierIssuedService { + @Resource + private TdCarrierIssuedMapper tdCarrierIssuedMapper; + @Override + public List selectTdCarrierList(TdCarrierIssued tdCarrierIssued) { + return tdCarrierIssuedMapper.selectTdCarrierList(tdCarrierIssued); + } + + @Override + public List selectTdCarrierUpdateList(TdCarrierIssued tdCarrierIssued) { + return tdCarrierIssuedMapper.selectTdCarrierUpdateList(tdCarrierIssued); + } } diff --git a/ruoyi-system/src/main/resources/mapper/system/TdCarrierIssuedMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TdCarrierIssuedMapper.xml index c1616d8..68afba5 100644 --- a/ruoyi-system/src/main/resources/mapper/system/TdCarrierIssuedMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/TdCarrierIssuedMapper.xml @@ -56,4 +56,65 @@ destory_stand,issued_dept,expiration_time, mentSend_time,reclaim_time + + +