Browse Source

Merge commit 'refs/tags/jenkins-back-end-1147^{}' into release

release_toaliyun_real
hupeng 7 years ago
parent
commit
d7c96079cf
8 changed files with 117 additions and 221 deletions
  1. +5
    -4
      mallinkAdmin/src/main/java/com/iformall/controller/WxCouponController.java
  2. +7
    -147
      mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java
  3. +3
    -1
      mallinkService/src/main/java/com/iformall/domain/vo/WxCouponStatisVo.java
  4. +13
    -12
      mallinkService/src/main/java/com/iformall/mapper/WxCouponMapper.java
  5. +13
    -12
      mallinkService/src/main/java/com/iformall/service/WxCouponService.java
  6. +18
    -18
      mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java
  7. +13
    -12
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java
  8. +45
    -15
      mallinkService/src/main/resources/mapper/WxCouponMapper.xml

+ 5
- 4
mallinkAdmin/src/main/java/com/iformall/controller/WxCouponController.java View File

@@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo;
import com.iformall.common.Result;
import com.iformall.common.ResultData;
import com.iformall.domain.po.WxCoupon;
import com.iformall.domain.vo.WxCouponStatisVo;
import com.iformall.enums.*;
import com.iformall.service.WxCouponService;
import com.iformall.utils.DateUtils;
@@ -92,8 +93,8 @@ public class WxCouponController extends BaseController {
if(wxCoupon.getEnddate() == null){
wxCoupon.setEnddate(DateUtils.stringToDate(DateUtils.getSystemTime("yyyy-MM-dd") + " 23:59:59"));
}
PageInfo<WxCoupon> pageInfo = wxCouponService.findCountData(wxCoupon,pageNum,pageSize);
for (WxCoupon coupon:pageInfo.getList()) {
PageInfo<WxCouponStatisVo> pageInfo = wxCouponService.findCountData(wxCoupon,pageNum,pageSize);
for (WxCouponStatisVo coupon:pageInfo.getList()) {
if(coupon.getSaleAmount() == null){
coupon.setSaleAmount(0);
}
@@ -126,8 +127,8 @@ public class WxCouponController extends BaseController {
wxCoupon.setEnddate(DateUtils.stringToDate(DateUtils.getSystemTime("yyyy-MM-dd") + " 23:59:59"));
}

PageInfo<WxCoupon> pageInfo = wxCouponService.findCouponData(wxCoupon,pageNum,pageSize);
for (WxCoupon coupon:pageInfo.getList()) {
PageInfo<WxCouponStatisVo> pageInfo = wxCouponService.findCouponData(wxCoupon,pageNum,pageSize);
for (WxCouponStatisVo coupon:pageInfo.getList()) {
if(coupon.getSumSubsidy() == null){
coupon.setSumSubsidy(0);
}


+ 7
- 147
mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java View File

@@ -1,5 +1,6 @@
package com.iformall.domain.po;

import com.iformall.domain.vo.WxCouponStatisVo;
import org.apache.commons.lang3.StringUtils;

import javax.persistence.Id;
@@ -162,148 +163,15 @@ public class WxCoupon implements Serializable {
@Transient
private String merchantParams;

//营销分析-----start-----
@Transient
private String xtime;
@Transient
private String xcount;
/**售出卡数量**/
@io.swagger.annotations.ApiModelProperty(value="售出卡数量",name="saleCount")
@Transient
private Long saleCount;
/**转增数量**/
@io.swagger.annotations.ApiModelProperty(value="转增数量",name="transferCount")
@Transient
private Long transferCount;
/**售出金额**/
@io.swagger.annotations.ApiModelProperty(value="售出金额",name="saleAmount")
@Transient
private Integer saleAmount;
/**核销数量**/
@io.swagger.annotations.ApiModelProperty(value="核销数量",name="sumPayment")
@Transient
private Integer sumPayment;
/**退款数量**/
@io.swagger.annotations.ApiModelProperty(value="退款数量",name="backpayCount")
@Transient
private Integer backpayCount;

/**砍价发起次数**/
@io.swagger.annotations.ApiModelProperty(value="砍价发起次数",name="pressSendCount")
@Transient
private Integer pressSendCount;
/**砍价成功次数**/
@io.swagger.annotations.ApiModelProperty(value="砍价成功次数",name="pressSuccCount")
@Transient
private Integer pressSuccCount;
/**砍价参与人数**/
@io.swagger.annotations.ApiModelProperty(value="砍价参与人数",name="pressJoinCount")
@Transient
private Integer pressJoinCount;

/**商场补贴**/
@io.swagger.annotations.ApiModelProperty(value="商场补贴",name="sumSubsidy")
@Transient
private Integer sumSubsidy;
/**核销比**/
@io.swagger.annotations.ApiModelProperty(value="核销比",name="paymentRate")
@Transient
private String paymentRate;

//营销分析-----end-----

public Integer getSumSubsidy() {
return sumSubsidy;
}

public void setSumSubsidy(Integer sumSubsidy) {
this.sumSubsidy = sumSubsidy;
}

public String getPaymentRate() {
return paymentRate;
}

public void setPaymentRate(String paymentRate) {
if(StringUtils.isNotBlank(paymentRate)) {
if ("0.00".equals(paymentRate)) {
this.paymentRate = "0%";
} else {
this.paymentRate = paymentRate + "%";
}
}
}

public Integer getPressSendCount() {
return pressSendCount;
}

public void setPressSendCount(Integer pressSendCount) {
this.pressSendCount = pressSendCount;
}

public Integer getPressSuccCount() {
return pressSuccCount;
}
//营销分析
private WxCouponStatisVo wxCouponStatisVo;

public void setPressSuccCount(Integer pressSuccCount) {
this.pressSuccCount = pressSuccCount;
public WxCouponStatisVo getWxCouponStatisVo() {
return wxCouponStatisVo;
}

public Integer getPressJoinCount() {
return pressJoinCount;
}

public void setPressJoinCount(Integer pressJoinCount) {
this.pressJoinCount = pressJoinCount;
}

public String getXcount() {
return xcount;
}

public void setXcount(String xcount) {
this.xcount = xcount;
}

public Integer getBackpayCount() {
return backpayCount;
}

public void setBackpayCount(Integer backpayCount) {
this.backpayCount = backpayCount;
}

public Long getSaleCount() {
return saleCount;
}

public void setSaleCount(Long saleCount) {
this.saleCount = saleCount;
}

public Long getTransferCount() {
return transferCount;
}

public void setTransferCount(Long transferCount) {
this.transferCount = transferCount;
}

public Integer getSaleAmount() {
return saleAmount;
}

public void setSaleAmount(Integer saleAmount) {
this.saleAmount = saleAmount;
}

public Integer getSumPayment() {
return sumPayment;
}

public void setSumPayment(Integer sumPayment) {
this.sumPayment = sumPayment;
public void setWxCouponStatisVo(WxCouponStatisVo wxCouponStatisVo) {
this.wxCouponStatisVo = wxCouponStatisVo;
}

public static long getSerialVersionUID() {
@@ -657,14 +525,6 @@ public class WxCoupon implements Serializable {
}
}

public String getXtime() {
return xtime;
}

public void setXtime(String xtime) {
this.xtime = xtime;
}

public List<Long> getNotinTypes() {
return notinTypes;
}


+ 3
- 1
mallinkService/src/main/java/com/iformall/domain/vo/WxCouponStatisVo.java View File

@@ -1,5 +1,7 @@
package com.iformall.domain.vo;

import com.iformall.domain.po.WxCoupon;

import javax.persistence.Transient;
import java.io.Serializable;

@@ -8,7 +10,7 @@ import java.io.Serializable;
* coupon 营销分析
* @date 2019/3/22 17:29
*/
public class WxCouponStatisVo implements Serializable {
public class WxCouponStatisVo extends WxCoupon {

@Transient
private String xtime;


+ 13
- 12
mallinkService/src/main/java/com/iformall/mapper/WxCouponMapper.java View File

@@ -3,13 +3,14 @@ package com.iformall.mapper;
import java.util.*;
import com.iformall.common.CommonMapper;
import com.iformall.domain.vo.WxCouponCVo;
import com.iformall.domain.vo.WxCouponStatisVo;
import org.apache.ibatis.annotations.Param;
import com.iformall.domain.po.WxCoupon;

public interface WxCouponMapper extends CommonMapper<WxCoupon, Long> {
List<WxCoupon> findPressData(WxCoupon wxCoupon);
List<WxCoupon> findCouponData(WxCoupon wxCoupon);
List<WxCoupon> findCountData(WxCoupon wxCoupon);
List<WxCouponStatisVo> findPressData(WxCoupon wxCoupon);
List<WxCouponStatisVo> findCouponData(WxCoupon wxCoupon);
List<WxCouponStatisVo> findCountData(WxCoupon wxCoupon);

List<WxCoupon> findList(WxCoupon wxCoupon);
List<WxCoupon> findCouponList(WxCoupon wxCoupon);
@@ -28,14 +29,14 @@ public interface WxCouponMapper extends CommonMapper<WxCoupon, Long> {
* @param wxCoupon
* @return
*/
List<WxCoupon> findSaleMoneyByDate(WxCoupon wxCoupon);
List<WxCouponStatisVo> findSaleMoneyByDate(WxCoupon wxCoupon);

/**
* 查询时间段内核销金额
* @param wxCoupon
* @return
*/
List<WxCoupon> findPaymentByDate(WxCoupon wxCoupon);
List<WxCouponStatisVo> findPaymentByDate(WxCoupon wxCoupon);

Long findSaleCardCount(WxCoupon wxCoupon);

@@ -45,22 +46,22 @@ public interface WxCouponMapper extends CommonMapper<WxCoupon, Long> {

//-------卷--------

List<WxCoupon> findCouponOrderCount(WxCoupon wxCoupon);
List<WxCouponStatisVo> findCouponOrderCount(WxCoupon wxCoupon);

List<WxCoupon> findCouponPaymentCount(WxCoupon wxCoupon);
List<WxCouponStatisVo> findCouponPaymentCount(WxCoupon wxCoupon);

List<WxCoupon> priceCouponSaleCount(WxCoupon wxCoupon);
List<WxCouponStatisVo> priceCouponSaleCount(WxCoupon wxCoupon);

List<WxCoupon> priceCouponPaymentCount(WxCoupon wxCoupon);
List<WxCouponStatisVo> priceCouponPaymentCount(WxCoupon wxCoupon);

String findSumPriceSaleMoney(WxCoupon wxCoupon);
String findSumPricePayMent(WxCoupon wxCoupon);
String findSumSubsidyMoney(WxCoupon wxCoupon);

//-------砍价--------
List<WxCoupon> pressSendHistory(WxCoupon wxCoupon);
List<WxCoupon> pressSuccHistory(WxCoupon wxCoupon);
List<WxCoupon> pressPaymentHistory(WxCoupon wxCoupon);
List<WxCouponStatisVo> pressSendHistory(WxCoupon wxCoupon);
List<WxCouponStatisVo> pressSuccHistory(WxCoupon wxCoupon);
List<WxCouponStatisVo> pressPaymentHistory(WxCoupon wxCoupon);
String pressSuccRate(WxCoupon wxCoupon);
Long sumJoin(WxCoupon wxCoupon);
}

+ 13
- 12
mallinkService/src/main/java/com/iformall/service/WxCouponService.java View File

@@ -5,6 +5,7 @@ import com.github.pagehelper.PageInfo;
import com.iformall.common.ResultData;
import com.iformall.domain.po.WxCoupon;
import com.iformall.domain.vo.WxCouponCVo;
import com.iformall.domain.vo.WxCouponStatisVo;

public interface WxCouponService {

@@ -26,14 +27,14 @@ public interface WxCouponService {
* @param record
* @return
*/
PageInfo<WxCoupon> findCountData(WxCoupon record,Integer pageNum, Integer pageSize);
PageInfo<WxCouponStatisVo> findCountData(WxCoupon record, Integer pageNum, Integer pageSize);

/**
* 卷列表,包括统计
* @param record
* @return
*/
PageInfo<WxCoupon> findCouponData(WxCoupon record,Integer pageNum, Integer pageSize);
PageInfo<WxCouponStatisVo> findCouponData(WxCoupon record,Integer pageNum, Integer pageSize);

/**
* 砍价列表,包括统计
@@ -42,7 +43,7 @@ public interface WxCouponService {
* @param pageSize
* @return
*/
PageInfo<WxCoupon> findPressData(WxCoupon record,Integer pageNum, Integer pageSize);
PageInfo<WxCouponStatisVo> findPressData(WxCoupon record,Integer pageNum, Integer pageSize);

/**
* 根据Id获得实体
@@ -74,14 +75,14 @@ public interface WxCouponService {
* @param wxCoupon
* @return
*/
List<WxCoupon> findSaleMoneyByDate(WxCoupon wxCoupon);
List<WxCouponStatisVo> findSaleMoneyByDate(WxCoupon wxCoupon);

/**
* 查询时间段内核销金额
* @param wxCoupon
* @return
*/
List<WxCoupon> findPaymentByDate(WxCoupon wxCoupon);
List<WxCouponStatisVo> findPaymentByDate(WxCoupon wxCoupon);

/**
* 查询售出卡数量
@@ -112,7 +113,7 @@ public interface WxCouponService {
* 卷购买数量
* @return
*/
List<WxCoupon> findCouponOrderCount(WxCoupon wxCoupon);
List<WxCouponStatisVo> findCouponOrderCount(WxCoupon wxCoupon);

/**
* 卷领取数量
@@ -124,19 +125,19 @@ public interface WxCouponService {
* 卷核销数量
* @return
*/
List<WxCoupon> findCouponPaymentCount(WxCoupon wxCoupon);
List<WxCouponStatisVo> findCouponPaymentCount(WxCoupon wxCoupon);

/**
* 有价卷销售数量
* @return
*/
List<WxCoupon> priceCouponSaleCount(WxCoupon wxCoupon);
List<WxCouponStatisVo> priceCouponSaleCount(WxCoupon wxCoupon);

/**
* 有价卷核销数量
* @return
*/
List<WxCoupon> priceCouponPaymentCount(WxCoupon wxCoupon);
List<WxCouponStatisVo> priceCouponPaymentCount(WxCoupon wxCoupon);

String findSumPriceSaleMoney(WxCoupon wxCoupon);
String findSumPricePayMent(WxCoupon wxCoupon);
@@ -147,17 +148,17 @@ public interface WxCouponService {
* 砍价发起次数走势
* @return
*/
List<WxCoupon> pressSendHistory(WxCoupon wxCoupon);
List<WxCouponStatisVo> pressSendHistory(WxCoupon wxCoupon);
/**
* 砍价成功次数走势
* @return
*/
List<WxCoupon> pressSuccHistory(WxCoupon wxCoupon);
List<WxCouponStatisVo> pressSuccHistory(WxCoupon wxCoupon);
/**
* 砍价核销数量走势
* @return
*/
List<WxCoupon> pressPaymentHistory(WxCoupon wxCoupon);
List<WxCouponStatisVo> pressPaymentHistory(WxCoupon wxCoupon);
/**
* 砍价转化率
* @return


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

@@ -1490,15 +1490,15 @@ public class WxChartServiceImpl implements WxChartDataService {
}

Map<String,Object> result = new HashedMap();
List<WxCoupon> saleMoneyList = wxCouponService.findSaleMoneyByDate(wxCoupon);
List<WxCoupon> paymentList = wxCouponService.findPaymentByDate(wxCoupon);
List<WxCouponStatisVo> saleMoneyList = wxCouponService.findSaleMoneyByDate(wxCoupon);
List<WxCouponStatisVo> paymentList = wxCouponService.findPaymentByDate(wxCoupon);
Map<String,String> saleMap = getDateMap(wxCoupon.getStartdate(),wxCoupon.getEnddate());
Map<String,String> payMentMap = getDateMap(wxCoupon.getStartdate(),wxCoupon.getEnddate());

for (WxCoupon coupon:saleMoneyList){
for (WxCouponStatisVo coupon:saleMoneyList){
saleMap.put(coupon.getXtime(),coupon.getXcount());
}
for (WxCoupon coupon:paymentList){
for (WxCouponStatisVo coupon:paymentList){
payMentMap.put(coupon.getXtime(),coupon.getXcount());
}
result.put("saleHistory",saleMap);
@@ -1533,26 +1533,26 @@ public class WxChartServiceImpl implements WxChartDataService {
Date endTime = DateUtils.stringToDate(enddate, "yyyy-MM-dd HH:mm:ss");
wxCoupon.setEnddate(endTime);
}
List<WxCoupon> orderCountList = wxCouponService.findCouponOrderCount(wxCoupon);
List<WxCoupon> paymentCountList = wxCouponService.findCouponPaymentCount(wxCoupon);
List<WxCoupon> priceCouponSaleCountList = wxCouponService.priceCouponSaleCount(wxCoupon);
List<WxCoupon> priceCouponPaymentCountList = wxCouponService.priceCouponPaymentCount(wxCoupon);
List<WxCouponStatisVo> orderCountList = wxCouponService.findCouponOrderCount(wxCoupon);
List<WxCouponStatisVo> paymentCountList = wxCouponService.findCouponPaymentCount(wxCoupon);
List<WxCouponStatisVo> priceCouponSaleCountList = wxCouponService.priceCouponSaleCount(wxCoupon);
List<WxCouponStatisVo> priceCouponPaymentCountList = wxCouponService.priceCouponPaymentCount(wxCoupon);

Map<String,String> orderCountMap = getDateMap(wxCoupon.getStartdate(),wxCoupon.getEnddate());
Map<String,String> paymentCountMap = getDateMap(wxCoupon.getStartdate(),wxCoupon.getEnddate());
Map<String,String> priceCouponSaleCountMap = getDateMap(wxCoupon.getStartdate(),wxCoupon.getEnddate());
Map<String,String> priceCouponPaymentCountMap = getDateMap(wxCoupon.getStartdate(),wxCoupon.getEnddate());

for (WxCoupon coupon:orderCountList){
for (WxCouponStatisVo coupon:orderCountList){
orderCountMap.put(coupon.getXtime(),coupon.getXcount());
}
for (WxCoupon coupon:paymentCountList){
for (WxCouponStatisVo coupon:paymentCountList){
paymentCountMap.put(coupon.getXtime(),coupon.getXcount());
}
for (WxCoupon coupon:priceCouponSaleCountList){
for (WxCouponStatisVo coupon:priceCouponSaleCountList){
priceCouponSaleCountMap.put(coupon.getXtime(),coupon.getXcount());
}
for (WxCoupon coupon:priceCouponPaymentCountList){
for (WxCouponStatisVo coupon:priceCouponPaymentCountList){
priceCouponPaymentCountMap.put(coupon.getXtime(),coupon.getXcount());
}
result.put("orderCountList",orderCountMap);
@@ -1590,21 +1590,21 @@ public class WxChartServiceImpl implements WxChartDataService {
Date endTime = DateUtils.stringToDate(enddate, "yyyy-MM-dd HH:mm:ss");
wxCoupon.setEnddate(endTime);
}
List<WxCoupon> pressSendHistory = wxCouponService.pressSendHistory(wxCoupon);
List<WxCoupon> pressSuccHistory = wxCouponService.pressSuccHistory(wxCoupon);
List<WxCoupon> pressPaymentHistory = wxCouponService.pressPaymentHistory(wxCoupon);
List<WxCouponStatisVo> pressSendHistory = wxCouponService.pressSendHistory(wxCoupon);
List<WxCouponStatisVo> pressSuccHistory = wxCouponService.pressSuccHistory(wxCoupon);
List<WxCouponStatisVo> pressPaymentHistory = wxCouponService.pressPaymentHistory(wxCoupon);

Map<String,String> pressSendHistoryMap = getDateMap(wxCoupon.getStartdate(),wxCoupon.getEnddate());
Map<String,String> pressSuccHistoryMap = getDateMap(wxCoupon.getStartdate(),wxCoupon.getEnddate());
Map<String,String> pressPaymentHistoryMap = getDateMap(wxCoupon.getStartdate(),wxCoupon.getEnddate());

for (WxCoupon coupon:pressSendHistory){
for (WxCouponStatisVo coupon:pressSendHistory){
pressSendHistoryMap.put(coupon.getXtime(),coupon.getXcount());
}
for (WxCoupon coupon:pressSuccHistory){
for (WxCouponStatisVo coupon:pressSuccHistory){
pressSuccHistoryMap.put(coupon.getXtime(),coupon.getXcount());
}
for (WxCoupon coupon:pressPaymentHistory){
for (WxCouponStatisVo coupon:pressPaymentHistory){
pressPaymentHistoryMap.put(coupon.getXtime(),coupon.getXcount());
}
result.put("pressSendHistory",pressSendHistoryMap);


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

@@ -14,6 +14,7 @@ import com.iformall.domain.po.WxCouponChannel;
import com.iformall.domain.po.WxCouponMerchant;
import com.iformall.domain.po.WxScreenAd;
import com.iformall.domain.vo.WxCouponCVo;
import com.iformall.domain.vo.WxCouponStatisVo;
import com.iformall.domain.vo.WxMerchantVo;
import com.iformall.enums.*;
import com.iformall.mapper.WxCouponChannelMapper;
@@ -120,7 +121,7 @@ public class WxCouponServiceImpl implements WxCouponService {


@Override
public PageInfo<WxCoupon> findCountData(WxCoupon record,Integer pageNum, Integer pageSize) {
public PageInfo<WxCouponStatisVo> findCountData(WxCoupon record,Integer pageNum, Integer pageSize) {
return PageHelper.startPage(pageNum, pageSize).doSelectPageInfo(() -> wxCouponMapper.findCountData(record));
}

@@ -314,12 +315,12 @@ public class WxCouponServiceImpl implements WxCouponService {
}

@Override
public List<WxCoupon> findSaleMoneyByDate(WxCoupon wxCoupon) {
public List<WxCouponStatisVo> findSaleMoneyByDate(WxCoupon wxCoupon) {
return wxCouponMapper.findSaleMoneyByDate(wxCoupon);
}

@Override
public List<WxCoupon> findPaymentByDate(WxCoupon wxCoupon) {
public List<WxCouponStatisVo> findPaymentByDate(WxCoupon wxCoupon) {
return wxCouponMapper.findPaymentByDate(wxCoupon);
}

@@ -342,28 +343,28 @@ public class WxCouponServiceImpl implements WxCouponService {
}

@Override
public PageInfo<WxCoupon> findCouponData(WxCoupon record, Integer pageNum, Integer pageSize) {
public PageInfo<WxCouponStatisVo> findCouponData(WxCoupon record, Integer pageNum, Integer pageSize) {
return PageHelper.startPage(pageNum, pageSize).doSelectPageInfo(() -> wxCouponMapper.findCouponData(record));
}

@Override
public List<WxCoupon> findCouponOrderCount(WxCoupon wxCoupon) {
public List<WxCouponStatisVo> findCouponOrderCount(WxCoupon wxCoupon) {
return wxCouponMapper.findCouponOrderCount(wxCoupon);
}


@Override
public List<WxCoupon> findCouponPaymentCount(WxCoupon wxCoupon) {
public List<WxCouponStatisVo> findCouponPaymentCount(WxCoupon wxCoupon) {
return wxCouponMapper.findCouponPaymentCount(wxCoupon);
}

@Override
public List<WxCoupon> priceCouponSaleCount(WxCoupon wxCoupon) {
public List<WxCouponStatisVo> priceCouponSaleCount(WxCoupon wxCoupon) {
return wxCouponMapper.priceCouponSaleCount(wxCoupon);
}

@Override
public List<WxCoupon> priceCouponPaymentCount(WxCoupon wxCoupon) {
public List<WxCouponStatisVo> priceCouponPaymentCount(WxCoupon wxCoupon) {
return wxCouponMapper.priceCouponPaymentCount(wxCoupon);
}

@@ -386,22 +387,22 @@ public class WxCouponServiceImpl implements WxCouponService {
}

@Override
public PageInfo<WxCoupon> findPressData(WxCoupon record, Integer pageNum, Integer pageSize) {
public PageInfo<WxCouponStatisVo> findPressData(WxCoupon record, Integer pageNum, Integer pageSize) {
return PageHelper.startPage(pageNum, pageSize).doSelectPageInfo(() -> wxCouponMapper.findPressData(record));
}

@Override
public List<WxCoupon> pressSendHistory(WxCoupon wxCoupon) {
public List<WxCouponStatisVo> pressSendHistory(WxCoupon wxCoupon) {
return wxCouponMapper.pressSendHistory(wxCoupon);
}

@Override
public List<WxCoupon> pressSuccHistory(WxCoupon wxCoupon) {
public List<WxCouponStatisVo> pressSuccHistory(WxCoupon wxCoupon) {
return wxCouponMapper.pressSuccHistory(wxCoupon);
}

@Override
public List<WxCoupon> pressPaymentHistory(WxCoupon wxCoupon) {
public List<WxCouponStatisVo> pressPaymentHistory(WxCoupon wxCoupon) {
return wxCouponMapper.pressPaymentHistory(wxCoupon);
}



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

@@ -33,18 +33,48 @@
<result column="press_limit_hours" jdbcType="INTEGER" property="pressLimitHours"/>
<result column="auto_refund" jdbcType="INTEGER" property="autoRefund"/>

</resultMap>
<resultMap id="statisMap" type="com.iformall.domain.vo.WxCouponStatisVo">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
<result column="type" jdbcType="INTEGER" property="type"/>
<result column="cover_img" jdbcType="VARCHAR" property="coverImg"/>
<result column="title" jdbcType="VARCHAR" property="title"/>
<result column="sub_title" jdbcType="VARCHAR" property="subTitle"/>
<result column="sale_price" jdbcType="INTEGER" property="salePrice"/>
<result column="use_price" jdbcType="INTEGER" property="usePrice"/>
<result column="use_limit_quantity" jdbcType="INTEGER" property="useLimitQuantity"/>
<result column="send_type" jdbcType="INTEGER" property="sendType"/>
<result column="valid_type" jdbcType="INTEGER" property="validType"/>
<result column="valid_start_date" jdbcType="TIMESTAMP" property="validStartDate"/>
<result column="valid_end_date" jdbcType="TIMESTAMP" property="validEndDate"/>
<result column="valid_days" jdbcType="INTEGER" property="validDays"/>
<result column="detail" jdbcType="VARCHAR" property="detail"/>
<result column="price" jdbcType="INTEGER" property="price"/>
<result column="unit" jdbcType="INTEGER" property="unit"/>
<result column="remain_inventory" jdbcType="INTEGER" property="remainInventory"/>
<result column="inventory" jdbcType="INTEGER" property="inventory"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="status" jdbcType="INTEGER" property="status"/>
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
<result column="business" jdbcType="INTEGER" property="business"/>
<result column="support_transfer" jdbcType="INTEGER" property="supportTransfer"/>
<result column="subsidy_type" jdbcType="INTEGER" property="subsidyType"/>
<result column="subsidy_num" jdbcType="INTEGER" property="subsidyNum"/>
<result column="press_limit_num" jdbcType="INTEGER" property="pressLimitNum"/>
<result column="press_limit_hours" jdbcType="INTEGER" property="pressLimitHours"/>
<result column="auto_refund" jdbcType="INTEGER" property="autoRefund"/>

<result column="sale_count" property="saleCount"/>
<result column="transfer_count" property="transferCount"/>
<result column="sale_amount" property="saleAmount"/>
<result column="sum_payment" property="sumPayment"/>

<result column="press_count" property="pressSendCount"/>
<result column="press_succ_count" property="pressSuccCount"/>
<result column="join_count" property="pressJoinCount"/>
<result column="sum_subsidy" property="sumSubsidy"/>
<result column="payment_rate" property="paymentRate"/>


</resultMap>

<sql id="allColumns">
@@ -422,7 +452,7 @@
and m.status = 1) = 0
</update>

<select id="findSaleMoneyByDate" parameterType="com.iformall.domain.po.WxCoupon" resultType="com.iformall.domain.po.WxCoupon">
<select id="findSaleMoneyByDate" parameterType="com.iformall.domain.po.WxCoupon" resultType="com.iformall.domain.vo.WxCouponStatisVo">
select DATE_FORMAT(ci.create_date,'%Y-%m-%d') xtime,sum(round(ci.sale_amount/100,2)) xcount from wx_card_info ci
left join wx_coupon c on c.id = ci.coupon_id
where c.type = 100
@@ -430,7 +460,7 @@
group by xtime
</select>

<select id="findPaymentByDate" parameterType="com.iformall.domain.po.WxCoupon" resultType="com.iformall.domain.po.WxCoupon">
<select id="findPaymentByDate" parameterType="com.iformall.domain.po.WxCoupon" resultType="com.iformall.domain.vo.WxCouponStatisVo">
select DATE_FORMAT(wcs.create_date,'%Y-%m-%d') xtime,sum(round(wcs.real_payment/100,2)) xcount from wx_card_info ci
left join wx_coupon c on c.id = ci.coupon_id
left join wx_card_spend wcs on wcs.card_id = ci.id
@@ -462,7 +492,7 @@
where c.type = 100 and c.create_date between #{startdate} and #{enddate}
</select>

<select id="findCountData" parameterType="com.iformall.domain.po.WxCoupon" resultMap="BaseResultMap">
<select id="findCountData" parameterType="com.iformall.domain.po.WxCoupon" resultMap="statisMap">
select c.*,
(select count(wco.id) from wx_coupon wc
left join wx_coupon_order wco on wc.id = wco.coupon_id
@@ -497,7 +527,7 @@
order by c.status asc,c.create_date desc
</select>

<select id="findCouponData" parameterType="com.iformall.domain.po.WxCoupon" resultMap="BaseResultMap">
<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,
@@ -523,7 +553,7 @@
order by c.status asc,c.create_date desc
</select>

<select id="findPressData" parameterType="com.iformall.domain.po.WxCoupon" resultMap="BaseResultMap">
<select id="findPressData" parameterType="com.iformall.domain.po.WxCoupon" resultMap="statisMap">
select c.*
,(select count(wop.id) from wx_coupon wc
left join wx_order wo on wo.product_id = wc.id
@@ -577,7 +607,7 @@
</select>
-->

<select id="findCouponOrderCount" parameterType="com.iformall.domain.po.WxCoupon" resultType="com.iformall.domain.po.WxCoupon">
<select id="findCouponOrderCount" parameterType="com.iformall.domain.po.WxCoupon" resultType="com.iformall.domain.vo.WxCouponStatisVo">
select DATE_FORMAT(wco.create_date,'%Y-%m-%d') xtime,count(wco.id) xcount from wx_coupon c
left join wx_coupon_order wco on c.id = wco.coupon_id
where c.type not in(8,9,100)
@@ -587,7 +617,7 @@



<select id="findCouponPaymentCount" parameterType="com.iformall.domain.po.WxCoupon" resultType="com.iformall.domain.po.WxCoupon">
<select id="findCouponPaymentCount" parameterType="com.iformall.domain.po.WxCoupon" resultType="com.iformall.domain.vo.WxCouponStatisVo">
select DATE_FORMAT(wco.create_date,'%Y-%m-%d') xtime,count(wco.id) xcount from wx_coupon c,wx_coupon_order wco
where c.type not in(8,9,100)
and wco.coupon_id = c.id and wco.coupon_order_status = 1
@@ -595,7 +625,7 @@
group by xtime
</select>

<select id="priceCouponSaleCount" parameterType="com.iformall.domain.po.WxCoupon" resultType="com.iformall.domain.po.WxCoupon">
<select id="priceCouponSaleCount" parameterType="com.iformall.domain.po.WxCoupon" resultType="com.iformall.domain.vo.WxCouponStatisVo">
select DATE_FORMAT(wco.create_date,'%Y-%m-%d') xtime,count(wco.id) xcount from wx_coupon c,wx_coupon_order wco
where c.type not in(8,9,100)
and wco.coupon_id = c.id and wco.coupon_price > 0
@@ -603,7 +633,7 @@
group by xtime
</select>

<select id="priceCouponPaymentCount" parameterType="com.iformall.domain.po.WxCoupon" resultType="com.iformall.domain.po.WxCoupon">
<select id="priceCouponPaymentCount" parameterType="com.iformall.domain.po.WxCoupon" resultType="com.iformall.domain.vo.WxCouponStatisVo">
select DATE_FORMAT(wco.create_date,'%Y-%m-%d') xtime,count(wco.id) xcount from wx_coupon c,wx_coupon_order wco
where c.type not in(8,9,100)
and wco.coupon_id = c.id and wco.coupon_order_status = 1 and wco.coupon_price > 0
@@ -633,7 +663,7 @@


<!--砍价-->
<select id="pressSendHistory" parameterType="com.iformall.domain.po.WxCoupon" resultType="com.iformall.domain.po.WxCoupon">
<select id="pressSendHistory" parameterType="com.iformall.domain.po.WxCoupon" resultType="com.iformall.domain.vo.WxCouponStatisVo">
select DATE_FORMAT(wop.create_date,'%Y-%m-%d') xtime,count(wop.id) xcount 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
@@ -641,14 +671,14 @@
wop.create_date between #{startdate} and #{enddate}
group by xtime
</select>
<select id="pressSuccHistory" parameterType="com.iformall.domain.po.WxCoupon" resultType="com.iformall.domain.po.WxCoupon">
<select id="pressSuccHistory" parameterType="com.iformall.domain.po.WxCoupon" resultType="com.iformall.domain.vo.WxCouponStatisVo">
select DATE_FORMAT(wo.create_date,'%Y-%m-%d') xtime,count(wo.id) xcount from wx_coupon wc
left join wx_order wo on wo.product_id = wc.id
where wc.type = 8 and wo.order_status = 1
and wo.create_date between #{startdate} and #{enddate}
group by xtime
</select>
<select id="pressPaymentHistory" parameterType="com.iformall.domain.po.WxCoupon" resultType="com.iformall.domain.po.WxCoupon">
<select id="pressPaymentHistory" parameterType="com.iformall.domain.po.WxCoupon" resultType="com.iformall.domain.vo.WxCouponStatisVo">
select DATE_FORMAT(wco.create_date,'%Y-%m-%d') xtime,count(wco.id) xcount from wx_coupon wc
left join wx_coupon_order wco on wco.coupon_id = wc.id
where wc.type = 8 and wco.coupon_order_status = 1


Loading…
Cancel
Save