| @@ -596,6 +596,19 @@ public class WxCouponController extends BaseController { | |||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | ||||
| wxCoupon.updateTenantInfo(tenantEntity); | wxCoupon.updateTenantInfo(tenantEntity); | ||||
| wxCoupon.setSourceType(EnumCouponSourceType.COUPONSource_Admin.getCode()); | wxCoupon.setSourceType(EnumCouponSourceType.COUPONSource_Admin.getCode()); | ||||
| //根据上架时间查询券 | |||||
| WxCouponChannel couponChannelQ = new WxCouponChannel(); | |||||
| couponChannelQ.updateTenantInfo(tenantEntity); | |||||
| couponChannelQ.setStartdate(wxCoupon.getStartdate()); | |||||
| couponChannelQ.setEnddate(wxCoupon.getEnddate()); | |||||
| List<Long> couponIds = wxCouponChannelService.findCouponIdList(couponChannelQ); | |||||
| if (null != couponIds && couponIds.size() > 0 ) { | |||||
| wxCoupon.setIds(couponIds); | |||||
| }else { | |||||
| wxCoupon.setId(-1L); | |||||
| } | |||||
| PageInfo<WxCouponStatisVo> pages = wxCouponService.findPressData(wxCoupon,tenantEntitys,pageNum,pageSize); | PageInfo<WxCouponStatisVo> pages = wxCouponService.findPressData(wxCoupon,tenantEntitys,pageNum,pageSize); | ||||
| return new ResultData(pages); | return new ResultData(pages); | ||||
| } | } | ||||
| @@ -5,8 +5,10 @@ import com.iformall.annotation.SystemControllerLog; | |||||
| import com.iformall.annotation.TenantIgnore; | import com.iformall.annotation.TenantIgnore; | ||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.controller.base.BaseController; | import com.iformall.controller.base.BaseController; | ||||
| import com.iformall.domain.po.WxCouponChannel; | |||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import com.iformall.domain.vo.WxOrderGroupMarketing; | import com.iformall.domain.vo.WxOrderGroupMarketing; | ||||
| import com.iformall.service.WxCouponChannelService; | |||||
| import com.iformall.service.WxMallService; | import com.iformall.service.WxMallService; | ||||
| import com.iformall.service.WxOrderGroupService; | import com.iformall.service.WxOrderGroupService; | ||||
| import io.swagger.annotations.Api; | import io.swagger.annotations.Api; | ||||
| @@ -36,6 +38,8 @@ public class WxOrderGroupController extends BaseController { | |||||
| WxOrderGroupService wxOrderGroupService; | WxOrderGroupService wxOrderGroupService; | ||||
| @Autowired | @Autowired | ||||
| WxMallService wxMallService; | WxMallService wxMallService; | ||||
| @Autowired | |||||
| private WxCouponChannelService wxCouponChannelService; | |||||
| @TenantIgnore | @TenantIgnore | ||||
| @ApiOperation(value = "拼团营销分析") | @ApiOperation(value = "拼团营销分析") | ||||
| @@ -50,6 +54,17 @@ public class WxOrderGroupController extends BaseController { | |||||
| TenantEntity tenantEntity = getTenantInfo(); | TenantEntity tenantEntity = getTenantInfo(); | ||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | ||||
| wxOrderGroupMarketing.updateTenantInfo(tenantEntity); | wxOrderGroupMarketing.updateTenantInfo(tenantEntity); | ||||
| WxCouponChannel couponChannelQ = new WxCouponChannel(); | |||||
| couponChannelQ.updateTenantInfo(tenantEntity); | |||||
| couponChannelQ.setStartdate(wxOrderGroupMarketing.getStartdate()); | |||||
| couponChannelQ.setEnddate(wxOrderGroupMarketing.getEnddate()); | |||||
| List<Long> couponIds = wxCouponChannelService.findCouponIdList(couponChannelQ); | |||||
| if (null != couponIds && couponIds.size() > 0 ) { | |||||
| wxOrderGroupMarketing.setCouponIdList(couponIds); | |||||
| }else { | |||||
| wxOrderGroupMarketing.setCouponId("-1"); | |||||
| } | |||||
| final PageInfo<WxOrderGroupMarketing> page = wxOrderGroupService.queryOrderGroupMarketingList(wxOrderGroupMarketing,tenantEntitys, pageNum, pageSize); | final PageInfo<WxOrderGroupMarketing> page = wxOrderGroupService.queryOrderGroupMarketingList(wxOrderGroupMarketing,tenantEntitys, pageNum, pageSize); | ||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @@ -1,5 +1,9 @@ | |||||
| package com.iformall.domain.vo; | package com.iformall.domain.vo; | ||||
| import java.util.Date; | |||||
| import java.util.List; | |||||
| import com.baomidou.mybatisplus.annotation.TableField; | |||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import cn.afterturn.easypoi.excel.annotation.Excel; | import cn.afterturn.easypoi.excel.annotation.Excel; | ||||
| @@ -44,5 +48,16 @@ public class WxOrderGroupMarketing extends TenantEntity { | |||||
| @Excel(name="参与人次",width = 20,orderNum = "10") | @Excel(name="参与人次",width = 20,orderNum = "10") | ||||
| private String totalPeople; | private String totalPeople; | ||||
| @TableField(exist = false) | |||||
| @io.swagger.annotations.ApiModelProperty(value="查询-起始时间",name="startdate") | |||||
| private Date startdate; | |||||
| @TableField(exist = false) | |||||
| @io.swagger.annotations.ApiModelProperty(value="查询-结束时间",name="enddate") | |||||
| private Date enddate; | |||||
| @TableField(exist = false) | |||||
| private List<Long> couponIdList; | |||||
| } | } | ||||
| @@ -234,7 +234,11 @@ public class WxChartServiceImpl implements WxChartDataService { | |||||
| String tenantId = paramsMap.get("tenantId"); | String tenantId = paramsMap.get("tenantId"); | ||||
| String parentTenantId = paramsMap.get("parentTenantId"); | String parentTenantId = paramsMap.get("parentTenantId"); | ||||
| Integer chart = Integer.valueOf(paramsMap.get("chart")); | Integer chart = Integer.valueOf(paramsMap.get("chart")); | ||||
| Integer chartByArea = Integer.valueOf(paramsMap.get("chartByArea")); | |||||
| String _chartByAreaStr = paramsMap.get("chartByArea"); | |||||
| Integer chartByArea = null; | |||||
| if (!StringUtils.isBlank(_chartByAreaStr)){ | |||||
| chartByArea = Integer.valueOf(_chartByAreaStr); | |||||
| } | |||||
| String startdate = paramsMap.get("startdate"); | String startdate = paramsMap.get("startdate"); | ||||
| String enddate = paramsMap.get("enddate"); | String enddate = paramsMap.get("enddate"); | ||||
| @@ -147,6 +147,14 @@ | |||||
| <if test=" null != marketing.couponId and '' != marketing.couponId"> | <if test=" null != marketing.couponId and '' != marketing.couponId"> | ||||
| and c.coupon_id=#{marketing.couponId} | and c.coupon_id=#{marketing.couponId} | ||||
| </if> | </if> | ||||
| <if test=" null != marketing.couponIdList "> | |||||
| and c.coupon_id in | |||||
| <foreach collection="marketing.couponIdList" index="index" item="cidItem" open="(" separator="," close=")"> | |||||
| #{cidItem} | |||||
| </foreach> | |||||
| </if> | |||||
| <if test=" null != marketing.title and '' != marketing.title"> | <if test=" null != marketing.title and '' != marketing.title"> | ||||
| and c.title like concat('%',#{marketing.title},'%') | and c.title like concat('%',#{marketing.title},'%') | ||||
| </if> | </if> | ||||