Browse Source

[SUM返回异常修复][修改]:SUM返回异常修复

release_toaliyun_real
Stormeye Wu 7 years ago
parent
commit
73cc84be74
7 changed files with 8 additions and 8 deletions
  1. +1
    -1
      mallinkService/src/main/resources/mapper/WxBillDepositMapper.xml
  2. +1
    -1
      mallinkService/src/main/resources/mapper/WxBillPropertyDepositMapper.xml
  3. +1
    -1
      mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml
  4. +1
    -1
      mallinkService/src/main/resources/mapper/WxBillRentMapper.xml
  5. +2
    -2
      mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml
  6. +1
    -1
      mallinkService/src/main/resources/mapper/WxMerchantTradeDailyMapper.xml
  7. +1
    -1
      mallinkService/src/main/resources/mapper/WxShopMapper.xml

+ 1
- 1
mallinkService/src/main/resources/mapper/WxBillDepositMapper.xml View File

@@ -79,7 +79,7 @@
</select>
<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}
group by tenant_id
</select>


+ 1
- 1
mallinkService/src/main/resources/mapper/WxBillPropertyDepositMapper.xml View File

@@ -78,7 +78,7 @@
</select>
<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}
group by tenant_id
</select>


+ 1
- 1
mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml View File

@@ -79,7 +79,7 @@
</select>
<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}
group by tenant_id
</select>


+ 1
- 1
mallinkService/src/main/resources/mapper/WxBillRentMapper.xml View File

@@ -85,7 +85,7 @@
</select>
<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}
group by tenant_id
</select>


+ 2
- 2
mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml View File

@@ -455,12 +455,12 @@
</select>

<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 &gt;= #{startTime} and create_date &lt; #{endTime} GROUP BY xTime
</select>

<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 &gt;= #{startTime} and create_date &lt; #{endTime}
</select>



+ 1
- 1
mallinkService/src/main/resources/mapper/WxMerchantTradeDailyMapper.xml View File

@@ -158,7 +158,7 @@
</resultMap>

<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
where 1 = 1



+ 1
- 1
mallinkService/src/main/resources/mapper/WxShopMapper.xml View File

@@ -242,7 +242,7 @@
</select>
<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}
</select>



Loading…
Cancel
Save