Blame view

PushImageDataMapper.xml 1.11 KB
涂亚平 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
<?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="com.subsidy.mapper.PushImageDataMapper">

    <select id="pushImageData">
        insert into push_image_data (class_id,check_type,member_id,check_place,occurred_time)
        VALUES (#{classId}, #{detectionType}, #{memberId},#{processType}, #{activityTime})
    </select>

    <select id="imageList" resultType="long">
        	SELECT
                t2.id 人脸id
            FROM
                image_check_record t2
15
                left join class_dict t3 on t2.class_id = t3.id
涂亚平 committed
16 17 18 19 20
                LEFT JOIN push_image_data t1 ON t1.class_id = t2.class_id
                AND t1.member_id = t2.member_id
                AND t1.occurred_time = t2.create_date
            WHERE
                t2.delete_date IS NULL
21
                AND DATE_FORMAT( DATE_ADD( t2.create_date, interval 1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
涂亚平 committed
22 23
                AND t1.id IS NULL
                AND t2.result = 1
24
                and t3.class_type = 0
涂亚平 committed
25 26
    </select>
</mapper>