fix: 功能优化完善,日常支出统计。
This commit is contained in:
@@ -238,4 +238,32 @@
|
||||
to_char(a.create_time,
|
||||
'yyyy-MM-dd')
|
||||
</select>
|
||||
|
||||
<select id="selectDailyExpensesDateList" parameterType="AccountsDealRecordDto" resultMap="AccountsDealRecordResult">
|
||||
select
|
||||
sum(a.amount) as amount ,
|
||||
to_char(a.create_time,
|
||||
'yyyy-MM-dd') as dateStr
|
||||
from
|
||||
accounts_deal_record a
|
||||
<where>
|
||||
a.del_flag = '0'
|
||||
and a.deal_type = '2'
|
||||
and a.deal_category = '1'
|
||||
<if test="endTime!=null and endTime !=''">
|
||||
and #{endTime}>=to_char(a.create_time, 'yyyy-MM-dd')
|
||||
</if>
|
||||
<if test="startTime!=null and startTime !=''">
|
||||
and to_char(a.create_time, 'yyyy-MM-dd')>=#{startTime}
|
||||
</if>
|
||||
</where>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
group by
|
||||
to_char(a.create_time,
|
||||
'yyyy-MM-dd')
|
||||
order by
|
||||
to_char(a.create_time,
|
||||
'yyyy-MM-dd') desc
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user