Parcourir la source

安全消防企业版模块架构添加

jichaobo il y a 2 ans
Parent
commit
dce454a140
26 fichiers modifiés avec 1013 ajouts et 1 suppressions
  1. 2 1
      pom.xml
  2. 19 0
      service-fire/pom.xml
  3. 27 0
      service-fire/service-fire-api/pom.xml
  4. 28 0
      service-fire/service-fire-api/src/main/java/com/usky/fire/RemoteUserService.java
  5. 105 0
      service-fire/service-fire-api/src/main/java/com/usky/fire/domain/SysUserVO.java
  6. 48 0
      service-fire/service-fire-api/src/main/java/com/usky/fire/factory/RemoteUserFallbackFactory.java
  7. 63 0
      service-fire/service-fire-biz/pom.xml
  8. 37 0
      service-fire/service-fire-biz/src/main/java/com/usky/fire/RuoYiSystemApplication.java
  9. 108 0
      service-fire/service-fire-biz/src/main/java/com/usky/fire/controller/MybatisGeneratorUtils.java
  10. 60 0
      service-fire/service-fire-biz/src/main/java/com/usky/fire/controller/api/SysUserControllerApi.java
  11. 22 0
      service-fire/service-fire-biz/src/main/java/com/usky/fire/controller/web/PatrolInspectionAreaController.java
  12. 22 0
      service-fire/service-fire-biz/src/main/java/com/usky/fire/controller/web/PatrolInspectionPersonnelController.java
  13. 63 0
      service-fire/service-fire-biz/src/main/java/com/usky/fire/domain/PatrolInspectionArea.java
  14. 53 0
      service-fire/service-fire-biz/src/main/java/com/usky/fire/domain/PatrolInspectionPersonnel.java
  15. 16 0
      service-fire/service-fire-biz/src/main/java/com/usky/fire/mapper/PatrolInspectionAreaMapper.java
  16. 16 0
      service-fire/service-fire-biz/src/main/java/com/usky/fire/mapper/PatrolInspectionPersonnelMapper.java
  17. 16 0
      service-fire/service-fire-biz/src/main/java/com/usky/fire/service/PatrolInspectionAreaService.java
  18. 16 0
      service-fire/service-fire-biz/src/main/java/com/usky/fire/service/PatrolInspectionPersonnelService.java
  19. 20 0
      service-fire/service-fire-biz/src/main/java/com/usky/fire/service/impl/PatrolInspectionAreaServiceImpl.java
  20. 20 0
      service-fire/service-fire-biz/src/main/java/com/usky/fire/service/impl/PatrolInspectionPersonnelServiceImpl.java
  21. 25 0
      service-fire/service-fire-biz/src/main/resources/bootstrap.yml
  22. 108 0
      service-fire/service-fire-biz/src/main/resources/doc/index.adoc
  23. 74 0
      service-fire/service-fire-biz/src/main/resources/logback.xml
  24. 16 0
      service-fire/service-fire-biz/src/main/resources/mapper.fire/PatrolInspectionAreaMapper.xml
  25. 14 0
      service-fire/service-fire-biz/src/main/resources/mapper.fire/PatrolInspectionPersonnelMapper.xml
  26. 15 0
      service-fire/service-fire-biz/src/main/resources/smart-doc.json

+ 2 - 1
pom.xml

@@ -12,12 +12,13 @@
     <packaging>pom</packaging>
 
     <description>
-        usky-demo ����
+        usky-demo ????
     </description>
     <modules>
         <module>usky-module-demo</module>
     <module>service-backend</module>
     <module>service-system</module>
+    <module>service-fire</module>
   </modules>
 
 

+ 19 - 0
service-fire/pom.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>usky-modules</artifactId>
+        <groupId>com.usky</groupId>
+        <version>0.0.1</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>service-fire</artifactId>
+
+    <groupId>com.usky</groupId>
+    <packaging>pom</packaging>
+    <version>service-fire</version>
+
+<modules>  <module>service-fire-biz</module>
+    <module>service-fire-api</module>
+  </modules>
+</project>

+ 27 - 0
service-fire/service-fire-api/pom.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>service-fire</artifactId>
+        <groupId>com.usky</groupId>
+        <version>service-fire</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>service-fire-api</artifactId>
+    <!-- SpringCloud Openfeign -->
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-openfeign</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.usky</groupId>
+            <artifactId>usky-common-core</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>${project.artifactId}</finalName>
+    </build>
+
+</project>

+ 28 - 0
service-fire/service-fire-api/src/main/java/com/usky/fire/RemoteUserService.java

@@ -0,0 +1,28 @@
+package com.usky.fire;
+
+
+import com.usky.common.core.bean.ApiResult;
+import com.usky.fire.domain.SysUserVO;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.List;
+
+@FeignClient(contextId = "remoteUserService", value = "usky-demo")
+public interface RemoteUserService {
+
+
+
+    @GetMapping("/byUserName")
+    ApiResult<List<SysUserVO>> getByUserName(@RequestParam("userName") String userName);
+
+
+    @PostMapping("/byUserName")
+    ApiResult<List<SysUserVO>> add(@RequestBody SysUserVO sysUserVO);
+
+
+    @PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
+    ApiResult<String> upload(@RequestPart(value = "file") MultipartFile file);
+}

+ 105 - 0
service-fire/service-fire-api/src/main/java/com/usky/fire/domain/SysUserVO.java

@@ -0,0 +1,105 @@
+package com.usky.fire.domain;
+
+
+import lombok.Data;
+
+import java.time.LocalDateTime;
+
+@Data
+public class SysUserVO {
+
+    /**
+     * 用户ID
+     */
+    private Long userId;
+
+    /**
+     * 部门ID
+     */
+    private Long deptId;
+
+    /**
+     * 用户账号
+     */
+    private String userName;
+
+    /**
+     * 用户昵称
+     */
+    private String nickName;
+
+    /**
+     * 用户类型(00系统用户)
+     */
+    private String userType;
+
+    /**
+     * 用户邮箱
+     */
+    private String email;
+
+    /**
+     * 手机号码
+     */
+    private String phonenumber;
+
+    /**
+     * 用户性别(0男 1女 2未知)
+     */
+    private String sex;
+
+    /**
+     * 头像地址
+     */
+    private String avatar;
+
+    /**
+     * 密码
+     */
+    private String password;
+
+    /**
+     * 帐号状态(0正常 1停用)
+     */
+    private String status;
+
+    /**
+     * 删除标志(0代表存在 2代表删除)
+     */
+    private String delFlag;
+
+    /**
+     * 最后登录IP
+     */
+    private String loginIp;
+
+    /**
+     * 最后登录时间
+     */
+    private LocalDateTime loginDate;
+
+    /**
+     * 创建者
+     */
+    private String createBy;
+
+    /**
+     * 创建时间
+     */
+    private LocalDateTime createTime;
+
+    /**
+     * 更新者
+     */
+    private String updateBy;
+
+    /**
+     * 更新时间
+     */
+    private LocalDateTime updateTime;
+
+    /**
+     * 备注
+     */
+    private String remark;
+}

+ 48 - 0
service-fire/service-fire-api/src/main/java/com/usky/fire/factory/RemoteUserFallbackFactory.java

@@ -0,0 +1,48 @@
+package com.usky.fire.factory;
+
+import com.usky.common.core.bean.ApiResult;
+import com.usky.common.core.exception.BusinessException;
+import com.usky.fire.RemoteUserService;
+import com.usky.fire.domain.SysUserVO;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.springframework.cloud.openfeign.FallbackFactory;
+import org.springframework.stereotype.Component;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.List;
+
+
+/**
+ * 用户服务降级处理
+ *
+ * @author ruoyi
+ */
+@Component
+public class RemoteUserFallbackFactory implements FallbackFactory<RemoteUserService>
+{
+    private static final Logger log = LoggerFactory.getLogger(RemoteUserFallbackFactory.class);
+
+    @Override
+    public RemoteUserService create(Throwable throwable)
+    {
+        log.error("用户服务调用失败:{}", throwable.getMessage());
+        return new RemoteUserService() {
+            @Override
+            public ApiResult<List<SysUserVO>> getByUserName(String userName) {
+                throw new BusinessException(throwable.getMessage());
+            }
+
+            @Override
+            public ApiResult<List<SysUserVO>> add(SysUserVO sysUserVO) {
+                throw new BusinessException(throwable.getMessage());
+            }
+
+            @Override
+            public ApiResult<String> upload(MultipartFile file) {
+                throw new BusinessException(throwable.getMessage());
+            }
+        };
+    }
+}

+ 63 - 0
service-fire/service-fire-biz/pom.xml

@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>service-fire</artifactId>
+        <groupId>com.usky</groupId>
+        <version>service-fire</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>service-fire-biz</artifactId>
+    <dependencies>
+        <dependency>
+            <groupId>com.usky</groupId>
+            <artifactId>common-cloud-starter</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <!-- Pagehelper -->
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper-spring-boot-starter</artifactId>
+        </dependency>
+
+
+    </dependencies>
+
+    <build>
+        <finalName>${project.artifactId}</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>com.github.shalousun</groupId>
+                <artifactId>smart-doc-maven-plugin</artifactId>
+                <version>2.1.1</version>
+                <configuration>
+                    <!--指定生成文档的使用的配置文件,配置文件放在自己的项目中-->
+                    <configFile>./src/main/resources/smart-doc.json</configFile>
+                    <!--指定项目名称-->
+                    <projectName>test</projectName>
+                    <!--                    <excludes>-->
+                    <!--                        <exclude>com.bizmatics:product-service-provider</exclude>-->
+                    <!--                        <exclude>cn.afterturn:easypoi-web</exclude>-->
+                    <!--                    </excludes>-->
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

+ 37 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/RuoYiSystemApplication.java

@@ -0,0 +1,37 @@
+package com.usky.fire;
+
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.openfeign.EnableFeignClients;
+import org.springframework.context.annotation.ComponentScan;
+
+/**
+ * 系统模块
+ * 
+ * @author ruoyi
+ */
+
+
+@EnableFeignClients(basePackages = "com.usky")
+@MapperScan(value = "com.usky.fire.mapper")
+@ComponentScan("com.usky")
+@SpringBootApplication
+public class RuoYiSystemApplication
+{
+    public static void main(String[] args)
+    {
+        SpringApplication.run(RuoYiSystemApplication.class, args);
+        System.out.println("(♥◠‿◠)ノ゙  永天测试模块启动成功   ლ(´ڡ`ლ)゙  \n" +
+                " .-------.       ____     __        \n" +
+                " |  _ _   \\      \\   \\   /  /    \n" +
+                " | ( ' )  |       \\  _. /  '       \n" +
+                " |(_ o _) /        _( )_ .'         \n" +
+                " | (_,_).' __  ___(_ o _)'          \n" +
+                " |  |\\ \\  |  ||   |(_,_)'         \n" +
+                " |  | \\ `'   /|   `-'  /           \n" +
+                " |  |  \\    /  \\      /           \n" +
+                " ''-'   `'-'    `-..-'              ");
+    }
+}

+ 108 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/controller/MybatisGeneratorUtils.java

@@ -0,0 +1,108 @@
+package com.usky.fire.controller;//package com.usky.fire.controller;//package com.usky.dm.controller.web.business;//package com.usky.dm.controller.web;
+
+
+import com.baomidou.mybatisplus.core.toolkit.StringPool;
+import com.baomidou.mybatisplus.generator.AutoGenerator;
+import com.baomidou.mybatisplus.generator.InjectionConfig;
+import com.baomidou.mybatisplus.generator.config.*;
+import com.baomidou.mybatisplus.generator.config.po.TableInfo;
+import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author yq
+ * @date 2021/7/6 11:42
+ */
+public class MybatisGeneratorUtils {
+    public static void main(String[] args) {
+
+            shell("service-fire","service-fire-biz");
+    }
+
+    private static void shell(String parentName,String model) {
+
+        AutoGenerator mpg = new AutoGenerator();
+        //1、全局配置
+        GlobalConfig gc = new GlobalConfig();
+//        File file = new File(model);
+//        String path = file.getAbsolutePath();
+        String projectPath = System.getProperty("user.dir");
+        projectPath+="/"+parentName;
+        projectPath+="/"+model;
+        gc.setOutputDir(projectPath+ "/src/main/java");  //生成路径(一般都是生成在此项目的src/main/java下面)
+        //修改为自己的名字
+        gc.setAuthor("JCB"); //设置作者
+        gc.setOpen(false);
+        gc.setFileOverride(true); //第二次生成会把第一次生成的覆盖掉
+        gc.setServiceName("%sService"); //生成的service接口名字首字母是否为I,这样设置就没有
+        gc.setBaseResultMap(true); //生成resultMap
+        mpg.setGlobalConfig(gc);
+
+        //2、数据源配置
+        //修改数据源
+        DataSourceConfig dsc = new DataSourceConfig();
+        dsc.setUrl("jdbc:mysql://172.16.120.165:3306/usky-fire?useUnicode=true&serverTimezone=GMT&useSSL=false&characterEncoding=utf8");
+        dsc.setDriverName("com.mysql.jdbc.Driver");
+        dsc.setUsername("usky");
+        dsc.setPassword("Yt#75Usky");
+        mpg.setDataSource(dsc);
+
+        // 3、包配置
+        PackageConfig pc = new PackageConfig();
+        pc.setParent("com.usky.fire");
+        pc.setController("controller.web");
+        pc.setEntity("domain");
+        pc.setMapper("mapper");
+        pc.setService("service");
+        pc.setServiceImpl("service.impl");
+//        pc.setXml("mapper.demo");
+        //pc.setModuleName("test");
+        mpg.setPackageInfo(pc);
+
+        // 4、策略配置
+        StrategyConfig strategy = new StrategyConfig();
+        strategy.setNaming(NamingStrategy.underline_to_camel);
+        strategy.setColumnNaming(NamingStrategy.underline_to_camel);
+        strategy.setSuperMapperClass("com.usky.common.mvc.base.CrudMapper");
+        strategy.setSuperServiceClass("com.usky.common.mvc.base.CrudService");
+        strategy.setSuperServiceImplClass("com.usky.common.mvc.base.AbstractCrudService");
+        // strategy.setTablePrefix("t_"); // 表名前缀
+        strategy.setEntityLombokModel(true); //使用lombok
+        //修改自己想要生成的表
+        strategy.setInclude("patrol_inspection_personnel");  // 逆向工程使用的表   如果要生成多个,这里可以传入String[]
+        mpg.setStrategy(strategy);
+
+        // 关闭默认 xml 生成,调整生成 至 根目录
+        //修改对应的模块名称
+        TemplateConfig tc = new TemplateConfig();
+        // 自定义配置
+        InjectionConfig cfg = new InjectionConfig() {
+            @Override
+            public void initMap() {
+                // to do nothing
+            }
+        };
+        //如果模板引擎是 velocity
+        String templatePath = "/templates/mapper.xml.vm";
+        // 自定义输出配置
+        List<FileOutConfig> focList = new ArrayList<>();
+        // 自定义配置会被优先输出
+        String finalProjectPath = projectPath;
+        focList.add(new FileOutConfig(templatePath) {
+            @Override
+            public String outputFile(TableInfo tableInfo) {
+                // 自定义输出文件名 , 如果你 Entity 设置了前后缀、此处注意 xml 的名称会跟着发生变化!!
+                return finalProjectPath + "/src/main/resources/mapper.fire" + "/"
+                        + tableInfo.getEntityName() + "Mapper" + StringPool.DOT_XML;
+            }
+        });
+        cfg.setFileOutConfigList(focList);
+        mpg.setCfg(cfg);
+        tc.setXml(null);
+        mpg.setTemplate(tc);
+        //5、执行
+        mpg.execute();
+    }
+}

+ 60 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/controller/api/SysUserControllerApi.java

@@ -0,0 +1,60 @@
+//package com.usky.fire.controller.api;
+//
+//import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+//import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+//import com.usky.common.core.bean.ApiResult;
+//import com.usky.common.core.exception.BusinessException;
+//import com.usky.common.core.util.BeanMapperUtils;
+//import com.usky.common.core.util.FileUtils;
+//import com.usky.common.core.util.GlobalUtils;
+//import com.usky.fire.domain.SysUser;
+//import com.usky.fire.service.SysUserService;
+//import com.usky.system.RemoteUserService;
+//import com.usky.system.domain.SysUserVO;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.web.bind.annotation.RestController;
+//import org.springframework.web.multipart.MultipartFile;
+//
+//import java.io.File;
+//import java.io.IOException;
+//import java.util.ArrayList;
+//import java.util.List;
+//import java.util.Optional;
+//
+//@RestController
+//public class SysUserControllerApi implements RemoteUserService {
+//
+//    @Autowired
+//    private SysUserService sysUserService;
+//    @Override
+//    public ApiResult<List<SysUserVO>> getByUserName(String userName) {
+//        LambdaQueryWrapper<SysUser> queryWrapper = Wrappers.lambdaQuery();
+//        queryWrapper.eq(SysUser::getUserName,userName);
+//        return ApiResult.success(BeanMapperUtils.mapList(sysUserService.list(queryWrapper),SysUser.class,SysUserVO.class));
+//    }
+//
+//    @Override
+//    public ApiResult<List<SysUserVO>> add(SysUserVO sysUserVO) {
+//        sysUserService.save(BeanMapperUtils.map(sysUserVO, SysUser.class));
+//        return ApiResult.success(new ArrayList<>());
+//    }
+//
+//    @Override
+//    public ApiResult<String> upload(MultipartFile multipartFile) {
+//        Optional.ofNullable(multipartFile).orElseThrow(() ->  new BusinessException("文件为空"));
+//        String originalFilename = multipartFile.getOriginalFilename();
+//        String newFileName = System.currentTimeMillis() + originalFilename;
+//        File file = FileUtils.getFile(GlobalUtils.getTempBaseDir(), newFileName);
+//        String urlPath = "";
+//        try {
+//            try {
+//                multipartFile.transferTo(file);
+//            } catch (IOException e) {
+//                throw new BusinessException("文件上传失败");
+//            }
+//        } catch (Exception e) {
+//
+//        }
+//        return ApiResult.success(urlPath);
+//    }
+//}

+ 22 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/controller/web/PatrolInspectionAreaController.java

@@ -0,0 +1,22 @@
+package com.usky.fire.controller.web;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author JCB
+ * @since 2022-07-12
+ */
+@RestController
+@RequestMapping("/patrolInspectionArea")
+public class PatrolInspectionAreaController {
+
+}
+

+ 22 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/controller/web/PatrolInspectionPersonnelController.java

@@ -0,0 +1,22 @@
+package com.usky.fire.controller.web;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author JCB
+ * @since 2022-07-12
+ */
+@RestController
+@RequestMapping("/patrolInspectionPersonnel")
+public class PatrolInspectionPersonnelController {
+
+}
+

+ 63 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/domain/PatrolInspectionArea.java

@@ -0,0 +1,63 @@
+package com.usky.fire.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author JCB
+ * @since 2022-07-12
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class PatrolInspectionArea implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 巡检区域ID
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 区域名称
+     */
+    private String areaName;
+
+    /**
+     * 单位ID
+     */
+    private Integer companyId;
+
+    /**
+     * 租户ID
+     */
+    private Integer tenantId;
+
+    /**
+     * 创建时间
+     */
+    private LocalDateTime createTime;
+
+    /**
+     * 创建人
+     */
+    private String creator;
+
+    /**
+     * 使能标识(0 不生效,1 生效)
+     */
+    private Integer enable;
+
+
+}

+ 53 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/domain/PatrolInspectionPersonnel.java

@@ -0,0 +1,53 @@
+package com.usky.fire.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author JCB
+ * @since 2022-07-12
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class PatrolInspectionPersonnel implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 巡检人员关联ID
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 人员ID
+     */
+    private Integer personnelId;
+
+    /**
+     * 区域ID
+     */
+    private Integer areaId;
+
+    /**
+     * 创建时间
+     */
+    private LocalDateTime createTime;
+
+    /**
+     * 创建人
+     */
+    private String creator;
+
+
+}

+ 16 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/mapper/PatrolInspectionAreaMapper.java

@@ -0,0 +1,16 @@
+package com.usky.fire.mapper;
+
+import com.usky.common.mybatis.core.CrudMapper;
+import com.usky.fire.domain.PatrolInspectionArea;
+
+/**
+ * <p>
+ * Mapper 接口
+ * </p>
+ *
+ * @author JCB
+ * @since 2022-07-12
+ */
+public interface PatrolInspectionAreaMapper extends CrudMapper<PatrolInspectionArea> {
+
+}

+ 16 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/mapper/PatrolInspectionPersonnelMapper.java

@@ -0,0 +1,16 @@
+package com.usky.fire.mapper;
+
+import com.usky.common.mybatis.core.CrudMapper;
+import com.usky.fire.domain.PatrolInspectionPersonnel;
+
+/**
+ * <p>
+ * Mapper 接口
+ * </p>
+ *
+ * @author JCB
+ * @since 2022-07-12
+ */
+public interface PatrolInspectionPersonnelMapper extends CrudMapper<PatrolInspectionPersonnel> {
+
+}

+ 16 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/PatrolInspectionAreaService.java

@@ -0,0 +1,16 @@
+package com.usky.fire.service;
+
+import com.usky.common.mybatis.core.CrudService;
+import com.usky.fire.domain.PatrolInspectionArea;
+
+/**
+ * <p>
+ * 服务类
+ * </p>
+ *
+ * @author JCB
+ * @since 2022-07-12
+ */
+public interface PatrolInspectionAreaService extends CrudService<PatrolInspectionArea> {
+
+}

+ 16 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/PatrolInspectionPersonnelService.java

@@ -0,0 +1,16 @@
+package com.usky.fire.service;
+
+import com.usky.common.mybatis.core.CrudService;
+import com.usky.fire.domain.PatrolInspectionPersonnel;
+
+/**
+ * <p>
+ * 服务类
+ * </p>
+ *
+ * @author JCB
+ * @since 2022-07-12
+ */
+public interface PatrolInspectionPersonnelService extends CrudService<PatrolInspectionPersonnel> {
+
+}

+ 20 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/impl/PatrolInspectionAreaServiceImpl.java

@@ -0,0 +1,20 @@
+package com.usky.fire.service.impl;
+
+import com.usky.common.mybatis.core.AbstractCrudService;
+import com.usky.fire.domain.PatrolInspectionArea;
+import com.usky.fire.mapper.PatrolInspectionAreaMapper;
+import com.usky.fire.service.PatrolInspectionAreaService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 服务实现类
+ * </p>
+ *
+ * @author JCB
+ * @since 2022-07-12
+ */
+@Service
+public class PatrolInspectionAreaServiceImpl extends AbstractCrudService<PatrolInspectionAreaMapper, PatrolInspectionArea> implements PatrolInspectionAreaService {
+
+}

+ 20 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/impl/PatrolInspectionPersonnelServiceImpl.java

@@ -0,0 +1,20 @@
+package com.usky.fire.service.impl;
+
+import com.usky.common.mybatis.core.AbstractCrudService;
+import com.usky.fire.domain.PatrolInspectionPersonnel;
+import com.usky.fire.mapper.PatrolInspectionPersonnelMapper;
+import com.usky.fire.service.PatrolInspectionPersonnelService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 服务实现类
+ * </p>
+ *
+ * @author JCB
+ * @since 2022-07-12
+ */
+@Service
+public class PatrolInspectionPersonnelServiceImpl extends AbstractCrudService<PatrolInspectionPersonnelMapper, PatrolInspectionPersonnel> implements PatrolInspectionPersonnelService {
+
+}

+ 25 - 0
service-fire/service-fire-biz/src/main/resources/bootstrap.yml

@@ -0,0 +1,25 @@
+# Tomcat
+server:
+  port: 9888
+
+# Spring
+spring: 
+  application:
+    # 应用名称
+    name: service-fire
+  profiles:
+    # 环境配置
+    active: dev
+  cloud:
+    nacos:
+      discovery:
+        # 服务注册地址
+        server-addr: 172.16.120.165:8848
+      config:
+        # 配置中心地址
+        server-addr: 172.16.120.165:8848
+        # 配置文件格式
+        file-extension: yml
+        # 共享配置
+        shared-configs:
+          - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}

+ 108 - 0
service-fire/service-fire-biz/src/main/resources/doc/index.adoc

@@ -0,0 +1,108 @@
+= 安防项目
+
+[width="100%",options="header"]
+[stripes=even]
+|====================
+|Version |  Update Time  | Status | Author |  Description
+|v2022-04-21 16:57:08|2022-04-21 16:57:08|auto|@yq|Created by smart-doc
+|====================
+
+
+== &lt;p&gt;参数配置表 前端控制器&lt;/p&gt;
+== &lt;p&gt;部门信息&lt;/p&gt;
+=== 查看部门信息
+*URL:* http:10.23.39.1:8082/sysDept/list
+
+*Type:* POST
+
+*Author:* ya
+
+*Content-Type:* application/json; charset=utf-8
+
+
+
+
+*Body-parameters:*
+
+[width="100%",options="header"]
+[stripes=even]
+|====================
+|Parameter | Type|Description|Required|Since
+|deptId|int64|部门id|false|-
+|parentId|int64|父部门id|false|-
+|ancestors|string|祖级列表|false|-
+|deptName|string|部门名称|false|-
+|orderNum|int32|显示顺序|false|-
+|leader|string|负责人|false|-
+|phone|string|联系电话|false|-
+|email|string|邮箱|false|-
+|status|string|部门状态(0正常 1停用)|false|-
+|delFlag|string|删除标志(0代表存在 2代表删除)|false|-
+|createBy|string|创建者|false|-
+|createTime|string|创建时间|false|-
+|updateBy|string|更新者|false|-
+|updateTime|string|更新时间|false|-
+|bId|int64|建筑id|false|-
+|====================
+
+*Response-fields:*
+
+[width="100%",options="header"]
+[stripes=even]
+|====================
+|Field | Type|Description|Since
+|status|object|No comments found.|-
+|code|string|No comments found.|-
+|msg|string|No comments found.|-
+|data|object|No comments found.|-
+|└─deptId|int64|部门id|-
+|└─parentId|int64|父部门id|-
+|└─ancestors|string|祖级列表|-
+|└─deptName|string|部门名称|-
+|└─orderNum|int32|显示顺序|-
+|└─leader|string|负责人|-
+|└─phone|string|联系电话|-
+|└─email|string|邮箱|-
+|└─status|string|部门状态(0正常 1停用)|-
+|└─delFlag|string|删除标志(0代表存在 2代表删除)|-
+|└─createBy|string|创建者|-
+|└─createTime|string|创建时间|-
+|└─updateBy|string|更新者|-
+|└─updateTime|string|更新时间|-
+|└─bId|int64|建筑id|-
+|exception|string|No comments found.|-
+|====================
+
+*Response-example:*
+----
+{
+	"status": {
+		
+	},
+	"code": "97564",
+	"msg": "wnr5qt",
+	"data": [
+		{
+			"deptId": 540,
+			"parentId": 858,
+			"ancestors": "o5lg60",
+			"deptName": "文.沈",
+			"orderNum": 260,
+			"leader": "ufz93p",
+			"phone": "17852835049",
+			"email": "智渊.徐@yahoo.com",
+			"status": "nu6cnp",
+			"delFlag": "72oiji",
+			"createBy": "5fxr6j",
+			"createTime": "2022-04-21 16:57:10",
+			"updateBy": "4kcs4e",
+			"updateTime": "2022-04-21 16:57:10",
+			"bId": 977
+		}
+	],
+	"exception": "53u6bg"
+}
+----
+
+== &lt;p&gt;用户信息表 前端控制器&lt;/p&gt;
+

+ 74 - 0
service-fire/service-fire-biz/src/main/resources/logback.xml

@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration scan="true" scanPeriod="60 seconds" debug="false">
+    <!-- 日志存放路径 -->
+	<property name="log.path" value="/var/log/uskycloud/usky-demo" />
+   <!-- 日志输出格式 -->
+	<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
+
+    <!-- 控制台输出 -->
+	<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+		<encoder>
+			<pattern>${log.pattern}</pattern>
+		</encoder>
+	</appender>
+
+    <!-- 系统日志输出 -->
+	<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
+	    <file>${log.path}/info.log</file>
+        <!-- 循环政策:基于时间创建日志文件 -->
+		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <!-- 日志文件名格式 -->
+			<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
+			<!-- 日志最大的历史 60天 -->
+			<maxHistory>60</maxHistory>
+		</rollingPolicy>
+		<encoder>
+			<pattern>${log.pattern}</pattern>
+		</encoder>
+		<filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <!-- 过滤的级别 -->
+            <level>INFO</level>
+            <!-- 匹配时的操作:接收(记录) -->
+            <onMatch>ACCEPT</onMatch>
+            <!-- 不匹配时的操作:拒绝(不记录) -->
+            <onMismatch>DENY</onMismatch>
+        </filter>
+	</appender>
+
+    <appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
+	    <file>${log.path}/error.log</file>
+        <!-- 循环政策:基于时间创建日志文件 -->
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <!-- 日志文件名格式 -->
+            <fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
+			<!-- 日志最大的历史 60天 -->
+			<maxHistory>60</maxHistory>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${log.pattern}</pattern>
+        </encoder>
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <!-- 过滤的级别 -->
+            <level>ERROR</level>
+			<!-- 匹配时的操作:接收(记录) -->
+            <onMatch>ACCEPT</onMatch>
+			<!-- 不匹配时的操作:拒绝(不记录) -->
+            <onMismatch>DENY</onMismatch>
+        </filter>
+    </appender>
+
+    <!-- 系统模块日志级别控制  -->
+	<logger name="com.usky.fire" level="info" />
+	<!-- Spring日志级别控制  -->
+	<logger name="org.springframework" level="warn" />
+
+	<root level="info">
+		<appender-ref ref="console" />
+	</root>
+	
+	<!--系统操作日志-->
+    <root level="info">
+        <appender-ref ref="file_info" />
+        <appender-ref ref="file_error" />
+    </root>
+</configuration>

+ 16 - 0
service-fire/service-fire-biz/src/main/resources/mapper.fire/PatrolInspectionAreaMapper.xml

@@ -0,0 +1,16 @@
+<?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.usky.fire.mapper.PatrolInspectionAreaMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.usky.fire.domain.PatrolInspectionArea">
+        <id column="id" property="id" />
+        <result column="area_name" property="areaName" />
+        <result column="company_id" property="companyId" />
+        <result column="tenant_id" property="tenantId" />
+        <result column="create_time" property="createTime" />
+        <result column="creator" property="creator" />
+        <result column="enable" property="enable" />
+    </resultMap>
+
+</mapper>

+ 14 - 0
service-fire/service-fire-biz/src/main/resources/mapper.fire/PatrolInspectionPersonnelMapper.xml

@@ -0,0 +1,14 @@
+<?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.usky.fire.mapper.PatrolInspectionPersonnelMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.usky.fire.domain.PatrolInspectionPersonnel">
+        <id column="id" property="id" />
+        <result column="personnel_id" property="personnelId" />
+        <result column="area_id" property="areaId" />
+        <result column="create_time" property="createTime" />
+        <result column="creator" property="creator" />
+    </resultMap>
+
+</mapper>

+ 15 - 0
service-fire/service-fire-biz/src/main/resources/smart-doc.json

@@ -0,0 +1,15 @@
+{
+  "outPath":"./src/main/resources/doc",
+  "serverUrl": "http:10.23.39.1:8082/",
+  "isStrict": false,
+  "coverOld": true,
+  "allInOne": true,
+  "packageFilters": "com.usky.demo.controller.web",
+  "requestExample":"false",
+  "responseExample":"true",
+  "projectName": "安防项目",
+  "appKey": "20211216921084883495813120",
+  "appToken":"36bde2426ad546a5a50311bb747e7e61",
+  "secret": "N@Pd,KXAHki*BW3=zK.XPNykf!=CM79J",
+  "openUrl": "http://101.133.214.75:7700/api"
+}