<?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="edu.whut.infrastructure.dao.ICrowdTagsJobDao">

    <resultMap id="dataMap" type="edu.whut.infrastructure.dao.po.CrowdTagsJob">
        <id column="id" property="id"/>
        <result column="tag_id" property="tagId"/>
        <result column="batch_id" property="batchId"/>
        <result column="tag_type" property="tagType"/>
        <result column="tag_rule" property="tagRule"/>
        <result column="stat_start_time" property="statStartTime"/>
        <result column="stat_end_time" property="statEndTime"/>
        <result column="status" property="status"/>
        <result column="create_time" property="createTime"/>
        <result column="update_time" property="updateTime"/>
    </resultMap>

    <select id="queryCrowdTagsJob" parameterType="edu.whut.infrastructure.dao.po.CrowdTagsJob" resultMap="dataMap">
        select tag_type, tag_rule, stat_start_time, stat_end_time
        from crowd_tags_job
        where tag_id = #{tagId} and batch_id = #{batchId}
    </select>

</mapper>
