diff --git a/cs-device/cs-device-api/src/main/java/com/njcn/csdevice/pojo/po/CsEventSendMsg.java b/cs-device/cs-device-api/src/main/java/com/njcn/csdevice/pojo/po/CsEventSendMsg.java new file mode 100644 index 0000000..14a5309 --- /dev/null +++ b/cs-device/cs-device-api/src/main/java/com/njcn/csdevice/pojo/po/CsEventSendMsg.java @@ -0,0 +1,53 @@ +package com.njcn.csdevice.pojo.po; + +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + *
+ * 事件推送日志表 + *
+ * + * @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; + + +} diff --git a/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/controller/equipment/CsEventSendMsgController.java b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/controller/equipment/CsEventSendMsgController.java new file mode 100644 index 0000000..94fda95 --- /dev/null +++ b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/controller/equipment/CsEventSendMsgController.java @@ -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; + +/** + *+ * 事件推送日志表 前端控制器 + *
+ * + * @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+ * 事件推送日志表 Mapper 接口 + *
+ * + * @author xuyang + * @since 2023-09-18 + */ +public interface CsEventSendMsgMapper extends BaseMapper+ * 事件推送日志表 服务类 + *
+ * + * @author xuyang + * @since 2023-09-18 + */ +public interface ICsEventSendMsgService extends IService+ * 事件推送日志表 服务实现类 + *
+ * + * @author xuyang + * @since 2023-09-18 + */ +@Service +public class CsEventSendMsgServiceImpl extends ServiceImpl