Browse Source

各模块引入分页插件

xucaiqin 2 years ago
parent
commit
9ba78ff23c
33 changed files with 871 additions and 122 deletions
  1. 2 5
      iot-module/iot-module-auth/iot-module-auth-biz/src/main/java/com/middle/platform/auth/biz/controller/AuthController.java
  2. 5 0
      iot-module/iot-module-data/iot-module-data-biz/pom.xml
  3. 9 1
      iot-module/iot-module-manage/iot-module-manage-biz/pom.xml
  4. 18 18
      iot-module/iot-module-manage/iot-module-manage-biz/src/main/java/com/middle/platform/manage/biz/controller/IotCompanyController.java
  5. 9 7
      iot-module/iot-module-manage/iot-module-manage-biz/src/main/java/com/middle/platform/manage/biz/controller/IotDeviceController.java
  6. 18 18
      iot-module/iot-module-manage/iot-module-manage-biz/src/main/java/com/middle/platform/manage/biz/controller/IotModController.java
  7. 18 18
      iot-module/iot-module-manage/iot-module-manage-biz/src/main/java/com/middle/platform/manage/biz/controller/IotProductController.java
  8. 18 18
      iot-module/iot-module-manage/iot-module-manage-biz/src/main/java/com/middle/platform/manage/biz/controller/IotProjectController.java
  9. 18 18
      iot-module/iot-module-manage/iot-module-manage-biz/src/main/java/com/middle/platform/manage/biz/controller/IotProjectDeviceController.java
  10. 18 18
      iot-module/iot-module-manage/iot-module-manage-biz/src/main/java/com/middle/platform/manage/biz/controller/IotUrlController.java
  11. 4 1
      iot-module/iot-module-system/iot-module-system-biz/pom.xml
  12. 5 0
      iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/controller/IndexController.java
  13. 40 0
      iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/controller/UserController.java
  14. 80 0
      iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/entity/SysDict.java
  15. 98 0
      iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/entity/SysDictItem.java
  16. 104 0
      iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/entity/SysMenu.java
  17. 64 0
      iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/entity/SysUser.java
  18. 74 0
      iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/entity/SysUserMenu.java
  19. 13 0
      iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/mapper/SysDictItemMapper.java
  20. 13 0
      iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/mapper/SysDictMapper.java
  21. 13 0
      iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/mapper/SysMenuMapper.java
  22. 13 0
      iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/mapper/SysUserMapper.java
  23. 13 0
      iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/mapper/SysUserMenuMapper.java
  24. 14 0
      iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/service/SysDictItemService.java
  25. 16 0
      iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/service/SysDictService.java
  26. 16 0
      iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/service/SysMenuService.java
  27. 16 0
      iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/service/SysUserMenuService.java
  28. 17 0
      iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/service/SysUserService.java
  29. 26 0
      iot-module/iot-module-system/iot-module-system-biz/src/main/resources/mapper/SysDictItemMapper.xml
  30. 23 0
      iot-module/iot-module-system/iot-module-system-biz/src/main/resources/mapper/SysDictMapper.xml
  31. 27 0
      iot-module/iot-module-system/iot-module-system-biz/src/main/resources/mapper/SysMenuMapper.xml
  32. 27 0
      iot-module/iot-module-system/iot-module-system-biz/src/main/resources/mapper/SysUserMapper.xml
  33. 22 0
      iot-module/iot-module-system/iot-module-system-biz/src/main/resources/mapper/SysUserMenuMapper.xml

+ 2 - 5
iot-module/iot-module-auth/iot-module-auth-biz/src/main/java/com/middle/platform/auth/biz/controller/AuthController.java

@@ -3,10 +3,7 @@ package com.middle.platform.auth.biz.controller;
 import cn.dev33.satoken.stp.StpUtil;
 import com.middle.platform.auth.biz.pojo.LoginPara;
 import com.middle.platform.common.utils.Result;
-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 org.springframework.web.bind.annotation.*;
 
 /**
  * @author xucaiqin
@@ -28,7 +25,7 @@ public class AuthController {
         return Result.ok(true);
     }
 
-    @PostMapping("/check")
+    @GetMapping("/check")
     public Result<Object> check() {
         return Result.ok(StpUtil.isLogin());
     }

+ 5 - 0
iot-module/iot-module-data/iot-module-data-biz/pom.xml

@@ -33,6 +33,11 @@
             <groupId>com.alibaba.cloud</groupId>
             <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
         </dependency>
+        <!--认证-->
+        <dependency>
+            <groupId>com.middle.platform</groupId>
+            <artifactId>iot-starter-satoken</artifactId>
+        </dependency>
 
         <dependency>
             <groupId>com.middle.platform</groupId>

+ 9 - 1
iot-module/iot-module-manage/iot-module-manage-biz/pom.xml

@@ -33,7 +33,15 @@
             <groupId>com.alibaba.cloud</groupId>
             <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
         </dependency>
-
+        <!--认证-->
+        <dependency>
+            <groupId>com.middle.platform</groupId>
+            <artifactId>iot-starter-satoken</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.middle.platform</groupId>
+            <artifactId>iot-starter-pagehelper</artifactId>
+        </dependency>
         <dependency>
             <groupId>com.middle.platform</groupId>
             <artifactId>iot-starter-web</artifactId>

+ 18 - 18
iot-module/iot-module-manage/iot-module-manage-biz/src/main/java/com/middle/platform/manage/biz/controller/IotCompanyController.java

@@ -8,28 +8,28 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 /**
-* 企业表(iot_company)表控制层
-*
-* @author xxxxx
-*/
+ * 企业表(iot_company)表控制层
+ *
+ * @author xxxxx
+ */
 @RestController
 @RequestMapping("/iot_company")
 @RequiredArgsConstructor
 public class IotCompanyController {
-/**
-* 服务对象
-*/
-private final IotCompanyServiceImpl iotCompanyServiceImpl;
+    /**
+     * 服务对象
+     */
+    private final IotCompanyServiceImpl iotCompanyServiceImpl;
 
-/**
-* 通过主键查询单条数据
-*
-* @param id 主键
-* @return 单条数据
-*/
-@GetMapping("selectOne")
-public IotCompany selectOne(Long id) {
-return iotCompanyServiceImpl.selectByPrimaryKey(id);
-}
+    /**
+     * 通过主键查询单条数据
+     *
+     * @param id 主键
+     * @return 单条数据
+     */
+    @GetMapping("selectOne")
+    public IotCompany selectOne(Long id) {
+        return iotCompanyServiceImpl.selectByPrimaryKey(id);
+    }
 
 }

+ 9 - 7
iot-module/iot-module-manage/iot-module-manage-biz/src/main/java/com/middle/platform/manage/biz/controller/IotDeviceController.java

@@ -1,4 +1,5 @@
 package com.middle.platform.manage.biz.controller;
+
 import com.middle.platform.common.utils.Result;
 import com.middle.platform.manage.biz.domain.IotDevice;
 import com.middle.platform.manage.biz.domain.vo.req.IotDeviceVo;
@@ -12,6 +13,7 @@ import java.util.List;
 
 /**
  * 设备表(iot_device)表控制层
+ *
  * @author Aick Spt
  * @date 2023-12-18 10:38
  */
@@ -20,8 +22,8 @@ import java.util.List;
 @RequiredArgsConstructor
 public class IotDeviceController {
     /**
-    * 服务对象
-    */
+     * 服务对象
+     */
     private final IotDeviceServiceImpl iotDeviceServiceImpl;
 
 
@@ -35,11 +37,11 @@ public class IotDeviceController {
 
 
     /**
-    * 通过主键查询单条数据
-    *
-    * @param id 主键
-    * @return 单条数据
-    */
+     * 通过主键查询单条数据
+     *
+     * @param id 主键
+     * @return 单条数据
+     */
     @GetMapping("selectOne")
     public Result<IotDevice> selectOne(Long id) {
         return Result.ok(iotDeviceServiceImpl.selectByPrimaryKey(id));

+ 18 - 18
iot-module/iot-module-manage/iot-module-manage-biz/src/main/java/com/middle/platform/manage/biz/controller/IotModController.java

@@ -8,28 +8,28 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 /**
-* 物模型表(iot_mod)表控制层
-*
-* @author xxxxx
-*/
+ * 物模型表(iot_mod)表控制层
+ *
+ * @author xxxxx
+ */
 @RestController
 @RequestMapping("/iot_mod")
 @RequiredArgsConstructor
 public class IotModController {
-/**
-* 服务对象
-*/
-private final IotModServiceImpl iotModServiceImpl;
+    /**
+     * 服务对象
+     */
+    private final IotModServiceImpl iotModServiceImpl;
 
-/**
-* 通过主键查询单条数据
-*
-* @param id 主键
-* @return 单条数据
-*/
-@GetMapping("selectOne")
-public IotMod selectOne(Long id) {
-return iotModServiceImpl.selectByPrimaryKey(id);
-}
+    /**
+     * 通过主键查询单条数据
+     *
+     * @param id 主键
+     * @return 单条数据
+     */
+    @GetMapping("selectOne")
+    public IotMod selectOne(Long id) {
+        return iotModServiceImpl.selectByPrimaryKey(id);
+    }
 
 }

+ 18 - 18
iot-module/iot-module-manage/iot-module-manage-biz/src/main/java/com/middle/platform/manage/biz/controller/IotProductController.java

@@ -8,28 +8,28 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 /**
-* 产品表(iot_product)表控制层
-*
-* @author xxxxx
-*/
+ * 产品表(iot_product)表控制层
+ *
+ * @author xxxxx
+ */
 @RestController
 @RequestMapping("/iot_product")
 @RequiredArgsConstructor
 public class IotProductController {
-/**
-* 服务对象
-*/
-private final IotProductServiceImpl iotProductServiceImpl;
+    /**
+     * 服务对象
+     */
+    private final IotProductServiceImpl iotProductServiceImpl;
 
-/**
-* 通过主键查询单条数据
-*
-* @param id 主键
-* @return 单条数据
-*/
-@GetMapping("selectOne")
-public IotProduct selectOne(Long id) {
-return iotProductServiceImpl.selectByPrimaryKey(id);
-}
+    /**
+     * 通过主键查询单条数据
+     *
+     * @param id 主键
+     * @return 单条数据
+     */
+    @GetMapping("selectOne")
+    public IotProduct selectOne(Long id) {
+        return iotProductServiceImpl.selectByPrimaryKey(id);
+    }
 
 }

+ 18 - 18
iot-module/iot-module-manage/iot-module-manage-biz/src/main/java/com/middle/platform/manage/biz/controller/IotProjectController.java

@@ -8,28 +8,28 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 /**
-* 项目表(iot_project)表控制层
-*
-* @author xxxxx
-*/
+ * 项目表(iot_project)表控制层
+ *
+ * @author xxxxx
+ */
 @RestController
 @RequestMapping("/iot_project")
 @RequiredArgsConstructor
 public class IotProjectController {
-/**
-* 服务对象
-*/
-private final IotProjectServiceImpl iotProjectServiceImpl;
+    /**
+     * 服务对象
+     */
+    private final IotProjectServiceImpl iotProjectServiceImpl;
 
-/**
-* 通过主键查询单条数据
-*
-* @param id 主键
-* @return 单条数据
-*/
-@GetMapping("selectOne")
-public IotProject selectOne(Long id) {
-return iotProjectServiceImpl.selectByPrimaryKey(id);
-}
+    /**
+     * 通过主键查询单条数据
+     *
+     * @param id 主键
+     * @return 单条数据
+     */
+    @GetMapping("selectOne")
+    public IotProject selectOne(Long id) {
+        return iotProjectServiceImpl.selectByPrimaryKey(id);
+    }
 
 }

+ 18 - 18
iot-module/iot-module-manage/iot-module-manage-biz/src/main/java/com/middle/platform/manage/biz/controller/IotProjectDeviceController.java

@@ -8,28 +8,28 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 /**
-* 产品关联设备表(iot_project_device)表控制层
-*
-* @author xxxxx
-*/
+ * 产品关联设备表(iot_project_device)表控制层
+ *
+ * @author xxxxx
+ */
 @RestController
 @RequestMapping("/iot_project_device")
 @RequiredArgsConstructor
 public class IotProjectDeviceController {
-/**
-* 服务对象
-*/
-private final IotProjectDeviceServiceImpl iotProjectDeviceServiceImpl;
+    /**
+     * 服务对象
+     */
+    private final IotProjectDeviceServiceImpl iotProjectDeviceServiceImpl;
 
-/**
-* 通过主键查询单条数据
-*
-* @param id 主键
-* @return 单条数据
-*/
-@GetMapping("selectOne")
-public IotProjectDevice selectOne(Long id) {
-return iotProjectDeviceServiceImpl.selectByPrimaryKey(id);
-}
+    /**
+     * 通过主键查询单条数据
+     *
+     * @param id 主键
+     * @return 单条数据
+     */
+    @GetMapping("selectOne")
+    public IotProjectDevice selectOne(Long id) {
+        return iotProjectDeviceServiceImpl.selectByPrimaryKey(id);
+    }
 
 }

+ 18 - 18
iot-module/iot-module-manage/iot-module-manage-biz/src/main/java/com/middle/platform/manage/biz/controller/IotUrlController.java

@@ -8,28 +8,28 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 /**
-* 数据上下行关系表(iot_url)表控制层
-*
-* @author xxxxx
-*/
+ * 数据上下行关系表(iot_url)表控制层
+ *
+ * @author xxxxx
+ */
 @RestController
 @RequestMapping("/iot_url")
 @RequiredArgsConstructor
 public class IotUrlController {
-/**
-* 服务对象
-*/
-private final IotUrlServiceImpl iotUrlServiceImpl;
+    /**
+     * 服务对象
+     */
+    private final IotUrlServiceImpl iotUrlServiceImpl;
 
-/**
-* 通过主键查询单条数据
-*
-* @param id 主键
-* @return 单条数据
-*/
-@GetMapping("selectOne")
-public IotUrl selectOne(Long id) {
-return iotUrlServiceImpl.selectByPrimaryKey(id);
-}
+    /**
+     * 通过主键查询单条数据
+     *
+     * @param id 主键
+     * @return 单条数据
+     */
+    @GetMapping("selectOne")
+    public IotUrl selectOne(Long id) {
+        return iotUrlServiceImpl.selectByPrimaryKey(id);
+    }
 
 }

+ 4 - 1
iot-module/iot-module-system/iot-module-system-biz/pom.xml

@@ -38,7 +38,10 @@
             <groupId>com.middle.platform</groupId>
             <artifactId>iot-starter-satoken</artifactId>
         </dependency>
-
+        <dependency>
+            <groupId>com.middle.platform</groupId>
+            <artifactId>iot-starter-pagehelper</artifactId>
+        </dependency>
         <dependency>
             <groupId>com.middle.platform</groupId>
             <artifactId>iot-starter-web</artifactId>

+ 5 - 0
iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/controller/IndexController.java

@@ -2,6 +2,8 @@ package com.middle.platform.system.biz.controller;
 
 import com.middle.platform.common.utils.DateTimeUtil;
 import com.middle.platform.common.utils.Result;
+import com.middle.platform.system.biz.service.SysUserService;
+import jakarta.annotation.Resource;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -17,6 +19,9 @@ public class IndexController {
     @Value("${spring.application.name}")
     private String name;
 
+    @Resource
+    private SysUserService sysUserService;
+
     @GetMapping("")
     public Result<Object> server() {
         return Result.ok(name + ":" + DateTimeUtil.nowStr());

+ 40 - 0
iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/controller/UserController.java

@@ -0,0 +1,40 @@
+package com.middle.platform.system.biz.controller;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.middle.platform.common.utils.Result;
+import com.middle.platform.system.biz.entity.SysUser;
+import com.middle.platform.system.biz.service.SysUserService;
+import jakarta.annotation.Resource;
+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 xucaiqin
+ * @date 2023-12-15 08:46:49
+ */
+@RestController
+@RequestMapping("/user")
+public class UserController {
+
+
+    @Resource
+    private SysUserService sysUserService;
+
+    @PostMapping("/save")
+    public Result<Object> save(@RequestBody SysUser sysUser) {
+        return Result.ok(sysUserService.save(sysUser));
+    }
+
+    @PostMapping("/list")
+    public Result<List<SysUser>> list() {
+        PageHelper.startPage(1, 2);
+        List<SysUser> list = sysUserService.list();
+        PageInfo<SysUser> sysUserPageInfo = new PageInfo<>(list);
+        return Result.ok(list);
+    }
+}

+ 80 - 0
iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/entity/SysDict.java

@@ -0,0 +1,80 @@
+package com.middle.platform.system.biz.entity;
+
+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 lombok.Getter;
+import lombok.Setter;
+
+import java.time.LocalDateTime;
+
+/**
+ * 字典表
+* @date 2023-12-18 15:17:33
+* @author xucaiqin
+*/
+@Getter
+@Setter
+@TableName(value = "sys_dict")
+public class SysDict {
+    /**
+     * id
+     */
+    @TableId(value = "id", type = IdType.ASSIGN_ID)
+    private Long id;
+
+    /**
+     * 类型
+     */
+    @TableField(value = "`type`")
+    private String type;
+
+    /**
+     * 名称
+     */
+    @TableField(value = "`name`")
+    private String name;
+
+    /**
+     * 描述
+     */
+    @TableField(value = "`desc`")
+    private String desc;
+
+    /**
+     * 创建人
+     */
+    @TableField(value = "create_by")
+    private Long createBy;
+
+    /**
+     * 创建时间
+     */
+    @TableField(value = "create_time")
+    private LocalDateTime createTime;
+
+    /**
+     * 更新人
+     */
+    @TableField(value = "update_by")
+    private Long updateBy;
+
+    /**
+     * 更新时间
+     */
+    @TableField(value = "update_time")
+    private LocalDateTime updateTime;
+
+    /**
+     * 删除时间
+     */
+    @TableField(value = "delete_time")
+    private LocalDateTime deleteTime;
+
+    /**
+     * 删除标记 1-删除 0-正常
+     */
+    @TableField(value = "del_flag")
+    private Boolean delFlag;
+}

+ 98 - 0
iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/entity/SysDictItem.java

@@ -0,0 +1,98 @@
+package com.middle.platform.system.biz.entity;
+
+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 lombok.Getter;
+import lombok.Setter;
+
+import java.time.LocalDateTime;
+
+/**
+ * 字典项
+* @date 2023-12-18 15:17:32
+* @author xucaiqin
+*/
+@Getter
+@Setter
+@TableName(value = "sys_dict_item")
+public class SysDictItem {
+    /**
+     * 编号
+     */
+    @TableId(value = "id", type = IdType.ASSIGN_ID)
+    private Long id;
+
+    /**
+     * 字典ID
+     */
+    @TableField(value = "dict_id")
+    private Long dictId;
+
+    /**
+     * 值
+     */
+    @TableField(value = "`value`")
+    private String value;
+
+    /**
+     * 标签
+     */
+    @TableField(value = "`label`")
+    private String label;
+
+    /**
+     * 字典类型 冗余字段
+     */
+    @TableField(value = "`type`")
+    private String type;
+
+    /**
+     * 描述
+     */
+    @TableField(value = "`desc`")
+    private String desc;
+
+    /**
+     * 排序(升序)
+     */
+    @TableField(value = "sort")
+    private Integer sort;
+
+    /**
+     * 创建人
+     */
+    @TableField(value = "create_by")
+    private Long createBy;
+
+    /**
+     * 创建时间
+     */
+    @TableField(value = "create_time")
+    private LocalDateTime createTime;
+
+    /**
+     * 修改人
+     */
+    @TableField(value = "update_by")
+    private Long updateBy;
+
+    /**
+     * 更新时间
+     */
+    @TableField(value = "update_time")
+    private LocalDateTime updateTime;
+
+    /**
+     * 删除时间
+     */
+    @TableField(value = "delete_time")
+    private LocalDateTime deleteTime;
+
+    /**
+     * 删除标记
+     */
+    @TableField(value = "del_flag")
+    private Boolean delFlag;
+}

+ 104 - 0
iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/entity/SysMenu.java

@@ -0,0 +1,104 @@
+package com.middle.platform.system.biz.entity;
+
+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 lombok.Getter;
+import lombok.Setter;
+
+import java.time.LocalDateTime;
+
+/**
+ * 菜单权限表
+* @date 2023-12-18 15:17:33
+* @author xucaiqin
+*/
+@Getter
+@Setter
+@TableName(value = "sys_menu")
+public class SysMenu {
+    /**
+     * ID
+     */
+    @TableId(value = "id", type = IdType.ASSIGN_ID)
+    private Long id;
+
+    /**
+     * 父菜单ID
+     */
+    @TableField(value = "pid")
+    private Long pid;
+
+    /**
+     * 名称
+     */
+    @TableField(value = "`name`")
+    private String name;
+
+    /**
+     * 编码
+     */
+    @TableField(value = "code")
+    private String code;
+
+    /**
+     * 权限标识
+     */
+    @TableField(value = "permission")
+    private String permission;
+
+    /**
+     * 菜单类型 1-菜单 2-功能
+     */
+    @TableField(value = "`type`")
+    private Integer type;
+
+    /**
+     * 显示顺序
+     */
+    @TableField(value = "sort")
+    private Integer sort;
+
+    /**
+     * 备注
+     */
+    @TableField(value = "remark")
+    private String remark;
+
+    /**
+     * 创建者
+     */
+    @TableField(value = "create_by")
+    private Long createBy;
+
+    /**
+     * 创建时间
+     */
+    @TableField(value = "create_time")
+    private LocalDateTime createTime;
+
+    /**
+     * 更新者
+     */
+    @TableField(value = "update_by")
+    private Long updateBy;
+
+    /**
+     * 更新时间
+     */
+    @TableField(value = "update_time")
+    private LocalDateTime updateTime;
+
+    /**
+     * 删除时间
+     */
+    @TableField(value = "delete_time")
+    private LocalDateTime deleteTime;
+
+    /**
+     * 是否删除
+     */
+    @TableField(value = "del_flag")
+    private Boolean delFlag;
+}

+ 64 - 0
iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/entity/SysUser.java

@@ -0,0 +1,64 @@
+package com.middle.platform.system.biz.entity;
+
+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 com.middle.platform.mybatis.core.dataobject.BaseDO;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 用户表
+ *
+ * @author xucaiqin
+ * @date 2023-12-18 14:44:40
+ */
+@Getter
+@Setter
+@TableName(value = "sys_user")
+public class SysUser extends BaseDO {
+    @TableId(value = "id", type = IdType.ASSIGN_ID)
+    private Long id;
+
+    /**
+     * 姓名
+     */
+    @TableField(value = "`name`")
+    private String name;
+
+    /**
+     * 性别0未知1男2女
+     */
+    private Integer sex;
+
+    /**
+     * 联系电话
+     */
+    @TableField(value = "phone")
+    private String phone;
+
+    /**
+     * 登录账号
+     */
+    @TableField(value = "username")
+    private String username;
+
+    /**
+     * 登录密码
+     */
+    @TableField(value = "`password`")
+    private String password;
+
+    /**
+     * 启用状态 1-启用 0-停用
+     */
+    @TableField(value = "`status`")
+    private Integer status;
+
+    /**
+     * 备注
+     */
+    @TableField(value = "remark")
+    private String remark;
+}

+ 74 - 0
iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/entity/SysUserMenu.java

@@ -0,0 +1,74 @@
+package com.middle.platform.system.biz.entity;
+
+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 lombok.Getter;
+import lombok.Setter;
+
+import java.time.LocalDateTime;
+
+/**
+ * 用户角色关联表
+* @date 2023-12-18 15:17:33
+* @author xucaiqin
+*/
+@Getter
+@Setter
+@TableName(value = "sys_user_menu")
+public class SysUserMenu {
+    /**
+     * 自增编号
+     */
+    @TableId(value = "id", type = IdType.ASSIGN_ID)
+    private Long id;
+
+    /**
+     * 角色ID
+     */
+    @TableField(value = "user_id")
+    private Long userId;
+
+    /**
+     * 菜单ID
+     */
+    @TableField(value = "menu_id")
+    private Long menuId;
+
+    /**
+     * 创建者
+     */
+    @TableField(value = "create_by")
+    private Long createBy;
+
+    /**
+     * 创建时间
+     */
+    @TableField(value = "create_time")
+    private LocalDateTime createTime;
+
+    /**
+     * 更新者
+     */
+    @TableField(value = "update_by")
+    private Long updateBy;
+
+    /**
+     * 更新时间
+     */
+    @TableField(value = "update_time")
+    private LocalDateTime updateTime;
+
+    /**
+     * 删除时间
+     */
+    @TableField(value = "delete_time")
+    private LocalDateTime deleteTime;
+
+    /**
+     * 是否删除
+     */
+    @TableField(value = "del_flag")
+    private Boolean delFlag;
+}

+ 13 - 0
iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/mapper/SysDictItemMapper.java

@@ -0,0 +1,13 @@
+package com.middle.platform.system.biz.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.middle.platform.system.biz.entity.SysDictItem;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * @author xucaiqin
+ * @date 2023-12-18 15:17:32
+ */
+@Mapper
+public interface SysDictItemMapper extends BaseMapper<SysDictItem> {
+}

+ 13 - 0
iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/mapper/SysDictMapper.java

@@ -0,0 +1,13 @@
+package com.middle.platform.system.biz.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.middle.platform.system.biz.entity.SysDict;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @date 2023-12-18 15:17:33
+* @author xucaiqin
+*/
+@Mapper
+public interface SysDictMapper extends BaseMapper<SysDict> {
+}

+ 13 - 0
iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/mapper/SysMenuMapper.java

@@ -0,0 +1,13 @@
+package com.middle.platform.system.biz.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.middle.platform.system.biz.entity.SysMenu;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @date 2023-12-18 15:17:33
+* @author xucaiqin
+*/
+@Mapper
+public interface SysMenuMapper extends BaseMapper<SysMenu> {
+}

+ 13 - 0
iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/mapper/SysUserMapper.java

@@ -0,0 +1,13 @@
+package com.middle.platform.system.biz.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.middle.platform.system.biz.entity.SysUser;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * @author xucaiqin
+ * @date 2023-12-18 14:44:40
+ */
+@Mapper
+public interface SysUserMapper extends BaseMapper<SysUser> {
+}

+ 13 - 0
iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/mapper/SysUserMenuMapper.java

@@ -0,0 +1,13 @@
+package com.middle.platform.system.biz.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.middle.platform.system.biz.entity.SysUserMenu;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @date 2023-12-18 15:17:33
+* @author xucaiqin
+*/
+@Mapper
+public interface SysUserMenuMapper extends BaseMapper<SysUserMenu> {
+}

+ 14 - 0
iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/service/SysDictItemService.java

@@ -0,0 +1,14 @@
+package com.middle.platform.system.biz.service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.middle.platform.system.biz.entity.SysDictItem;
+import com.middle.platform.system.biz.mapper.SysDictItemMapper;
+import org.springframework.stereotype.Service;
+/**
+* @date 2023-12-18 15:17:16
+* @author xucaiqin
+*/
+@Service
+public class SysDictItemService extends ServiceImpl<SysDictItemMapper, SysDictItem> {
+
+}

+ 16 - 0
iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/service/SysDictService.java

@@ -0,0 +1,16 @@
+package com.middle.platform.system.biz.service;
+
+import org.springframework.stereotype.Service;
+import jakarta.annotation.Resource;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.middle.platform.system.biz.entity.SysDict;
+import com.middle.platform.system.biz.mapper.SysDictMapper;
+/**
+* @date 2023-12-18 15:17:33
+* @author xucaiqin
+*/
+@Service
+public class SysDictService extends ServiceImpl<SysDictMapper, SysDict> {
+
+}

+ 16 - 0
iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/service/SysMenuService.java

@@ -0,0 +1,16 @@
+package com.middle.platform.system.biz.service;
+
+import org.springframework.stereotype.Service;
+import jakarta.annotation.Resource;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.middle.platform.system.biz.mapper.SysMenuMapper;
+import com.middle.platform.system.biz.entity.SysMenu;
+/**
+* @date 2023-12-18 15:17:33
+* @author xucaiqin
+*/
+@Service
+public class SysMenuService extends ServiceImpl<SysMenuMapper, SysMenu> {
+
+}

+ 16 - 0
iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/service/SysUserMenuService.java

@@ -0,0 +1,16 @@
+package com.middle.platform.system.biz.service;
+
+import org.springframework.stereotype.Service;
+import jakarta.annotation.Resource;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.middle.platform.system.biz.mapper.SysUserMenuMapper;
+import com.middle.platform.system.biz.entity.SysUserMenu;
+/**
+* @date 2023-12-18 15:17:33
+* @author xucaiqin
+*/
+@Service
+public class SysUserMenuService extends ServiceImpl<SysUserMenuMapper, SysUserMenu> {
+
+}

+ 17 - 0
iot-module/iot-module-system/iot-module-system-biz/src/main/java/com/middle/platform/system/biz/service/SysUserService.java

@@ -0,0 +1,17 @@
+package com.middle.platform.system.biz.service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.middle.platform.system.biz.entity.SysUser;
+import com.middle.platform.system.biz.mapper.SysUserMapper;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author xucaiqin
+ * @date 2023-12-18 14:44:40
+ */
+@Service
+public class SysUserService extends ServiceImpl<SysUserMapper, SysUser> {
+
+
+
+}

+ 26 - 0
iot-module/iot-module-system/iot-module-system-biz/src/main/resources/mapper/SysDictItemMapper.xml

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.middle.platform.system.biz.mapper.SysDictItemMapper">
+  <resultMap id="BaseResultMap" type="com.middle.platform.system.biz.entity.SysDictItem">
+    <!--@mbg.generated-->
+    <!--@Table sys_dict_item-->
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="dict_id" jdbcType="BIGINT" property="dictId" />
+    <result column="value" jdbcType="VARCHAR" property="value" />
+    <result column="label" jdbcType="VARCHAR" property="label" />
+    <result column="type" jdbcType="VARCHAR" property="type" />
+    <result column="desc" jdbcType="VARCHAR" property="desc" />
+    <result column="sort" jdbcType="INTEGER" property="sort" />
+    <result column="create_by" jdbcType="BIGINT" property="createBy" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="update_by" jdbcType="BIGINT" property="updateBy" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="delete_time" jdbcType="TIMESTAMP" property="deleteTime" />
+    <result column="del_flag" jdbcType="BOOLEAN" property="delFlag" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    <!--@mbg.generated-->
+    id, dict_id, `value`, `label`, `type`, `desc`, sort, create_by, create_time, update_by,
+    update_time, delete_time, del_flag
+  </sql>
+</mapper>

+ 23 - 0
iot-module/iot-module-system/iot-module-system-biz/src/main/resources/mapper/SysDictMapper.xml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.middle.platform.system.biz.mapper.SysDictMapper">
+  <resultMap id="BaseResultMap" type="com.middle.platform.system.biz.entity.SysDict">
+    <!--@mbg.generated-->
+    <!--@Table sys_dict-->
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="type" jdbcType="VARCHAR" property="type" />
+    <result column="name" jdbcType="VARCHAR" property="name" />
+    <result column="desc" jdbcType="VARCHAR" property="desc" />
+    <result column="create_by" jdbcType="BIGINT" property="createBy" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="update_by" jdbcType="BIGINT" property="updateBy" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="delete_time" jdbcType="TIMESTAMP" property="deleteTime" />
+    <result column="del_flag" jdbcType="BOOLEAN" property="delFlag" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    <!--@mbg.generated-->
+    id, `type`, `name`, `desc`, create_by, create_time, update_by, update_time, delete_time,
+    del_flag
+  </sql>
+</mapper>

+ 27 - 0
iot-module/iot-module-system/iot-module-system-biz/src/main/resources/mapper/SysMenuMapper.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.middle.platform.system.biz.mapper.SysMenuMapper">
+  <resultMap id="BaseResultMap" type="com.middle.platform.system.biz.entity.SysMenu">
+    <!--@mbg.generated-->
+    <!--@Table sys_menu-->
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="pid" jdbcType="BIGINT" property="pid" />
+    <result column="name" jdbcType="VARCHAR" property="name" />
+    <result column="code" jdbcType="VARCHAR" property="code" />
+    <result column="permission" jdbcType="VARCHAR" property="permission" />
+    <result column="type" jdbcType="TINYINT" property="type" />
+    <result column="sort" jdbcType="INTEGER" property="sort" />
+    <result column="remark" jdbcType="VARCHAR" property="remark" />
+    <result column="create_by" jdbcType="BIGINT" property="createBy" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="update_by" jdbcType="BIGINT" property="updateBy" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="delete_time" jdbcType="TIMESTAMP" property="deleteTime" />
+    <result column="del_flag" jdbcType="BOOLEAN" property="delFlag" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    <!--@mbg.generated-->
+    id, pid, `name`, code, permission, `type`, sort, remark, create_by, create_time,
+    update_by, update_time, delete_time, del_flag
+  </sql>
+</mapper>

+ 27 - 0
iot-module/iot-module-system/iot-module-system-biz/src/main/resources/mapper/SysUserMapper.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.middle.platform.system.biz.mapper.SysUserMapper">
+  <resultMap id="BaseResultMap" type="com.middle.platform.system.biz.entity.SysUser">
+    <!--@mbg.generated-->
+    <!--@Table sys_user-->
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="name" jdbcType="VARCHAR" property="name" />
+    <result column="sex" jdbcType="TINYINT" property="sex" />
+    <result column="phone" jdbcType="VARCHAR" property="phone" />
+    <result column="username" jdbcType="VARCHAR" property="username" />
+    <result column="password" jdbcType="VARCHAR" property="password" />
+    <result column="status" jdbcType="TINYINT" property="status" />
+    <result column="remark" jdbcType="VARCHAR" property="remark" />
+    <result column="create_by" jdbcType="BIGINT" property="createBy" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="update_by" jdbcType="BIGINT" property="updateBy" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="delete_time" jdbcType="TIMESTAMP" property="deleteTime" />
+    <result column="del_flag" jdbcType="TINYINT" property="delFlag" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    <!--@mbg.generated-->
+    id, `name`, sex, phone, username, `password`, `status`, remark, create_by, create_time,
+    update_by, update_time, delete_time, del_flag
+  </sql>
+</mapper>

+ 22 - 0
iot-module/iot-module-system/iot-module-system-biz/src/main/resources/mapper/SysUserMenuMapper.xml

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.middle.platform.system.biz.mapper.SysUserMenuMapper">
+  <resultMap id="BaseResultMap" type="com.middle.platform.system.biz.entity.SysUserMenu">
+    <!--@mbg.generated-->
+    <!--@Table sys_user_menu-->
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="user_id" jdbcType="BIGINT" property="userId" />
+    <result column="menu_id" jdbcType="BIGINT" property="menuId" />
+    <result column="create_by" jdbcType="BIGINT" property="createBy" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="update_by" jdbcType="BIGINT" property="updateBy" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="delete_time" jdbcType="TIMESTAMP" property="deleteTime" />
+    <result column="del_flag" jdbcType="BOOLEAN" property="delFlag" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    <!--@mbg.generated-->
+    id, user_id, menu_id, create_by, create_time, update_by, update_time, delete_time,
+    del_flag
+  </sql>
+</mapper>