Browse Source

[首页统计][修改][修改统计]

release_toaliyun_real
luozukai 7 years ago
parent
commit
1d08dc6fa1
2 changed files with 14 additions and 11 deletions
  1. +9
    -6
      mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java
  2. +5
    -5
      mallinkService/src/main/resources/mapper/WxCouponMapper.xml

+ 9
- 6
mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java View File

@@ -2294,12 +2294,6 @@ public class WxChartServiceImpl implements WxChartDataService {
return new ResultData(datamap);
}

public static void main(String[] args) {
double a = 0.0;
System.out.println(a==0.0);
System.out.println();
}

/**
* 费用收缴数据
* @param tenantId
@@ -2445,6 +2439,15 @@ public class WxChartServiceImpl implements WxChartDataService {
return new ResultData(datamap);
}

public static void main(String[] args) {
BigDecimal receivepay = new BigDecimal(33);
BigDecimal pay = new BigDecimal(11);
BigDecimal divide = pay.divide(receivepay, 2, BigDecimal.ROUND_UNNECESSARY);
System.out.println(divide);
double zjcjl = divide.multiply(new BigDecimal(100)).doubleValue();
System.out.println(zjcjl);
}

/**
* 营销数据
* @param tenantId


+ 5
- 5
mallinkService/src/main/resources/mapper/WxCouponMapper.xml View File

@@ -509,21 +509,21 @@
left join wx_coupon c on c.id = ci.coupon_id
left join wx_coupon_order co on co.id = ci.id
where c.type = 100
and c.create_date between #{startdate} and #{enddate}
and co.create_date between #{startdate} and #{enddate}
</select>

<select id="findTranCardCount" parameterType="com.iformall.domain.po.WxCoupon" resultType="Long">
select count(distinct wcs.coupon_order_id) from wx_card_info ci
left join wx_coupon c on c.id = ci.coupon_id
left join wx_card_transfer_info wcs on wcs.coupon_order_id = ci.id
where c.type = 100 and c.create_date between #{startdate} and #{enddate}
where c.type = 100 and wcs.create_date between #{startdate} and #{enddate}
</select>

<select id="findSubsidyMoney" parameterType="com.iformall.domain.po.WxCoupon" resultType="String">
select sum(round(sc.subsidy/100,2)) from wx_card_info ci
left join wx_coupon c on c.id = ci.coupon_id
left join wx_merchant_subsidy sc on sc.coupon_order_id = ci.id
where c.type = 100 and c.create_date between #{startdate} and #{enddate}
where c.type = 100 and sc.create_date between #{startdate} and #{enddate}
</select>

<select id="findCountData" parameterType="com.iformall.domain.po.WxCoupon" resultMap="statisMap">
@@ -692,7 +692,7 @@
left join wx_coupon_order wo on wo.coupon_id = c.id
left join wx_merchant_subsidy sc on sc.coupon_order_id = wo.id
where c.type not in(8,9,100) and wo.coupon_order_status = 1
and c.create_date between #{startdate} and #{enddate}
and sc.create_date between #{startdate} and #{enddate}
</select>


@@ -760,7 +760,7 @@
left join wx_coupon c on c.id = ci.coupon_id
left join wx_coupon_order co on co.id = ci.id
where c.type = 100
and c.create_date between #{startdate} and #{enddate}
and co.create_date between #{startdate} and #{enddate}
group by xtime
</select>



Loading…
Cancel
Save