| @@ -15,6 +15,7 @@ public class MarkingCouponDataReportDto extends BaseEntity{ | |||||
| private Integer couponType; | private Integer couponType; | ||||
| private String couponTitle; | private String couponTitle; | ||||
| private String tenantId; | private String tenantId; | ||||
| private Integer channelType; | |||||
| @Override | @Override | ||||
| public String getSortColumns() { | public String getSortColumns() { | ||||
| @@ -22,6 +23,13 @@ public class MarkingCouponDataReportDto extends BaseEntity{ | |||||
| return super.getSortColumns(); | return super.getSortColumns(); | ||||
| } | } | ||||
| public Integer getChannelType() { | |||||
| return channelType; | |||||
| } | |||||
| public void setChannelType(Integer channelType) { | |||||
| this.channelType = channelType; | |||||
| } | |||||
| public Integer getType() { | public Integer getType() { | ||||
| return type; | return type; | ||||
| @@ -10,8 +10,7 @@ import java.util.Date; | |||||
| import java.util.List; | import java.util.List; | ||||
| @Table(name = "wx_campaign") | @Table(name = "wx_campaign") | ||||
| public class WxCampaign implements Serializable { | |||||
| private static final long serialVersionUID = 1L; | |||||
| public class WxCampaign extends BaseEntity { | |||||
| @Id | @Id | ||||
| protected Long id; | protected Long id; | ||||
| @@ -39,8 +38,10 @@ public class WxCampaign implements Serializable { | |||||
| this.id = id; | this.id = id; | ||||
| } | } | ||||
| @Override | |||||
| public String getSortColumns() { | public String getSortColumns() { | ||||
| return sortColumns; | |||||
| super.setSortColumns(this.sortColumns); | |||||
| return super.getSortColumns(); | |||||
| } | } | ||||
| public List<Long> getIds() { | public List<Long> getIds() { | ||||
| @@ -11,8 +11,7 @@ import java.util.Date; | |||||
| import java.util.List; | import java.util.List; | ||||
| @Table(name = "wx_coupon_inject") | @Table(name = "wx_coupon_inject") | ||||
| public class WxCouponInject implements Serializable { | |||||
| private static final long serialVersionUID = 1L; | |||||
| public class WxCouponInject extends BaseEntity { | |||||
| @Id | @Id | ||||
| protected Long id; | protected Long id; | ||||
| @@ -48,8 +47,10 @@ public class WxCouponInject implements Serializable { | |||||
| this.id = id; | this.id = id; | ||||
| } | } | ||||
| @Override | |||||
| public String getSortColumns() { | public String getSortColumns() { | ||||
| return sortColumns; | |||||
| super.setSortColumns(this.sortColumns); | |||||
| return super.getSortColumns(); | |||||
| } | } | ||||
| public List<Long> getIds() { | public List<Long> getIds() { | ||||
| @@ -9,8 +9,7 @@ import java.util.Date; | |||||
| import java.util.List; | import java.util.List; | ||||
| @Table(name = "wx_coupon_order") | @Table(name = "wx_coupon_order") | ||||
| public class WxCouponOrder implements Serializable { | |||||
| private static final long serialVersionUID = 1L; | |||||
| public class WxCouponOrder extends BaseEntity{ | |||||
| @Id | @Id | ||||
| protected Long id; | protected Long id; | ||||
| @@ -20,6 +19,12 @@ public class WxCouponOrder implements Serializable { | |||||
| @Transient | @Transient | ||||
| protected String sortColumns; | protected String sortColumns; | ||||
| @Override | |||||
| public String getSortColumns() { | |||||
| super.setSortColumns(this.sortColumns); | |||||
| return super.getSortColumns(); | |||||
| } | |||||
| public Long getId() { | public Long getId() { | ||||
| return id; | return id; | ||||
| } | } | ||||
| @@ -28,9 +33,6 @@ public class WxCouponOrder implements Serializable { | |||||
| this.id = id; | this.id = id; | ||||
| } | } | ||||
| public String getSortColumns() { | |||||
| return sortColumns; | |||||
| } | |||||
| public List<Long> getIds() { | public List<Long> getIds() { | ||||
| return ids; | return ids; | ||||
| @@ -9,8 +9,7 @@ import java.util.Date; | |||||
| import java.util.List; | import java.util.List; | ||||
| @Table(name = "wx_screen_ad") | @Table(name = "wx_screen_ad") | ||||
| public class WxScreenAd implements Serializable { | |||||
| private static final long serialVersionUID = 1L; | |||||
| public class WxScreenAd extends BaseEntity { | |||||
| @Id | @Id | ||||
| protected Long id; | protected Long id; | ||||
| @@ -28,8 +27,10 @@ public class WxScreenAd implements Serializable { | |||||
| this.id = id; | this.id = id; | ||||
| } | } | ||||
| @Override | |||||
| public String getSortColumns() { | public String getSortColumns() { | ||||
| return sortColumns; | |||||
| super.setSortColumns(this.sortColumns); | |||||
| return super.getSortColumns(); | |||||
| } | } | ||||
| public List<Long> getIds() { | public List<Long> getIds() { | ||||
| @@ -11,9 +11,8 @@ import java.io.Serializable; | |||||
| @Table(name = "wx_subsidy") | @Table(name = "wx_subsidy") | ||||
| @Data | @Data | ||||
| public class WxSubsidy implements Serializable { | |||||
| private static final long serialVersionUID = 1L; | |||||
| public class WxSubsidy extends BaseEntity { | |||||
| @Id | @Id | ||||
| protected Long id; | protected Long id; | ||||
| @@ -21,7 +20,13 @@ public class WxSubsidy implements Serializable { | |||||
| protected List<Long> ids; | protected List<Long> ids; | ||||
| @Transient | @Transient | ||||
| protected String sortColumns; | protected String sortColumns; | ||||
| @Override | |||||
| public String getSortColumns() { | |||||
| super.setSortColumns(this.sortColumns); | |||||
| return super.getSortColumns(); | |||||
| } | |||||
| /**租户ID*/ | /**租户ID*/ | ||||
| @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") | @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") | ||||
| private String tenantId; | private String tenantId; | ||||
| @@ -3,13 +3,11 @@ package com.iformall.domain.po; | |||||
| import javax.persistence.Id; | import javax.persistence.Id; | ||||
| import javax.persistence.Table; | import javax.persistence.Table; | ||||
| import javax.persistence.Transient; | import javax.persistence.Transient; | ||||
| import java.io.Serializable; | |||||
| import java.util.Date; | import java.util.Date; | ||||
| import java.util.List; | import java.util.List; | ||||
| @Table(name = "wx_topic") | @Table(name = "wx_topic") | ||||
| public class WxTopic implements Serializable { | |||||
| private static final long serialVersionUID = 1L; | |||||
| public class WxTopic extends BaseEntity{ | |||||
| @Id | @Id | ||||
| protected Long id; | protected Long id; | ||||
| @@ -70,7 +68,11 @@ public class WxTopic implements Serializable { | |||||
| @Transient | @Transient | ||||
| private Long couponChannelId; | private Long couponChannelId; | ||||
| @Override | |||||
| public String getSortColumns() { | |||||
| super.setSortColumns(this.sortColumns); | |||||
| return super.getSortColumns(); | |||||
| } | |||||
| public Long getCouponChannelId() { | public Long getCouponChannelId() { | ||||
| return couponChannelId; | return couponChannelId; | ||||
| } | } | ||||
| @@ -1,5 +1,6 @@ | |||||
| package com.iformall.domain.po.msg; | package com.iformall.domain.po.msg; | ||||
| import com.iformall.domain.po.BaseEntity; | |||||
| import lombok.Data; | import lombok.Data; | ||||
| import javax.persistence.Transient; | import javax.persistence.Transient; | ||||
| @@ -10,7 +11,7 @@ import java.io.Serializable; | |||||
| * @date 2019/3/7 10:05 | * @date 2019/3/7 10:05 | ||||
| */ | */ | ||||
| @Data | @Data | ||||
| public class BaseMsg implements Serializable { | |||||
| public class BaseMsg extends BaseEntity { | |||||
| private static final long serialVersionUID = 923764283764823L; | private static final long serialVersionUID = 923764283764823L; | ||||
| @io.swagger.annotations.ApiModelProperty(value="域0全部 1sys 2a端 3c端 4b端",name="domain") | @io.swagger.annotations.ApiModelProperty(value="域0全部 1sys 2a端 3c端 4b端",name="domain") | ||||
| @@ -44,4 +45,10 @@ public class BaseMsg implements Serializable { | |||||
| @io.swagger.annotations.ApiModelProperty(value="rocketMQ延迟消息1s,5s,10s,30s,1m,2m,3m,4m,5m,6m,7m,8m,9m,10m,20m,30m,1h,2h",name="delayTimeLevel") | @io.swagger.annotations.ApiModelProperty(value="rocketMQ延迟消息1s,5s,10s,30s,1m,2m,3m,4m,5m,6m,7m,8m,9m,10m,20m,30m,1h,2h",name="delayTimeLevel") | ||||
| @Transient | @Transient | ||||
| private Integer delayTimeLevel = 0; | private Integer delayTimeLevel = 0; | ||||
| @Override | |||||
| public String getSortColumns() { | |||||
| super.setSortColumns(this.sortColumns); | |||||
| return super.getSortColumns(); | |||||
| } | |||||
| } | } | ||||
| @@ -18,8 +18,13 @@ import java.util.List; | |||||
| @Data | @Data | ||||
| @ToString(callSuper = true) | @ToString(callSuper = true) | ||||
| @EqualsAndHashCode(callSuper = true) | @EqualsAndHashCode(callSuper = true) | ||||
| public class WxMsg extends BaseMsg { | |||||
| public class WxMsg extends BaseMsg{ | |||||
| private static final long serialVersionUID = 1L; | private static final long serialVersionUID = 1L; | ||||
| @Override | |||||
| public String getSortColumns() { | |||||
| super.setSortColumns(this.sortColumns); | |||||
| return super.getSortColumns(); | |||||
| } | |||||
| @Id | @Id | ||||
| protected Long id; | protected Long id; | ||||
| @@ -24,7 +24,11 @@ public class WxCouponOrderBVo extends WxCouponOrder{ | |||||
| public void setId(Long id) { | public void setId(Long id) { | ||||
| this.id = id; | this.id = id; | ||||
| } | } | ||||
| @Override | |||||
| public String getSortColumns() { | |||||
| super.setSortColumns(this.sortColumns); | |||||
| return super.getSortColumns(); | |||||
| } | |||||
| /* 基础购买到的券信息 */ | /* 基础购买到的券信息 */ | ||||
| /***/ | /***/ | ||||
| @@ -60,6 +60,19 @@ public class WxCouponStatisVo extends WxCoupon { | |||||
| private String paymentRate; | private String paymentRate; | ||||
| /**转化率**/ | |||||
| @io.swagger.annotations.ApiModelProperty(value="转化率",name="changeRate") | |||||
| @Transient | |||||
| private String changeRate; | |||||
| public String getChangeRate() { | |||||
| return changeRate; | |||||
| } | |||||
| public void setChangeRate(String changeRate) { | |||||
| this.changeRate = changeRate; | |||||
| } | |||||
| public String getXtime() { | public String getXtime() { | ||||
| return xtime; | return xtime; | ||||
| @@ -304,16 +304,16 @@ public class MarkingDataReportServiceImpl implements MarkingDataReportService { | |||||
| List<MarkingSceneDataVo> list; | List<MarkingSceneDataVo> list; | ||||
| if(markingCouponDataReportDto.getType().equals(EnumCouponSendSendType.CAR_STOP.getCode())) { | if(markingCouponDataReportDto.getType().equals(EnumCouponSendSendType.CAR_STOP.getCode())) { | ||||
| params.put("channelType", EnumCouponSendSendType.CAR_STOP.getCode()); | |||||
| queryDto.setChannelType(EnumCouponSendSendType.CAR_STOP.getCode()); | |||||
| list = wxCouponActionLogMapper.sceneDataList(queryDto); | list = wxCouponActionLogMapper.sceneDataList(queryDto); | ||||
| }else if (markingCouponDataReportDto.getType().equals(EnumCouponSendSendType.B_MICROPAY.getCode())) { | }else if (markingCouponDataReportDto.getType().equals(EnumCouponSendSendType.B_MICROPAY.getCode())) { | ||||
| params.put("channelType", EnumCouponSendSendType.B_MICROPAY.getCode()); | |||||
| queryDto.setChannelType(EnumCouponSendSendType.B_MICROPAY.getCode()); | |||||
| list = wxCouponActionLogMapper.sceneDataList(queryDto); | list = wxCouponActionLogMapper.sceneDataList(queryDto); | ||||
| }else if (markingCouponDataReportDto.getType().equals(EnumCouponSendSendType.COUPON_VERIFY.getCode())){ | }else if (markingCouponDataReportDto.getType().equals(EnumCouponSendSendType.COUPON_VERIFY.getCode())){ | ||||
| params.put("channelType", EnumCouponSendSendType.COUPON_VERIFY.getCode()); | |||||
| queryDto.setChannelType(EnumCouponSendSendType.COUPON_VERIFY.getCode()); | |||||
| list = wxCouponActionLogMapper.sceneDataList(queryDto); | list = wxCouponActionLogMapper.sceneDataList(queryDto); | ||||
| }else if (markingCouponDataReportDto.getType().equals(EnumCouponSendSendType.C_ORDER.getCode())){ | }else if (markingCouponDataReportDto.getType().equals(EnumCouponSendSendType.C_ORDER.getCode())){ | ||||
| params.put("channelType", EnumCouponSendSendType.C_ORDER.getCode()); | |||||
| queryDto.setChannelType(EnumCouponSendSendType.C_ORDER.getCode()); | |||||
| list = wxCouponActionLogMapper.sceneDataList(queryDto); | list = wxCouponActionLogMapper.sceneDataList(queryDto); | ||||
| }else{ | }else{ | ||||
| PageHelper.clearPage(); | PageHelper.clearPage(); | ||||
| @@ -554,7 +554,6 @@ | |||||
| left join wx_merchant_shop ms on ms.`merchant_id` = m.id | left join wx_merchant_shop ms on ms.`merchant_id` = m.id | ||||
| left join wx_shop ws on ms.`shop_id` = ws.id | left join wx_shop ws on ms.`shop_id` = ws.id | ||||
| where m.status=1 and m.tenant_id = #{tenantId} | where m.status=1 and m.tenant_id = #{tenantId} | ||||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | <if test=" null != sortColumns"> order by ${sortColumns} </if> | ||||
| <if test=" null == sortColumns"> order by totalOwe desc </if> | <if test=" null == sortColumns"> order by totalOwe desc </if> | ||||
| </select> | </select> | ||||
| @@ -109,7 +109,7 @@ | |||||
| <if test=" null != latePayStatus ">and br.`late_pay_status` = #{latePayStatus}</if> | <if test=" null != latePayStatus ">and br.`late_pay_status` = #{latePayStatus}</if> | ||||
| </where> | </where> | ||||
| <if test=" null != sortColumns">order by br.${sortColumns}</if> | |||||
| <if test=" null != sortColumns">order by ${sortColumns}</if> | |||||
| </select> | </select> | ||||
| <select id="queryPayInfo" resultType="hashmap" parameterType="hashmap"> | <select id="queryPayInfo" resultType="hashmap" parameterType="hashmap"> | ||||
| @@ -116,7 +116,7 @@ | |||||
| <if test=" null != latePayStatus ">and br.`late_pay_status` = #{latePayStatus}</if> | <if test=" null != latePayStatus ">and br.`late_pay_status` = #{latePayStatus}</if> | ||||
| </where> | </where> | ||||
| <if test=" null != sortColumns">order by br.${sortColumns}</if> | |||||
| <if test=" null != sortColumns">order by ${sortColumns}</if> | |||||
| </select> | </select> | ||||
| <select id="queryPayInfo" resultType="hashmap" parameterType="hashmap"> | <select id="queryPayInfo" resultType="hashmap" parameterType="hashmap"> | ||||
| @@ -79,6 +79,8 @@ | |||||
| <result column="join_count" property="pressJoinCount"/> | <result column="join_count" property="pressJoinCount"/> | ||||
| <result column="sum_subsidy" property="sumSubsidy"/> | <result column="sum_subsidy" property="sumSubsidy"/> | ||||
| <result column="payment_rate" property="paymentRate"/> | <result column="payment_rate" property="paymentRate"/> | ||||
| <result column="change_rate" property="changeRate"/> | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| @@ -577,6 +579,8 @@ | |||||
| </select> | </select> | ||||
| <select id="findCouponData" parameterType="com.iformall.domain.po.WxCoupon" resultMap="statisMap"> | <select id="findCouponData" parameterType="com.iformall.domain.po.WxCoupon" resultMap="statisMap"> | ||||
| select la.* from( | |||||
| select res.*,IFNULL(round(sum_payment/sale_count*100,2),0) as payment_rate from ( | |||||
| select c.*, | 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_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 = 1 and wc.id = c.id) as sum_payment, | ||||
| @@ -587,24 +591,27 @@ | |||||
| where wc.id = c.id) as sum_subsidy | where wc.id = c.id) as sum_subsidy | ||||
| from wx_coupon c where c.type not in(8,9,100) | from wx_coupon c where c.type not in(8,9,100) | ||||
| ) res | |||||
| ) la | |||||
| <if test=" 1 == type "> | <if test=" 1 == type "> | ||||
| and c.sale_price > 0 | |||||
| and la.sale_price > 0 | |||||
| </if> | </if> | ||||
| <if test=" 2 == type "> | <if test=" 2 == type "> | ||||
| and c.sale_price = 0 | |||||
| and la.sale_price = 0 | |||||
| </if> | </if> | ||||
| <if test="title != null and title != ''"> | <if test="title != null and title != ''"> | ||||
| and c.title like concat('%', #{title},'%') | |||||
| and la.title like concat('%', #{title},'%') | |||||
| </if> | </if> | ||||
| <if test="id != null"> | <if test="id != null"> | ||||
| and c.id = #{id} | |||||
| and la.id = #{id} | |||||
| </if> | </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 ${sortColumns}</if> | |||||
| <if test=" null == sortColumns">order by la.status asc,la.create_date desc</if> | |||||
| </select> | </select> | ||||
| <select id="findPressData" parameterType="com.iformall.domain.po.WxCoupon" resultMap="statisMap"> | <select id="findPressData" parameterType="com.iformall.domain.po.WxCoupon" resultMap="statisMap"> | ||||
| select la.* from( | |||||
| select res.*,IFNULL(round(press_succ_count/press_count*100,2),0) as change_rate from ( | |||||
| select c.* | select c.* | ||||
| ,(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 | ||||
| @@ -633,14 +640,16 @@ | |||||
| *100,2) as payment_rate | *100,2) as payment_rate | ||||
| from wx_coupon c where c.type = 8 | from wx_coupon c where c.type = 8 | ||||
| ) res | |||||
| ) la | |||||
| <if test="id != null"> | <if test="id != null"> | ||||
| and c.id = #{id} | |||||
| and la.id = #{id} | |||||
| </if> | </if> | ||||
| <if test="title != null and title != ''"> | <if test="title != null and title != ''"> | ||||
| and c.title like concat('%', #{title},'%') | |||||
| and la.title like concat('%', #{title},'%') | |||||
| </if> | </if> | ||||
| <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 la.status asc,la.create_date desc </if> | |||||
| </select> | </select> | ||||
| <!-- | <!-- | ||||
| @@ -99,9 +99,9 @@ | |||||
| <select id="queryOrderGroupMarketingList" parameterType="com.iformall.domain.vo.WxOrderGroupMarketing" | <select id="queryOrderGroupMarketingList" parameterType="com.iformall.domain.vo.WxOrderGroupMarketing" | ||||
| resultType="com.iformall.domain.vo.WxOrderGroupMarketing"> | resultType="com.iformall.domain.vo.WxOrderGroupMarketing"> | ||||
| select c.tenant_id,coupon_id,c.cover_img,title,c.price,c.sale_price,c.group_total_count,c.group_success_count, | select c.tenant_id,coupon_id,c.cover_img,title,c.price,c.sale_price,c.group_total_count,c.group_success_count, | ||||
| CONCAT(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, | ||||
| CONCAT(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,FORMAT(price/100,2) price,FORMAT(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, | ||||
| @@ -49,7 +49,9 @@ | |||||
| #{statusItem} | #{statusItem} | ||||
| </foreach> | </foreach> | ||||
| </if> | </if> | ||||
| order by begin_time desc,status asc | |||||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | |||||
| <if test=" null == sortColumns"> order by begin_time desc,status asc </if> | |||||
| </sql> | </sql> | ||||
| <select id="findList" parameterType="com.iformall.domain.po.WxTopic" resultMap="BaseResultMap"> | <select id="findList" parameterType="com.iformall.domain.po.WxTopic" resultMap="BaseResultMap"> | ||||