在mapping中针对数据库的查询时返回一个
<select id="getYiLiao" parameterType="java.util.Map" resultType="java.util.Map">
SELECT
ta.area_code as areaCode,
ta.id as id,
ta.number_show as numberShow,
ta.org_code as orgCode,
ta.type as type,
ta.upload_url as uploadUrl,
DATE_FORMAT(ta.`upload_time`,'%Y-%m-%d %H:%i:%S') as uploadTime
from
testuser ta
where 1 = 1
<if test="id!=null and id!=''">
and ta.id=#{id}
</if>
<if test="stardTime!=null and stardTime!=''">
AND DATE_FORMAT(ta.`upload_time`,'%Y-%m-%d') >=DATE_FORMAT(#{stardTime},'%Y-%m-%d')
</if>
<if test="endTime!=null and endTime!=''">
AND DATE_FORMAT(ta.`upload_time`,'%Y-%m-%d' )<=DATE_FORMAT(#{endTime},'%Y-%m-%d')
</if>
</select>
DATE_FORMAT(ta.`upload_time`,'%Y-%m-%d %H:%i:%S')对时间返回进行处理
>=对应 >=
<=对应 <=
否则报错Tag name expected