推送日志相关文件
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
package com.njcn.csdevice.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 事件推送日志表
|
||||
* </p>
|
||||
*
|
||||
* @author xuyang
|
||||
* @since 2023-09-18
|
||||
*/
|
||||
@Data
|
||||
@TableName("cs_event_send_msg")
|
||||
public class CsEventSendMsg {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 事件id
|
||||
*/
|
||||
private String eventId;
|
||||
|
||||
/**
|
||||
* 推送事件时用户的devCode
|
||||
*/
|
||||
private String devCode;
|
||||
|
||||
/**
|
||||
* 推送时间
|
||||
*/
|
||||
private LocalDateTime sendTime;
|
||||
|
||||
/**
|
||||
* 推送状态
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.csdevice.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.csdevice.pojo.po.CsEventSendMsg;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 事件推送日志表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author xuyang
|
||||
* @since 2023-09-18
|
||||
*/
|
||||
public interface CsEventSendMsgMapper extends BaseMapper<CsEventSendMsg> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.csdevice.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.csdevice.pojo.po.CsEventSendMsg;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 事件推送日志表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author xuyang
|
||||
* @since 2023-09-18
|
||||
*/
|
||||
public interface ICsEventSendMsgService extends IService<CsEventSendMsg> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.njcn.csdevice.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.csdevice.mapper.CsEventSendMsgMapper;
|
||||
import com.njcn.csdevice.pojo.po.CsEventSendMsg;
|
||||
import com.njcn.csdevice.service.ICsEventSendMsgService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 事件推送日志表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author xuyang
|
||||
* @since 2023-09-18
|
||||
*/
|
||||
@Service
|
||||
public class CsEventSendMsgServiceImpl extends ServiceImpl<CsEventSendMsgMapper, CsEventSendMsg> implements ICsEventSendMsgService {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user