1.财务中心和数据中心收入明细不匹配修复

This commit is contained in:
张松
2025-01-06 19:27:18 +08:00
parent 73bd738c8b
commit 589fba42b9
4 changed files with 20 additions and 4 deletions

View File

@@ -162,6 +162,18 @@
select count(*) from pay_details
where `state`=1 and user_id=#{userId}
</select>
<select id="statisticsIncomeMoney" resultType="java.lang.Double">
select sum(money) from pay_details where state=1
<if test="flag!=null and flag==1">
and date_format(create_time,'%Y-%m-%d')=date_format(#{time},'%Y-%m-%d')
</if>
<if test="flag!=null and flag==2">
and date_format(create_time,'%Y-%m')=date_format(#{time},'%Y-%m')
</if>
<if test="flag!=null and flag==3">
and date_format(create_time,'%Y')=date_format(#{time},'%Y')
</if>
</select>
</mapper>