| @@ -1611,6 +1611,7 @@ public class WxChartServiceImpl implements WxChartDataService { | |||||
| result.put("pressSuccHistory",pressSuccHistoryMap); | result.put("pressSuccHistory",pressSuccHistoryMap); | ||||
| result.put("pressPaymentHistory",pressPaymentHistoryMap); | result.put("pressPaymentHistory",pressPaymentHistoryMap); | ||||
| wxCoupon.setTenantId(tenantId); | |||||
| result.put("pressSuccRate",wxCouponService.pressSuccRate(wxCoupon)); | result.put("pressSuccRate",wxCouponService.pressSuccRate(wxCoupon)); | ||||
| result.put("sumJoin",wxCouponService.sumJoin(wxCoupon)); | result.put("sumJoin",wxCouponService.sumJoin(wxCoupon)); | ||||
| return new ResultData(result); | return new ResultData(result); | ||||
| @@ -409,8 +409,8 @@ public class WxCouponServiceImpl implements WxCouponService { | |||||
| @Override | @Override | ||||
| public String pressSuccRate(WxCoupon wxCoupon) { | public String pressSuccRate(WxCoupon wxCoupon) { | ||||
| String count = wxCouponMapper.pressSuccRate(wxCoupon); | String count = wxCouponMapper.pressSuccRate(wxCoupon); | ||||
| if ("0.00".equals(count)) { | |||||
| return "0%"; | |||||
| if (StringUtils.isBlank(count) || "0.00".equals(count)) { | |||||
| return "0%"; | |||||
| } else { | } else { | ||||
| return count + "%"; | return count + "%"; | ||||
| } | } | ||||
| @@ -697,13 +697,16 @@ | |||||
| (select count(wo.id) from wx_coupon wc | (select count(wo.id) from wx_coupon wc | ||||
| left join wx_order wo on wo.product_id = wc.id | left join wx_order wo on wo.product_id = wc.id | ||||
| where wo.order_status = 1 and wc.type = 8 | 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 | (select count(wop.id) from wx_coupon wc | ||||
| left join wx_order wo on wo.product_id = wc.id | left join wx_order wo on wo.product_id = wc.id | ||||
| left join wx_order_press wop on wop.order_id = wo.id | left join wx_order_press wop on wop.order_id = wo.id | ||||
| where wop.first = 1 and wc.type = 8 | 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 | * 100 | ||||
| ,2) | ,2) | ||||
| </select> | </select> | ||||