|
|
|
@@ -3,7 +3,6 @@ package com.iformall.controller; |
|
|
|
import com.iformall.common.ErrorCode; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.domain.po.WxCoupon; |
|
|
|
import com.iformall.domain.vo.MarkingSceneDataReportVo; |
|
|
|
import com.iformall.domain.vo.WxCouponCVo; |
|
|
|
import com.iformall.enums.EnumCouponChannelActivityStatus; |
|
|
|
import com.iformall.enums.EnumCouponChannelType; |
|
|
|
@@ -13,19 +12,13 @@ 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.GetMapping; |
|
|
|
import org.springframework.web.bind.annotation.ModelAttribute; |
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.util.*; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
import java.util.Date; |
|
|
|
|
|
|
|
@RestController |
|
|
|
@RequestMapping("/api/wxCoupon") |
|
|
|
@@ -74,4 +67,25 @@ public class WxCouponController extends BaseController { |
|
|
|
|
|
|
|
return new ResultData(wxCouponCVo); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("分页列表接口") |
|
|
|
@GetMapping("list") |
|
|
|
@ApiImplicitParams({ |
|
|
|
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), |
|
|
|
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) |
|
|
|
public ResultData list(@ModelAttribute WxCoupon wxCoupon, Integer pageNum, Integer pageSize) { |
|
|
|
logger.debug("[" + getIpAddr() + "] WxCouponController::list"); |
|
|
|
if (wxCoupon == null) wxCoupon = new WxCoupon(); |
|
|
|
wxCoupon.setTenantId(getTenantId()); |
|
|
|
return wxCouponService.list(wxCoupon, pageNum, pageSize); //全列表 |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("根据id查询接口") |
|
|
|
@GetMapping("/findById") |
|
|
|
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) |
|
|
|
public ResultData findById(@RequestParam Long id) { |
|
|
|
logger.debug("[" + getIpAddr() + "] WxCouponController::findById");; |
|
|
|
return new ResultData(wxCouponService.getById(id)); |
|
|
|
} |
|
|
|
|
|
|
|
} |