//DAO层
List<Map<String,Object>> selectRecord(Map<String,Object>map);
//mapper层
<select id="selectUpCountByTime" parameterType="map" resultType="java.util.HashMap">
SELECT create_by as username,DATE_FORMAT(create_time,'%Y-%m-%d') as dates,count(0) as counts FROM t_break_rule
<where>
del_flag='0'
<if test="startTime != null">
and DATE_FORMAT(create_time,'%Y-%m-%d %H:%i:%S') >= DATE_FORMAT(#{startTime,jdbcType=TIMESTAMP},'%Y-%m-%d %H:%i:%S')
</if>
<if test="endTime != null">
and DATE_FORMAT(create_time,'%Y-%m-%d %H:%i:%S') <= DATE_FORMAT(#{endTime,jdbcType=TIMESTAMP},'%Y-%m-%d %H:%i:%S')
</if>
</where>
GROUP BY create_by ,DATE_FORMAT(create_time,'%Y-%m-%d') ORDER BY DATE_FORMAT(create_time,'%Y-%m-%d') ASC
</select>