暂降事件
This commit is contained in:
@@ -5,6 +5,8 @@ import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.csharmonic.param.CsEventUserQueryParam;
|
||||
import com.njcn.csharmonic.pojo.vo.EventDetailVO;
|
||||
import com.njcn.csharmonic.service.EventService;
|
||||
import com.njcn.influx.pojo.dto.EventQueryDTO;
|
||||
import com.njcn.influx.pojo.po.cs.EntData;
|
||||
@@ -36,10 +38,24 @@ public class EventController extends BaseController {
|
||||
@PostMapping("/queryEvent")
|
||||
@ApiOperation("暂降事件查询")
|
||||
@ApiImplicitParam(name = "eventQueryDTO", value = "暂降事件查询参数", required = true)
|
||||
@Deprecated
|
||||
public HttpResult<List<EntData>> queryEvent(@RequestBody EventQueryDTO eventQueryDTO) {
|
||||
String methodDescribe = getMethodDescribe("queryEvent");
|
||||
List<EntData> list = eventService.queryEvent(eventQueryDTO);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryEventList")
|
||||
@ApiOperation("暂降事件列表查询")
|
||||
@ApiImplicitParam(name = "csEventUserQueryParam", value = "暂降事件查询参数", required = true)
|
||||
public HttpResult<List<EventDetailVO>> queryEventList(@RequestBody CsEventUserQueryParam csEventUserQueryParam) {
|
||||
String methodDescribe = getMethodDescribe("queryEventList");
|
||||
List<EventDetailVO> list = eventService.queryEventList(csEventUserQueryParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.njcn.csharmonic.controller;
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.csharmonic.param.CsEventUserQueryParam;
|
||||
import com.njcn.csharmonic.service.CsEventUserPOService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2023/9/4 16:18【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/eventUser")
|
||||
@Api(tags = "暂降事件")
|
||||
@AllArgsConstructor
|
||||
public class EventUserController extends BaseController {
|
||||
private final CsEventUserPOService csEventUserPOService;
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryEvent")
|
||||
@ApiOperation("当天暂降事件未读消息")
|
||||
@ApiImplicitParam(name = "csEventUserQueryParam", value = "暂降事件查询参数", required = true)
|
||||
public HttpResult<Integer> queryEvent(@RequestBody CsEventUserQueryParam csEventUserQueryParam) {
|
||||
String methodDescribe = getMethodDescribe("queryEvent");
|
||||
Integer count = csEventUserPOService.queryEventCount(csEventUserQueryParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, count, methodDescribe);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user