Parcourir la source

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

release_toaliyun_real
luozukai il y a 7 ans
Parent
révision
26567de47b
4 fichiers modifiés avec 10 ajouts et 24 suppressions
  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 Voir le fichier

@@ -1,32 +1,21 @@
package com.iformall.controller; 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.Result;
import com.iformall.common.ResultData; import com.iformall.common.ResultData;
import com.iformall.domain.po.WxCoupon; 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.enums.*;
import com.iformall.service.WxCouponChannelService;
import com.iformall.service.WxCouponService; import com.iformall.service.WxCouponService;
import com.iformall.service.WxMerchantService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.commons.collections.map.HashedMap; import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;

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


@RestController @RestController
@RequestMapping("wxCoupon") @RequestMapping("wxCoupon")


+ 6
- 8
mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java Voir le fichier

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


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


/**租户ID**/ /**租户ID**/
@io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") @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 Voir le fichier

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


public interface WxCouponService { public interface WxCouponService {


+ 4
- 4
mallinkService/src/main/resources/mapper/WxCouponMapper.xml Voir le fichier

@@ -679,23 +679,23 @@
</update> </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.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 left join wx_coupon c on c.id = ci.coupon_id
where ci.create_date between #{startdate} and #{enddate} where ci.create_date between #{startdate} and #{enddate}
<if test="title != null"> <if test="title != null">
and c.title like concat('%', #{title},'%') and c.title like concat('%', #{title},'%')
</if> </if>
group by xTime
group by xtime
</select> </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.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_coupon c on c.id = ci.coupon_id
left join wx_card_spend wcs on wcs.card_id = ci.id left join wx_card_spend wcs on wcs.card_id = ci.id
where ci.create_date between #{startdate} and #{enddate} where ci.create_date between #{startdate} and #{enddate}
<if test="title != null"> <if test="title != null">
and c.title like concat('%', #{title},'%') and c.title like concat('%', #{title},'%')
</if> </if>
group by xTime
group by xtime
</select> </select>
</mapper> </mapper>

Chargement…
Annuler
Enregistrer