From 27fddad1d3bf77f0a8fc773591bcf88c4e489a94 Mon Sep 17 00:00:00 2001 From: anthonywj Date: Tue, 6 Jun 2023 18:04:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BC=81=E4=B8=9A=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E9=85=8D=E7=BD=AE=E8=A1=A8=EF=BC=8C=E5=BF=83=E8=B7=B3?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/sup/UserOnLineController.java | 12 +++++++ .../api/controller/trace/TestController.java | 3 ++ .../api/dao/sup/UserCompanyConfigMapper.java | 9 ++++++ .../api/dao/sup/UserCompanyOnlineMapper.java | 9 ++++++ .../entity/sup/UserCompanyConfigEntity.java | 31 +++++++++++++++++++ .../entity/sup/UserCompanyOnlineEntity.java | 26 ++++++++++++++++ .../service/sup/UserCompanyConfigService.java | 10 ++++++ .../service/sup/UserCompanyOnlineService.java | 10 ++++++ .../mapper/sup/UserCompanyConfigMapper.xml | 4 +++ .../mapper/sup/UserCompanyOnlineMapper.xml | 4 +++ 10 files changed, 118 insertions(+) create mode 100644 src/main/java/com/glxp/api/controller/sup/UserOnLineController.java create mode 100644 src/main/java/com/glxp/api/dao/sup/UserCompanyConfigMapper.java create mode 100644 src/main/java/com/glxp/api/dao/sup/UserCompanyOnlineMapper.java create mode 100644 src/main/java/com/glxp/api/entity/sup/UserCompanyConfigEntity.java create mode 100644 src/main/java/com/glxp/api/entity/sup/UserCompanyOnlineEntity.java create mode 100644 src/main/java/com/glxp/api/service/sup/UserCompanyConfigService.java create mode 100644 src/main/java/com/glxp/api/service/sup/UserCompanyOnlineService.java create mode 100644 src/main/resources/mybatis/mapper/sup/UserCompanyConfigMapper.xml create mode 100644 src/main/resources/mybatis/mapper/sup/UserCompanyOnlineMapper.xml diff --git a/src/main/java/com/glxp/api/controller/sup/UserOnLineController.java b/src/main/java/com/glxp/api/controller/sup/UserOnLineController.java new file mode 100644 index 0000000..449a5b0 --- /dev/null +++ b/src/main/java/com/glxp/api/controller/sup/UserOnLineController.java @@ -0,0 +1,12 @@ +package com.glxp.api.controller.sup; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +@RestController +@Slf4j +public class UserOnLineController { + + +} diff --git a/src/main/java/com/glxp/api/controller/trace/TestController.java b/src/main/java/com/glxp/api/controller/trace/TestController.java index 59a6c45..aa9decb 100644 --- a/src/main/java/com/glxp/api/controller/trace/TestController.java +++ b/src/main/java/com/glxp/api/controller/trace/TestController.java @@ -1,13 +1,16 @@ package com.glxp.api.controller.trace; import cn.hutool.core.lang.UUID; +import com.alibaba.fastjson2.JSON; import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.config.rabbit.TopicRabbitConfig; +import com.glxp.api.entity.trace.MqTraceMessage; import com.glxp.api.util.DateUtil; import lombok.RequiredArgsConstructor; import org.springframework.amqp.rabbit.core.RabbitTemplate; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; diff --git a/src/main/java/com/glxp/api/dao/sup/UserCompanyConfigMapper.java b/src/main/java/com/glxp/api/dao/sup/UserCompanyConfigMapper.java new file mode 100644 index 0000000..164774b --- /dev/null +++ b/src/main/java/com/glxp/api/dao/sup/UserCompanyConfigMapper.java @@ -0,0 +1,9 @@ +package com.glxp.api.dao.sup; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.api.entity.sup.UserCompanyConfigEntity; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface UserCompanyConfigMapper extends BaseMapper { +} diff --git a/src/main/java/com/glxp/api/dao/sup/UserCompanyOnlineMapper.java b/src/main/java/com/glxp/api/dao/sup/UserCompanyOnlineMapper.java new file mode 100644 index 0000000..2c382c0 --- /dev/null +++ b/src/main/java/com/glxp/api/dao/sup/UserCompanyOnlineMapper.java @@ -0,0 +1,9 @@ +package com.glxp.api.dao.sup; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.api.entity.sup.UserCompanyOnlineEntity; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface UserCompanyOnlineMapper extends BaseMapper { +} diff --git a/src/main/java/com/glxp/api/entity/sup/UserCompanyConfigEntity.java b/src/main/java/com/glxp/api/entity/sup/UserCompanyConfigEntity.java new file mode 100644 index 0000000..2e9fcff --- /dev/null +++ b/src/main/java/com/glxp/api/entity/sup/UserCompanyConfigEntity.java @@ -0,0 +1,31 @@ +package com.glxp.api.entity.sup; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.io.Serializable; + +import lombok.Data; + +@Data +@TableName(value = "user_company_config") +public class UserCompanyConfigEntity implements Serializable { + @TableId(value = "id", type = IdType.INPUT) + private Integer id; + + /** + * 企业ID + */ + @TableField(value = "companyId") + private Long companyId; + + /** + * 心跳频率(秒) + */ + @TableField(value = "heartRate") + private Integer heartRate; + + private static final long serialVersionUID = 1L; +} diff --git a/src/main/java/com/glxp/api/entity/sup/UserCompanyOnlineEntity.java b/src/main/java/com/glxp/api/entity/sup/UserCompanyOnlineEntity.java new file mode 100644 index 0000000..450ad25 --- /dev/null +++ b/src/main/java/com/glxp/api/entity/sup/UserCompanyOnlineEntity.java @@ -0,0 +1,26 @@ +package com.glxp.api.entity.sup; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.io.Serializable; +import java.util.Date; + +import lombok.Data; + +@Data +@TableName(value = "user_company_online") +public class UserCompanyOnlineEntity implements Serializable { + @TableId(value = "companyId", type = IdType.INPUT) + private Long companyId; + + @TableField(value = "userId") + private Long userId; + + @TableField(value = "updateTime") + private Date updateTime; + + private static final long serialVersionUID = 1L; +} diff --git a/src/main/java/com/glxp/api/service/sup/UserCompanyConfigService.java b/src/main/java/com/glxp/api/service/sup/UserCompanyConfigService.java new file mode 100644 index 0000000..e74eeaa --- /dev/null +++ b/src/main/java/com/glxp/api/service/sup/UserCompanyConfigService.java @@ -0,0 +1,10 @@ +package com.glxp.api.service.sup; + +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.glxp.api.dao.sup.UserCompanyConfigMapper; +import com.glxp.api.entity.sup.UserCompanyConfigEntity; +@Service +public class UserCompanyConfigService extends ServiceImpl { + +} diff --git a/src/main/java/com/glxp/api/service/sup/UserCompanyOnlineService.java b/src/main/java/com/glxp/api/service/sup/UserCompanyOnlineService.java new file mode 100644 index 0000000..072588c --- /dev/null +++ b/src/main/java/com/glxp/api/service/sup/UserCompanyOnlineService.java @@ -0,0 +1,10 @@ +package com.glxp.api.service.sup; + +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.glxp.api.dao.sup.UserCompanyOnlineMapper; +import com.glxp.api.entity.sup.UserCompanyOnlineEntity; +@Service +public class UserCompanyOnlineService extends ServiceImpl { + +} diff --git a/src/main/resources/mybatis/mapper/sup/UserCompanyConfigMapper.xml b/src/main/resources/mybatis/mapper/sup/UserCompanyConfigMapper.xml new file mode 100644 index 0000000..2808f58 --- /dev/null +++ b/src/main/resources/mybatis/mapper/sup/UserCompanyConfigMapper.xml @@ -0,0 +1,4 @@ + + + + diff --git a/src/main/resources/mybatis/mapper/sup/UserCompanyOnlineMapper.xml b/src/main/resources/mybatis/mapper/sup/UserCompanyOnlineMapper.xml new file mode 100644 index 0000000..04a4f5e --- /dev/null +++ b/src/main/resources/mybatis/mapper/sup/UserCompanyOnlineMapper.xml @@ -0,0 +1,4 @@ + + + +