orders表sys_user_id字段进行填充

This commit is contained in:
谭凯凯
2025-01-07 15:28:35 +08:00
committed by Tankaikai
parent e530955959
commit b237d3125e
9 changed files with 64 additions and 38 deletions

View File

@@ -183,7 +183,7 @@
<select id="selectOrdersCount" resultType="Integer">
select count(*) from orders where 1=1
<if test="sysUserId!=null">
<if test="sysUserId!=null and sysUserId != 1">
and sys_user_id=#{sysUserId}
</if>
<if test="status!=null">
@@ -206,7 +206,7 @@
<select id="selectOrdersMoney" resultType="Double">
select sum(pay_money) from orders
where 1=1
<if test="sysUserId!=null">
<if test="sysUserId!=null and sysUserId != 1">
and sys_user_id=#{sysUserId}
</if>
<if test="status!=null">

View File

@@ -26,7 +26,12 @@
</select>
<select id="selectSysUserCashOutSum" resultType="Double">
select sum(money) from cash_out where state = 1 and sys_user_id=#{sysUserId} and create_at &gt; #{time}
select sum(money) from cash_out where state = 1
<if test="sysUserId != null">
and user_id=#{sysUserId}
</if>
and user_type = 2
and create_at &gt; #{time}
</select>
<select id="sumMoney" resultType="Double">