Jelajahi Sumber

新增 website

guoenzhou 2 tahun lalu
induk
melakukan
96eb2e3a94
32 mengubah file dengan 1310 tambahan dan 0 penghapusan
  1. 1 0
      pom.xml
  2. 19 0
      service-website/pom.xml
  3. 27 0
      service-website/service-website-api/pom.xml
  4. 28 0
      service-website/service-website-api/src/main/java/com/usky/website/RemoteUserService.java
  5. 105 0
      service-website/service-website-api/src/main/java/com/usky/website/domain/SysUserVO.java
  6. 48 0
      service-website/service-website-api/src/main/java/com/usky/website/factory/RemoteUserFallbackFactory.java
  7. 63 0
      service-website/service-website-biz/pom.xml
  8. 108 0
      service-website/service-website-biz/src/main/java/com/usky/website/MybatisGenerator.java
  9. 37 0
      service-website/service-website-biz/src/main/java/com/usky/website/RuoYiSystemApplication.java
  10. 60 0
      service-website/service-website-biz/src/main/java/com/usky/website/controller/api/SysUserControllerApi.java
  11. 36 0
      service-website/service-website-biz/src/main/java/com/usky/website/controller/web/SysUserController.java
  12. 21 0
      service-website/service-website-biz/src/main/java/com/usky/website/controller/web/TArticleController.java
  13. 21 0
      service-website/service-website-biz/src/main/java/com/usky/website/controller/web/TCategoryController.java
  14. 123 0
      service-website/service-website-biz/src/main/java/com/usky/website/domain/SysUser.java
  15. 67 0
      service-website/service-website-biz/src/main/java/com/usky/website/domain/TArticle.java
  16. 81 0
      service-website/service-website-biz/src/main/java/com/usky/website/domain/TCategory.java
  17. 16 0
      service-website/service-website-biz/src/main/java/com/usky/website/mapper/SysUserMapper.java
  18. 16 0
      service-website/service-website-biz/src/main/java/com/usky/website/mapper/TArticleMapper.java
  19. 16 0
      service-website/service-website-biz/src/main/java/com/usky/website/mapper/TCategoryMapper.java
  20. 17 0
      service-website/service-website-biz/src/main/java/com/usky/website/service/SysUserService.java
  21. 16 0
      service-website/service-website-biz/src/main/java/com/usky/website/service/TArticleService.java
  22. 16 0
      service-website/service-website-biz/src/main/java/com/usky/website/service/TCategoryService.java
  23. 20 0
      service-website/service-website-biz/src/main/java/com/usky/website/service/impl/SysUserServiceImpl.java
  24. 20 0
      service-website/service-website-biz/src/main/java/com/usky/website/service/impl/TArticleServiceImpl.java
  25. 20 0
      service-website/service-website-biz/src/main/java/com/usky/website/service/impl/TCategoryServiceImpl.java
  26. 25 0
      service-website/service-website-biz/src/main/resources/bootstrap.yml
  27. 108 0
      service-website/service-website-biz/src/main/resources/doc/index.adoc
  28. 74 0
      service-website/service-website-biz/src/main/resources/logback.xml
  29. 28 0
      service-website/service-website-biz/src/main/resources/mapper/website/SysUserMapper.xml
  30. 31 0
      service-website/service-website-biz/src/main/resources/mapper/website/TArticleMapper.xml
  31. 27 0
      service-website/service-website-biz/src/main/resources/mapper/website/TCategoryMapper.xml
  32. 15 0
      service-website/service-website-biz/src/main/resources/smart-doc.json

+ 1 - 0
pom.xml

@@ -18,6 +18,7 @@
         <module>usky-module-demo</module>
     <module>service-backend</module>
     <module>service-system</module>
+    <module>service-website</module>
   </modules>
 
 

+ 19 - 0
service-website/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-website</artifactId>
+
+    <groupId>com.usky</groupId>
+    <packaging>pom</packaging>
+    <version>0.1</version>
+
+<modules>  <module>service-website-biz</module>
+    <module>service-website-api</module>
+  </modules>
+</project>

+ 27 - 0
service-website/service-website-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-website</artifactId>
+        <groupId>com.usky</groupId>
+        <version>0.1</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>service-website-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-website/service-website-api/src/main/java/com/usky/website/RemoteUserService.java

@@ -0,0 +1,28 @@
+package com.usky.website;
+
+
+import com.usky.common.core.bean.ApiResult;
+import com.usky.website.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-website/service-website-api/src/main/java/com/usky/website/domain/SysUserVO.java

@@ -0,0 +1,105 @@
+package com.usky.website.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-website/service-website-api/src/main/java/com/usky/website/factory/RemoteUserFallbackFactory.java

@@ -0,0 +1,48 @@
+package com.usky.website.factory;
+
+import com.usky.common.core.bean.ApiResult;
+import com.usky.common.core.exception.BusinessException;
+import com.usky.website.RemoteUserService;
+import com.usky.website.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-website/service-website-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-website</artifactId>
+        <groupId>com.usky</groupId>
+        <version>0.1</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>service-website-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>

+ 108 - 0
service-website/service-website-biz/src/main/java/com/usky/website/MybatisGenerator.java

@@ -0,0 +1,108 @@
+package com.usky.website;//package com.usky.website.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 MybatisGenerator {
+    public static void main(String[] args) {
+
+            shell("service-website","service-website-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("ya"); //设置作者
+        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://101.133.214.75:3306/usky_website?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.website");
+        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.mybatis.core.CrudMapper");
+        strategy.setSuperServiceClass("com.usky.common.mybatis.core.CrudService");
+        strategy.setSuperServiceImplClass("com.usky.common.mybatis.core.AbstractCrudService;");
+        // strategy.setTablePrefix("t_"); // 表名前缀
+        strategy.setEntityLombokModel(true); //使用lombok
+        //修改自己想要生成的表
+        strategy.setInclude(new String[]{"t_category","t_article"});  // 逆向工程使用的表   如果要生成多个,这里可以传入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/website" + "/"
+                        + tableInfo.getEntityName() + "Mapper" + StringPool.DOT_XML;
+            }
+        });
+        cfg.setFileOutConfigList(focList);
+        mpg.setCfg(cfg);
+        tc.setXml(null);
+        mpg.setTemplate(tc);
+        //5、执行
+        mpg.execute();
+    }
+}

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

@@ -0,0 +1,37 @@
+package com.usky.website;
+
+
+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.website.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" +
+                " ''-'   `'-'    `-..-'              ");
+    }
+}

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

@@ -0,0 +1,60 @@
+//package com.usky.website.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.website.domain.SysUser;
+//import com.usky.website.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);
+//    }
+//}

+ 36 - 0
service-website/service-website-biz/src/main/java/com/usky/website/controller/web/SysUserController.java

@@ -0,0 +1,36 @@
+package com.usky.website.controller.web;
+
+
+import com.usky.common.core.bean.ApiResult;
+import com.usky.website.domain.SysUser;
+import com.usky.website.service.SysUserService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 用户信息表 前端控制器
+ * </p>
+ *
+ * @author ya
+ * @since 2022-04-21
+ */
+@RestController
+@RequestMapping("/sysUser")
+public class SysUserController {
+
+
+    @Autowired
+    private SysUserService sysUserService;
+
+    @GetMapping("/list")
+    public ApiResult<List<SysUser>> list(){
+        return ApiResult.success(sysUserService.list());
+    }
+}
+

+ 21 - 0
service-website/service-website-biz/src/main/java/com/usky/website/controller/web/TArticleController.java

@@ -0,0 +1,21 @@
+package com.usky.website.controller.web;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.stereotype.Controller;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author ya
+ * @since 2022-08-29
+ */
+@Controller
+@RequestMapping("/tArticle")
+public class TArticleController {
+
+}
+

+ 21 - 0
service-website/service-website-biz/src/main/java/com/usky/website/controller/web/TCategoryController.java

@@ -0,0 +1,21 @@
+package com.usky.website.controller.web;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.stereotype.Controller;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author ya
+ * @since 2022-08-29
+ */
+@Controller
+@RequestMapping("/tCategory")
+public class TCategoryController {
+
+}
+

+ 123 - 0
service-website/service-website-biz/src/main/java/com/usky/website/domain/SysUser.java

@@ -0,0 +1,123 @@
+package com.usky.website.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 ya
+ * @since 2022-04-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class SysUser implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 用户ID
+     */
+    @TableId(value = "user_id", type = IdType.AUTO)
+    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;
+
+
+}

+ 67 - 0
service-website/service-website-biz/src/main/java/com/usky/website/domain/TArticle.java

@@ -0,0 +1,67 @@
+package com.usky.website.domain;
+
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author ya
+ * @since 2022-08-29
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class TArticle implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private String id;
+
+    private String author;
+
+    private String content;
+
+    private Integer hits;
+
+    private String htmlfilepath;
+
+    private Integer ispublication;
+
+    private Integer isrecommend;
+
+    private Integer istop;
+
+    private String koname;
+
+    private String categoryid;
+
+    private String image;
+
+    private Integer ishot;
+
+    private Integer istui;
+
+    private Integer iscai;
+
+    private String lmtitle;
+
+    private String zhaiyao;
+
+    private String title;
+
+    private String metadescription;
+
+    private String metakeywords;
+
+    private LocalDateTime createdate;
+
+    private LocalDateTime modifydate;
+
+    private Integer version;
+
+
+}

+ 81 - 0
service-website/service-website-biz/src/main/java/com/usky/website/domain/TCategory.java

@@ -0,0 +1,81 @@
+package com.usky.website.domain;
+
+import java.time.LocalDateTime;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author ya
+ * @since 2022-08-29
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class TCategory implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private String id;
+
+    private String pid;
+
+    private String mid;
+
+    /**
+     * 栏目名称
+     */
+    private String name;
+
+    /**
+     * 栏目简称
+     */
+    private String sname;
+
+    /**
+     * 是否首页栏目
+     */
+    @TableField("isMenu")
+    private String isMenu;
+
+    /**
+     * 是否新栏目
+     */
+    @TableField("isNew")
+    private String isNew;
+
+    /**
+     * 页面模板
+     */
+    private String tpl;
+
+    private String website;
+
+    @TableField("imagePath")
+    private String imagePath;
+
+    private String title;
+
+    private String metakeywords;
+
+    private String metadescription;
+
+    private LocalDateTime createdate;
+
+    private LocalDateTime modifydate;
+
+    private Integer version;
+
+    /**
+     * 栏目图片
+     */
+    private String sortindex;
+
+    private String status;
+
+
+}

+ 16 - 0
service-website/service-website-biz/src/main/java/com/usky/website/mapper/SysUserMapper.java

@@ -0,0 +1,16 @@
+package com.usky.website.mapper;
+
+import com.usky.common.mybatis.core.CrudMapper;
+import com.usky.website.domain.SysUser;
+
+/**
+ * <p>
+ * 用户信息表 Mapper 接口
+ * </p>
+ *
+ * @author ya
+ * @since 2022-04-21
+ */
+public interface SysUserMapper extends CrudMapper<SysUser> {
+
+}

+ 16 - 0
service-website/service-website-biz/src/main/java/com/usky/website/mapper/TArticleMapper.java

@@ -0,0 +1,16 @@
+package com.usky.website.mapper;
+
+import com.usky.website.domain.TArticle;
+import com.usky.common.mybatis.core.CrudMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author ya
+ * @since 2022-08-29
+ */
+public interface TArticleMapper extends CrudMapper<TArticle> {
+
+}

+ 16 - 0
service-website/service-website-biz/src/main/java/com/usky/website/mapper/TCategoryMapper.java

@@ -0,0 +1,16 @@
+package com.usky.website.mapper;
+
+import com.usky.website.domain.TCategory;
+import com.usky.common.mybatis.core.CrudMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author ya
+ * @since 2022-08-29
+ */
+public interface TCategoryMapper extends CrudMapper<TCategory> {
+
+}

+ 17 - 0
service-website/service-website-biz/src/main/java/com/usky/website/service/SysUserService.java

@@ -0,0 +1,17 @@
+package com.usky.website.service;
+
+import com.usky.common.mybatis.core.CrudService;
+import com.usky.website.domain.SysUser;
+
+
+/**
+ * <p>
+ * 用户信息表 服务类
+ * </p>
+ *
+ * @author ya
+ * @since 2022-04-21
+ */
+public interface SysUserService extends CrudService<SysUser> {
+
+}

+ 16 - 0
service-website/service-website-biz/src/main/java/com/usky/website/service/TArticleService.java

@@ -0,0 +1,16 @@
+package com.usky.website.service;
+
+import com.usky.website.domain.TArticle;
+import com.usky.common.mybatis.core.CrudService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author ya
+ * @since 2022-08-29
+ */
+public interface TArticleService extends CrudService<TArticle> {
+
+}

+ 16 - 0
service-website/service-website-biz/src/main/java/com/usky/website/service/TCategoryService.java

@@ -0,0 +1,16 @@
+package com.usky.website.service;
+
+import com.usky.website.domain.TCategory;
+import com.usky.common.mybatis.core.CrudService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author ya
+ * @since 2022-08-29
+ */
+public interface TCategoryService extends CrudService<TCategory> {
+
+}

+ 20 - 0
service-website/service-website-biz/src/main/java/com/usky/website/service/impl/SysUserServiceImpl.java

@@ -0,0 +1,20 @@
+package com.usky.website.service.impl;
+
+import com.usky.common.mybatis.core.AbstractCrudService;
+import com.usky.website.domain.SysUser;
+import com.usky.website.mapper.SysUserMapper;
+import com.usky.website.service.SysUserService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 用户信息表 服务实现类
+ * </p>
+ *
+ * @author ya
+ * @since 2022-04-21
+ */
+@Service
+public class SysUserServiceImpl extends AbstractCrudService<SysUserMapper, SysUser> implements SysUserService {
+
+}

+ 20 - 0
service-website/service-website-biz/src/main/java/com/usky/website/service/impl/TArticleServiceImpl.java

@@ -0,0 +1,20 @@
+package com.usky.website.service.impl;
+
+import com.usky.website.domain.TArticle;
+import com.usky.website.mapper.TArticleMapper;
+import com.usky.website.service.TArticleService;
+import com.usky.common.mybatis.core.AbstractCrudService;;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author ya
+ * @since 2022-08-29
+ */
+@Service
+public class TArticleServiceImpl extends AbstractCrudService;<TArticleMapper, TArticle> implements TArticleService {
+
+}

+ 20 - 0
service-website/service-website-biz/src/main/java/com/usky/website/service/impl/TCategoryServiceImpl.java

@@ -0,0 +1,20 @@
+package com.usky.website.service.impl;
+
+import com.usky.website.domain.TCategory;
+import com.usky.website.mapper.TCategoryMapper;
+import com.usky.website.service.TCategoryService;
+import com.usky.common.mybatis.core.AbstractCrudService;;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author ya
+ * @since 2022-08-29
+ */
+@Service
+public class TCategoryServiceImpl extends AbstractCrudService;<TCategoryMapper, TCategory> implements TCategoryService {
+
+}

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

@@ -0,0 +1,25 @@
+# Tomcat
+server:
+  port: 9887
+
+# Spring
+spring: 
+  application:
+    # 应用名称
+    name: usky-demo
+  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-website/service-website-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-website/service-website-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" 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>

+ 28 - 0
service-website/service-website-biz/src/main/resources/mapper/website/SysUserMapper.xml

@@ -0,0 +1,28 @@
+<?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.website.mapper.SysUserMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.usky.website.domain.SysUser">
+        <id column="user_id" property="userId" />
+        <result column="dept_id" property="deptId" />
+        <result column="user_name" property="userName" />
+        <result column="nick_name" property="nickName" />
+        <result column="user_type" property="userType" />
+        <result column="email" property="email" />
+        <result column="phonenumber" property="phonenumber" />
+        <result column="sex" property="sex" />
+        <result column="avatar" property="avatar" />
+        <result column="password" property="password" />
+        <result column="status" property="status" />
+        <result column="del_flag" property="delFlag" />
+        <result column="login_ip" property="loginIp" />
+        <result column="login_date" property="loginDate" />
+        <result column="create_by" property="createBy" />
+        <result column="create_time" property="createTime" />
+        <result column="update_by" property="updateBy" />
+        <result column="update_time" property="updateTime" />
+        <result column="remark" property="remark" />
+    </resultMap>
+
+</mapper>

+ 31 - 0
service-website/service-website-biz/src/main/resources/mapper/website/TArticleMapper.xml

@@ -0,0 +1,31 @@
+<?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.website.mapper.TArticleMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.usky.website.domain.TArticle">
+        <id column="id" property="id" />
+        <result column="author" property="author" />
+        <result column="content" property="content" />
+        <result column="hits" property="hits" />
+        <result column="htmlfilepath" property="htmlfilepath" />
+        <result column="ispublication" property="ispublication" />
+        <result column="isrecommend" property="isrecommend" />
+        <result column="istop" property="istop" />
+        <result column="koname" property="koname" />
+        <result column="categoryid" property="categoryid" />
+        <result column="image" property="image" />
+        <result column="ishot" property="ishot" />
+        <result column="istui" property="istui" />
+        <result column="iscai" property="iscai" />
+        <result column="lmtitle" property="lmtitle" />
+        <result column="zhaiyao" property="zhaiyao" />
+        <result column="title" property="title" />
+        <result column="metadescription" property="metadescription" />
+        <result column="metakeywords" property="metakeywords" />
+        <result column="createdate" property="createdate" />
+        <result column="modifydate" property="modifydate" />
+        <result column="version" property="version" />
+    </resultMap>
+
+</mapper>

+ 27 - 0
service-website/service-website-biz/src/main/resources/mapper/website/TCategoryMapper.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.usky.website.mapper.TCategoryMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.usky.website.domain.TCategory">
+        <id column="id" property="id" />
+        <result column="pid" property="pid" />
+        <result column="mid" property="mid" />
+        <result column="name" property="name" />
+        <result column="sname" property="sname" />
+        <result column="isMenu" property="isMenu" />
+        <result column="isNew" property="isNew" />
+        <result column="tpl" property="tpl" />
+        <result column="website" property="website" />
+        <result column="imagePath" property="imagePath" />
+        <result column="title" property="title" />
+        <result column="metakeywords" property="metakeywords" />
+        <result column="metadescription" property="metadescription" />
+        <result column="createdate" property="createdate" />
+        <result column="modifydate" property="modifydate" />
+        <result column="version" property="version" />
+        <result column="sortindex" property="sortindex" />
+        <result column="status" property="status" />
+    </resultMap>
+
+</mapper>

+ 15 - 0
service-website/service-website-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"
+}