From d6bb4a0c5ecd9ac9915fdcd643a25d2d9b86175e Mon Sep 17 00:00:00 2001 From: luozukai Date: Mon, 8 Jul 2019 17:48:41 +0800 Subject: [PATCH] =?UTF-8?q?[=E7=BB=9F=E8=AE=A1][=E4=BF=AE=E6=94=B9][?= =?UTF-8?q?=E4=B8=9A=E6=80=81=E5=88=86=E6=9E=90=E6=B7=BB=E5=8A=A0=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E8=BF=87=E6=BB=A4]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/sys/WxBusinessController.java | 3 --- .../resources/mapper/WxBusinessMapper.xml | 26 +++++++++---------- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/sys/WxBusinessController.java b/mallinkAdmin/src/main/java/com/iformall/controller/sys/WxBusinessController.java index fe2c908c3..a1ac70854 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/sys/WxBusinessController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/sys/WxBusinessController.java @@ -6,7 +6,6 @@ import com.iformall.controller.base.BaseController; import com.iformall.domain.po.WxBusiness; import com.iformall.domain.po.WxSubBusiness; import com.iformall.domain.vo.WxBusinessDataVo; -import com.iformall.domain.vo.WxMerchantSubsidyVo; import com.iformall.service.ExcelService; import com.iformall.service.WxBusinessService; import com.iformall.service.WxSubBusinessService; @@ -15,12 +14,10 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; -import org.apache.http.HttpResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; - import javax.servlet.http.HttpServletResponse; import java.math.BigDecimal; import java.text.SimpleDateFormat; diff --git a/mallinkService/src/main/resources/mapper/WxBusinessMapper.xml b/mallinkService/src/main/resources/mapper/WxBusinessMapper.xml index 551dacdfa..1d0685b1f 100644 --- a/mallinkService/src/main/resources/mapper/WxBusinessMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBusinessMapper.xml @@ -86,62 +86,62 @@ round( (select sum(mtd.trade_amt) from wx_merchant m - left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and mtd.create_date between #{startdate} and #{enddate}) + left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and mtd.create_date between #{startdate} and #{enddate} and m.status = 1) /100,2) volume, round( (select sum(mtd.trade_amt) from wx_merchant m - left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and mtd.create_date between #{startdate} and #{enddate}) + left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and mtd.create_date between #{startdate} and #{enddate} and m.status = 1) / (select sum(ws.operation_area) from wx_merchant m left join wx_merchant_shop mtd on mtd.merchant_id = m.id left join wx_shop ws on(mtd.shop_id = ws.id) - where m.business_id = b.id and m.tenant_id=#{tenantId}) + where m.business_id = b.id and m.tenant_id=#{tenantId} and m.status = 1) /100,2) sale, round( (select (select sum(br.receive_pay) receive_pay from wx_merchant m - left join wx_bill_rent br on(br.merchant_id=m.id) where m.business_id = b.id and m.tenant_id=#{tenantId} and br.receive_date between #{startdate} and #{enddate}) + left join wx_bill_rent br on(br.merchant_id=m.id) where m.business_id = b.id and m.tenant_id=#{tenantId} and br.receive_date between #{startdate} and #{enddate} and m.status = 1) + (select sum(br.receive_pay) receive_pay from wx_merchant m - left join wx_bill_property br on(br.merchant_id=m.id) where m.business_id = b.id and m.tenant_id=#{tenantId} and br.receive_date between #{startdate} and #{enddate}) + left join wx_bill_property br on(br.merchant_id=m.id) where m.business_id = b.id and m.tenant_id=#{tenantId} and br.receive_date between #{startdate} and #{enddate} and m.status = 1) from dual) / (select sum(ws.operation_area) from wx_merchant m left join wx_merchant_shop mtd on mtd.merchant_id = m.id left join wx_shop ws on(mtd.shop_id = ws.id) - where m.business_id = b.id and m.tenant_id=#{tenantId} ) + where m.business_id = b.id and m.tenant_id=#{tenantId} and m.status = 1) /100,2) rent, round( round( (select sum(mtd.trade_amt) from wx_merchant m - left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and mtd.create_date between #{startdate} and #{enddate}) + left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and mtd.create_date between #{startdate} and #{enddate} and m.status = 1) / (select sum(ws.operation_area) from wx_merchant m left join wx_merchant_shop mtd on mtd.merchant_id = m.id left join wx_shop ws on(mtd.shop_id = ws.id) - where m.business_id = b.id and m.tenant_id=#{tenantId}) + where m.business_id = b.id and m.tenant_id=#{tenantId} and m.status = 1) /100,2) / round( (select (select sum(br.receive_pay) receive_pay from wx_merchant m - left join wx_bill_rent br on(br.merchant_id=m.id) where m.business_id = b.id and m.tenant_id=#{tenantId} and br.receive_date between #{startdate} and #{enddate}) + left join wx_bill_rent br on(br.merchant_id=m.id) where m.business_id = b.id and m.tenant_id=#{tenantId} and br.receive_date between #{startdate} and #{enddate} and m.status = 1) + (select sum(br.receive_pay) receive_pay from wx_merchant m - left join wx_bill_property br on(br.merchant_id=m.id) where m.business_id = b.id and m.tenant_id=#{tenantId} and br.receive_date between #{startdate} and #{enddate}) + left join wx_bill_property br on(br.merchant_id=m.id) where m.business_id = b.id and m.tenant_id=#{tenantId} and br.receive_date between #{startdate} and #{enddate} and m.status = 1) from dual) / (select sum(ws.operation_area) from wx_merchant m left join wx_merchant_shop mtd on mtd.merchant_id = m.id left join wx_shop ws on(mtd.shop_id = ws.id) - where m.business_id = b.id) + where m.business_id = b.id and m.status = 1) /100,2) ,4) rentSaleRate, @@ -149,10 +149,10 @@ round( (select sum(mtd.trade_amt) from wx_merchant m - left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and mtd.create_date between #{startdate} and #{enddate}) / + left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and mtd.create_date between #{startdate} and #{enddate} and m.status = 1) / (select count(mtd.id) from wx_merchant m - left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and mtd.create_date between #{startdate} and #{enddate}) + left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and mtd.create_date between #{startdate} and #{enddate} and m.status = 1) /100,2) comPrice from wx_business b