Browse Source

[营销数据][修改][砍价成功率加租户id]

release_toaliyun_real
luozukai 7 years ago
parent
commit
71cfd413f5
3 changed files with 8 additions and 4 deletions
  1. +1
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java
  2. +2
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java
  3. +5
    -2
      mallinkService/src/main/resources/mapper/WxCouponMapper.xml

+ 1
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java View File

@@ -1611,6 +1611,7 @@ public class WxChartServiceImpl implements WxChartDataService {
result.put("pressSuccHistory",pressSuccHistoryMap);
result.put("pressPaymentHistory",pressPaymentHistoryMap);

wxCoupon.setTenantId(tenantId);
result.put("pressSuccRate",wxCouponService.pressSuccRate(wxCoupon));
result.put("sumJoin",wxCouponService.sumJoin(wxCoupon));
return new ResultData(result);


+ 2
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java View File

@@ -409,8 +409,8 @@ public class WxCouponServiceImpl implements WxCouponService {
@Override
public String pressSuccRate(WxCoupon wxCoupon) {
String count = wxCouponMapper.pressSuccRate(wxCoupon);
if ("0.00".equals(count)) {
return "0%";
if (StringUtils.isBlank(count) || "0.00".equals(count)) {
return "0%";
} else {
return count + "%";
}


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

@@ -697,13 +697,16 @@
(select count(wo.id) from wx_coupon wc
left join wx_order wo on wo.product_id = wc.id
where wo.order_status = 1 and wc.type = 8
and wo.create_date between #{startdate} and #{enddate})
and wo.create_date between #{startdate} and #{enddate}
and wo.tenant_id = #{tenantId}
)
/
(select count(wop.id) from wx_coupon wc
left join wx_order wo on wo.product_id = wc.id
left join wx_order_press wop on wop.order_id = wo.id
where wop.first = 1 and wc.type = 8
and wop.create_date between #{startdate} and #{enddate})
and wop.create_date between #{startdate} and #{enddate}
and wo.tenant_id = #{tenantId} and wop.tenant_id = #{tenantId})
* 100
,2)
</select>


Loading…
Cancel
Save