我用的是springMVC+myBatis框架
mapper.xml中
<select id="getAccount" parameterType="map" resultMap="getMap">
select * from (
select sum(price) price,'today' dateType from scf_pay where to_days(operation_time) = to_days(now())
union all
select sum(price) price,'week' dateType from scf_pay where YEARWEEK(date_format(operation_time,'%Y-%m-%d')) = YEARWEEK(now())
union all
select sum(price) price,'yestweek' dateType from scf_pay where YEARWEEK(date_format(operation_time,'%Y-%m-%d')) = YEARWEEK(now())-1
union all
select sum(pri