推送日志相关文件
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
package com.njcn.csdevice.controller.equipment;
|
||||
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.constant.OperateType;
|
||||
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.csdevice.pojo.po.CsEventSendMsg;
|
||||
import com.njcn.csdevice.service.ICsEventSendMsgService;
|
||||
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;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 事件推送日志表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author xuyang
|
||||
* @since 2023-09-18
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/csEventSendMsg")
|
||||
@Slf4j
|
||||
@Api(tags = "推送日志管理")
|
||||
@AllArgsConstructor
|
||||
public class CsEventSendMsgController extends BaseController {
|
||||
|
||||
private final ICsEventSendMsgService csEventSendMsgService;
|
||||
|
||||
@OperateInfo(info = LogEnum.SYSTEM_COMMON, operateType = OperateType.ADD)
|
||||
@PostMapping("/add")
|
||||
@ApiOperation("插入推送日志")
|
||||
@ApiImplicitParam(name = "list", value = "日志记录", required = true)
|
||||
public HttpResult addLogs(@RequestBody List<CsEventSendMsg> list) {
|
||||
String methodDescribe = getMethodDescribe("addLogs");
|
||||
csEventSendMsgService.saveBatch(list);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user