|
|
|
@@ -3,6 +3,8 @@ package com.iformall.controller; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.domain.po.*; |
|
|
|
import com.iformall.enums.EnumCouponChannelActivityStatus; |
|
|
|
import com.iformall.enums.EnumWxTopicStatus; |
|
|
|
import com.iformall.service.*; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
|
@@ -12,6 +14,8 @@ import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
import java.util.Date; |
|
|
|
|
|
|
|
@RestController |
|
|
|
@RequestMapping("topic") |
|
|
|
@Api(description = "专题相关接口") |
|
|
|
@@ -29,6 +33,13 @@ public class WxTopicController extends BaseController { |
|
|
|
String tenantId = getTenantId(); |
|
|
|
wxTopic.setTenantId(tenantId); |
|
|
|
PageInfo<WxTopic> page = wxTopicService.listAsPage(wxTopic, pageNum, pageSize); |
|
|
|
|
|
|
|
Date now = new Date(); |
|
|
|
page.getList().stream().forEach(cc->{ |
|
|
|
if (cc.getEndTime()!=null && now.getTime() > cc.getEndTime().getTime()) { |
|
|
|
cc.setStatus(EnumWxTopicStatus.INVAILD.getCode()); |
|
|
|
} |
|
|
|
}); |
|
|
|
return new ResultData(page); |
|
|
|
} |
|
|
|
|
|
|
|
|