Просмотр исходного кода

[营销分析][添加][卡营销列表]

release_toaliyun_real
luozukai 7 лет назад
Родитель
Сommit
26567de47b
4 измененных файлов: 10 добавлений и 24 удалений
  1. +0
    -11
      mallinkAdmin/src/main/java/com/iformall/controller/WxCouponController.java
  2. +6
    -8
      mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java
  3. +0
    -1
      mallinkService/src/main/java/com/iformall/service/WxCouponService.java
  4. +4
    -4
      mallinkService/src/main/resources/mapper/WxCouponMapper.xml

+ 0
- 11
mallinkAdmin/src/main/java/com/iformall/controller/WxCouponController.java Просмотреть файл

@@ -1,32 +1,21 @@
package com.iformall.controller;

import com.alibaba.fastjson.JSON;
import com.github.pagehelper.PageInfo;
import com.iformall.common.ErrorCode;
import com.iformall.common.Result;
import com.iformall.common.ResultData;
import com.iformall.domain.po.WxCoupon;
import com.iformall.domain.po.WxCouponChannel;
import com.iformall.domain.po.WxMerchant;
import com.iformall.enums.*;
import com.iformall.service.WxCouponChannelService;
import com.iformall.service.WxCouponService;
import com.iformall.service.WxMerchantService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.text.DateFormatSymbols;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;

@RestController
@RequestMapping("wxCoupon")


+ 6
- 8
mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java Просмотреть файл

@@ -66,8 +66,8 @@ public class WxCoupon implements Serializable {
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date enddate;

@Transient
private String xTime;
@Transient
private String xtime;

/**租户ID**/
@io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId")
@@ -562,13 +562,11 @@ public class WxCoupon implements Serializable {
}
}

public String getxTime() {
return xTime;
public String getXtime() {
return xtime;
}

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


}

+ 0
- 1
mallinkService/src/main/java/com/iformall/service/WxCouponService.java Просмотреть файл

@@ -4,7 +4,6 @@ import java.util.*;
import com.github.pagehelper.PageInfo;
import com.iformall.common.ResultData;
import com.iformall.domain.po.WxCoupon;
import com.iformall.domain.po.WxCouponChannel;
import com.iformall.domain.vo.WxCouponCVo;

public interface WxCouponService {


+ 4
- 4
mallinkService/src/main/resources/mapper/WxCouponMapper.xml Просмотреть файл

@@ -679,23 +679,23 @@
</update>

<select id="findSaleMoneyByDate" parameterType="com.iformall.domain.po.WxCoupon" resultType="com.iformall.domain.po.WxCoupon">
select DATE_FORMAT(ci.create_date,'%Y-%m-%d') xTime,sum(ci.sale_amount) sale_amount from wx_card_info ci
select DATE_FORMAT(ci.create_date,'%Y-%m-%d') xtime,sum(ci.sale_amount) sale_amount from wx_card_info ci
left join wx_coupon c on c.id = ci.coupon_id
where ci.create_date between #{startdate} and #{enddate}
<if test="title != null">
and c.title like concat('%', #{title},'%')
</if>
group by xTime
group by xtime
</select>

<select id="findPaymentByDate" parameterType="com.iformall.domain.po.WxCoupon" resultType="com.iformall.domain.po.WxCoupon">
select DATE_FORMAT(ci.create_date,'%Y-%m-%d') xTime,sum(wcs.real_payment) sum_payment from wx_card_info ci
select DATE_FORMAT(ci.create_date,'%Y-%m-%d') xtime,sum(wcs.real_payment) sum_payment 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
where ci.create_date between #{startdate} and #{enddate}
<if test="title != null">
and c.title like concat('%', #{title},'%')
</if>
group by xTime
group by xtime
</select>
</mapper>

Загрузка…
Отмена
Сохранить