南昌市物联网技防平台-后台
Administrator
2021-03-17 5b766beb6a9fb1b77aba45437c17d2c477adcd8d
blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/healthcode/mapper/healthcodeMapper.xml
@@ -3,7 +3,7 @@
<mapper namespace="org.springblade.jfpt.healthcode.mapper.healthcodeMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="healthcodeResultMap" type="org.springblade.jfpt.healthcode.entity.healthcode">
    <resultMap id="healthcodeResultMap" type="org.springblade.jfpt.healthcode.entity.Healthcode">
        <id column="id" property="id"/>
        <result column="type" property="type"/>
        <result column="sex" property="sex"/>
@@ -120,4 +120,24 @@
       a.click_date = b.datetime
    </select>
    <!--自定义健康码分页/健康码统计图表点击事件-->
    <select id="selectHealthcodeListPage" resultType="org.springblade.jfpt.healthcode.entity.Healthcode">
        SELECT * FROM healthcode
        where 1=1
        <if test="healthcodeVO.status==0">
            and to_days(dtime)=to_days(now())
        </if>
        <if test="healthcodeVO.status==1">
            and YEARWEEK(date_format(dtime,'%Y-%m-%d'),1) = YEARWEEK(now(),1)
        </if>
        <if test="healthcodeVO.status==2">
            and date_format(dtime,'%Y%m') = date_format(now(),'%Y%m')
        </if>
        <if test="healthcodeVO.type!=null">
            and type=#{healthcodeVO.type}
        </if>
        ORDER BY dtime asc
    </select>
</mapper>