nnnjjj123
2021-01-28 71b6b716361c52af290493d365a328fc1a3467e2
src/main/java/org/springblade/modules/healthcode/mapper/healthcodeMapper.xml
@@ -6,7 +6,7 @@
    <resultMap id="healthcodeResultMap" type="org.springblade.modules.healthcode.entity.healthcode">
        <id column="id" property="id"/>
        <result column="type" property="type"/>
        <result column="jname" property="jname"/>
        <result column="sex" property="sex"/>
        <result column="province" property="province"/>
        <result column="city" property="city"/>
        <result column="district" property="district"/>
@@ -18,8 +18,8 @@
            <if test="type!=null and type!=''">
                type,
            </if>
            <if test="jname!=null and jname!=''">
                jname,
            <if test="sex!=null and sex!=''">
                sex,
            </if>
            <if test="province!=null and province!=''">
                province,
@@ -40,8 +40,8 @@
            <if test="type!=null and type!=''">
                #{type},
            </if>
            <if test="jname!=null and jname!=''">
                #{jname},
            <if test="sex!=null and sex!=''">
                #{sex},
            </if>
            <if test="province!=null and province!=''">
                #{province},
@@ -61,4 +61,24 @@
        insert into healthcode(<include refid="key"/>) values(<include refid="value"/>)
    </insert>
    <select id="selectCountr" resultType="java.util.HashMap">
     SELECT
   COUNT( * ) AS num,
   type
FROM
   healthcode
WHERE
DATE_FORMAT(dtime,'%Y-%m-%d')=#{time} GROUP BY type
    </select>
    <select id="selectCountz" resultType="java.util.HashMap">
        SELECT
        COUNT( * ) AS num,
        type
        FROM
        healthcode
        WHERE
        DATE_FORMAT(dtime,'%Y-%m-%d')&gt;=#{beginTime} and DATE_FORMAT(dtime,'%Y-%m-%d')&lt;=#{endTime} GROUP BY type
    </select>
</mapper>