Forráskód Böngészése

feat(business): 添加用户头像管理功能- 新增用户头像实体类 UserPic 及相关业务对象
- 实现用户头像的增删改查接口和服务逻辑- 配置 MyBatis 映射文件支持头像数据操作
- 提供 RESTful 控制器用于外部调用
- 支持分页查询、导出及权限校验- 关联 OSS 服务实现头像文件同步删除

fugui001 2 hónapja
szülő
commit
a5a21c9cae

+ 105 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/controller/UserPicController.java

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

+ 45 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/domain/UserPic.java

@@ -0,0 +1,45 @@
+package org.dromara.business.domain;
+
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.Data;
+import java.util.Date;
+import java.io.Serial;
+
+/**
+ * 【请填写功能名称】对象 user_pic
+ *
+ * @author Lion Li
+ * @date 2025-10-09
+ */
+@Data
+@TableName("user_pic")
+public class UserPic{
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     *
+     */
+    @TableId(value = "id")
+    private Long id;
+
+    /**
+     * 头像路径
+     */
+    private String picUrl;
+
+    /**
+     *
+     */
+    private Date createAt;
+
+    /**
+     *
+     */
+    private Date updateAt;
+
+    private String osId;
+
+
+}

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

@@ -0,0 +1,45 @@
+package org.dromara.business.domain.bo;
+
+import org.dromara.business.domain.UserPic;
+import org.dromara.common.mybatis.core.domain.BaseEntity;
+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;
+
+/**
+ * 【请填写功能名称】业务对象 user_pic
+ *
+ * @author Lion Li
+ * @date 2025-10-09
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = UserPic.class, reverseConvertGenerate = false)
+public class UserPicBo extends BaseEntity {
+
+    /**
+     *
+     */
+    @NotNull(message = "不能为空", groups = { EditGroup.class })
+    private Long id;
+
+    /**
+     * 头像路径
+     */
+    private String picUrl;
+
+    /**
+     *
+     */
+    private Date createAt;
+
+    /**
+     *
+     */
+    private Date updateAt;
+
+    private String osId;
+}

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

@@ -0,0 +1,54 @@
+package org.dromara.business.domain.vo;
+
+import java.util.Date;
+import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
+import cn.idev.excel.annotation.ExcelProperty;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import org.dromara.business.domain.UserPic;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+
+
+/**
+ * 【请填写功能名称】视图对象 user_pic
+ *
+ * @author Lion Li
+ * @date 2025-10-09
+ */
+@Data
+@ExcelIgnoreUnannotated
+@AutoMapper(target = UserPic.class)
+public class UserPicVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     *
+     */
+    @ExcelProperty(value = "")
+    private Long id;
+
+    /**
+     * 头像路径
+     */
+    @ExcelProperty(value = "头像路径")
+    private String picUrl;
+
+    /**
+     *
+     */
+    @ExcelProperty(value = "")
+    private Date createAt;
+
+    /**
+     *
+     */
+    @ExcelProperty(value = "")
+    private Date updateAt;
+
+    private String osId;
+}

+ 44 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/mapper/UserPicMapper.java

@@ -0,0 +1,44 @@
+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.UserPic;
+import org.dromara.business.domain.vo.UserPicVo;
+import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * 【请填写功能名称】Mapper接口
+ *
+ * @author Lion Li
+ * @date 2025-10-09
+ */
+@DS("mysql2")
+public interface UserPicMapper extends BaseMapperPlus<UserPic, UserPicVo> {
+
+
+    @InterceptorIgnore(tenantLine = "true")
+    Page<UserPicVo> selectPicVoPage(@Param("page") Page<UserPic> page, @Param("ew") Wrapper<UserPic> wrapper);
+
+    @InterceptorIgnore(tenantLine = "true")
+    UserPicVo selectPicVoByIdInfo(Long id);
+
+    @InterceptorIgnore(tenantLine = "true")
+    int updatePicById(UserPic update);
+
+    @InterceptorIgnore(tenantLine = "true")
+    int insertPic(UserPic insert);
+
+    @InterceptorIgnore(tenantLine = "true")
+    int deletePicById(@Param("ids") Collection<Long> ids);
+
+    @InterceptorIgnore(tenantLine = "true")
+    List<UserPicVo> selectPicVoList(@Param("ew") Wrapper<UserPic> wrapper);
+
+
+}

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

@@ -0,0 +1,68 @@
+package org.dromara.business.service;
+
+import org.dromara.business.domain.bo.UserPicBo;
+import org.dromara.business.domain.vo.UserPicVo;
+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-10-09
+ */
+public interface IUserPicService {
+
+    /**
+     * 查询【请填写功能名称】
+     *
+     * @param id 主键
+     * @return 【请填写功能名称】
+     */
+    UserPicVo queryById(Long id);
+
+    /**
+     * 分页查询【请填写功能名称】列表
+     *
+     * @param bo        查询条件
+     * @param pageQuery 分页参数
+     * @return 【请填写功能名称】分页列表
+     */
+    TableDataInfo<UserPicVo> queryPageList(UserPicBo bo, PageQuery pageQuery);
+
+    /**
+     * 查询符合条件的【请填写功能名称】列表
+     *
+     * @param bo 查询条件
+     * @return 【请填写功能名称】列表
+     */
+    List<UserPicVo> queryList(UserPicBo bo);
+
+    /**
+     * 新增【请填写功能名称】
+     *
+     * @param bo 【请填写功能名称】
+     * @return 是否新增成功
+     */
+    Boolean insertByBo(UserPicBo bo);
+
+    /**
+     * 修改【请填写功能名称】
+     *
+     * @param bo 【请填写功能名称】
+     * @return 是否修改成功
+     */
+    Boolean updateByBo(UserPicBo bo);
+
+    /**
+     * 校验并批量删除【请填写功能名称】信息
+     *
+     * @param ids     待删除的主键集合
+     * @param isValid 是否进行有效性校验
+     * @return 是否删除成功
+     */
+    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+}

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

@@ -0,0 +1,143 @@
+package org.dromara.business.service.impl;
+
+import org.dromara.business.domain.UserPic;
+import org.dromara.business.domain.bo.UserPicBo;
+import org.dromara.business.domain.vo.UserPicVo;
+import org.dromara.business.mapper.UserPicMapper;
+import org.dromara.business.service.IUserPicService;
+import org.dromara.common.core.utils.MapstructUtils;
+import org.dromara.common.core.utils.StringUtils;
+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.dromara.system.service.ISysOssService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Collection;
+
+/**
+ * 【请填写功能名称】Service业务层处理
+ *
+ * @author Lion Li
+ * @date 2025-10-09
+ */
+@Slf4j
+@RequiredArgsConstructor
+@Service
+public class UserPicServiceImpl implements IUserPicService {
+
+    private final UserPicMapper baseMapper;
+
+    private final ISysOssService ossService;
+
+    /**
+     * 查询【请填写功能名称】
+     *
+     * @param id 主键
+     * @return 【请填写功能名称】
+     */
+    @Override
+    public UserPicVo queryById(Long id){
+        return baseMapper.selectPicVoByIdInfo(id);
+    }
+
+    /**
+     * 分页查询【请填写功能名称】列表
+     *
+     * @param bo        查询条件
+     * @param pageQuery 分页参数
+     * @return 【请填写功能名称】分页列表
+     */
+    @Override
+    public TableDataInfo<UserPicVo> queryPageList(UserPicBo bo, PageQuery pageQuery) {
+        LambdaQueryWrapper<UserPic> lqw = buildQueryWrapper(bo);
+        Page<UserPicVo> result = baseMapper.selectPicVoPage(pageQuery.build(), lqw);
+        return TableDataInfo.build(result);
+    }
+
+    /**
+     * 查询符合条件的【请填写功能名称】列表
+     *
+     * @param bo 查询条件
+     * @return 【请填写功能名称】列表
+     */
+    @Override
+    public List<UserPicVo> queryList(UserPicBo bo) {
+        LambdaQueryWrapper<UserPic> lqw = buildQueryWrapper(bo);
+        return baseMapper.selectPicVoList(lqw);
+    }
+
+    private LambdaQueryWrapper<UserPic> buildQueryWrapper(UserPicBo bo) {
+        Map<String, Object> params = bo.getParams();
+        LambdaQueryWrapper<UserPic> lqw = Wrappers.lambdaQuery();
+        lqw.orderByAsc(UserPic::getId);
+        lqw.eq(StringUtils.isNotBlank(bo.getPicUrl()), UserPic::getPicUrl, bo.getPicUrl());
+        lqw.eq(bo.getCreateAt() != null, UserPic::getCreateAt, bo.getCreateAt());
+        lqw.eq(bo.getUpdateAt() != null, UserPic::getUpdateAt, bo.getUpdateAt());
+        return lqw;
+    }
+
+    /**
+     * 新增【请填写功能名称】
+     *
+     * @param bo 【请填写功能名称】
+     * @return 是否新增成功
+     */
+    @Override
+    public Boolean insertByBo(UserPicBo bo) {
+        UserPic add = MapstructUtils.convert(bo, UserPic.class);
+        validEntityBeforeSave(add);
+        boolean flag = baseMapper.insertPic(add) > 0;
+        if (flag) {
+            bo.setId(add.getId());
+        }
+        return flag;
+    }
+
+    /**
+     * 修改【请填写功能名称】
+     *
+     * @param bo 【请填写功能名称】
+     * @return 是否修改成功
+     */
+    @Override
+    public Boolean updateByBo(UserPicBo bo) {
+        UserPic update = MapstructUtils.convert(bo, UserPic.class);
+        validEntityBeforeSave(update);
+        return baseMapper.updatePicById(update) > 0;
+    }
+
+    /**
+     * 保存前的数据校验
+     */
+    private void validEntityBeforeSave(UserPic entity){
+        //TODO 做一些数据校验,如唯一约束
+    }
+
+    /**
+     * 校验并批量删除【请填写功能名称】信息
+     *
+     * @param ids     待删除的主键集合
+     * @param isValid 是否进行有效性校验
+     * @return 是否删除成功
+     */
+    @Override
+    public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
+        if(isValid){
+            //TODO 做一些业务上的校验,判断是否需要校验
+        }
+        for (Long id : ids) {
+            UserPicVo userPicVo = baseMapper.selectPicVoByIdInfo(id);
+            if(StringUtils.isNotBlank(userPicVo.getOsId())){
+                ossService.deleteWithValidByIds(List.of(Long.valueOf(userPicVo.getOsId())), true);
+            }
+        }
+        return baseMapper.deletePicById(ids) > 0;
+    }
+}

+ 59 - 13
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/job/business/ScheduleTask.java

@@ -66,31 +66,77 @@ public class ScheduleTask {
     IScheduleConfigService scheduleConfigService;
 
 
+    /**
+     * 生成 schedule_execution 未来七天任务
+     */
     /**
      * 生成 schedule_execution 未来七天任务
      */
     @Scheduled(cron = "0 01 00 * * ?")
     public void generateNextSevenDayTask() {
-        List<ScheduleConfigVo> scheduleConfigVoList = baseMapper.selectAllScheduleUseConfigs();
-        for (ScheduleConfigVo scheduleConfigVo : scheduleConfigVoList) {
-            List<String> repeatTypes=new ArrayList<>();
-            List<ScheduleRepeatVo> scheduleRepeatVos = scheduleRepeatMapper.selectScheduleRepeatByConfigId(scheduleConfigVo.getId());
-            for (ScheduleRepeatVo scheduleRepeatVo : scheduleRepeatVos) {
-                repeatTypes.add(scheduleRepeatVo.getRepeatType());
-            }
-            List<LocalTime> execTimes=new ArrayList<>();
-            List<ScheduleTimeVo> scheduleTimeVos = scheduleTimeMapper.selectScheduleTimeInfoById(scheduleConfigVo.getId());
-            for (ScheduleTimeVo scheduleTimeVo : scheduleTimeVos) {
-                execTimes.add(scheduleTimeVo.getExecTime());
+        log.info("开始执行每日任务计划生成,生成未来七天的任务");
+
+        try {
+            List<ScheduleConfigVo> scheduleConfigVoList = baseMapper.selectAllScheduleUseConfigs();
+            log.info("查询到需要处理的计划配置数量: {}", scheduleConfigVoList.size());
+
+            for (ScheduleConfigVo scheduleConfigVo : scheduleConfigVoList) {
+                try {
+                    log.info("开始处理计划配置ID: {}", scheduleConfigVo.getId());
+
+                    // 获取重复类型列表
+                    List<String> repeatTypes = new ArrayList<>();
+                    List<ScheduleRepeatVo> scheduleRepeatVos = scheduleRepeatMapper.selectScheduleRepeatByConfigId(scheduleConfigVo.getId());
+                    log.debug("配置ID {} 查询到重复规则数量: {}", scheduleConfigVo.getId(), scheduleRepeatVos.size());
+
+                    for (ScheduleRepeatVo scheduleRepeatVo : scheduleRepeatVos) {
+                        repeatTypes.add(scheduleRepeatVo.getRepeatType());
+                        log.debug("配置ID {} 添加重复类型: {}", scheduleConfigVo.getId(), scheduleRepeatVo.getRepeatType());
+                    }
+
+                    // 获取执行时间列表
+                    List<LocalTime> execTimes = new ArrayList<>();
+                    List<ScheduleTimeVo> scheduleTimeVos = scheduleTimeMapper.selectScheduleTimeInfoById(scheduleConfigVo.getId());
+                    log.debug("配置ID {} 查询到执行时间数量: {}", scheduleConfigVo.getId(), scheduleTimeVos.size());
+
+                    for (ScheduleTimeVo scheduleTimeVo : scheduleTimeVos) {
+                        execTimes.add(scheduleTimeVo.getExecTime());
+                        log.debug("配置ID {} 添加执行时间: {}", scheduleConfigVo.getId(), scheduleTimeVo.getExecTime());
+                    }
+
+                    LocalDate startDate = LocalDate.now();
+                    LocalDate endDate = LocalDate.now().plusDays(7);
+                    log.info("调用生成执行计划任务,配置ID: {}, 计划类型: WEEKLY, 开始日期: {}, 结束日期: {}, 重复类型数量: {}, 执行时间数量: {}",
+                        scheduleConfigVo.getId(), startDate, endDate, repeatTypes.size(), execTimes.size());
+
+                    scheduleConfigService.generateExecutionPlanTask(
+                        scheduleConfigVo.getId(),
+                        "WEEKLY",
+                        startDate,
+                        endDate,
+                        repeatTypes,
+                        execTimes
+                    );
+
+                    log.info("计划配置ID {} 处理完成", scheduleConfigVo.getId());
+
+                } catch (Exception e) {
+                    log.error("处理计划配置ID {} 时发生异常", scheduleConfigVo.getId(), e);
+                }
             }
-            scheduleConfigService.generateExecutionPlanTask(scheduleConfigVo.getId(),"WEEKLY",LocalDate.now(),LocalDate.now().plusDays(7),repeatTypes,execTimes);
-       }
+
+            log.info("每日任务计划生成执行完成,共处理 {} 个计划配置", scheduleConfigVoList.size());
+
+        } catch (Exception e) {
+            log.error("执行每日任务计划生成时发生异常", e);
+        }
     }
 
 
 
 
 
+
     /**
      * 每天  00:10 执行
      */

+ 92 - 0
ruoyi-modules/ruoyi-system/src/main/resources/mapper/business/UserPicMapper.xml

@@ -0,0 +1,92 @@
+<?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.UserPicMapper">
+
+    <select id="selectPicVoPage" resultType="org.dromara.business.domain.vo.UserPicVo">
+        SELECT
+            id,
+            pic_url,
+            os_id as osId,
+            created_at as createAt,
+            updated_at as updateAt
+        FROM
+            user_pic ${ew.customSqlSegment}
+    </select>
+
+
+    <select id="selectPicVoList" resultType="org.dromara.business.domain.vo.UserPicVo">
+        SELECT
+            id,
+            pic_url,
+            os_id as osId,
+            created_at as createAt,
+            updated_at as updateAt
+        FROM
+            user_pic  ${ew.customSqlSegment}
+    </select>
+
+    <select id="selectPicVoByIdInfo" resultType="org.dromara.business.domain.vo.UserPicVo" >
+        SELECT
+            id,
+            pic_url,
+            os_id as osId,
+            created_at as createAt,
+            updated_at as updateAt
+        FROM
+            user_pic WHERE id =  #{id}
+    </select>
+
+
+    <update id="updatePicById">
+        UPDATE user_pic
+        <set>
+            <if test="picUrl != null">
+                pic_url = #{picUrl},
+            </if>
+            <if test="osId != null">
+                os_id = #{osId},
+            </if>
+            updated_at=now()
+        </set>
+        WHERE id = #{id}
+    </update>
+
+
+    <insert id="insertPic" useGeneratedKeys="true" keyProperty="id">
+        INSERT INTO user_pic
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="picUrl != null">
+                pic_url,
+            </if>
+            <if test="osId != null">
+                os_id,
+            </if>
+            created_at
+        </trim>
+        <trim prefix="VALUES (" suffix=")" suffixOverrides=",">
+            <if test="picUrl != null">
+                #{picUrl},
+            </if>
+            <if test="osId != null">
+                #{osId},
+            </if>
+            now()
+        </trim>
+    </insert>
+
+    <delete id="deletePicById">
+        DELETE FROM user_pic
+        <where>
+            id IN
+            <foreach item="id" collection="ids" open="(" separator="," close=")">
+                <if test="id > 0">
+                    #{id}
+                </if>
+            </foreach>
+        </where>
+    </delete>
+
+
+</mapper>