浏览代码

增加文档加密级别相关内容

wukai 1 年之前
父节点
当前提交
db22ed2ec8

+ 55 - 67
doc-biz/src/main/java/com/doc/biz/controller/DocDirLevelController.java

@@ -1,40 +1,30 @@
 package com.doc.biz.controller;
 
-import java.util.List;
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletResponse;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import com.doc.biz.domain.DocDirLevel;
+import com.doc.biz.service.IDocDirLevelService;
 import com.doc.common.annotation.Log;
 import com.doc.common.core.controller.BaseController;
 import com.doc.common.core.domain.AjaxResult;
-import com.doc.common.enums.BusinessType;
-import com.doc.biz.domain.DocDirLevel;
-import com.doc.biz.service.IDocDirLevelService;
-import com.doc.common.utils.poi.ExcelUtil;
 import com.doc.common.core.page.TableDataInfo;
+import com.doc.common.enums.BusinessType;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.List;
 
 /**
  * 文档目录加密级别Controller
- * 
+ *
  * @author wukai
  * @date 2023-10-19
  */
-@Api(tags="文档目录加密级别")
+@Api(tags = "文档目录加密级别")
 @RestController
 @RequestMapping("/biz/level")
-public class DocDirLevelController extends BaseController
-{
+public class DocDirLevelController extends BaseController {
     @Resource
     private IDocDirLevelService docDirLevelService;
 
@@ -42,73 +32,71 @@ public class DocDirLevelController extends BaseController
      * 查询文档目录加密级别列表
      */
     @ApiOperation("查询文档目录加密级别列表")
-    @PreAuthorize("@ss.hasPermi('biz:level:list')")
+//    @PreAuthorize("@ss.hasPermi('biz:level:list')")
     @GetMapping("/list")
-    public TableDataInfo list(DocDirLevel docDirLevel)
-    {
+    public TableDataInfo list(DocDirLevel docDirLevel) {
         startPage();
         List<DocDirLevel> list = docDirLevelService.selectDocDirLevelList(docDirLevel);
         return getDataTable(list);
     }
 
     /**
-     * 导出文档目录加密级别列表
+     * 修改文档目录加密级别
      */
-    @ApiOperation("导出文档目录加密级别列表")
-    @PreAuthorize("@ss.hasPermi('biz:level:export')")
-    @Log(title = "文档目录加密级别", businessType = BusinessType.EXPORT)
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, DocDirLevel docDirLevel)
-    {
-        List<DocDirLevel> list = docDirLevelService.selectDocDirLevelList(docDirLevel);
-        ExcelUtil<DocDirLevel> util = new ExcelUtil<DocDirLevel>(DocDirLevel.class);
-        util.exportExcel(response, list, "文档目录加密级别数据");
+    @ApiOperation("修改文档目录加密级别")
+    @PreAuthorize("@ss.hasPermi('biz:level:edit')")
+    @Log(title = "文档目录加密级别", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody List<DocDirLevel> docDirLevel) {
+        return toAjax(docDirLevelService.updateDocDirLevel(docDirLevel));
     }
 
     /**
      * 获取文档目录加密级别详细信息
      */
     @ApiOperation("获取文档目录加密级别详细信息")
-    @PreAuthorize("@ss.hasPermi('biz:level:query')")
-    @GetMapping(value = "/{levelId}")
-    public AjaxResult getInfo(@PathVariable("levelId") Long levelId)
-    {
-        return success(docDirLevelService.selectDocDirLevelByLevelId(levelId));
+//    @PreAuthorize("@ss.hasPermi('biz:level:query')")
+    @GetMapping(value = "/{levelCode}")
+    public AjaxResult getInfo(@PathVariable("levelCode") String levelCode) {
+        return success(docDirLevelService.selectDocDirLevelByLevelCode(levelCode));
     }
 
+
     /**
-     * 新增文档目录加密级别
+     * 导出文档目录加密级别列表
      */
-    @ApiOperation("新增文档目录加密级别")
-    @PreAuthorize("@ss.hasPermi('biz:level:add')")
-    @Log(title = "文档目录加密级别", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody DocDirLevel docDirLevel)
-    {
-        return toAjax(docDirLevelService.insertDocDirLevel(docDirLevel));
-    }
+//    @ApiOperation("导出文档目录加密级别列表")
+//    @PreAuthorize("@ss.hasPermi('biz:level:export')")
+//    @Log(title = "文档目录加密级别", businessType = BusinessType.EXPORT)
+//    @PostMapping("/export")
+//    public void export(HttpServletResponse response, DocDirLevel docDirLevel) {
+//        List<DocDirLevel> list = docDirLevelService.selectDocDirLevelList(docDirLevel);
+//        ExcelUtil<DocDirLevel> util = new ExcelUtil<DocDirLevel>(DocDirLevel.class);
+//        util.exportExcel(response, list, "文档目录加密级别数据");
+//    }
+
+
 
     /**
-     * 修改文档目录加密级别
+     * 新增文档目录加密级别
      */
-    @ApiOperation("修改文档目录加密级别")
-    @PreAuthorize("@ss.hasPermi('biz:level:edit')")
-    @Log(title = "文档目录加密级别", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody DocDirLevel docDirLevel)
-    {
-        return toAjax(docDirLevelService.updateDocDirLevel(docDirLevel));
-    }
+//    @ApiOperation("新增文档目录加密级别")
+//    @PreAuthorize("@ss.hasPermi('biz:level:add')")
+//    @Log(title = "文档目录加密级别", businessType = BusinessType.INSERT)
+//    @PostMapping
+//    public AjaxResult add(@RequestBody DocDirLevel docDirLevel) {
+//        return toAjax(docDirLevelService.insertDocDirLevel(docDirLevel));
+//    }
+
 
     /**
      * 删除文档目录加密级别
      */
-    @ApiOperation("删除文档目录加密级别")
-    @PreAuthorize("@ss.hasPermi('biz:level:remove')")
-    @Log(title = "文档目录加密级别", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{levelIds}")
-    public AjaxResult remove(@PathVariable Long[] levelIds)
-    {
-        return toAjax(docDirLevelService.deleteDocDirLevelByLevelIds(levelIds));
-    }
+//    @ApiOperation("删除文档目录加密级别")
+//    @PreAuthorize("@ss.hasPermi('biz:level:remove')")
+//    @Log(title = "文档目录加密级别", businessType = BusinessType.DELETE)
+//    @DeleteMapping("/{levelIds}")
+//    public AjaxResult remove(@PathVariable Long[] levelIds) {
+//        return toAjax(docDirLevelService.deleteDocDirLevelByLevelIds(levelIds));
+//    }
 }

+ 34 - 57
doc-biz/src/main/java/com/doc/biz/domain/DocDirLevel.java

@@ -1,12 +1,15 @@
 package com.doc.biz.domain;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
+import com.doc.biz.vo.LevelVO;
+import com.doc.common.annotation.Excel;
+import com.doc.common.core.domain.BaseEntity;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
-import com.doc.common.annotation.Excel;
-import com.doc.common.core.domain.BaseEntity;
 
 /**
  * 文档目录加密级别对象 doc_dir_level
@@ -14,80 +17,54 @@ import com.doc.common.core.domain.BaseEntity;
  * @author wukai
  * @date 2023-10-19
  */
+@Data
 @ApiModel(value = "DocDirLevel", description = "文档目录加密级别")
-public class DocDirLevel extends BaseEntity
-{
+public class DocDirLevel extends BaseEntity {
     private static final long serialVersionUID = 1L;
 
-    /** 目录ID */
+    /**
+     * 目录ID
+     */
     @ApiModelProperty("目录ID")
     @TableId
     private Long levelId;
 
-    /** 等级名称; */
-    @ApiModelProperty("等级名称;")
-    @Excel(name = "等级名称;")
+    /**
+     * 等级名称;
+     */
+    @ApiModelProperty("等级名称")
+    @Excel(name = "等级名称")
     private String levelName;
 
-    /** 等级编码 */
+    /**
+     * 等级编码
+     */
     @ApiModelProperty("等级编码")
     @Excel(name = "等级编码")
     private String levelCode;
 
-    /** 等级对应权限 */
+    /**
+     * 等级对应权限
+     */
     @ApiModelProperty("等级对应权限")
     @Excel(name = "等级对应权限")
     private String levelRoles;
 
-    public void setLevelId(Long levelId)
-    {
-        this.levelId = levelId;
-    }
-
-    public Long getLevelId()
-    {
-        return levelId;
-    }
-    public void setLevelName(String levelName)
-    {
-        this.levelName = levelName;
-    }
-
-    public String getLevelName()
-    {
-        return levelName;
-    }
-    public void setLevelCode(String levelCode)
-    {
-        this.levelCode = levelCode;
-    }
-
-    public String getLevelCode()
-    {
-        return levelCode;
-    }
-    public void setLevelRoles(String levelRoles)
-    {
-        this.levelRoles = levelRoles;
-    }
-
-    public String getLevelRoles()
-    {
-        return levelRoles;
-    }
+    @TableField(exist = false)
+    private LevelVO roles;
 
     @Override
     public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("levelId", getLevelId())
-            .append("levelName", getLevelName())
-            .append("levelCode", getLevelCode())
-            .append("levelRoles", getLevelRoles())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .append("remark", getRemark())
-            .toString();
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("levelId", getLevelId())
+                .append("levelName", getLevelName())
+                .append("levelCode", getLevelCode())
+                .append("levelRoles", getLevelRoles())
+                .append("createBy", getCreateBy())
+                .append("createTime", getCreateTime())
+                .append("updateBy", getUpdateBy())
+                .append("updateTime", getUpdateTime())
+                .append("remark", getRemark())
+                .toString();
     }
 }

+ 2 - 0
doc-biz/src/main/java/com/doc/biz/mapper/DocDirLevelMapper.java

@@ -59,4 +59,6 @@ public interface DocDirLevelMapper extends BaseMapper<DocDirLevel>
      * @return 结果
      */
     public int deleteDocDirLevelByLevelIds(Long[] levelIds);
+
+    DocDirLevel selectDocDirLevelByLevelCode(String levelCode);
 }

+ 28 - 10
doc-biz/src/main/java/com/doc/biz/service/IDocDirLevelService.java

@@ -1,27 +1,35 @@
 package com.doc.biz.service;
 
-import java.util.List;
 import com.doc.biz.domain.DocDirLevel;
 
+import java.util.List;
+
 /**
  * 文档目录加密级别Service接口
- * 
+ *
  * @author wukai
  * @date 2023-10-19
  */
-public interface IDocDirLevelService 
-{
+public interface IDocDirLevelService {
     /**
      * 查询文档目录加密级别
-     * 
+     *
      * @param levelId 文档目录加密级别主键
      * @return 文档目录加密级别
      */
     public DocDirLevel selectDocDirLevelByLevelId(Long levelId);
 
     /**
+     * 查询文档目录加密级别
+     *
+     * @param levelCode 文档目录加密级别编码
+     * @return 文档目录加密级别
+     */
+    DocDirLevel selectDocDirLevelByLevelCode(String levelCode);
+
+    /**
      * 查询文档目录加密级别列表
-     * 
+     *
      * @param docDirLevel 文档目录加密级别
      * @return 文档目录加密级别集合
      */
@@ -29,7 +37,7 @@ public interface IDocDirLevelService
 
     /**
      * 新增文档目录加密级别
-     * 
+     *
      * @param docDirLevel 文档目录加密级别
      * @return 结果
      */
@@ -37,15 +45,23 @@ public interface IDocDirLevelService
 
     /**
      * 修改文档目录加密级别
-     * 
+     *
      * @param docDirLevel 文档目录加密级别
      * @return 结果
      */
     public int updateDocDirLevel(DocDirLevel docDirLevel);
 
     /**
+     * 修改文档目录加密级别
+     *
+     * @param docDirLevel 文档目录加密级别
+     * @return 结果
+     */
+    public int updateDocDirLevel(List<DocDirLevel> docDirLevel);
+
+    /**
      * 批量删除文档目录加密级别
-     * 
+     *
      * @param levelIds 需要删除的文档目录加密级别主键集合
      * @return 结果
      */
@@ -53,9 +69,11 @@ public interface IDocDirLevelService
 
     /**
      * 删除文档目录加密级别信息
-     * 
+     *
      * @param levelId 文档目录加密级别主键
      * @return 结果
      */
     public int deleteDocDirLevelByLevelId(Long levelId);
+
+
 }

+ 58 - 8
doc-biz/src/main/java/com/doc/biz/service/impl/DocDirLevelServiceImpl.java

@@ -1,12 +1,15 @@
 package com.doc.biz.service.impl;
 
-import java.util.List;
-        import com.doc.common.utils.DateUtils;
-import org.springframework.stereotype.Service;
-import com.doc.biz.mapper.DocDirLevelMapper;
+import com.alibaba.fastjson2.JSONObject;
 import com.doc.biz.domain.DocDirLevel;
+import com.doc.biz.mapper.DocDirLevelMapper;
 import com.doc.biz.service.IDocDirLevelService;
+import com.doc.biz.vo.LevelVO;
+import com.doc.common.utils.DateUtils;
+import org.springframework.stereotype.Service;
+
 import javax.annotation.Resource;
+import java.util.List;
 
 /**
  * 文档目录加密级别Service业务层处理
@@ -31,6 +34,28 @@ public class DocDirLevelServiceImpl implements IDocDirLevelService {
     }
 
     /**
+     * 查询文档目录加密级别
+     *
+     * @param levelCode 文档目录加密级别主键
+     * @return 文档目录加密级别
+     */
+    @Override
+    public DocDirLevel selectDocDirLevelByLevelCode(String levelCode) {
+        DocDirLevel docDirLevel = docDirLevelMapper.selectDocDirLevelByLevelCode(levelCode);
+        process(docDirLevel);
+        return docDirLevel;
+    }
+
+    private void process(DocDirLevel l) {
+        JSONObject obj = JSONObject.parse(l.getLevelRoles());
+        if (obj != null && !obj.isEmpty()) {
+            l.setRoles(obj.toJavaObject(LevelVO.class));
+        } else {
+            l.setRoles(new LevelVO());
+        }
+    }
+
+    /**
      * 查询文档目录加密级别列表
      *
      * @param docDirLevel 文档目录加密级别
@@ -38,7 +63,11 @@ public class DocDirLevelServiceImpl implements IDocDirLevelService {
      */
     @Override
     public List<DocDirLevel> selectDocDirLevelList(DocDirLevel docDirLevel) {
-        return docDirLevelMapper.selectDocDirLevelList(docDirLevel);
+        List<DocDirLevel> list = docDirLevelMapper.selectDocDirLevelList(docDirLevel);
+        list.forEach(l -> {
+            process(l);
+        });
+        return list;
     }
 
     /**
@@ -49,8 +78,8 @@ public class DocDirLevelServiceImpl implements IDocDirLevelService {
      */
     @Override
     public int insertDocDirLevel(DocDirLevel docDirLevel) {
-                docDirLevel.setCreateTime(DateUtils.getNowDate());
-            return docDirLevelMapper.insertDocDirLevel(docDirLevel);
+        docDirLevel.setCreateTime(DateUtils.getNowDate());
+        return docDirLevelMapper.insertDocDirLevel(docDirLevel);
     }
 
     /**
@@ -61,11 +90,32 @@ public class DocDirLevelServiceImpl implements IDocDirLevelService {
      */
     @Override
     public int updateDocDirLevel(DocDirLevel docDirLevel) {
-                docDirLevel.setUpdateTime(DateUtils.getNowDate());
+        docDirLevel.setUpdateTime(DateUtils.getNowDate());
         return docDirLevelMapper.updateDocDirLevel(docDirLevel);
     }
 
     /**
+     * 修改文档目录加密级别
+     *
+     * @param docDirLevel 文档目录加密级别
+     * @return 结果
+     */
+    @Override
+    public int updateDocDirLevel(List<DocDirLevel> docDirLevel) {
+        try {
+            docDirLevel.forEach(l -> {
+                l.setUpdateTime(DateUtils.getNowDate());
+                JSONObject obj = JSONObject.from(l.getRoles());
+                l.setLevelRoles(obj.toJSONString());
+                docDirLevelMapper.updateDocDirLevel(l);
+            });
+        } catch (Exception e) {
+            return 0;
+        }
+        return 1;
+    }
+
+    /**
      * 批量删除文档目录加密级别
      *
      * @param levelIds 需要删除的文档目录加密级别主键

+ 25 - 0
doc-biz/src/main/java/com/doc/biz/vo/LevelVO.java

@@ -0,0 +1,25 @@
+package com.doc.biz.vo;
+
+import lombok.Data;
+
+/**
+ * levelVO$
+ *
+ * @author wukai
+ * @date 2023/10/19 16:18
+ */
+@Data
+public class LevelVO {
+    private Integer l0100;
+    private Integer l0200;
+    private Integer l0300;
+    private Integer l0400;
+    private Integer l0500;
+    private Integer l0600;
+    private Integer l0700;
+    private Integer l0800;
+    private Integer l0900;
+    private Integer l1000;
+    private Integer l1100;
+    private Integer l1200;
+}

+ 43 - 28
doc-biz/src/main/resources/mapper/biz/DocDirLevelMapper.xml

@@ -1,44 +1,57 @@
 <?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">
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.doc.biz.mapper.DocDirLevelMapper">
-    
+
     <resultMap type="DocDirLevel" id="DocDirLevelResult">
-        <result property="levelId"    column="LEVEL_ID"    />
-        <result property="levelName"    column="LEVEL_NAME"    />
-        <result property="levelCode"    column="LEVEL_CODE"    />
-        <result property="levelRoles"    column="LEVEL_ROLES"    />
-        <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"    />
+        <result property="levelId" column="LEVEL_ID"/>
+        <result property="levelName" column="LEVEL_NAME"/>
+        <result property="levelCode" column="LEVEL_CODE"/>
+        <result property="levelRoles" column="LEVEL_ROLES"/>
+        <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="selectDocDirLevelVo">
-        select LEVEL_ID, LEVEL_NAME, LEVEL_CODE, LEVEL_ROLES, CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME, REMARK from doc_dir_level
+        select LEVEL_ID,
+               LEVEL_NAME,
+               LEVEL_CODE,
+               LEVEL_ROLES,
+               CREATE_BY,
+               CREATE_TIME,
+               UPDATE_BY,
+               UPDATE_TIME,
+               REMARK
+        from doc_dir_level
     </sql>
 
     <select id="selectDocDirLevelList" parameterType="DocDirLevel" resultMap="DocDirLevelResult">
         <include refid="selectDocDirLevelVo"/>
-        <where>  
-            <if test="levelName != null  and levelName != ''"> and LEVEL_NAME like concat('%', #{levelName}, '%')</if>
-            <if test="levelCode != null  and levelCode != ''"> and LEVEL_CODE = #{levelCode}</if>
-            <if test="levelRoles != null  and levelRoles != ''"> and LEVEL_ROLES = #{levelRoles}</if>
-            <if test="createBy != null  and createBy != ''"> and CREATE_BY = #{createBy}</if>
-            <if test="createTime != null "> and CREATE_TIME = #{createTime}</if>
-            <if test="updateBy != null  and updateBy != ''"> and UPDATE_BY = #{updateBy}</if>
-            <if test="updateTime != null "> and UPDATE_TIME = #{updateTime}</if>
-            <if test="remark != null  and remark != ''"> and REMARK = #{remark}</if>
+        <where>
+            <if test="levelName != null  and levelName != ''">and LEVEL_NAME like concat('%', #{levelName}, '%')</if>
+            <if test="levelCode != null  and levelCode != ''">and LEVEL_CODE = #{levelCode}</if>
+            <if test="levelRoles != null  and levelRoles != ''">and LEVEL_ROLES = #{levelRoles}</if>
+            <if test="createBy != null  and createBy != ''">and CREATE_BY = #{createBy}</if>
+            <if test="createTime != null ">and CREATE_TIME = #{createTime}</if>
+            <if test="updateBy != null  and updateBy != ''">and UPDATE_BY = #{updateBy}</if>
+            <if test="updateTime != null ">and UPDATE_TIME = #{updateTime}</if>
+            <if test="remark != null  and remark != ''">and REMARK = #{remark}</if>
         </where>
     </select>
-    
+
     <select id="selectDocDirLevelByLevelId" parameterType="Long" resultMap="DocDirLevelResult">
         <include refid="selectDocDirLevelVo"/>
         where LEVEL_ID = #{levelId}
     </select>
-        
+    <select id="selectDocDirLevelByLevelCode" resultType="com.doc.biz.domain.DocDirLevel">
+        <include refid="selectDocDirLevelVo"/>
+        where LEVEL_CODE = #{levelCode}
+    </select>
+
     <insert id="insertDocDirLevel" parameterType="DocDirLevel" useGeneratedKeys="true" keyProperty="levelId">
         insert into doc_dir_level
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -50,7 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateBy != null">UPDATE_BY,</if>
             <if test="updateTime != null">UPDATE_TIME,</if>
             <if test="remark != null">REMARK,</if>
-         </trim>
+        </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="levelName != null">#{levelName},</if>
             <if test="levelCode != null and levelCode != ''">#{levelCode},</if>
@@ -60,7 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateBy != null">#{updateBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="remark != null">#{remark},</if>
-         </trim>
+        </trim>
     </insert>
 
     <update id="updateDocDirLevel" parameterType="DocDirLevel">
@@ -79,11 +92,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </update>
 
     <delete id="deleteDocDirLevelByLevelId" parameterType="Long">
-        delete from doc_dir_level where LEVEL_ID = #{levelId}
+        delete
+        from doc_dir_level
+        where LEVEL_ID = #{levelId}
     </delete>
 
     <delete id="deleteDocDirLevelByLevelIds" parameterType="String">
-        delete from doc_dir_level where LEVEL_ID in 
+        delete from doc_dir_level where LEVEL_ID in
         <foreach item="levelId" collection="array" open="(" separator="," close=")">
             #{levelId}
         </foreach>