public List<Map> statistics( @Param("startTime")String startTime,@Param("endTime")String endTime,Integer pageIndex,Integer pageSize);<select id="statistics" resultType="java.util.Map">
consume_time
SELECT COUNT(*) AS 'total_cnt',SUM(consume_change) AS 'change_cnt',COUNT(DISTINCT(uid)) AS 'user_cnt',DATE_FORMAT(,'%Y-%m-%d') 'data_time'
consume_time
FROM kpl_matchs_vote.guess_consume
WHERE consume_status=0 AND consume_type='bet'
<if test="startTime != null" >
AND consume_time >= #{startTime,jdbcType=TIMESTAMP}
</if>
<if test="endTime != null" >
AND #{endTime,jdbcType=TIMESTAMP} >= consume_time
</if>
GROUP BY DATE_FORMAT(,'%Y-%m-%d') limit #{2},#{3}
</select>
mybatis多个参数 判断非空
最新推荐文章于 2024-07-09 20:26:37 发布