Browse Source

修改连接信息

multiwx
xh-pan1 9 months ago
parent
commit
9c41b687fa
  1. 30
      cereshop-admin/src/main/resources/mybatis/mapper/business/CerePlatformBusinessDAO.xml

30
cereshop-admin/src/main/resources/mybatis/mapper/business/CerePlatformBusinessDAO.xml

@ -424,27 +424,33 @@
</select> </select>
<select id="finFrozen" resultType="java.math.BigDecimal"> <select id="finFrozen" resultType="java.math.BigDecimal">
SELECT IF(SUM(price) IS NULL,0,SUM(price)) FROM cere_shop_order where state in (2,3)
SELECT IF(SUM(cso.price) IS NULL,0,SUM(cso.price))
FROM cere_shop_order cso
INNER JOIN cere_platform_shop cps ON cso.shop_id=cps.shop_id
where cso.state in (2,3)
<if test="businessId!=null"> <if test="businessId!=null">
and business_id=#{businessId}
and cps.business_id=#{businessId}
</if> </if>
AND project IS NULL
AND cso.project IS NULL
</select> </select>
<select id="findHaveWithdrawal" parameterType="java.lang.Object" resultType="java.math.BigDecimal"> <select id="findHaveWithdrawal" parameterType="java.lang.Object" resultType="java.math.BigDecimal">
SELECT IF(SUM(withdrawal_money) IS NULL,0,SUM(withdrawal_money)) FROM cere_shop_withdrawal
where state=1
<if test="shopId!=null">
and shop_id=#{shopId}
SELECT IF(SUM(csw.withdrawal_money) IS NULL,0,SUM(csw.withdrawal_money))
FROM cere_shop_withdrawal csw
INNER JOIN cere_platform_shop cps ON csw.shop_id=cps.shop_id
where csw.state=1
<if test="businessId!=null">
and cps.business_id=#{businessId}
</if> </if>
</select> </select>
<select id="findRefund" parameterType="java.lang.Object" resultType="java.math.BigDecimal"> <select id="findRefund" parameterType="java.lang.Object" resultType="java.math.BigDecimal">
SELECT IF(SUM(money) IS NULL,0,SUM(money)) FROM cere_order_reconciliation a
LEFT JOIN cere_shop_order b ON a.order_id=b.order_id
where a.type=2
<if test="shopId!=null">
and b.shop_id=#{shopId}
SELECT IF(SUM(cor.money) IS NULL,0,SUM(cor.money)) FROM cere_order_reconciliation cor
LEFT JOIN cere_shop_order cso ON cor.order_id=cso.order_id
INNER JOIN cere_platform_shop cps ON cso.shop_id=cps.shop_id
where cor.type=2
<if test="businessId!=null">
and cps.business_id=#{businessId}
</if> </if>
</select> </select>

Loading…
Cancel
Save