| | |
| | | <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"/> |
| | |
| | | <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, |
| | |
| | | <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}, |
| | |
| | | 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')>=#{beginTime} and DATE_FORMAT(dtime,'%Y-%m-%d')<=#{endTime} GROUP BY type |
| | | </select> |
| | | |
| | | </mapper> |