<?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">
<!--  Copyright (c) 京北方信息技术股份有限公司 Corporation 2021 . All rights reserved. -->
<!--  Mybatis数据库持久层（业务层映射文件）：进度图数据准备 -->
<!--  version: 1.0  -->
<!--  author:  maven-cctp-plugin    -->
<!--  date:  2021-12-30 16:06:16  -->
<mapper namespace="net.northking.cctp.dw.db.dao.ProgressChartPrepareDao">

    <select id="queryToday" resultMap="BaseResultMap">
        SELECT id
        FROM
        <include refid="Table_Name"/>
        WHERE project_id IN
        <foreach collection="midProjectInfos" separator="," close=")" open="(" item="midProjectInfo">
            #{midProjectInfo.projectId}
        </foreach>
        AND created_time = date(now())
    </select>

    <delete id="queryTodayDeleted">
        DELETE FROM <include refid="Table_Name"/> WHERE project_id IN
        <foreach collection="midProjectInfos" separator="," close=")" open="(" item="midProjectInfo">
            #{midProjectInfo.projectId}
        </foreach>
        AND created_time = date(now())
    </delete>

</mapper>