标签:语句 from size select date etc rom span amp
<select id="getCustomerTJByUser" parameterType="map" resultType="map">
select u.username,
<if test="dateType=="d"">DATE_FORMAT(c.create_date,‘%Y-%m-%d‘) createDate,</if>
<if test="dateType=="m"">DATE_FORMAT(c.create_date,‘%Y-%m‘) createDate,</if>
COUNT(*) summer
from nb_custom c ,nb_user u
where 1=1
<if test="startDate!=null&&startDate!="""> and c.create_date >= #{startDate}</if>
<if test="endDate!=null&&endDate!="""> and c.create_date <= #{endDate}</if>
<if test="usernameTJ!=null&&usernameTJ!="""> and u.username=#{usernameTJ}</if>
<if test="createId!=null"> and u.create_id=#{createId}</if>
and u.state=1
and c.nu_id_oper=u.nu_id
GROUP BY createDate,u.username
</select>
标签:语句 from size select date etc rom span amp
原文地址:http://www.cnblogs.com/xiaonier/p/6042488.html