| @@ -201,9 +201,9 @@ public class DataTowerServiceImpl implements DataTowerService { | |||||
| //今日车流量*********************************************** | //今日车流量*********************************************** | ||||
| private Map<String, Object> carRunning(TenantEntity tenantEntity) { | private Map<String, Object> carRunning(TenantEntity tenantEntity) { | ||||
| HashMap<String, Object> carMap = new HashMap<>(); | HashMap<String, Object> carMap = new HashMap<>(); | ||||
| List<TenantEntity> tenantEntitys = wxMallMapper.getTenantEntitys(tenantEntity); | |||||
| // List<TenantEntity> tenantEntitys = wxMallMapper.getTenantEntitys(tenantEntity); | |||||
| HashMap<String, Object> paramsCar = new HashMap<>(); | HashMap<String, Object> paramsCar = new HashMap<>(); | ||||
| paramsCar.put("tenantEntitys",tenantEntitys); | |||||
| // paramsCar.put("tenantEntitys",tenantEntitys); | |||||
| paramsCar.put("tenantId", tenantEntity.getTenantId()); | paramsCar.put("tenantId", tenantEntity.getTenantId()); | ||||
| if (StringUtils.isNotBlank(tenantEntity.getParentTenantId())) { | if (StringUtils.isNotBlank(tenantEntity.getParentTenantId())) { | ||||
| paramsCar.put("parentTenantId", tenantEntity.getParentTenantId()); | paramsCar.put("parentTenantId", tenantEntity.getParentTenantId()); | ||||
| @@ -413,7 +413,7 @@ public class DataTowerServiceImpl implements DataTowerService { | |||||
| dataMap.put("rent", rentRunning(tenantEntity)); | dataMap.put("rent", rentRunning(tenantEntity)); | ||||
| dataMap.put("report", reportRunning(tenantEntity)); | dataMap.put("report", reportRunning(tenantEntity)); | ||||
| //TODO 待优化数据 | //TODO 待优化数据 | ||||
| //dataMap.put("car", carRunning(tenantEntity)); | |||||
| dataMap.put("car", carRunning(tenantEntity)); | |||||
| dataMap.put("car", null); | dataMap.put("car", null); | ||||
| dataMap.put("coupon", couponRunning(tenantEntity)); | dataMap.put("coupon", couponRunning(tenantEntity)); | ||||
| dataMap.put("visitor", visitorRunning(tenantEntity)); | dataMap.put("visitor", visitorRunning(tenantEntity)); | ||||
| @@ -1610,6 +1610,7 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||||
| public WxMerchantSubsidy recordAfterVerified(WxCouponOrder couponOrder, Long merchantId) { | public WxMerchantSubsidy recordAfterVerified(WxCouponOrder couponOrder, Long merchantId) { | ||||
| WxCoupon wxCoupon = wxCouponMapper.selectById(couponOrder.getCouponId(),couponOrder.getTenantId()); | WxCoupon wxCoupon = wxCouponMapper.selectById(couponOrder.getCouponId(),couponOrder.getTenantId()); | ||||
| WxMerchantSubsidy merchantSubsidy = new WxMerchantSubsidy(); | WxMerchantSubsidy merchantSubsidy = new WxMerchantSubsidy(); | ||||
| merchantSubsidy.updateTenantInfo(couponOrder); | |||||
| if (couponOrder.getCouponType().equals(EnumCouponType.COUPON_PRESS.getCode()) | if (couponOrder.getCouponType().equals(EnumCouponType.COUPON_PRESS.getCode()) | ||||
| && couponOrder.getCouponPrice().equals(wxCoupon.getSalePrice())) { | && couponOrder.getCouponPrice().equals(wxCoupon.getSalePrice())) { | ||||
| //砍价 | //砍价 | ||||
| @@ -1642,7 +1643,6 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||||
| final IdWorker idWorker = IdWorker.get(); | final IdWorker idWorker = IdWorker.get(); | ||||
| Date curDate = new Date(); | Date curDate = new Date(); | ||||
| merchantSubsidy.setId(idWorker.nextId()); | merchantSubsidy.setId(idWorker.nextId()); | ||||
| merchantSubsidy.updateTenantInfo(couponOrder); | |||||
| merchantSubsidy.setMerchantId(merchantId); | merchantSubsidy.setMerchantId(merchantId); | ||||
| merchantSubsidy.setOrderPayment(couponOrder.getCouponPrice()); | merchantSubsidy.setOrderPayment(couponOrder.getCouponPrice()); | ||||
| merchantSubsidy.setReceiverPayment(couponOrder.getCouponPrice()); | merchantSubsidy.setReceiverPayment(couponOrder.getCouponPrice()); | ||||
| @@ -2383,7 +2383,7 @@ public class WxOrderServiceImpl implements WxOrderService { | |||||
| Long allRefundOrderSummary = wxOrderMapper.queryOrderForSum(params); | Long allRefundOrderSummary = wxOrderMapper.queryOrderForSum(params); | ||||
| result.put("allRefundOrderSummary", allRefundOrderSummary); | result.put("allRefundOrderSummary", allRefundOrderSummary); | ||||
| Long allOrderSummary = allPayOrderSummary - allRefundOrderSummary; | Long allOrderSummary = allPayOrderSummary - allRefundOrderSummary; | ||||
| result.put("allOrderSummary", allPayOrderSummary); | |||||
| result.put("allOrderSummary", allOrderSummary); | |||||
| //今日 | //今日 | ||||
| params.put("startdate", systemTime + " 00:00:00"); | params.put("startdate", systemTime + " 00:00:00"); | ||||
| params.put("enddate", systemTime + " 23:59:59"); | params.put("enddate", systemTime + " 23:59:59"); | ||||
| @@ -226,12 +226,6 @@ | |||||
| ((date_format(cs.create_date,'%H:%m') < '06:00') | ((date_format(cs.create_date,'%H:%m') < '06:00') | ||||
| and date_format(cs.create_date,'%w') in (6,0))) | and date_format(cs.create_date,'%w') in (6,0))) | ||||
| </if> | </if> | ||||
| <if test=" null != merchantIds "> | |||||
| and cs.merchant_id in | |||||
| <foreach collection="merchantIds" index="index" item="merchantIdItem" open="(" separator="," close=")"> | |||||
| #{merchantIdItem} | |||||
| </foreach> | |||||
| </if> | |||||
| group by cs.merchant_id | group by cs.merchant_id | ||||
| </select> | </select> | ||||
| @@ -921,21 +921,17 @@ | |||||
| </select> | </select> | ||||
| <select id="queryOrderForSum" resultType="Long" parameterType="hashmap"> | <select id="queryOrderForSum" resultType="Long" parameterType="hashmap"> | ||||
| select ifnull(sum(o.payment),0) payment from ( | |||||
| select o.* from wx_order o | |||||
| select ifnull(sum(o.payment),0) payment from wx_order o | |||||
| where o.type in (0,1,2) and o.order_status = #{order_status} | where o.type in (0,1,2) and o.order_status = #{order_status} | ||||
| ) o | |||||
| <where> | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and o.`tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and o.`parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test="startdate!=null and enddate!=null"> | |||||
| and o.create_date between #{startdate} and #{enddate} | |||||
| </if> | |||||
| </where> | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and o.`tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and o.`parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test="startdate!=null and enddate!=null"> | |||||
| and o.create_date between #{startdate} and #{enddate} | |||||
| </if> | |||||
| </select> | </select> | ||||
| <select id="queryOrderForCount" resultType="Long" parameterType="hashmap"> | <select id="queryOrderForCount" resultType="Long" parameterType="hashmap"> | ||||