|
|
|
@@ -1,7 +1,9 @@ |
|
|
|
package com.simple.controller; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.simple.domain.dto.WxCouponChannelDto; |
|
|
|
import com.simple.domain.po.MallUserInfo; |
|
|
|
import com.simple.domain.po.WxChannel; |
|
|
|
import com.simple.domain.vo.WxCouponChannelVo; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import org.apache.log4j.Logger; |
|
|
|
@@ -18,6 +20,7 @@ import io.swagger.annotations.ApiImplicitParam; |
|
|
|
import io.swagger.annotations.ApiImplicitParams; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
@@ -99,6 +102,26 @@ public class WxCouponChannelController extends BaseController |
|
|
|
return wxCouponChannelService.addBatch(ids,channelId,user.getTenantId(),wxCouponChannelDto.getBeginTime(),wxCouponChannelDto.getEndTime()); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("根据id查询接口") |
|
|
|
@GetMapping("/findChannelByCouponId") |
|
|
|
@ApiImplicitParam(name="id",value="id",dataType="Long", paramType = "query",required=true) |
|
|
|
public ResultData findChannelByCouponId(Long id) { |
|
|
|
List<Integer> channellist = new ArrayList<>(); |
|
|
|
WxCouponChannel wxCouponChannel = new WxCouponChannel(); |
|
|
|
wxCouponChannel.setTenantId(getTenantId()); |
|
|
|
wxCouponChannel.setStatus(0); |
|
|
|
wxCouponChannel.setCouponId(id); |
|
|
|
List<WxCouponChannel> list = wxCouponChannelService.listAsPage(wxCouponChannel,1,5).getList(); |
|
|
|
if(list.isEmpty()){ |
|
|
|
return new ResultData(Result.SUCCESS,"查询成功", ""); |
|
|
|
} |
|
|
|
for (WxCouponChannel temp:list) { |
|
|
|
channellist.add(temp.getTargetAd()); |
|
|
|
} |
|
|
|
return new ResultData(Result.SUCCESS,"查询成功", JSON.toJSONString(channellist)); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|