Ver código fonte

feat(business): 添加盲注级别相关功能

- 新增 BlindLevels 实体类
- 新增 BlindLevelsBo 业务对象类
- 新增 BlindLevelsController 控制器
- 新增 BlindLevelsMapper Mapper 接口
- 新增 BlindLevelsServiceImpl 服务实现类
- 新增 IBlindLevelsService服务接口
- 新增 BlindLevelsVo 视图对象类
- 更新 BlindStructures 实体类
fugui001 6 meses atrás
pai
commit
b981e546cc

+ 104 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/controller/BlindLevelsController.java

@@ -0,0 +1,104 @@
+package org.dromara.business.controller;
+
+import java.util.List;
+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 org.dromara.business.domain.vo.BlindLevelsVo;
+import org.dromara.business.domain.bo.BlindLevelsBo;
+import org.dromara.business.service.IBlindLevelsService;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+
+/**
+ * 【盲注级别】
+ *
+ * @author Lion Li
+ * @date 2025-06-10
+ */
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/business/levels")
+public class BlindLevelsController extends BaseController {
+
+    private final IBlindLevelsService blindLevelsService;
+
+    /**
+     * 查询【盲注级别】列表
+     */
+    @SaCheckPermission("business:levels:list")
+    @GetMapping("/list")
+    public TableDataInfo<BlindLevelsVo> list(BlindLevelsBo bo, PageQuery pageQuery) {
+        return blindLevelsService.queryPageList(bo, pageQuery);
+    }
+
+    /**
+     * 导出【盲注级别】列表
+     */
+    @SaCheckPermission("business:levels:export")
+    @Log(title = "【盲注级别-导出】", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(BlindLevelsBo bo, HttpServletResponse response) {
+        List<BlindLevelsVo> list = blindLevelsService.queryList(bo);
+        ExcelUtil.exportExcel(list, "【盲注级别】", BlindLevelsVo.class, response);
+    }
+
+    /**
+     * 获取【盲注级别】详细信息
+     *
+     * @param id 主键
+     */
+    @SaCheckPermission("business:levels:query")
+    @GetMapping("/{id}")
+    public R<BlindLevelsVo> getInfo(@NotNull(message = "主键不能为空")
+                                     @PathVariable Long id) {
+        return R.ok(blindLevelsService.queryById(id));
+    }
+
+    /**
+     * 新增【盲注级别】
+     */
+    @SaCheckPermission("business:levels:add")
+    @Log(title = "【盲注级别-新增】", businessType = BusinessType.INSERT)
+    @RepeatSubmit()
+    @PostMapping()
+    public R<Void> add(@Validated(AddGroup.class) @RequestBody BlindLevelsBo bo) {
+        return toAjax(blindLevelsService.insertByBo(bo));
+    }
+
+    /**
+     * 修改【盲注级别】
+     */
+    @SaCheckPermission("business:levels:edit")
+    @Log(title = "【盲注级别-修改】", businessType = BusinessType.UPDATE)
+    @RepeatSubmit()
+    @PutMapping()
+    public R<Void> edit(@Validated(EditGroup.class) @RequestBody BlindLevelsBo bo) {
+        return toAjax(blindLevelsService.updateByBo(bo));
+    }
+
+    /**
+     * 删除【盲注级别】
+     *
+     * @param ids 主键串
+     */
+    @SaCheckPermission("business:levels:remove")
+    @Log(title = "【盲注级别-删除】", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public R<Void> remove(@NotEmpty(message = "主键不能为空")
+                          @PathVariable Long[] ids) {
+        return toAjax(blindLevelsService.deleteWithValidByIds(List.of(ids), true));
+    }
+}

+ 69 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/domain/BlindLevels.java

@@ -0,0 +1,69 @@
+package org.dromara.business.domain;
+
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.Data;
+import java.util.Date;
+
+import java.io.Serial;
+
+/**
+ * 【请填写功能名称】对象 blind_levels
+ *
+ * @author Lion Li
+ * @date 2025-06-10
+ */
+@Data
+@TableName("blind_levels")
+public class BlindLevels{
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     *id
+     */
+    @TableId(value = "id")
+    private Long id;
+
+    /**
+     * 所属盲注结构
+     */
+    private Long blindStructureId;
+
+    /**
+     * 级别编号,如第1级、第2级
+     */
+    private Long levelNumber;
+
+    /**
+     * 小盲金额
+     */
+    private Long smallBlind;
+
+    /**
+     * 大盲金额
+     */
+    private Long bigBlind;
+
+    /**
+     * 底注(可选)
+     */
+    private Long ante;
+
+    /**
+     * 本级别持续时间(分钟)
+     */
+    private Long durationMinutes;
+
+    /**
+     *
+     */
+    private Date createdAt;
+
+    /**
+     *
+     */
+    private Date updatedAt;
+
+
+}

+ 0 - 3
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/domain/BlindStructures.java

@@ -1,11 +1,8 @@
 package org.dromara.business.domain;
 
-import org.dromara.common.mybatis.core.domain.BaseEntity;
 import com.baomidou.mybatisplus.annotation.*;
 import lombok.Data;
-import lombok.EqualsAndHashCode;
 import java.util.Date;
-
 import java.io.Serial;
 
 /**

+ 76 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/domain/bo/BlindLevelsBo.java

@@ -0,0 +1,76 @@
+package org.dromara.business.domain.bo;
+
+import org.dromara.business.domain.BlindLevels;
+import org.dromara.common.mybatis.core.domain.BaseEntity;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.core.validate.EditGroup;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import jakarta.validation.constraints.*;
+import java.util.Date;
+
+/**
+ * 【请填写功能名称】业务对象 blind_levels
+ *
+ * @author Lion Li
+ * @date 2025-06-10
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = BlindLevels.class, reverseConvertGenerate = false)
+public class BlindLevelsBo extends BaseEntity {
+
+    /**
+     *id
+     */
+    @NotNull(message = "id不能为空", groups = { EditGroup.class })
+    private Long id;
+
+    /**
+     * 所属盲注结构
+     */
+    @NotNull(message = "所属盲注结构不能为空", groups = { AddGroup.class, EditGroup.class })
+    private Long blindStructureId;
+
+    /**
+     * 级别编号,如第1级、第2级
+     */
+    @NotNull(message = "级别编号,如第1级、第2级不能为空", groups = { AddGroup.class, EditGroup.class })
+    private Long levelNumber;
+
+    /**
+     * 小盲金额
+     */
+    @NotNull(message = "小盲金额不能为空", groups = { AddGroup.class, EditGroup.class })
+    private Long smallBlind;
+
+    /**
+     * 大盲金额
+     */
+    @NotNull(message = "大盲金额不能为空", groups = { AddGroup.class, EditGroup.class })
+    private Long bigBlind;
+
+    /**
+     * 底注(可选)
+     */
+    private Long ante;
+
+    /**
+     * 本级别持续时间(分钟)
+     */
+    @NotNull(message = "本级别持续时间(分钟)不能为空", groups = { AddGroup.class, EditGroup.class })
+    private Long durationMinutes;
+
+    /**
+     * 创建时间
+     */
+    private Date createdAt;
+
+    /**
+     * 修改时间
+     */
+    private Date updatedAt;
+
+
+}

+ 88 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/domain/vo/BlindLevelsVo.java

@@ -0,0 +1,88 @@
+package org.dromara.business.domain.vo;
+
+import java.util.Date;
+import org.dromara.business.domain.BlindLevels;
+import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
+import cn.idev.excel.annotation.ExcelProperty;
+import org.dromara.common.excel.annotation.ExcelDictFormat;
+import org.dromara.common.excel.convert.ExcelDictConvert;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+
+
+/**
+ * 【请填写功能名称】视图对象 blind_levels
+ *
+ * @author Lion Li
+ * @date 2025-06-10
+ */
+@Data
+@ExcelIgnoreUnannotated
+@AutoMapper(target = BlindLevels.class)
+public class BlindLevelsVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     *
+     */
+    @ExcelProperty(value = "")
+    private Long id;
+
+    /**
+     * 所属盲注结构
+     */
+    @ExcelProperty(value = "所属盲注结构")
+    private Long blindStructureId;
+
+    /**
+     * 级别编号,如第1级、第2级
+     */
+    @ExcelProperty(value = "级别编号,如第1级、第2级")
+    private Long levelNumber;
+
+    /**
+     * 小盲金额
+     */
+    @ExcelProperty(value = "小盲金额")
+    private Long smallBlind;
+
+    /**
+     * 大盲金额
+     */
+    @ExcelProperty(value = "大盲金额")
+    private Long bigBlind;
+
+    /**
+     * 底注(可选)
+     */
+    @ExcelProperty(value = "底注", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(readConverterExp = "可=选")
+    private Long ante;
+
+    /**
+     * 本级别持续时间(分钟)
+     */
+    @ExcelProperty(value = "本级别持续时间", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(readConverterExp = "分=钟")
+    private Long durationMinutes;
+
+    /**
+     *创建时间
+     */
+    @ExcelProperty(value = "创建时间")
+    private Date createdAt;
+
+    /**
+     *修改时间
+     */
+    @ExcelProperty(value = "修改时间")
+    private Date updatedAt;
+
+
+}

+ 46 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/mapper/BlindLevelsMapper.java

@@ -0,0 +1,46 @@
+package org.dromara.business.mapper;
+
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.apache.ibatis.annotations.Param;
+import org.dromara.business.domain.BlindLevels;
+import org.dromara.business.domain.vo.BlindLevelsVo;
+import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * 【请填写功能名称】Mapper接口
+ *
+ * @author Lion Li
+ * @date 2025-06-10
+ */
+@DS("mysql2")
+public interface BlindLevelsMapper extends BaseMapperPlus<BlindLevels, BlindLevelsVo> {
+
+
+    @InterceptorIgnore(tenantLine = "true")
+    Page<BlindLevelsVo> selectVoPage(@Param("page") Page<BlindLevels> page, @Param("ew") Wrapper<BlindLevels> wrapper);
+
+    @InterceptorIgnore(tenantLine = "true")
+    BlindLevelsVo selectVoByIdInfo(Long id);
+
+    @InterceptorIgnore(tenantLine = "true")
+    int updateBlindLevelById(BlindLevels update);
+
+    @InterceptorIgnore(tenantLine = "true")
+    int insertBlindLevel(BlindLevels insert);
+
+    @InterceptorIgnore(tenantLine = "true")
+    int deleteBlindLevelById(@Param("ids") Collection<Long> ids);
+
+    @InterceptorIgnore(tenantLine = "true")
+    List<BlindLevelsVo> selectBlindStructuresVoList(@Param("ew") Wrapper<BlindLevels> wrapper);
+
+
+
+
+}

+ 68 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/service/IBlindLevelsService.java

@@ -0,0 +1,68 @@
+package org.dromara.business.service;
+
+import org.dromara.business.domain.vo.BlindLevelsVo;
+import org.dromara.business.domain.bo.BlindLevelsBo;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.mybatis.core.page.PageQuery;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * 【请填写功能名称】Service接口
+ *
+ * @author Lion Li
+ * @date 2025-06-10
+ */
+public interface IBlindLevelsService {
+
+    /**
+     * 查询【请填写功能名称】
+     *
+     * @param id 主键
+     * @return 【请填写功能名称】
+     */
+    BlindLevelsVo queryById(Long id);
+
+    /**
+     * 分页查询【请填写功能名称】列表
+     *
+     * @param bo        查询条件
+     * @param pageQuery 分页参数
+     * @return 【请填写功能名称】分页列表
+     */
+    TableDataInfo<BlindLevelsVo> queryPageList(BlindLevelsBo bo, PageQuery pageQuery);
+
+    /**
+     * 查询符合条件的【请填写功能名称】列表
+     *
+     * @param bo 查询条件
+     * @return 【请填写功能名称】列表
+     */
+    List<BlindLevelsVo> queryList(BlindLevelsBo bo);
+
+    /**
+     * 新增【请填写功能名称】
+     *
+     * @param bo 【请填写功能名称】
+     * @return 是否新增成功
+     */
+    Boolean insertByBo(BlindLevelsBo bo);
+
+    /**
+     * 修改【请填写功能名称】
+     *
+     * @param bo 【请填写功能名称】
+     * @return 是否修改成功
+     */
+    Boolean updateByBo(BlindLevelsBo bo);
+
+    /**
+     * 校验并批量删除【请填写功能名称】信息
+     *
+     * @param ids     待删除的主键集合
+     * @param isValid 是否进行有效性校验
+     * @return 是否删除成功
+     */
+    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+}

+ 138 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/service/impl/BlindLevelsServiceImpl.java

@@ -0,0 +1,138 @@
+package org.dromara.business.service.impl;
+
+import org.dromara.common.core.utils.MapstructUtils;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+import org.dromara.business.domain.bo.BlindLevelsBo;
+import org.dromara.business.domain.vo.BlindLevelsVo;
+import org.dromara.business.domain.BlindLevels;
+import org.dromara.business.mapper.BlindLevelsMapper;
+import org.dromara.business.service.IBlindLevelsService;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Collection;
+
+/**
+ * 【请填写功能名称】Service业务层处理
+ *
+ * @author Lion Li
+ * @date 2025-06-10
+ */
+@Slf4j
+@RequiredArgsConstructor
+@Service
+public class BlindLevelsServiceImpl implements IBlindLevelsService {
+
+    private final BlindLevelsMapper baseMapper;
+
+    /**
+     * 查询【请填写功能名称】
+     *
+     * @param id 主键
+     * @return 【请填写功能名称】
+     */
+    @Override
+    public BlindLevelsVo queryById(Long id){
+        return baseMapper.selectVoByIdInfo(id);
+    }
+
+    /**
+     * 分页查询【请填写功能名称】列表
+     *
+     * @param bo        查询条件
+     * @param pageQuery 分页参数
+     * @return 【请填写功能名称】分页列表
+     */
+    @Override
+    public TableDataInfo<BlindLevelsVo> queryPageList(BlindLevelsBo bo, PageQuery pageQuery) {
+        LambdaQueryWrapper<BlindLevels> lqw = buildQueryWrapper(bo);
+        Page<BlindLevelsVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
+        return TableDataInfo.build(result);
+    }
+
+    /**
+     * 查询符合条件的【请填写功能名称】列表
+     *
+     * @param bo 查询条件
+     * @return 【请填写功能名称】列表
+     */
+    @Override
+    public List<BlindLevelsVo> queryList(BlindLevelsBo bo) {
+        LambdaQueryWrapper<BlindLevels> lqw = buildQueryWrapper(bo);
+        return baseMapper.selectBlindStructuresVoList(lqw);
+    }
+
+    private LambdaQueryWrapper<BlindLevels> buildQueryWrapper(BlindLevelsBo bo) {
+        Map<String, Object> params = bo.getParams();
+        LambdaQueryWrapper<BlindLevels> lqw = Wrappers.lambdaQuery();
+        lqw.orderByAsc(BlindLevels::getId);
+        lqw.eq(bo.getBlindStructureId() != null, BlindLevels::getBlindStructureId, bo.getBlindStructureId());
+        lqw.eq(bo.getLevelNumber() != null, BlindLevels::getLevelNumber, bo.getLevelNumber());
+        lqw.eq(bo.getSmallBlind() != null, BlindLevels::getSmallBlind, bo.getSmallBlind());
+        lqw.eq(bo.getBigBlind() != null, BlindLevels::getBigBlind, bo.getBigBlind());
+        lqw.eq(bo.getAnte() != null, BlindLevels::getAnte, bo.getAnte());
+        lqw.eq(bo.getDurationMinutes() != null, BlindLevels::getDurationMinutes, bo.getDurationMinutes());
+        lqw.eq(bo.getCreatedAt() != null, BlindLevels::getCreatedAt, bo.getCreatedAt());
+        lqw.eq(bo.getUpdatedAt() != null, BlindLevels::getUpdatedAt, bo.getUpdatedAt());
+        return lqw;
+    }
+
+    /**
+     * 新增【请填写功能名称】
+     *
+     * @param bo 【请填写功能名称】
+     * @return 是否新增成功
+     */
+    @Override
+    public Boolean insertByBo(BlindLevelsBo bo) {
+        BlindLevels add = MapstructUtils.convert(bo, BlindLevels.class);
+        validEntityBeforeSave(add);
+        boolean flag = baseMapper.insertBlindLevel(add) > 0;
+        if (flag) {
+            bo.setId(add.getId());
+        }
+        return flag;
+    }
+
+    /**
+     * 修改【请填写功能名称】
+     *
+     * @param bo 【请填写功能名称】
+     * @return 是否修改成功
+     */
+    @Override
+    public Boolean updateByBo(BlindLevelsBo bo) {
+        BlindLevels update = MapstructUtils.convert(bo, BlindLevels.class);
+        validEntityBeforeSave(update);
+        return baseMapper.updateBlindLevelById(update) > 0;
+    }
+
+    /**
+     * 保存前的数据校验
+     */
+    private void validEntityBeforeSave(BlindLevels entity){
+        //TODO 做一些数据校验,如唯一约束
+    }
+
+    /**
+     * 校验并批量删除【请填写功能名称】信息
+     *
+     * @param ids     待删除的主键集合
+     * @param isValid 是否进行有效性校验
+     * @return 是否删除成功
+     */
+    @Override
+    public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
+        if(isValid){
+            //TODO 做一些业务上的校验,判断是否需要校验
+        }
+        return baseMapper.deleteBlindLevelById(ids) > 0;
+    }
+}

+ 136 - 0
ruoyi-modules/ruoyi-system/src/main/resources/mapper/business/BlindLevelsMapper.xml

@@ -0,0 +1,136 @@
+<?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="org.dromara.business.mapper.BlindLevelsMapper">
+
+    <select id="selectVoPage" resultType="org.dromara.business.domain.vo.BlindLevelsVo">
+        SELECT
+            id,
+            blind_structure_id,
+            level_number,
+            small_blind,
+            big_blind,
+            ante,
+            duration_minutes,
+            created_at,
+            updated_at
+        FROM
+            blind_levels ${ew.customSqlSegment}
+    </select>
+
+
+    <select id="selectBlindLevelVoList" resultType="org.dromara.business.domain.vo.BlindLevelsVo">
+        SELECT
+            id,
+            blind_structure_id,
+            level_number,
+            small_blind,
+            big_blind,
+            ante,
+            duration_minutes,
+            created_at,
+            updated_at
+        FROM
+            blind_levels  ${ew.customSqlSegment}
+    </select>
+
+    <select id="selectVoByIdInfo" resultType="org.dromara.business.domain.vo.BlindLevelsVo">
+        SELECT
+            id,
+            blind_structure_id,
+            level_number,
+            small_blind,
+            big_blind,
+            ante,
+            duration_minutes,
+            created_at,
+            updated_at
+        FROM
+            blind_levels WHERE id =  #{id}
+    </select>
+
+
+    <update id="updateBlindLevelById">
+        UPDATE blind_levels
+        <set>
+            <if test="blindStructureId != null">
+                blind_structure_id = #{blindStructureId},
+            </if>
+            <if test="levelNumber != null">
+                level_number = #{levelNumber},
+            </if>
+            <if test="smallBlind != null">
+                small_blind = #{smallBlind},
+            </if>
+            <if test="bigBlind != null">
+                big_blind = #{bigBlind},
+            </if>
+            <if test="ante != null">
+                ante = #{ante},
+            </if>
+            <if test="durationMinutes != null">
+                duration_minutes = #{durationMinutes},
+            </if>
+        </set>
+        WHERE id = #{id}
+    </update>
+
+
+    <insert id="insertBlindLevel" useGeneratedKeys="true" keyProperty="id">
+        INSERT INTO blind_levels
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="blindStructureId != null">
+                blind_structure_id,
+            </if>
+            <if test="levelNumber != null">
+                level_number,
+            </if>
+            <if test="smallBlind != null">
+                small_blind,
+            </if>
+            <if test="bigBlind != null">
+                big_blind,
+            </if>
+            <if test="ante != null">
+                ante,
+            </if>
+            <if test="durationMinutes != null">
+                duration_minutes,
+            </if>
+        </trim>
+        <trim prefix="VALUES (" suffix=")" suffixOverrides=",">
+            <if test="blindStructureId != null">
+                #{blindStructureId},
+            </if>
+            <if test="levelNumber != null">
+                #{levelNumber},
+            </if>
+            <if test="smallBlind != null">
+                #{smallBlind},
+            </if>
+            <if test="bigBlind != null">
+                #{bigBlind},
+            </if>
+            <if test="ante != null">
+                #{ante},
+            </if>
+            <if test="durationMinutes != null">
+                #{durationMinutes},
+            </if>
+        </trim>
+    </insert>
+
+    <delete id="deleteBlindLevelById">
+        DELETE FROM blind_levels
+        <where>
+            id IN
+            <foreach item="id" collection="ids" open="(" separator="," close=")">
+                <if test="id > 0">
+                    #{id}
+                </if>
+            </foreach>
+        </where>
+    </delete>
+
+</mapper>