|
|
|
@@ -1,16 +1,20 @@ |
|
|
|
package com.iformall.controller; |
|
|
|
|
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import com.iformall.common.Result; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.domain.po.WxActivity; |
|
|
|
import com.iformall.domain.po.base.BaseEntity; |
|
|
|
import com.iformall.service.WxActivityService; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
|
import io.swagger.annotations.ApiImplicitParams; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
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; |
|
|
|
|
|
|
|
@@ -30,6 +34,22 @@ public class WxActivityController extends BaseController { |
|
|
|
@Autowired |
|
|
|
private WxActivityService wxActivityService; |
|
|
|
|
|
|
|
@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 WxActivity wxActivity, Integer pageNum, Integer pageSize) { |
|
|
|
logger.debug("[" + getIpAddr() + "] WxActivityController::list"); |
|
|
|
if (null == wxActivity) wxActivity = new WxActivity(); |
|
|
|
if (wxActivity.getStatus() != null && wxActivity.getStatus() == -1) { |
|
|
|
wxActivity.setStatus(null); |
|
|
|
} |
|
|
|
wxActivity.updateTenantInfo(getTenantInfo()); |
|
|
|
wxActivity.setSortColumns(BaseEntity.SortField.CreateTime_DESC,BaseEntity.SortField.Id_DESC); |
|
|
|
final PageInfo<WxActivity> page = wxActivityService.listAsPage(wxActivity, pageNum, pageSize); |
|
|
|
return new ResultData(page); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("查询活动状态") |
|
|
|
@GetMapping("/queryStatus") |
|
|
|
|