Browse Source

物业管理端

tjf 4 months ago
parent
commit
b5e42b50cd

+ 91 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/asset/AssetTypeController.java

@@ -0,0 +1,91 @@
+package com.ruoyi.web.controller.asset;
+
+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.common.utils.poi.ExcelUtil;
+import com.ruoyi.system.domain.asset.AssetType;
+import com.ruoyi.system.service.IAssetTypeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 资产类型Controller
+ *
+ * @author boman
+ * @date 2025-02-17
+ */
+@RestController
+@RequestMapping("/wuYe/assetType")
+public class AssetTypeController extends BaseController {
+    @Autowired
+    private IAssetTypeService assetTypeService;
+
+    /**
+     * 查询资产类型列表
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:assetType:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(AssetType assetType) {
+        startPage();
+        List<AssetType> list = assetTypeService.selectAssetTypeList(assetType);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出资产类型列表
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:assetType:export')")
+    @Log(title = "资产类型", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, AssetType assetType) {
+        List<AssetType> list = assetTypeService.selectAssetTypeList(assetType);
+        ExcelUtil<AssetType> util = new ExcelUtil<AssetType>(AssetType.class);
+        util.exportExcel(response, list, "资产类型数据");
+    }
+
+    /**
+     * 获取资产类型详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:assetType:query')")
+    @GetMapping(value = "/{assetId}")
+    public AjaxResult getInfo(@PathVariable("assetId") Long assetId) {
+        return success(assetTypeService.selectAssetTypeByAssetId(assetId));
+    }
+
+    /**
+     * 新增资产类型
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:assetType:add')")
+    @Log(title = "资产类型", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody AssetType assetType) {
+        return toAjax(assetTypeService.insertAssetType(assetType));
+    }
+
+    /**
+     * 修改资产类型
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:assetType:edit')")
+    @Log(title = "资产类型", businessType = BusinessType.UPDATE)
+    @PostMapping("/put")
+    public AjaxResult edit(@RequestBody AssetType assetType) {
+        return toAjax(assetTypeService.updateAssetType(assetType));
+    }
+
+    /**
+     * 删除资产类型
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:assetType:remove')")
+    @Log(title = "资产类型", businessType = BusinessType.DELETE)
+    @GetMapping("/delete/{assetIds}")
+    public AjaxResult remove(@PathVariable Long[] assetIds) {
+        return toAjax(assetTypeService.deleteAssetTypeByAssetIds(assetIds));
+    }
+}

+ 98 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/blackManage/BlackManageController.java

@@ -0,0 +1,98 @@
+package com.ruoyi.web.controller.blackManage;
+
+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.common.utils.poi.ExcelUtil;
+import com.ruoyi.system.domain.blackManage.BlackManage;
+import com.ruoyi.system.service.IBlackManageService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 黑名单管理Controller
+ *
+ * @author boman
+ * @date 2025-02-17
+ */
+@RestController
+@RequestMapping("/wuYe/blackManage")
+public class BlackManageController extends BaseController
+{
+    @Autowired
+    private IBlackManageService blackManageService;
+
+/**
+ * 查询黑名单管理列表
+ */
+@PreAuthorize("@ss.hasPermi('wuYe:blackManage:list')")
+@GetMapping("/list")
+    public TableDataInfo list(BlackManage blackManage)
+    {
+        startPage();
+        List<BlackManage> list = blackManageService.selectBlackManageList(blackManage);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出黑名单管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:blackManage:export')")
+    @Log(title = "黑名单管理", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, BlackManage blackManage)
+    {
+        List<BlackManage> list = blackManageService.selectBlackManageList(blackManage);
+        ExcelUtil<BlackManage> util = new ExcelUtil<BlackManage>(BlackManage.class);
+        util.exportExcel(response, list, "黑名单管理数据");
+    }
+
+    /**
+     * 获取黑名单管理详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:blackManage:query')")
+    @GetMapping(value = "/{blackManageId}")
+    public AjaxResult getInfo(@PathVariable("blackManageId") Long blackManageId)
+    {
+        return success(blackManageService.selectBlackManageByBlackManageId(blackManageId));
+    }
+
+    /**
+     * 新增黑名单管理
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:blackManage:add')")
+    @Log(title = "黑名单管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody BlackManage blackManage)
+    {
+        return toAjax(blackManageService.insertBlackManage(blackManage));
+    }
+
+    /**
+     * 修改黑名单管理
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:blackManage:edit')")
+    @Log(title = "黑名单管理", businessType = BusinessType.UPDATE)
+    @PostMapping("/put")
+    public AjaxResult edit(@RequestBody BlackManage blackManage)
+    {
+        return toAjax(blackManageService.updateBlackManage(blackManage));
+    }
+
+    /**
+     * 删除黑名单管理
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:blackManage:remove')")
+    @Log(title = "黑名单管理", businessType = BusinessType.DELETE)
+    @GetMapping("/delete/{blackManageIds}")
+    public AjaxResult remove(@PathVariable Long[] blackManageIds)
+    {
+        return toAjax(blackManageService.deleteBlackManageByBlackManageIds(blackManageIds));
+    }
+}

+ 8 - 14
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java

@@ -1,18 +1,5 @@
 package com.ruoyi.web.controller.system;
 
-import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-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 com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
@@ -30,6 +17,13 @@ import com.ruoyi.system.domain.SysUserRole;
 import com.ruoyi.system.service.ISysDeptService;
 import com.ruoyi.system.service.ISysRoleService;
 import com.ruoyi.system.service.ISysUserService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
 
 /**
  * 角色信息
@@ -218,7 +212,7 @@ public class SysRoleController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('system:role:edit')")
     @Log(title = "角色管理", businessType = BusinessType.GRANT)
-    @p("/authUser/cancel")
+    @PostMapping("/authUser/cancel")
     public AjaxResult cancelAuthUser(@RequestBody SysUserRole userRole)
     {
         return toAjax(roleService.deleteAuthUser(userRole));

+ 124 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/asset/AssetType.java

@@ -0,0 +1,124 @@
+package com.ruoyi.system.domain.asset;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 资产类型对象 asset_type
+ * 
+ * @author boman
+ * @date 2025-02-17
+ */
+public class AssetType extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 资产类型id */
+    private Long assetId;
+
+    /** 父资产类型id */
+    @Excel(name = "父资产类型id")
+    private Long parentId;
+
+    /** 祖级列表 */
+    @Excel(name = "祖级列表")
+    private String ancestors;
+
+    /** 资产类型名称 */
+    @Excel(name = "资产类型名称")
+    private String assetName;
+
+    /** 显示顺序 */
+    @Excel(name = "显示顺序")
+    private Integer orderNum;
+
+    /** 资产类型状态(0正常 1停用) */
+    @Excel(name = "资产类型状态", readConverterExp = "0=正常,1=停用")
+    private String status;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    public void setAssetId(Long assetId) 
+    {
+        this.assetId = assetId;
+    }
+
+    public Long getAssetId() 
+    {
+        return assetId;
+    }
+    public void setParentId(Long parentId) 
+    {
+        this.parentId = parentId;
+    }
+
+    public Long getParentId() 
+    {
+        return parentId;
+    }
+    public void setAncestors(String ancestors) 
+    {
+        this.ancestors = ancestors;
+    }
+
+    public String getAncestors() 
+    {
+        return ancestors;
+    }
+    public void setAssetName(String assetName) 
+    {
+        this.assetName = assetName;
+    }
+
+    public String getAssetName() 
+    {
+        return assetName;
+    }
+    public void setOrderNum(Integer orderNum) 
+    {
+        this.orderNum = orderNum;
+    }
+
+    public Integer getOrderNum() 
+    {
+        return orderNum;
+    }
+    public void setStatus(String status) 
+    {
+        this.status = status;
+    }
+
+    public String getStatus() 
+    {
+        return status;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("assetId", getAssetId())
+            .append("parentId", getParentId())
+            .append("ancestors", getAncestors())
+            .append("assetName", getAssetName())
+            .append("orderNum", getOrderNum())
+            .append("status", getStatus())
+            .append("delFlag", getDelFlag())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 98 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/blackManage/BlackManage.java

@@ -0,0 +1,98 @@
+package com.ruoyi.system.domain.blackManage;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 黑名单管理对象 black_manage
+ * 
+ * @author boman
+ * @date 2025-02-17
+ */
+public class BlackManage extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 黑名单管理id */
+    private Long blackManageId;
+
+    /** 黑名单类型 */
+    @Excel(name = "黑名单类型")
+    private String blackType;
+
+    /** 黑名单说明 */
+    @Excel(name = "黑名单说明")
+    private String blackTitle;
+
+    /** 黑名单的阈值 */
+    @Excel(name = "黑名单的阈值")
+    private String blackNum;
+
+    /** 黑名单是否启用 */
+    @Excel(name = "黑名单是否启用")
+    private String isDel;
+
+    public void setBlackManageId(Long blackManageId) 
+    {
+        this.blackManageId = blackManageId;
+    }
+
+    public Long getBlackManageId() 
+    {
+        return blackManageId;
+    }
+    public void setBlackType(String blackType) 
+    {
+        this.blackType = blackType;
+    }
+
+    public String getBlackType() 
+    {
+        return blackType;
+    }
+    public void setBlackTitle(String blackTitle) 
+    {
+        this.blackTitle = blackTitle;
+    }
+
+    public String getBlackTitle() 
+    {
+        return blackTitle;
+    }
+    public void setBlackNum(String blackNum) 
+    {
+        this.blackNum = blackNum;
+    }
+
+    public String getBlackNum() 
+    {
+        return blackNum;
+    }
+    public void setIsDel(String isDel) 
+    {
+        this.isDel = isDel;
+    }
+
+    public String getIsDel() 
+    {
+        return isDel;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("blackManageId", getBlackManageId())
+            .append("blackType", getBlackType())
+            .append("blackTitle", getBlackTitle())
+            .append("blackNum", getBlackNum())
+            .append("isDel", getIsDel())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("remark", getRemark())
+            .toString();
+    }
+}

+ 63 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/AssetTypeMapper.java

@@ -0,0 +1,63 @@
+package com.ruoyi.system.mapper;
+
+import com.ruoyi.system.domain.asset.AssetType;
+
+import java.util.List;
+
+
+/**
+ * 资产类型Mapper接口
+ * 
+ * @author boman
+ * @date 2025-02-17
+ */
+public interface AssetTypeMapper 
+{
+    /**
+     * 查询资产类型
+     * 
+     * @param assetId 资产类型主键
+     * @return 资产类型
+     */
+    public AssetType selectAssetTypeByAssetId(Long assetId);
+
+    /**
+     * 查询资产类型列表
+     * 
+     * @param assetType 资产类型
+     * @return 资产类型集合
+     */
+    public List<AssetType> selectAssetTypeList(AssetType assetType);
+
+    /**
+     * 新增资产类型
+     * 
+     * @param assetType 资产类型
+     * @return 结果
+     */
+    public int insertAssetType(AssetType assetType);
+
+    /**
+     * 修改资产类型
+     * 
+     * @param assetType 资产类型
+     * @return 结果
+     */
+    public int updateAssetType(AssetType assetType);
+
+    /**
+     * 删除资产类型
+     * 
+     * @param assetId 资产类型主键
+     * @return 结果
+     */
+    public int deleteAssetTypeByAssetId(Long assetId);
+
+    /**
+     * 批量删除资产类型
+     * 
+     * @param assetIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteAssetTypeByAssetIds(Long[] assetIds);
+}

+ 62 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/BlackManageMapper.java

@@ -0,0 +1,62 @@
+package com.ruoyi.system.mapper;
+
+import com.ruoyi.system.domain.blackManage.BlackManage;
+
+import java.util.List;
+
+/**
+ * 黑名单管理Mapper接口
+ * 
+ * @author boman
+ * @date 2025-02-17
+ */
+public interface BlackManageMapper 
+{
+    /**
+     * 查询黑名单管理
+     * 
+     * @param blackManageId 黑名单管理主键
+     * @return 黑名单管理
+     */
+    public BlackManage selectBlackManageByBlackManageId(Long blackManageId);
+
+    /**
+     * 查询黑名单管理列表
+     * 
+     * @param blackManage 黑名单管理
+     * @return 黑名单管理集合
+     */
+    public List<BlackManage> selectBlackManageList(BlackManage blackManage);
+
+    /**
+     * 新增黑名单管理
+     * 
+     * @param blackManage 黑名单管理
+     * @return 结果
+     */
+    public int insertBlackManage(BlackManage blackManage);
+
+    /**
+     * 修改黑名单管理
+     * 
+     * @param blackManage 黑名单管理
+     * @return 结果
+     */
+    public int updateBlackManage(BlackManage blackManage);
+
+    /**
+     * 删除黑名单管理
+     * 
+     * @param blackManageId 黑名单管理主键
+     * @return 结果
+     */
+    public int deleteBlackManageByBlackManageId(Long blackManageId);
+
+    /**
+     * 批量删除黑名单管理
+     * 
+     * @param blackManageIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteBlackManageByBlackManageIds(Long[] blackManageIds);
+}

+ 63 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IAssetTypeService.java

@@ -0,0 +1,63 @@
+package com.ruoyi.system.service;
+
+import com.ruoyi.system.domain.asset.AssetType;
+
+import java.util.List;
+
+
+/**
+ * 资产类型Service接口
+ * 
+ * @author boman
+ * @date 2025-02-17
+ */
+public interface IAssetTypeService 
+{
+    /**
+     * 查询资产类型
+     * 
+     * @param assetId 资产类型主键
+     * @return 资产类型
+     */
+    public AssetType selectAssetTypeByAssetId(Long assetId);
+
+    /**
+     * 查询资产类型列表
+     * 
+     * @param assetType 资产类型
+     * @return 资产类型集合
+     */
+    public List<AssetType> selectAssetTypeList(AssetType assetType);
+
+    /**
+     * 新增资产类型
+     * 
+     * @param assetType 资产类型
+     * @return 结果
+     */
+    public int insertAssetType(AssetType assetType);
+
+    /**
+     * 修改资产类型
+     * 
+     * @param assetType 资产类型
+     * @return 结果
+     */
+    public int updateAssetType(AssetType assetType);
+
+    /**
+     * 批量删除资产类型
+     * 
+     * @param assetIds 需要删除的资产类型主键集合
+     * @return 结果
+     */
+    public int deleteAssetTypeByAssetIds(Long[] assetIds);
+
+    /**
+     * 删除资产类型信息
+     * 
+     * @param assetId 资产类型主键
+     * @return 结果
+     */
+    public int deleteAssetTypeByAssetId(Long assetId);
+}

+ 63 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IBlackManageService.java

@@ -0,0 +1,63 @@
+package com.ruoyi.system.service;
+
+import com.ruoyi.system.domain.blackManage.BlackManage;
+
+import java.util.List;
+
+
+/**
+ * 黑名单管理Service接口
+ * 
+ * @author boman
+ * @date 2025-02-17
+ */
+public interface IBlackManageService 
+{
+    /**
+     * 查询黑名单管理
+     * 
+     * @param blackManageId 黑名单管理主键
+     * @return 黑名单管理
+     */
+    public BlackManage selectBlackManageByBlackManageId(Long blackManageId);
+
+    /**
+     * 查询黑名单管理列表
+     * 
+     * @param blackManage 黑名单管理
+     * @return 黑名单管理集合
+     */
+    public List<BlackManage> selectBlackManageList(BlackManage blackManage);
+
+    /**
+     * 新增黑名单管理
+     * 
+     * @param blackManage 黑名单管理
+     * @return 结果
+     */
+    public int insertBlackManage(BlackManage blackManage);
+
+    /**
+     * 修改黑名单管理
+     * 
+     * @param blackManage 黑名单管理
+     * @return 结果
+     */
+    public int updateBlackManage(BlackManage blackManage);
+
+    /**
+     * 批量删除黑名单管理
+     * 
+     * @param blackManageIds 需要删除的黑名单管理主键集合
+     * @return 结果
+     */
+    public int deleteBlackManageByBlackManageIds(Long[] blackManageIds);
+
+    /**
+     * 删除黑名单管理信息
+     * 
+     * @param blackManageId 黑名单管理主键
+     * @return 结果
+     */
+    public int deleteBlackManageByBlackManageId(Long blackManageId);
+}

+ 97 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AssetTypeServiceImpl.java

@@ -0,0 +1,97 @@
+package com.ruoyi.system.service.impl;
+
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.system.domain.asset.AssetType;
+import com.ruoyi.system.mapper.AssetTypeMapper;
+import com.ruoyi.system.service.IAssetTypeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 资产类型Service业务层处理
+ * 
+ * @author boman
+ * @date 2025-02-17
+ */
+@Service
+public class AssetTypeServiceImpl implements IAssetTypeService 
+{
+    @Autowired
+    private AssetTypeMapper assetTypeMapper;
+
+    /**
+     * 查询资产类型
+     * 
+     * @param assetId 资产类型主键
+     * @return 资产类型
+     */
+    @Override
+    public AssetType selectAssetTypeByAssetId(Long assetId)
+    {
+        return assetTypeMapper.selectAssetTypeByAssetId(assetId);
+    }
+
+    /**
+     * 查询资产类型列表
+     * 
+     * @param assetType 资产类型
+     * @return 资产类型
+     */
+    @Override
+    public List<AssetType> selectAssetTypeList(AssetType assetType)
+    {
+        return assetTypeMapper.selectAssetTypeList(assetType);
+    }
+
+    /**
+     * 新增资产类型
+     * 
+     * @param assetType 资产类型
+     * @return 结果
+     */
+    @Override
+    public int insertAssetType(AssetType assetType)
+    {
+        assetType.setCreateTime(DateUtils.getNowDate());
+        return assetTypeMapper.insertAssetType(assetType);
+    }
+
+    /**
+     * 修改资产类型
+     * 
+     * @param assetType 资产类型
+     * @return 结果
+     */
+    @Override
+    public int updateAssetType(AssetType assetType)
+    {
+        assetType.setUpdateTime(DateUtils.getNowDate());
+        return assetTypeMapper.updateAssetType(assetType);
+    }
+
+    /**
+     * 批量删除资产类型
+     * 
+     * @param assetIds 需要删除的资产类型主键
+     * @return 结果
+     */
+    @Override
+    public int deleteAssetTypeByAssetIds(Long[] assetIds)
+    {
+        return assetTypeMapper.deleteAssetTypeByAssetIds(assetIds);
+    }
+
+    /**
+     * 删除资产类型信息
+     * 
+     * @param assetId 资产类型主键
+     * @return 结果
+     */
+    @Override
+    public int deleteAssetTypeByAssetId(Long assetId)
+    {
+        return assetTypeMapper.deleteAssetTypeByAssetId(assetId);
+    }
+}

+ 97 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BlackManageServiceImpl.java

@@ -0,0 +1,97 @@
+package com.ruoyi.system.service.impl;
+
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.system.domain.blackManage.BlackManage;
+import com.ruoyi.system.mapper.BlackManageMapper;
+import com.ruoyi.system.service.IBlackManageService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 黑名单管理Service业务层处理
+ * 
+ * @author boman
+ * @date 2025-02-17
+ */
+@Service
+public class BlackManageServiceImpl implements IBlackManageService 
+{
+    @Autowired
+    private BlackManageMapper blackManageMapper;
+
+    /**
+     * 查询黑名单管理
+     * 
+     * @param blackManageId 黑名单管理主键
+     * @return 黑名单管理
+     */
+    @Override
+    public BlackManage selectBlackManageByBlackManageId(Long blackManageId)
+    {
+        return blackManageMapper.selectBlackManageByBlackManageId(blackManageId);
+    }
+
+    /**
+     * 查询黑名单管理列表
+     * 
+     * @param blackManage 黑名单管理
+     * @return 黑名单管理
+     */
+    @Override
+    public List<BlackManage> selectBlackManageList(BlackManage blackManage)
+    {
+        return blackManageMapper.selectBlackManageList(blackManage);
+    }
+
+    /**
+     * 新增黑名单管理
+     * 
+     * @param blackManage 黑名单管理
+     * @return 结果
+     */
+    @Override
+    public int insertBlackManage(BlackManage blackManage)
+    {
+        blackManage.setCreateTime(DateUtils.getNowDate());
+        return blackManageMapper.insertBlackManage(blackManage);
+    }
+
+    /**
+     * 修改黑名单管理
+     * 
+     * @param blackManage 黑名单管理
+     * @return 结果
+     */
+    @Override
+    public int updateBlackManage(BlackManage blackManage)
+    {
+        blackManage.setUpdateTime(DateUtils.getNowDate());
+        return blackManageMapper.updateBlackManage(blackManage);
+    }
+
+    /**
+     * 批量删除黑名单管理
+     * 
+     * @param blackManageIds 需要删除的黑名单管理主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBlackManageByBlackManageIds(Long[] blackManageIds)
+    {
+        return blackManageMapper.deleteBlackManageByBlackManageIds(blackManageIds);
+    }
+
+    /**
+     * 删除黑名单管理信息
+     * 
+     * @param blackManageId 黑名单管理主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBlackManageByBlackManageId(Long blackManageId)
+    {
+        return blackManageMapper.deleteBlackManageByBlackManageId(blackManageId);
+    }
+}

+ 96 - 0
ruoyi-system/src/main/resources/mapper/system/AssetTypeMapper.xml

@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.system.mapper.AssetTypeMapper">
+    
+    <resultMap type="AssetType" id="AssetTypeResult">
+        <result property="assetId"    column="asset_id"    />
+        <result property="parentId"    column="parent_id"    />
+        <result property="ancestors"    column="ancestors"    />
+        <result property="assetName"    column="asset_name"    />
+        <result property="orderNum"    column="order_num"    />
+        <result property="status"    column="status"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectAssetTypeVo">
+        select asset_id, parent_id, ancestors, asset_name, order_num, status, del_flag, create_by, create_time, update_by, update_time from asset_type
+    </sql>
+
+    <select id="selectAssetTypeList" parameterType="AssetType" resultMap="AssetTypeResult">
+        <include refid="selectAssetTypeVo"/>
+        <where>  
+            <if test="parentId != null "> and parent_id = #{parentId}</if>
+            <if test="ancestors != null  and ancestors != ''"> and ancestors = #{ancestors}</if>
+            <if test="assetName != null  and assetName != ''"> and asset_name like concat('%', #{assetName}, '%')</if>
+            <if test="orderNum != null "> and order_num = #{orderNum}</if>
+            <if test="status != null  and status != ''"> and status = #{status}</if>
+        </where>
+    </select>
+    
+    <select id="selectAssetTypeByAssetId" parameterType="Long" resultMap="AssetTypeResult">
+        <include refid="selectAssetTypeVo"/>
+        where asset_id = #{assetId}
+    </select>
+
+    <insert id="insertAssetType" parameterType="AssetType" useGeneratedKeys="true" keyProperty="assetId">
+        insert into asset_type
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="parentId != null">parent_id,</if>
+            <if test="ancestors != null">ancestors,</if>
+            <if test="assetName != null">asset_name,</if>
+            <if test="orderNum != null">order_num,</if>
+            <if test="status != null">status,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="parentId != null">#{parentId},</if>
+            <if test="ancestors != null">#{ancestors},</if>
+            <if test="assetName != null">#{assetName},</if>
+            <if test="orderNum != null">#{orderNum},</if>
+            <if test="status != null">#{status},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateAssetType" parameterType="AssetType">
+        update asset_type
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="parentId != null">parent_id = #{parentId},</if>
+            <if test="ancestors != null">ancestors = #{ancestors},</if>
+            <if test="assetName != null">asset_name = #{assetName},</if>
+            <if test="orderNum != null">order_num = #{orderNum},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where asset_id = #{assetId}
+    </update>
+
+    <delete id="deleteAssetTypeByAssetId" parameterType="Long">
+        delete from asset_type where asset_id = #{assetId}
+    </delete>
+
+    <delete id="deleteAssetTypeByAssetIds" parameterType="String">
+        delete from asset_type where asset_id in 
+        <foreach item="assetId" collection="array" open="(" separator="," close=")">
+            #{assetId}
+        </foreach>
+    </delete>
+</mapper>

+ 91 - 0
ruoyi-system/src/main/resources/mapper/system/BlackManageMapper.xml

@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.system.mapper.BlackManageMapper">
+    
+    <resultMap type="BlackManage" id="BlackManageResult">
+        <result property="blackManageId"    column="black_manage_id"    />
+        <result property="blackType"    column="black_type"    />
+        <result property="blackTitle"    column="black_title"    />
+        <result property="blackNum"    column="black_num"    />
+        <result property="isDel"    column="is_del"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="remark"    column="remark"    />
+    </resultMap>
+
+    <sql id="selectBlackManageVo">
+        select black_manage_id, black_type, black_title, black_num, is_del, create_by, create_time, update_by, update_time, remark from black_manage
+    </sql>
+
+    <select id="selectBlackManageList" parameterType="BlackManage" resultMap="BlackManageResult">
+        <include refid="selectBlackManageVo"/>
+        <where>  
+            <if test="blackType != null  and blackType != ''"> and black_type = #{blackType}</if>
+            <if test="blackTitle != null  and blackTitle != ''"> and black_title = #{blackTitle}</if>
+            <if test="blackNum != null  and blackNum != ''"> and black_num = #{blackNum}</if>
+            <if test="isDel != null  and isDel != ''"> and is_del = #{isDel}</if>
+        </where>
+    </select>
+    
+    <select id="selectBlackManageByBlackManageId" parameterType="Long" resultMap="BlackManageResult">
+        <include refid="selectBlackManageVo"/>
+        where black_manage_id = #{blackManageId}
+    </select>
+
+    <insert id="insertBlackManage" parameterType="BlackManage" useGeneratedKeys="true" keyProperty="blackManageId">
+        insert into black_manage
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="blackType != null and blackType != ''">black_type,</if>
+            <if test="blackTitle != null and blackTitle != ''">black_title,</if>
+            <if test="blackNum != null and blackNum != ''">black_num,</if>
+            <if test="isDel != null and isDel != ''">is_del,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="remark != null">remark,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="blackType != null and blackType != ''">#{blackType},</if>
+            <if test="blackTitle != null and blackTitle != ''">#{blackTitle},</if>
+            <if test="blackNum != null and blackNum != ''">#{blackNum},</if>
+            <if test="isDel != null and isDel != ''">#{isDel},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="remark != null">#{remark},</if>
+         </trim>
+    </insert>
+
+    <update id="updateBlackManage" parameterType="BlackManage">
+        update black_manage
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="blackType != null and blackType != ''">black_type = #{blackType},</if>
+            <if test="blackTitle != null and blackTitle != ''">black_title = #{blackTitle},</if>
+            <if test="blackNum != null and blackNum != ''">black_num = #{blackNum},</if>
+            <if test="isDel != null and isDel != ''">is_del = #{isDel},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where black_manage_id = #{blackManageId}
+    </update>
+
+    <delete id="deleteBlackManageByBlackManageId" parameterType="Long">
+        delete from black_manage where black_manage_id = #{blackManageId}
+    </delete>
+
+    <delete id="deleteBlackManageByBlackManageIds" parameterType="String">
+        delete from black_manage where black_manage_id in 
+        <foreach item="blackManageId" collection="array" open="(" separator="," close=")">
+            #{blackManageId}
+        </foreach>
+    </delete>
+</mapper>