<?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.ICrowdTagsDao">

    <resultMap id="dataMap" type="edu.whut.infrastructure.dao.po.CrowdTags">
        <id column="id" property="id"/>
        <result column="tag_id" property="tagId"/>
        <result column="tag_name" property="tagName"/>
        <result column="tag_desc" property="tagDesc"/>
        <result column="statistics" property="statistics"/>
        <result column="create_time" property="createTime"/>
        <result column="update_time" property="updateTime"/>
    </resultMap>

    <update id="updateCrowdTagsStatistics" parameterType="edu.whut.infrastructure.dao.po.CrowdTags">
        update crowd_tags
        set statistics = statistics + #{statistics}
        where tag_id = #{tagId}
    </update>

</mapper>
