Selaa lähdekoodia

第一次提交

nahida 11 kuukautta sitten
commit
ab0fe99d72

+ 39 - 0
.gitignore

@@ -0,0 +1,39 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+.idea
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store

+ 74 - 0
pom.xml

@@ -0,0 +1,74 @@
+<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/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>com.itcast</groupId>
+  <artifactId>test</artifactId>
+  <version>1.0-SNAPSHOT</version>
+
+  <parent>
+    <groupId>org.springframework.boot</groupId>
+    <artifactId>spring-boot-starter-parent</artifactId>
+    <version>2.7.12</version>
+    <relativePath/>
+  </parent>
+
+  <properties>
+    <maven.compiler.source>11</maven.compiler.source>
+    <maven.compiler.target>11</maven.compiler.target>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+  <dependencies>
+    <!--web-->
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter-web</artifactId>
+      <version>2.7.12</version>
+    </dependency>
+    <dependency>
+      <groupId>com.alibaba</groupId>
+      <artifactId>druid-spring-boot-starter</artifactId>
+      <version>1.2.8</version>
+    </dependency>
+    <dependency>
+      <groupId>mysql</groupId>
+      <artifactId>mysql-connector-java</artifactId>
+      <version>8.0.23</version>
+    </dependency>
+    <!--mybatis-->
+    <dependency>
+      <groupId>com.baomidou</groupId>
+      <artifactId>mybatis-plus-boot-starter</artifactId>
+      <version>3.5.1</version>
+    </dependency>
+    <!--hutool-->
+    <dependency>
+      <groupId>cn.hutool</groupId>
+      <artifactId>hutool-all</artifactId>
+      <version>5.8.11</version>
+    </dependency>
+    <!--redis-->
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter-data-redis</artifactId>
+      <version>3.0.5</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter-logging</artifactId>
+      <version>2.7.12</version>
+    </dependency>
+
+    <dependency>
+      <groupId>com.github.xiaoymin</groupId>
+      <artifactId>knife4j-openapi2-spring-boot-starter</artifactId>
+      <version>4.1.0</version>
+    </dependency>
+    <dependency>
+      <groupId>com.zksy</groupId>
+      <artifactId>minioutil</artifactId>
+      <version>1.0.1</version>
+    </dependency>
+  </dependencies>
+</project>

+ 24 - 0
src/main/java/com/zksy/EnterpriseApplication.java

@@ -0,0 +1,24 @@
+package com.zksy;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+import org.springframework.scheduling.annotation.EnableScheduling;
+
+/**
+ * @author Administrator
+ * @version 1.0
+ * @project enterprise-assets-service
+ * @description 启动服务
+ * @date 2025/6/24 14:34:33
+ */
+@SpringBootApplication
+@EnableScheduling
+@MapperScan("com.zksy.mapper")
+public class EnterpriseApplication {
+    public static void main(String[] args) {
+        SpringApplication.run(EnterpriseApplication.class, args);
+        System.out.println("启动成功");
+    }
+}

+ 70 - 0
src/main/java/com/zksy/controller/FileManagerController.java

@@ -0,0 +1,70 @@
+package com.zksy.controller;
+
+
+import com.zksy.domain.AjaxResult;
+import com.zksy.domain.FileManager;
+import com.zksy.domain.dto.FileManagerDTO;
+import com.zksy.service.FileManagerService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Date;
+
+/**
+ * @author sy
+ * @date 2025-06-25
+ */
+@RestController
+@RequestMapping("/fileManager")
+@Api(tags = "文件管理")
+public class FileManagerController {
+
+    @Autowired
+    private FileManagerService service;
+
+    @PostMapping("/upload")
+    @ApiOperation(value = "文件管理新增")
+    public AjaxResult save(FileManagerDTO fileManagerDTO) {
+        FileManager xcrFile = buildXrcFile(fileManagerDTO);
+        xcrFile.setCreateBy("管理员");
+        xcrFile.setCreateTime(new Date());
+        return service.saveMinio(xcrFile, fileManagerDTO.getFile())
+                ? AjaxResult.success(xcrFile)
+                : AjaxResult.error("新增失败");
+    }
+
+    @PostMapping("/updateById")
+    @ApiOperation(value = "文件管理修改")
+    public AjaxResult updateById(FileManagerDTO fileManagerDTO) {
+        FileManager xcrFile = buildXrcFile(fileManagerDTO);
+        xcrFile.setUpdateBy("管理员");
+        xcrFile.setUpdateTime(new Date());
+        return service.updateMinio(xcrFile, fileManagerDTO.getFile())
+                ? AjaxResult.success(xcrFile)
+                : AjaxResult.error("更新失败");
+    }
+
+    @PostMapping("/deleteFile")
+    @ApiOperation(value = "文件管理删除")
+    public AjaxResult deleteFile(FileManagerDTO fileManagerDTO) {
+        return service.deleteFile(fileManagerDTO.getId().toString())
+                ? AjaxResult.success("删除成功")
+                : AjaxResult.error("删除失败");
+    }
+
+    private FileManager buildXrcFile(FileManagerDTO fileManagerDTO) {
+        FileManager xcrFile = new FileManager();
+        xcrFile.setId(fileManagerDTO.getId());
+        xcrFile.setFid(fileManagerDTO.getFid());
+        xcrFile.setModuleName(fileManagerDTO.getModuleName());
+        xcrFile.setFileOriginalName(fileManagerDTO.getFile().getOriginalFilename());
+        xcrFile.setFileSize(fileManagerDTO.getFile().getSize());
+        return xcrFile;
+    }
+
+}
+

+ 14 - 0
src/main/java/com/zksy/controller/TestController.java

@@ -0,0 +1,14 @@
+package com.zksy.controller;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RequestMapping("/test")
+@RestController
+public class TestController {
+
+    @RequestMapping("/a")
+    public String hello() {
+        return "性与暴力";
+    }
+}

+ 61 - 0
src/main/java/com/zksy/domain/AHouseType.java

@@ -0,0 +1,61 @@
+package com.zksy.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+/**
+ * 户型表
+ * @TableName a_house_type
+ */
+@TableName(value ="a_house_type")
+@Data
+public class AHouseType implements Serializable {
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.ASSIGN_UUID)
+    private String id;
+
+    /**
+     * 户号
+     */
+    private String accountNumber;
+
+    /**
+     * 位置
+     */
+    private String address;
+
+    /**
+     * 面积
+     */
+    private String area;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 创建人
+     */
+    private String createBy;
+
+    /**
+     * 修改时间
+     */
+    private Date updateTime;
+
+    /**
+     * 修改人
+     */
+    private String updateBy;
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+}

+ 163 - 0
src/main/java/com/zksy/domain/AjaxResult.java

@@ -0,0 +1,163 @@
+package com.zksy.domain;
+
+import cn.hutool.http.HttpStatus;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+
+import java.util.HashMap;
+
+/**
+ * 操作消息提醒
+ * 
+ * @author ruoyi
+ */
+public class AjaxResult extends HashMap<String, Object>
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 状态码 */
+    public static final String CODE_TAG = "code";
+
+    /** 返回内容 */
+    public static final String MSG_TAG = "msg";
+
+    /** 数据对象 */
+    public static final String DATA_TAG = "data";
+
+    /**
+     * 初始化一个新创建的 AjaxResult 对象,使其表示一个空消息。
+     */
+    public AjaxResult()
+    {
+    }
+
+    /**
+     * 初始化一个新创建的 AjaxResult 对象
+     * 
+     * @param code 状态码
+     * @param msg 返回内容
+     */
+    public AjaxResult(int code, String msg)
+    {
+        super.put(CODE_TAG, code);
+        super.put(MSG_TAG, msg);
+    }
+
+    /**
+     * 初始化一个新创建的 AjaxResult 对象
+     * 
+     * @param code 状态码
+     * @param msg 返回内容
+     * @param data 数据对象
+     */
+    public AjaxResult(int code, String msg, Object data)
+    {
+        super.put(CODE_TAG, code);
+        super.put(MSG_TAG, msg);
+        if (StringUtils.checkValNotNull(data))
+        {
+            super.put(DATA_TAG, data);
+        }
+    }
+
+    /**
+     * 返回成功消息
+     * 
+     * @return 成功消息
+     */
+    public static AjaxResult success()
+    {
+        return AjaxResult.success("操作成功");
+    }
+
+    /**
+     * 返回成功数据
+     * 
+     * @return 成功消息
+     */
+    public static AjaxResult success(Object data)
+    {
+        return AjaxResult.success("操作成功", data);
+    }
+
+    /**
+     * 返回成功消息
+     * 
+     * @param msg 返回内容
+     * @return 成功消息
+     */
+    public static AjaxResult success(String msg)
+    {
+        return AjaxResult.success(msg, null);
+    }
+
+    /**
+     * 返回成功消息
+     * 
+     * @param msg 返回内容
+     * @param data 数据对象
+     * @return 成功消息
+     */
+    public static AjaxResult success(String msg, Object data)
+    {
+        return new AjaxResult(HttpStatus.HTTP_OK, msg, data);
+    }
+
+    /**
+     * 返回错误消息
+     * 
+     * @return
+     */
+    public static AjaxResult error()
+    {
+        return AjaxResult.error("操作失败");
+    }
+
+    /**
+     * 返回错误消息
+     * 
+     * @param msg 返回内容
+     * @return 警告消息
+     */
+    public static AjaxResult error(String msg)
+    {
+        return AjaxResult.error(msg, null);
+    }
+
+    /**
+     * 返回错误消息
+     * 
+     * @param msg 返回内容
+     * @param data 数据对象
+     * @return 警告消息
+     */
+    public static AjaxResult error(String msg, Object data)
+    {
+        return new AjaxResult(HttpStatus.HTTP_INTERNAL_ERROR, msg, data);
+    }
+
+    /**
+     * 返回错误消息
+     * 
+     * @param code 状态码
+     * @param msg 返回内容
+     * @return 警告消息
+     */
+    public static AjaxResult error(int code, String msg)
+    {
+        return new AjaxResult(code, msg, null);
+    }
+
+    /**
+     * 方便链式调用
+     *
+     * @param key 键
+     * @param value 值
+     * @return 数据对象
+     */
+    @Override
+    public AjaxResult put(String key, Object value)
+    {
+        super.put(key, value);
+        return this;
+    }
+}

+ 84 - 0
src/main/java/com/zksy/domain/FileManager.java

@@ -0,0 +1,84 @@
+package com.zksy.domain;
+
+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.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ *
+ * @TableName xcr_file
+ */
+@TableName("file_manager")
+@Data
+public class FileManager implements Serializable {
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.ASSIGN_UUID)
+    private String id;
+
+    /**
+     * 父id
+     */
+    private String fid;
+
+    /**
+     * 模块名称
+     */
+    private String moduleName;
+
+    /**
+     * 原文件名称
+     */
+    private String fileOriginalName;
+
+    /**
+     * 文件绝对路径
+     */
+    private String fileUrl;
+
+    /**
+     * 文件名称
+     */
+    private String fileName;
+
+    /**
+     * 文件大小
+     */
+    private Long fileSize;
+
+    /**
+     * 创建人
+     */
+    private String createBy;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 修改人
+     */
+    private String updateBy;
+
+    /**
+     * 修改时间
+     */
+    private Date updateTime;
+
+    /**
+     * 是否删除(0否1是)
+     */
+    private Integer isDelete;
+
+}

+ 29 - 0
src/main/java/com/zksy/domain/dto/FileManagerDTO.java

@@ -0,0 +1,29 @@
+package com.zksy.domain.dto;
+
+import lombok.Data;
+import org.springframework.web.multipart.MultipartFile;
+
+@Data
+public class FileManagerDTO {
+
+    /**
+     * 主键
+     */
+    private String id;
+
+    /**
+     * 父id
+     */
+    private String fid;
+
+    /**
+     * 模块名称
+     */
+    private String moduleName;
+
+    /**
+     * 文件
+     */
+    private MultipartFile file;
+
+}

+ 21 - 0
src/main/java/com/zksy/mapper/AHouseTypeMapper.java

@@ -0,0 +1,21 @@
+package com.zksy.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.zksy.domain.AHouseType;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @author Administrator
+* @description 针对表【a_house_type(户型表)】的数据库操作Mapper
+* @createDate 2025-06-24 16:24:28
+* @Entity com.zksy.property.domain.AHouseType
+*/
+@Mapper
+public interface AHouseTypeMapper extends BaseMapper<AHouseType> {
+
+}
+
+
+
+

+ 14 - 0
src/main/java/com/zksy/mapper/FileManagerMapper.java

@@ -0,0 +1,14 @@
+package com.zksy.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.zksy.domain.FileManager;
+
+/**
+ * @author Administrator
+ * @description 数据库操作Mapper
+ * @createDate 2025-06-25 11:57:55
+ */
+public interface FileManagerMapper extends BaseMapper<FileManager> {
+
+}

+ 19 - 0
src/main/java/com/zksy/service/AHouseTypeService.java

@@ -0,0 +1,19 @@
+package com.zksy.service;
+
+
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.zksy.domain.AHouseType;
+
+import java.util.List;
+
+/**
+* @author Administrator
+* @description 针对表【a_house_type(户型表)】的数据库操作Service
+* @createDate 2025-06-24 16:24:28
+*/
+public interface AHouseTypeService extends IService<AHouseType> {
+        List<AHouseType> getHouseTypeList(String accountNumber);
+        Page<AHouseType> findByPage(long pageNum, long pageSize, String accountNumber);
+}

+ 18 - 0
src/main/java/com/zksy/service/FileManagerService.java

@@ -0,0 +1,18 @@
+package com.zksy.service;
+
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.zksy.domain.FileManager;
+import org.springframework.web.multipart.MultipartFile;
+
+/**
+ * 文件管理Service接口
+ *
+ * @author sy
+ * @date 2025-06-25
+ */
+public interface FileManagerService extends IService<FileManager> {
+    boolean saveMinio(FileManager crmFile, MultipartFile multipartFile);
+    boolean updateMinio(FileManager crmFile, MultipartFile multipartFile);
+    boolean deleteFile(String id);
+}

+ 47 - 0
src/main/java/com/zksy/service/impl/AHouseTypeServiceImpl.java

@@ -0,0 +1,47 @@
+package com.zksy.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zksy.domain.AHouseType;
+import com.zksy.mapper.AHouseTypeMapper;
+import com.zksy.service.AHouseTypeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+* @author Administrator
+* @description 针对表【a_house_type(户型表)】的数据库操作Service实现
+* @createDate 2025-06-24 16:24:28
+*/
+@Service
+public class AHouseTypeServiceImpl extends ServiceImpl<AHouseTypeMapper, AHouseType>
+    implements AHouseTypeService {
+
+    @Autowired
+    private AHouseTypeMapper mapper;
+    @Override
+    public List<AHouseType> getHouseTypeList(String accountNumber) {
+        QueryWrapper<AHouseType> queryWrapper = new QueryWrapper();
+        queryWrapper.like("account_number",accountNumber);
+        List<AHouseType> list = mapper.selectList(queryWrapper);
+        return list;
+    }
+
+    @Override
+    public Page<AHouseType> findByPage(long pageNum, long pageSize, String accountNumber){
+        Page<AHouseType> page = new Page<>(pageNum,pageSize);
+        QueryWrapper<AHouseType> queryWrapper = new QueryWrapper();
+        queryWrapper.like("account_number",accountNumber);
+        Page<AHouseType> page1 = mapper.selectPage(page, queryWrapper);
+        return page1;
+    }
+
+}
+
+
+
+

+ 61 - 0
src/main/java/com/zksy/service/impl/FileManagerServiceImpl.java

@@ -0,0 +1,61 @@
+package com.zksy.service.impl;
+
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zksy.domain.FileManager;
+import com.zksy.mapper.FileManagerMapper;
+import com.zksy.service.FileManagerService;
+import com.zksy.service.MinioFileStorageService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
+
+/**
+ * @author sy
+ * @date 2025-06-25
+ */
+@Service
+public class FileManagerServiceImpl extends ServiceImpl<FileManagerMapper, FileManager> implements FileManagerService {
+
+    @Autowired
+    private MinioFileStorageService minioFileStorageService;
+
+    @Override
+    public boolean saveMinio(FileManager crmFile, MultipartFile multipartFile) {
+        try {
+            String path = minioFileStorageService.uploadFile(multipartFile, crmFile.getModuleName());
+            crmFile.setFileName(path.substring(path.lastIndexOf("/") + 1));
+            crmFile.setFileUrl(path);
+            return save(crmFile);
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    @Override
+    public boolean updateMinio(FileManager crmFile, MultipartFile multipartFile) {
+        try {
+            // 删除minio文件
+            minioFileStorageService.deleteFile(crmFile.getFileUrl());
+            // 新增minio文件
+            String path = minioFileStorageService.uploadFile(multipartFile, crmFile.getModuleName());
+            crmFile.setFileName(path.substring(path.lastIndexOf("/") + 1));
+            crmFile.setFileUrl(path);
+            return updateById(crmFile);
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    @Override
+    public boolean deleteFile(String id) {
+        FileManager fileManager = getById(id);
+        if (null == fileManager) {
+            throw new RuntimeException("文件id = " + id + " 的文件不存在");
+        }
+        // 删除minio文件
+        minioFileStorageService.deleteFile(fileManager.getFileUrl());
+        return removeById(id);
+    }
+
+}

+ 34 - 0
src/main/resources/application-dev.yml

@@ -0,0 +1,34 @@
+spring:
+  datasource:
+    driver-class-name: com.mysql.cj.jdbc.Driver
+    url: jdbc:mysql://192.168.110.30:3307/enterprise_assets?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=UTC
+    username: root
+    password: 123
+    hikari:
+      minimum-idle: 5
+      maximum-pool-size: 15
+      auto-commit: true
+      idle-timeout: 30000
+      pool-name: HikariCP
+      max-lifetime: 1800000
+      connection-timeout: 30000
+      connection-test-query: SELECT 1
+  redis:
+    host: 192.168.110.30
+    port: 6379
+    password:
+    timeout: 10000
+    database: 0
+    lettuce:
+      pool:
+        max-active: 8
+        max-wait: -1ms
+        max-idle: 8
+        min-idle: 0
+minio:
+  endpoint: http://192.168.110.30:9000
+  accessKey: minio
+  secretKey: minio123
+  bucket: test
+  readPath: http://192.168.110.30:9000
+imgAddress: D:/Temp/%s.jpg

+ 147 - 0
src/main/resources/application-prod.yml

@@ -0,0 +1,147 @@
+imgAddress: /home/img-repository/%s.jpg
+clientKey: 爱与和平
+# 项目相关配置
+zksy:
+  # 名称
+  name: zksy
+  # 版本
+  version: 1.0.0
+  # 版权年份
+  copyrightYear: 2023
+  # 实例演示开关
+  demoEnabled: true
+  # 文件路径 示例( Windows配置D:/zksy/uploadPath,Linux配置 /home/zksy/uploadPath)
+  profile: /home/zksy/uploadPath/creditRating/
+  # 获取ip地址开关
+  addressEnabled: false
+  # 验证码类型 math 数组计算 char 字符验证
+  captchaType: math
+
+
+# 日志配置
+logging:
+  level:
+    com.zksy: debug
+    org.springframework: warn
+
+
+# 数据源配置
+spring:
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    driverClassName: com.mysql.cj.jdbc.Driver
+    druid:
+      # 主库数据源
+      master:
+        url: jdbc:mysql://10.0.114.7:3307/enterprise_assets?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+        username: root
+        password: 123456
+      # 从库数据源
+      slave:
+        # 从数据源开关/默认关闭
+        enabled: false
+        url:
+        username:
+        password:
+      # 初始连接数
+      initialSize: 5
+      # 最小连接池数量
+      minIdle: 100
+      # 最大连接池数量
+      maxActive: 400
+      # 配置获取连接等待超时的时间
+      maxWait: 60000
+      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+      timeBetweenEvictionRunsMillis: 60000
+      # 配置一个连接在池中最小生存的时间,单位是毫秒
+      minEvictableIdleTimeMillis: 300000
+      # 配置一个连接在池中最大生存的时间,单位是毫秒
+      maxEvictableIdleTimeMillis: 900000
+      # 配置检测连接是否有效
+      validationQuery: SELECT 1 FROM DUAL
+      testWhileIdle: true
+      testOnBorrow: false
+      testOnReturn: false
+      webStatFilter:
+        enabled: false
+      statViewServlet:
+        enabled: false
+        # 设置白名单,不填则允许所有访问
+        allow:
+        url-pattern: /druid/*
+        # 控制台管理用户名和密码
+        login-username: wsnbb
+        login-password: cnmd123@#$%(cnnn)#
+      filter:
+        stat:
+          enabled: true
+          # 慢SQL记录
+          log-slow-sql: true
+          slow-sql-millis: 1000
+          merge-sql: true
+        wall:
+          config:
+            multi-statement-allow: true
+    # redis 配置
+  redis:
+    # 地址
+    host: 10.101.102.10
+    # 端口,默认为6379
+    port: 6379
+    # 数据库索引
+    database: 0
+    # 密码
+    #password:
+    # 连接超时时间
+    timeout: 10s
+    lettuce:
+      pool:
+        # 连接池中的最小空闲连接
+        min-idle: 10
+        # 连接池中的最大空闲连接
+        max-idle: 200
+        # 连接池的最大数据库连接数
+        max-active: 200
+        # #连接池最大阻塞等待时间(使用负值表示没有限制)
+        max-wait: 1000ms
+#  redisson:
+#    # 单机
+#    address: 10.101.102.10:6379
+#    database: 10
+#    #password: dy123@
+
+
+## 文件上传配置
+local:
+  fileserver:
+    path: file:/home/zksy/uploadPath/creditRating/
+    upload:
+      path: /home/zksy/uploadPath/creditRating/
+    baseurl:
+    mapping:
+      path: /profile/zksy/creditRating
+    filetypes: .jpg,.gif,.png,.ico,.bmp,.jpeg,.mp4,.xls,.xlsx,.tif,.pcx,.tga,.exif,.fpx,.svg,.psd,.cdr,.pcd,.dib,.jfif,.jpe,.dxf,.ufo,.eps,.ai,.raw,.et,.WMF,.webp,.avi,.rmvb,.prn,.wps,.vsd,.dps,.avif,.apng,.doc,.docx,.txt,.pdf,.ppt,.exe,.pptx,.rft,.rar,.zip,.dat,.key,.msg,.cad,.btw,
+
+
+#system:
+#  ghQuestionnaire: true
+#  diffpub: true
+#最大连接数
+server:
+  tomcat:
+    max-connections: 2000
+    #最大线程数
+    max-threads: 1000
+    #最大等待数
+    accept-count: 800
+#  servlet:
+#    context-path: /qyxyfjflserver
+#  ssl:
+#    key-store: classpath:tomcat.jks
+#    key-store-password: 20240520!
+#    keyStoreType: JKS
+#    keyAlias: tomcat
+management:
+  health:
+    redis:
+      enabled: false

+ 42 - 0
src/main/resources/application.yml

@@ -0,0 +1,42 @@
+# 开发环境配置
+server:
+  # 服务器的HTTP端口
+  port: 8801
+  tomcat:
+    # tomcat的URI编码
+    uri-encoding: UTF-8
+    # 连接数满后的排队数,默认为100
+    accept-count: 1000
+    threads:
+      # tomcat最大线程数,默认为200
+      max: 800
+      # Tomcat启动初始化的线程数,默认值10
+      min-spare: 100
+
+# Spring配置
+spring:
+  # 资源信息
+  messages:
+    # 国际化资源文件路径
+    basename: i18n/messages
+  profiles:
+    active: dev
+  # 文件上传
+  servlet:
+    multipart:
+      # 单个文件大小
+      max-file-size:  30MB
+      # 设置总上传的文件大小
+      max-request-size:  60MB
+
+
+# MyBatis配置
+mybatis-plus:
+  # 搜索指定包别名
+  typeAliasesPackage: com.zksy.**.domain
+  # 配置mapper的扫描,找到所有的mapper.xml映射文件
+  mapperLocations: classpath*:mapper/**/*Mapper.xml
+  # 加载全局的配置文件
+  configLocation: classpath:mybatis/mybatis-config.xml
+
+

+ 23 - 0
src/main/resources/mapper/AHouseTypeMapper.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.zksy.mapper.AHouseTypeMapper">
+
+    <resultMap id="BaseResultMap" type="com.zksy.domain.AHouseType">
+            <id property="id" column="id" jdbcType="VARCHAR"/>
+            <result property="accountNumber" column="account_number" jdbcType="VARCHAR"/>
+            <result property="address" column="address" jdbcType="VARCHAR"/>
+            <result property="area" column="area" jdbcType="VARCHAR"/>
+            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+            <result property="createBy" column="create_by" jdbcType="VARCHAR"/>
+            <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
+            <result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,account_number,address,
+        area,create_time,create_by,
+        update_time,update_by
+    </sql>
+</mapper>

+ 29 - 0
src/main/resources/mapper/FileManagerMapper.xml

@@ -0,0 +1,29 @@
+<?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.zksy.mapper.FileManagerMapper">
+
+    <resultMap id="BaseResultMap" type="com.zksy.domain.FileManager">
+        <result property="id" column="id" jdbcType="BIGINT"/>
+        <result property="fid" column="fid" jdbcType="BIGINT"/>
+        <result property="moduleName" column="module_name" jdbcType="VARCHAR"/>
+        <result property="fileOriginalName" column="file_original_name" jdbcType="VARCHAR"/>
+        <result property="fileUrl" column="file_url" jdbcType="VARCHAR"/>
+        <result property="fileName" column="file_name" jdbcType="VARCHAR"/>
+        <result property="fileSize" column="file_size" jdbcType="DOUBLE"/>
+        <result property="createBy" column="create_by" jdbcType="VARCHAR"/>
+        <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+        <result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
+        <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
+        <result property="isDelete" column="is_delete" jdbcType="INTEGER"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,fid,module_name,
+        file_original_name,file_url,file_name,
+        file_size,create_by,create_time,
+        update_by,update_time,is_delete
+    </sql>
+
+</mapper>

+ 25 - 0
src/main/resources/mybatis/mybatis-config.xml

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE configuration
+PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-config.dtd">
+<configuration>
+    <!-- 全局参数 -->
+    <settings>
+        <!-- 使全局的映射器启用或禁用缓存 -->
+        <setting name="cacheEnabled"             value="true"   />
+        <!-- 允许JDBC 支持自动生成主键 -->
+        <setting name="useGeneratedKeys"         value="true"   />
+        <!-- 配置默认的执行器.SIMPLE就是普通执行器;REUSE执行器会重用预处理语句(prepared statements);BATCH执行器将重用语句并执行批量更新 -->
+        <setting name="defaultExecutorType"      value="SIMPLE" />
+		<!-- 指定 MyBatis 所用日志的具体实现 -->
+        <setting name="logImpl"                  value="SLF4J"  />
+        <!-- 使用驼峰命名法转换字段 -->
+        <setting name="mapUnderscoreToCamelCase" value="true"/>
+	</settings>
+    
+    <mappers>
+        <!-- 配置MyBatis自动扫描Mapper接口 -->
+        <package name="com.zksy.property.mapper"/>
+    </mappers>
+    
+</configuration>