zhangnaisong
2023-08-05 24d66c8d82b628a06e93dbb1abfea2049b3d45ab
删除app巡检计划提交
已修改13个文件
289 ■■■■ 文件已修改
ard-work/src/main/java/com/ruoyi/app/patrolplan/controller/ArdAppPatrolplanController.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ard-work/src/main/java/com/ruoyi/app/patrolplan/controller/ArdAppPatroluserController.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ard-work/src/main/java/com/ruoyi/app/patrolplan/domain/ArdAppPatroluser.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ard-work/src/main/java/com/ruoyi/app/patrolplan/mapper/ArdAppPatrolplanMapper.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ard-work/src/main/java/com/ruoyi/app/patrolplan/mapper/ArdAppPatrolpointMapper.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ard-work/src/main/java/com/ruoyi/app/patrolplan/mapper/ArdAppPatroluserMapper.java 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ard-work/src/main/java/com/ruoyi/app/patrolplan/service/IArdAppPatrolplanService.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ard-work/src/main/java/com/ruoyi/app/patrolplan/service/IArdAppPatroluserService.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ard-work/src/main/java/com/ruoyi/app/patrolplan/service/impl/ArdAppPatrolplanServiceImpl.java 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ard-work/src/main/java/com/ruoyi/app/patrolplan/service/impl/ArdAppPatroluserServiceImpl.java 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ard-work/src/main/resources/mapper/app/ArdAppPatrolplanMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ard-work/src/main/resources/mapper/app/ArdAppPatrolpointMapper.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ard-work/src/main/resources/mapper/app/ArdAppPatroluserMapper.xml 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ard-work/src/main/java/com/ruoyi/app/patrolplan/controller/ArdAppPatrolplanController.java
@@ -1,6 +1,7 @@
package com.ruoyi.app.patrolplan.controller;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
@@ -94,13 +95,13 @@
    /**
     * 根据巡检ID查询巡检人
     */
    @PreAuthorize("@ss.hasPermi('app:appPatrolplan:userByPlanId')")
    /*@PreAuthorize("@ss.hasPermi('app:appPatrolplan:userByPlanId')")
    @GetMapping(value = "userByPlanId/{id}")
    @ApiOperation("根据巡检ID查询巡检人")
    public Results userByPlanId(@PathVariable String id)
    {
        return ardAppPatroluserService.userByPlanId(id);
    }
    }*/
    /**
     * 删除app巡检计划
@@ -109,9 +110,11 @@
    @Log(title = "app巡检计划", businessType = BusinessType.DELETE)
    @DeleteMapping("/{id}")
    @ApiOperation("删除app巡检计划")
    public Results remove(@PathVariable String id)
    //public Results remove(@PathVariable String id)
    public AjaxResult remove(@PathVariable String id)
    {
        return ardAppPatrolplanService.deleteArdApp(id);
        //return ardAppPatrolplanService.deleteArdApp(id);
        return toAjax(ardAppPatrolplanService.deleteArdApp(id));
    }
@@ -137,4 +140,15 @@
        return toAjax(ardAppPatrolplanService.updateArdAppPatrolplan(ardAppPatrolplan));
    }
    /**
     * 新增app巡检计划及人员点位
     */
    @PreAuthorize("@ss.hasPermi('app:appPatrolplan:insertArdAppPatrolplan')")
    @Log(title = "app巡检计划", businessType = BusinessType.INSERT)
    @PostMapping("/insertArdAppPatrolplan")
    @ApiOperation("新增app巡检计划及人员点位")
    public AjaxResult addArdAppPatrolplan(@RequestBody Map<String,Object> para)
    {
        return toAjax(ardAppPatrolplanService.insertArdAppPatrolplan(para));
    }
}
ard-work/src/main/java/com/ruoyi/app/patrolplan/controller/ArdAppPatroluserController.java
@@ -25,7 +25,7 @@
 * app巡检计划人员Controller
 * 
 * @author ard
 * @date 2023-08-02
 * @date 2023-08-04
 */
@RestController
@RequestMapping("/app/patroluser")
@@ -63,10 +63,10 @@
     * 获取app巡检计划人员详细信息
     */
    @PreAuthorize("@ss.hasPermi('app:patroluser:query')")
    @GetMapping(value = "/{reserved1}")
    public AjaxResult getInfo(@PathVariable("reserved1") String reserved1)
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") String id)
    {
        return success(ardAppPatroluserService.selectArdAppPatroluserByReserved1(reserved1));
        return success(ardAppPatroluserService.selectArdAppPatroluserById(id));
    }
    /**
@@ -91,4 +91,14 @@
        return toAjax(ardAppPatroluserService.updateArdAppPatroluser(ardAppPatroluser));
    }
    /**
     * 删除app巡检计划人员
     */
    @PreAuthorize("@ss.hasPermi('app:patroluser:remove')")
    @Log(title = "app巡检计划人员", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable String[] ids)
    {
        return toAjax(ardAppPatroluserService.deleteArdAppPatroluserByIds(ids));
    }
}
ard-work/src/main/java/com/ruoyi/app/patrolplan/domain/ArdAppPatroluser.java
@@ -9,15 +9,14 @@
 * app巡检计划人员对象 ard_app_patroluser
 * 
 * @author ard
 * @date 2023-08-02
 * @date 2023-08-04
 */
public class ArdAppPatroluser extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    /** 主键 */
    @Excel(name = "主键")
    private String reserved1;
    private String id;
    /** 巡检主键 */
    @Excel(name = "巡检主键")
@@ -27,14 +26,14 @@
    @Excel(name = "app单兵端用户主键")
    private String appUserId;
    public void setReserved1(String reserved1)
    public void setId(String id)
    {
        this.reserved1 = reserved1;
        this.id = id;
    }
    public String getReserved1()
    public String getId()
    {
        return reserved1;
        return id;
    }
    public void setPatrolplanId(String patrolplanId) 
    {
@@ -58,7 +57,7 @@
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("reserved1", getReserved1())
            .append("id", getId())
            .append("patrolplanId", getPatrolplanId())
            .append("appUserId", getAppUserId())
            .toString();
ard-work/src/main/java/com/ruoyi/app/patrolplan/mapper/ArdAppPatrolplanMapper.java
@@ -51,4 +51,10 @@
     */
    public int deleteArdAppPatrolplanByPatroEndTime(String patroEndTime);
    /**
     * 根据主键删除app巡检计划
     *
     */
    public int deleteArdAppPatrolplanById(String id);
}
ard-work/src/main/java/com/ruoyi/app/patrolplan/mapper/ArdAppPatrolpointMapper.java
@@ -4,6 +4,7 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.app.patrolplan.domain.ArdAppPatrolpoint;
import org.apache.ibatis.annotations.Param;
/**
 * app巡检计划点位Mapper接口
@@ -53,5 +54,17 @@
     */
    public int deleteArdAppPatrolpointById(String id);
    /**
     * 批量新增app巡检计划点位
     *
     * @param ardAppPatrolpoint app巡检计划点位
     * @return 结果
     */
    public int insertArdAppPatrolpointList(@Param("ardAppPatrolpointList")List<ArdAppPatrolpoint> ardAppPatrolpointList);
    /**
     * 根据巡检主键删除app巡检计划点位
     *
     */
    public int deleteArdAppPatrolpointByPlanId(String id);
}
ard-work/src/main/java/com/ruoyi/app/patrolplan/mapper/ArdAppPatroluserMapper.java
@@ -2,22 +2,23 @@
import java.util.List;
import com.ruoyi.app.patrolplan.domain.ArdAppPatroluser;
import org.apache.ibatis.annotations.Param;
/**
 * app巡检计划人员Mapper接口
 * 
 * @author ard
 * @date 2023-08-02
 * @date 2023-08-04
 */
public interface ArdAppPatroluserMapper 
{
    /**
     * 查询app巡检计划人员
     * 
     * @param reserved1 app巡检计划人员主键
     * @param id app巡检计划人员主键
     * @return app巡检计划人员
     */
    public ArdAppPatroluser selectArdAppPatroluserByReserved1(String reserved1);
    public ArdAppPatroluser selectArdAppPatroluserById(String id);
    /**
     * 查询app巡检计划人员列表
@@ -46,9 +47,28 @@
    /**
     * 删除app巡检计划人员
     * 
     * @param reserved1 app巡检计划人员主键
     * @param id app巡检计划人员主键
     * @return 结果
     */
    public int deleteArdAppPatroluserByReserved1(String reserved1);
    public int deleteArdAppPatroluserById(String id);
    /**
     * 批量删除app巡检计划人员
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteArdAppPatroluserByIds(String[] ids);
    /**
     * 批量新增app巡检计划人员
     *
     */
    public int insertArdAppPatroluserList(@Param("ardAppPatroluserList") List<ArdAppPatroluser> ardAppPatroluserList);
    /**
     * 根据巡检计划主键删除app巡检计划人员
     *
     */
    public int deleteArdAppPatroluserByPlanId(String id);
}
ard-work/src/main/java/com/ruoyi/app/patrolplan/service/IArdAppPatrolplanService.java
@@ -1,6 +1,8 @@
package com.ruoyi.app.patrolplan.service;
import java.util.List;
import java.util.Map;
import com.ruoyi.app.patrolplan.domain.ArdAppPatrolplan;
import com.ruoyi.utils.result.Results;
@@ -49,5 +51,10 @@
     * 删除app巡检计划信息
     * @return 结果
     */
    public Results deleteArdApp(String id);
    public int deleteArdApp(String id);
    /**
     * 新增app巡检计划及人员点位
     */
    public int insertArdAppPatrolplan(Map<String,Object>  para);
}
ard-work/src/main/java/com/ruoyi/app/patrolplan/service/IArdAppPatroluserService.java
@@ -2,23 +2,22 @@
import java.util.List;
import com.ruoyi.app.patrolplan.domain.ArdAppPatroluser;
import com.ruoyi.utils.result.Results;
/**
 * app巡检计划人员Service接口
 * 
 * @author ard
 * @date 2023-08-02
 * @date 2023-08-04
 */
public interface IArdAppPatroluserService 
{
    /**
     * 查询app巡检计划人员
     * 
     * @param reserved1 app巡检计划人员主键
     * @param id app巡检计划人员主键
     * @return app巡检计划人员
     */
    public ArdAppPatroluser selectArdAppPatroluserByReserved1(String reserved1);
    public ArdAppPatroluser selectArdAppPatroluserById(String id);
    /**
     * 查询app巡检计划人员列表
@@ -44,14 +43,19 @@
     */
    public int updateArdAppPatroluser(ArdAppPatroluser ardAppPatroluser);
    /**
     * 批量删除app巡检计划人员
     *
     * @param ids 需要删除的app巡检计划人员主键集合
     * @return 结果
     */
    public int deleteArdAppPatroluserByIds(String[] ids);
    /**
     * 删除app巡检计划人员信息
     * 
     * @param reserved1 app巡检计划人员主键
     * @param id app巡检计划人员主键
     * @return 结果
     */
    public int deleteArdAppPatroluserByReserved1(String reserved1);
    Results userByPlanId(String id);
    public int deleteArdAppPatroluserById(String id);
}
ard-work/src/main/java/com/ruoyi/app/patrolplan/service/impl/ArdAppPatrolplanServiceImpl.java
@@ -1,18 +1,27 @@
package com.ruoyi.app.patrolplan.service.impl;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import com.ruoyi.app.patrolplan.domain.ArdAppPatrolpoint;
import com.ruoyi.app.patrolplan.domain.ArdAppPatroluser;
import com.ruoyi.app.patrolplan.mapper.ArdAppPatrolpointMapper;
import com.ruoyi.app.patrolplan.mapper.ArdAppPatroluserMapper;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.uuid.IdUtils;
import com.ruoyi.utils.result.Results;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.app.patrolplan.mapper.ArdAppPatrolplanMapper;
import com.ruoyi.app.patrolplan.domain.ArdAppPatrolplan;
import com.ruoyi.app.patrolplan.service.IArdAppPatrolplanService;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
@@ -85,13 +94,63 @@
     * @return 结果
     */
    @Override
    public Results deleteArdApp(String id) {
        ardAppPatroluserMapper.deleteArdAppPatroluserByReserved1(id);
        ardAppPatrolpointMapper.deleteArdAppPatrolpointById(id);
    @Transactional
    public int deleteArdApp(String id) {
        //ardAppPatroluserMapper.deleteArdAppPatroluserByReserved1(id);
        /*ardAppPatrolpointMapper.deleteArdAppPatrolpointById(id);
        if(ardAppPatrolplanMapper.deleteArdAppPatrolplanByPatroEndTime(id)>0){
            return Results.succeed("删除成功!");
        }else {
            return Results.error("删除失败!");
        }*/
        try {
            int result = ardAppPatrolplanMapper.deleteArdAppPatrolplanById(id);//删除巡检计划
            ardAppPatrolpointMapper.deleteArdAppPatrolpointByPlanId(id);//删除巡检计划下挂点位
            ardAppPatroluserMapper.deleteArdAppPatroluserByPlanId(id);//删除巡检计划下挂用户
            return result;
        } catch (Exception e){
            e.printStackTrace();
            return 0;
        }
    }
    @Override
    @Transactional
    public int insertArdAppPatrolplan(Map<String, Object> para) {
        String id = IdUtils.simpleUUID();
        ArdAppPatrolplan ardAppPatrolplan = new ArdAppPatrolplan();
        ardAppPatrolplan.setId(id);
        ardAppPatrolplan.setPlanName((String) para.get("planName"));
        ardAppPatrolplan.setPatroBeginTime((String) para.get("patroBeginTime"));
        ardAppPatrolplan.setPatroEndTime((String) para.get("patroEndTime"));
        String userId = SecurityUtils.getUserId();
        ardAppPatrolplan.setUserId(userId);
        ardAppPatrolplan.setCycle((String) para.get("cycle"));
        ardAppPatrolplan.setCreateTime(new Date());
        int result = ardAppPatrolplanMapper.insertArdAppPatrolplan(ardAppPatrolplan);//新增主表
        List<String> alarmpointIdList = (List<String>) para.get("alarmpointIdList");
        List<ArdAppPatrolpoint> ardAppPatrolpointList = new ArrayList();
        for(String  alarmpointId : alarmpointIdList){
            String patrolpointId = IdUtils.simpleUUID();
            ArdAppPatrolpoint ardAppPatrolpoint = new ArdAppPatrolpoint();
            ardAppPatrolpoint.setId(patrolpointId);
            ardAppPatrolpoint.setPatrolplanId(id);
            ardAppPatrolpoint.setAlarmpointsId(alarmpointId);
            ardAppPatrolpoint.setType((String) para.get("type"));
            ardAppPatrolpointList.add(ardAppPatrolpoint);
        }
        ardAppPatrolpointMapper.insertArdAppPatrolpointList(ardAppPatrolpointList);//新增关联兴趣点
        List<String> appUserIdList = (List<String>) para.get("appUserIdList");
        List<ArdAppPatroluser> ardAppPatroluserList = new ArrayList();
        for(String appUserId : appUserIdList){
            String patroluserId = IdUtils.simpleUUID();
            ArdAppPatroluser ardAppPatroluser = new ArdAppPatroluser();
            ardAppPatroluser.setId(patroluserId);
            ardAppPatroluser.setPatrolplanId(id);
            ardAppPatroluser.setAppUserId(appUserId);
            ardAppPatroluserList.add(ardAppPatroluser);
        }
        ardAppPatroluserMapper.insertArdAppPatroluserList(ardAppPatroluserList);//新增关联人员
        return result;
    }
}
ard-work/src/main/java/com/ruoyi/app/patrolplan/service/impl/ArdAppPatroluserServiceImpl.java
@@ -2,40 +2,32 @@
import java.util.List;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.utils.result.Results;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.app.patrolplan.mapper.ArdAppPatroluserMapper;
import com.ruoyi.app.patrolplan.domain.ArdAppPatroluser;
import com.ruoyi.app.patrolplan.service.IArdAppPatroluserService;
import javax.annotation.Resource;
/**
 * app巡检计划人员Service业务层处理
 *
 * @author ard
 * @date 2023-08-02
 * @date 2023-08-04
 */
@Service
public class ArdAppPatroluserServiceImpl implements IArdAppPatroluserService {
    @Resource
    @Autowired
    private ArdAppPatroluserMapper ardAppPatroluserMapper;
    @Resource
    private SysUserMapper sysUserMapper;
    /**
     * 查询app巡检计划人员
     *
     * @param reserved1 app巡检计划人员主键
     * @param id app巡检计划人员主键
     * @return app巡检计划人员
     */
    @Override
    public ArdAppPatroluser selectArdAppPatroluserByReserved1(String reserved1) {
        return ardAppPatroluserMapper.selectArdAppPatroluserByReserved1(reserved1);
    public ArdAppPatroluser selectArdAppPatroluserById(String id) {
        return ardAppPatroluserMapper.selectArdAppPatroluserById(id);
    }
    /**
@@ -71,20 +63,25 @@
        return ardAppPatroluserMapper.updateArdAppPatroluser(ardAppPatroluser);
    }
    /**
     * 批量删除app巡检计划人员
     *
     * @param ids 需要删除的app巡检计划人员主键
     * @return 结果
     */
    @Override
    public int deleteArdAppPatroluserByIds(String[] ids) {
        return ardAppPatroluserMapper.deleteArdAppPatroluserByIds(ids);
    }
    /**
     * 删除app巡检计划人员信息
     *
     * @param reserved1 app巡检计划人员主键
     * @param id app巡检计划人员主键
     * @return 结果
     */
    @Override
    public int deleteArdAppPatroluserByReserved1(String reserved1) {
        return ardAppPatroluserMapper.deleteArdAppPatroluserByReserved1(reserved1);
    }
    @Override
    public Results userByPlanId(String id) {
        return Results.succeed(sysUserMapper.userByPlanId(id));
    public int deleteArdAppPatroluserById(String id) {
        return ardAppPatroluserMapper.deleteArdAppPatroluserById(id);
    }
}
ard-work/src/main/resources/mapper/app/ArdAppPatrolplanMapper.xml
@@ -103,4 +103,8 @@
            #{id}
        </foreach>
    </delete>
    <delete id="deleteArdAppPatrolplanById" parameterType="String">
        delete from ard_app_patrolplan aap where aap.id = #{id};
    </delete>
</mapper>
ard-work/src/main/resources/mapper/app/ArdAppPatrolpointMapper.xml
@@ -65,4 +65,15 @@
            #{id}
        </foreach>
    </delete>
    <insert id="insertArdAppPatrolpointList" parameterType="ArdAppPatrolpoint">
        insert into ard_app_patrolpoint (id,patrolplan_id,alarmpoints_id,type) values
        <foreach collection="ardAppPatrolpointList" separator="," item="ardAppPatrolpoint">
            (#{ardAppPatrolpoint.id},#{ardAppPatrolpoint.patrolplanId},
            #{ardAppPatrolpoint.alarmpointsId},#{ardAppPatrolpoint.type})
        </foreach>
    </insert>
    <delete id="deleteArdAppPatrolpointByPlanId" parameterType="String">
        delete from ard_app_patrolpoint aap where aap.patrolplan_id = #{id}
    </delete>
</mapper>
ard-work/src/main/resources/mapper/app/ArdAppPatroluserMapper.xml
@@ -5,38 +5,37 @@
<mapper namespace="com.ruoyi.app.patrolplan.mapper.ArdAppPatroluserMapper">
    
    <resultMap type="ArdAppPatroluser" id="ArdAppPatroluserResult">
        <result property="reserved1"    column="reserved_1"    />
        <result property="id"    column="id"    />
        <result property="patrolplanId"    column="patrolplan_id"    />
        <result property="appUserId"    column="app_user_id"    />
    </resultMap>
    <sql id="selectArdAppPatroluserVo">
        select reserved_1, patrolplan_id, app_user_id from ard_app_patroluser
        select id, patrolplan_id, app_user_id from ard_app_patroluser
    </sql>
    <select id="selectArdAppPatroluserList" parameterType="ArdAppPatroluser" resultMap="ArdAppPatroluserResult">
        <include refid="selectArdAppPatroluserVo"/>
        <where>  
            <if test="reserved1 != null  and reserved1 != ''"> and reserved_1 = #{reserved1}</if>
            <if test="patrolplanId != null  and patrolplanId != ''"> and patrolplan_id = #{patrolplanId}</if>
            <if test="appUserId != null  and appUserId != ''"> and app_user_id = #{appUserId}</if>
        </where>
    </select>
    
    <select id="selectArdAppPatroluserByReserved1" parameterType="String" resultMap="ArdAppPatroluserResult">
    <select id="selectArdAppPatroluserById" parameterType="String" resultMap="ArdAppPatroluserResult">
        <include refid="selectArdAppPatroluserVo"/>
        where reserved_1 = #{reserved1}
        where id = #{id}
    </select>
        
    <insert id="insertArdAppPatroluser" parameterType="ArdAppPatroluser">
        insert into ard_app_patroluser
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="reserved1 != null">reserved_1,</if>
            <if test="id != null">id,</if>
            <if test="patrolplanId != null">patrolplan_id,</if>
            <if test="appUserId != null">app_user_id,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="reserved1 != null">#{reserved1},</if>
            <if test="id != null">#{id},</if>
            <if test="patrolplanId != null">#{patrolplanId},</if>
            <if test="appUserId != null">#{appUserId},</if>
         </trim>
@@ -48,17 +47,27 @@
            <if test="patrolplanId != null">patrolplan_id = #{patrolplanId},</if>
            <if test="appUserId != null">app_user_id = #{appUserId},</if>
        </trim>
        where reserved_1 = #{reserved1}
        where id = #{id}
    </update>
    <delete id="deleteArdAppPatroluserByReserved1" parameterType="String">
        delete from ard_app_patroluser where patrolplan_id = #{id}
    <delete id="deleteArdAppPatroluserById" parameterType="String">
        delete from ard_app_patroluser where id = #{id}
    </delete>
    <delete id="deleteArdAppPatroluserByReserved1s" parameterType="String">
        delete from ard_app_patroluser where reserved_1 in
        <foreach item="reserved1" collection="array" open="(" separator="," close=")">
            #{reserved1}
    <delete id="deleteArdAppPatroluserByIds" parameterType="String">
        delete from ard_app_patroluser where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
    <insert id="insertArdAppPatroluserList" parameterType="ArdAppPatroluser">
        insert into ard_app_patroluser (id,patrolplan_id,app_user_id) values
        <foreach collection="ardAppPatroluserList" separator="," item="ardAppPatroluser">
            (#{ardAppPatroluser.id},#{ardAppPatroluser.patrolplanId},#{ardAppPatroluser.appUserId})
        </foreach>
    </insert>
    <delete id="deleteArdAppPatroluserByPlanId" parameterType="String">
        delete from ard_app_patroluser aap where aap.patrolplan_id = #{id}
    </delete>
</mapper>