| @@ -79,7 +79,7 @@ | |||||
| </select> | </select> | ||||
| <select id="queryPayInfo" resultType="hashmap" parameterType="hashmap"> | <select id="queryPayInfo" resultType="hashmap" parameterType="hashmap"> | ||||
| select sum(receive_pay) receivepay,sum(pay) pay,tenant_id from wx_bill_rent_deposit | |||||
| select IFNULL(sum(receive_pay),0) receivepay,IFNULL(sum(pay),0) pay,tenant_id from wx_bill_rent_deposit | |||||
| where tenant_id=#{tenantId} and date_format(receive_date,'%Y-%m')=#{receiveDate} | where tenant_id=#{tenantId} and date_format(receive_date,'%Y-%m')=#{receiveDate} | ||||
| group by tenant_id | group by tenant_id | ||||
| </select> | </select> | ||||
| @@ -78,7 +78,7 @@ | |||||
| </select> | </select> | ||||
| <select id="queryPayInfo" resultType="hashmap" parameterType="hashmap"> | <select id="queryPayInfo" resultType="hashmap" parameterType="hashmap"> | ||||
| select sum(receive_pay) receivepay,sum(pay) pay,tenant_id from wx_bill_property_deposit | |||||
| select IFNULL((sum(receive_pay),0) receivepay,IFNULL(sum(pay),0) pay,tenant_id from wx_bill_property_deposit | |||||
| where tenant_id=#{tenantId} and date_format(receive_date,'%Y-%m')=#{receiveDate} | where tenant_id=#{tenantId} and date_format(receive_date,'%Y-%m')=#{receiveDate} | ||||
| group by tenant_id | group by tenant_id | ||||
| </select> | </select> | ||||
| @@ -79,7 +79,7 @@ | |||||
| </select> | </select> | ||||
| <select id="queryPayInfo" resultType="hashmap" parameterType="hashmap"> | <select id="queryPayInfo" resultType="hashmap" parameterType="hashmap"> | ||||
| select sum(receive_pay) receivepay,sum(pay) pay,tenant_id from wx_bill_property | |||||
| select IFNULL(sum(receive_pay),0) receivepay,IFNULL(sum(pay),0) pay,tenant_id from wx_bill_property | |||||
| where tenant_id=#{tenantId} and date_format(receive_date,'%Y-%m')=#{receiveDate} | where tenant_id=#{tenantId} and date_format(receive_date,'%Y-%m')=#{receiveDate} | ||||
| group by tenant_id | group by tenant_id | ||||
| </select> | </select> | ||||
| @@ -85,7 +85,7 @@ | |||||
| </select> | </select> | ||||
| <select id="queryPayInfo" resultType="hashmap" parameterType="hashmap"> | <select id="queryPayInfo" resultType="hashmap" parameterType="hashmap"> | ||||
| select sum(receive_pay) receivepay,sum(pay) pay,tenant_id from wx_bill_rent | |||||
| select IFNULL(sum(receive_pay),0) receivepay,IFNULL(sum(pay),0) pay,tenant_id from wx_bill_rent | |||||
| where tenant_id=#{tenantId} and receive_date between #{startdate} and #{enddate} | where tenant_id=#{tenantId} and receive_date between #{startdate} and #{enddate} | ||||
| group by tenant_id | group by tenant_id | ||||
| </select> | </select> | ||||
| @@ -455,12 +455,12 @@ | |||||
| </select> | </select> | ||||
| <select id="queryPriceTotalGroup" resultType="com.iformall.domain.vo.CUserDateAmountVo" > | <select id="queryPriceTotalGroup" resultType="com.iformall.domain.vo.CUserDateAmountVo" > | ||||
| SELECT DATE_FORMAT(create_date,'%Y-%m-%d') as xTime,SUM(coupon_price) as price from wx_coupon_order | |||||
| SELECT DATE_FORMAT(create_date,'%Y-%m-%d') as xTime,IFNULL(SUM(coupon_price),0) as price from wx_coupon_order | |||||
| where tenant_id=#{tenantId} AND create_date >= #{startTime} and create_date < #{endTime} GROUP BY xTime | where tenant_id=#{tenantId} AND create_date >= #{startTime} and create_date < #{endTime} GROUP BY xTime | ||||
| </select> | </select> | ||||
| <select id="queryPriceTotal" resultType="java.lang.Integer" > | <select id="queryPriceTotal" resultType="java.lang.Integer" > | ||||
| SELECT SUM(coupon_price) from wx_coupon_order | |||||
| SELECT IFNULL(SUM(coupon_price),0) from wx_coupon_order | |||||
| where tenant_id=#{tenantId} AND create_date >= #{startTime} and create_date < #{endTime} | where tenant_id=#{tenantId} AND create_date >= #{startTime} and create_date < #{endTime} | ||||
| </select> | </select> | ||||
| @@ -158,7 +158,7 @@ | |||||
| </resultMap> | </resultMap> | ||||
| <select id="findTotalListOfMonth" parameterType="com.iformall.domain.po.WxMerchantTradeDaily" resultMap="BaseTotalResultMap"> | <select id="findTotalListOfMonth" parameterType="com.iformall.domain.po.WxMerchantTradeDaily" resultMap="BaseTotalResultMap"> | ||||
| select report_date, sum(mtd.trade_amt) as trade_amt | |||||
| select report_date, IFNULL(sum(mtd.trade_amt),0) as trade_amt | |||||
| from wx_merchant_trade_daily mtd | from wx_merchant_trade_daily mtd | ||||
| where 1 = 1 | where 1 = 1 | ||||
| @@ -242,7 +242,7 @@ | |||||
| </select> | </select> | ||||
| <select id="queryShopLeftInfo" resultType="hashmap" parameterType="hashmap"> | <select id="queryShopLeftInfo" resultType="hashmap" parameterType="hashmap"> | ||||
| select count(id) shopcount,sum(build_area) area from wx_shop | |||||
| select count(id) shopcount,IFNULL(sum(build_area),0) area from wx_shop | |||||
| where tenant_id=#{tenantId} and status=#{status} | where tenant_id=#{tenantId} and status=#{status} | ||||
| </select> | </select> | ||||