| @@ -75,10 +75,6 @@ public class TenantInfoImpl implements TenantInfo { | |||||
| if ("wx_msg_record".equals(tableName)) { | if ("wx_msg_record".equals(tableName)) { | ||||
| return true; | return true; | ||||
| } | } | ||||
| if ("wx_coupon".equals(tableName)) { | |||||
| return true; | |||||
| } | |||||
| return false; | return false; | ||||
| } | } | ||||
| @@ -92,8 +88,6 @@ public class TenantInfoImpl implements TenantInfo { | |||||
| return true; | return true; | ||||
| if ("com.iformall.mapper.WxShopMapper.rentRateHistory".equals(ms.getId())) | if ("com.iformall.mapper.WxShopMapper.rentRateHistory".equals(ms.getId())) | ||||
| return true; | return true; | ||||
| if ("com.iformall.mapper.WxCouponMapper.findCouponData".equals(ms.getId())) | |||||
| return true; | |||||
| return false; | return false; | ||||
| } | } | ||||
| } | } | ||||
| @@ -1,7 +1,9 @@ | |||||
| package com.iformall.domain.dto; | package com.iformall.domain.dto; | ||||
| import com.iformall.common.SortColumn; | |||||
| import com.iformall.domain.po.BaseEntity; | import com.iformall.domain.po.BaseEntity; | ||||
| import javax.persistence.Transient; | |||||
| import java.util.Date; | import java.util.Date; | ||||
| /** | /** | ||||
| @@ -17,6 +19,14 @@ public class MarkingCouponDataReportDto extends BaseEntity{ | |||||
| private String tenantId; | private String tenantId; | ||||
| private Integer channelType; | private Integer channelType; | ||||
| @Transient | |||||
| @SortColumn(column = "xTime") | |||||
| private String xTime; | |||||
| @Transient | |||||
| @SortColumn(column = "sendCount") | |||||
| private Integer sendCount; | |||||
| @Override | @Override | ||||
| public String getSortColumns() { | public String getSortColumns() { | ||||
| super.setSortColumns(this.sortColumns); | super.setSortColumns(this.sortColumns); | ||||
| @@ -49,9 +49,9 @@ public class BaseEntity implements Serializable { | |||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| // if(!find) { | |||||
| // return sortColumn; | |||||
| // } | |||||
| if(!find) { | |||||
| return null; | |||||
| } | |||||
| //默认驼峰解析 | //默认驼峰解析 | ||||
| return underscoreName(sortColumn) +" "+sortOrder; | return underscoreName(sortColumn) +" "+sortOrder; | ||||
| @@ -286,6 +286,7 @@ public class MarkingDataReportServiceImpl implements MarkingDataReportService { | |||||
| @Override | @Override | ||||
| public PageInfo<MarkingSceneDataVo> getSceneDataList(String tenantId, MarkingCouponDataReportDto markingCouponDataReportDto, Integer pageIndex, Integer pageSize) { | public PageInfo<MarkingSceneDataVo> getSceneDataList(String tenantId, MarkingCouponDataReportDto markingCouponDataReportDto, Integer pageIndex, Integer pageSize) { | ||||
| MarkingCouponDataReportDto queryDto = new MarkingCouponDataReportDto(); | MarkingCouponDataReportDto queryDto = new MarkingCouponDataReportDto(); | ||||
| org.springframework.beans.BeanUtils.copyProperties(markingCouponDataReportDto, queryDto); | |||||
| queryDto.setTenantId(tenantId); | queryDto.setTenantId(tenantId); | ||||
| HashMap<String, Object> params = new HashMap<>(); | HashMap<String, Object> params = new HashMap<>(); | ||||
| @@ -125,7 +125,7 @@ | |||||
| <if test=" null != endTime "> | <if test=" null != endTime "> | ||||
| and create_time <= #{endTime} | and create_time <= #{endTime} | ||||
| </if> | </if> | ||||
| group by xTime | |||||
| group by xTime | |||||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | <if test=" null != sortColumns"> order by ${sortColumns} </if> | ||||
| <if test=" null == sortColumns"> order by xTime desc </if> | <if test=" null == sortColumns"> order by xTime desc </if> | ||||
| </select> | </select> | ||||
| @@ -606,34 +606,6 @@ | |||||
| <if test=" null != sortColumns">order by ${sortColumns}</if> | <if test=" null != sortColumns">order by ${sortColumns}</if> | ||||
| <if test=" null == sortColumns">order by c.status asc,c.create_date desc</if> | <if test=" null == sortColumns">order by c.status asc,c.create_date desc</if> | ||||
| </select> | </select> | ||||
| <!-- | |||||
| <select id="findCouponData" parameterType="com.iformall.domain.po.WxCoupon" resultMap="statisMap"> | |||||
| select c.*, | |||||
| (select count(wco.id) from wx_coupon_order wco where wco.coupon_id = c.id) as sale_count, | |||||
| (select count(wco.id) from wx_coupon wc,wx_coupon_order wco where wco.coupon_id = wc.id and wco.coupon_order_status = 1 and wc.id = c.id) as sum_payment, | |||||
| (select count(wco.id) from wx_coupon wc,wx_coupon_order wco where wco.coupon_id = wc.id and wco.coupon_order_status = 3 and wc.id = c.id) as backpay_count, | |||||
| (select sum(sc.subsidy) from wx_coupon wc | |||||
| left join wx_coupon_order wo on wo.coupon_id = wc.id | |||||
| left join wx_merchant_subsidy sc on sc.coupon_order_id = wo.id | |||||
| where wc.id = c.id) as sum_subsidy | |||||
| from wx_coupon c where c.type not in(8,9,100) | |||||
| <if test=" 1 == type "> | |||||
| and c.sale_price > 0 | |||||
| </if> | |||||
| <if test=" 2 == type "> | |||||
| and c.sale_price = 0 | |||||
| </if> | |||||
| <if test="title != null and title != ''"> | |||||
| and c.title like concat('%', #{title},'%') | |||||
| </if> | |||||
| <if test="id != null"> | |||||
| and c.id = #{id} | |||||
| </if> | |||||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | |||||
| <if test=" null == sortColumns">order by c.status asc,c.create_date desc</if> | |||||
| </select>--> | |||||
| <select id="findPressData" parameterType="com.iformall.domain.po.WxCoupon" resultMap="statisMap"> | <select id="findPressData" parameterType="com.iformall.domain.po.WxCoupon" resultMap="statisMap"> | ||||
| select c.*, | select c.*, | ||||
| @@ -102,7 +102,7 @@ | |||||
| ROUND(IFNULL((c.group_success_count/c.group_total_count),0)*100) | ROUND(IFNULL((c.group_success_count/c.group_total_count),0)*100) | ||||
| group_transfer_ratio,c.success_people,c.verify_count, | group_transfer_ratio,c.success_people,c.verify_count, | ||||
| ROUND(IFNULL((verify_count/success_people),0)*100) verify_ratio,c.total_people from( | ROUND(IFNULL((verify_count/success_people),0)*100) verify_ratio,c.total_people from( | ||||
| select tenant_id,id coupon_id,cover_img,title,FORMAT(price/100,2) price,FORMAT(sale_price/100,2) sale_price, | |||||
| select tenant_id,id coupon_id,cover_img,title,ROUND(price/100,2) price,ROUND(sale_price/100,2) sale_price, | |||||
| (select count(*) total from wx_order_group where coupon_id=c.id) group_total_count, | (select count(*) total from wx_order_group where coupon_id=c.id) group_total_count, | ||||
| (select count(*) total from wx_order_group where status=11 and coupon_id=c.id) group_success_count, | (select count(*) total from wx_order_group where status=11 and coupon_id=c.id) group_success_count, | ||||
| IFNULL((select count(*) from wx_order where order_status=11 and product_id=c.id),0) success_people, | IFNULL((select count(*) from wx_order where order_status=11 and product_id=c.id),0) success_people, | ||||