From f7a5ccc42485d7b2eac21dffd85f0b8961ea7c82 Mon Sep 17 00:00:00 2001 From: liyj <1003249715@qq.com> Date: Thu, 29 Aug 2024 12:51:20 +0800 Subject: [PATCH] 1、新增给前端获取id的接口 --- dyh-service/dyh-sys/src/main/resources/config/application-dev.yml | 15 +++++++ dyh-service/dyh-sys/src/main/resources/config/application.yml | 11 +++++ dyh-service/dyh-utils/src/main/java/cn/huge/module/mediate/controller/web/CaseUtilsWebController.java | 72 ++++++++++++++++++++++++++++++++++++ dyh-gateway/src/main/resources/config/application.yml | 2 4 files changed, 97 insertions(+), 3 deletions(-) diff --git a/dyh-gateway/src/main/resources/config/application.yml b/dyh-gateway/src/main/resources/config/application.yml index 2bb96d6..df3781c 100644 --- a/dyh-gateway/src/main/resources/config/application.yml +++ b/dyh-gateway/src/main/resources/config/application.yml @@ -54,4 +54,4 @@ #refreshToken过期时间:13小时,比token时间长一点 expire-time: 46800000 #不进行token拦截 - auth-skip-urls: /dyh-cust/api/web/ctAccount/login,/dyh-sys/api/v1/sync/universalSync \ No newline at end of file + auth-skip-urls: /dyh-cust/api/web/ctAccount/login,/dyh-sys/api/v1/sync/universalSync,/dyh-utils/api/web/caseUtils/getNewTimeId,/dyh-utils/api/web/caseUtils/getNewTimeCaseId \ No newline at end of file diff --git a/dyh-service/dyh-sys/src/main/resources/config/application-dev.yml b/dyh-service/dyh-sys/src/main/resources/config/application-dev.yml index 5465a0e..89abc93 100644 --- a/dyh-service/dyh-sys/src/main/resources/config/application-dev.yml +++ b/dyh-service/dyh-sys/src/main/resources/config/application-dev.yml @@ -93,4 +93,17 @@ servlet: context-path: / ssl: - enabled: false \ No newline at end of file + enabled: false + +#ftp服务配置 +ftp: + #服务器ip地址 + hostname: 120.79.193.119 + #端口 + port: 21 + #用户名 + username: hugeinfo + #密码 + password: hugeinfo123 + #附件存储根目录 + rootdir: /home/ftp/gzdyh \ No newline at end of file diff --git a/dyh-service/dyh-sys/src/main/resources/config/application.yml b/dyh-service/dyh-sys/src/main/resources/config/application.yml index 1f89e91..a05e20b 100644 --- a/dyh-service/dyh-sys/src/main/resources/config/application.yml +++ b/dyh-service/dyh-sys/src/main/resources/config/application.yml @@ -60,4 +60,13 @@ logic-delete-value: 1 #字段策略,IGNORED:忽略判断,NOT_NULL:非null判断,NOT_EMPTY:非空判断,DEFAULT:默认,NEVER:不加入sql update-strategy: IGNORED - mapper-locations: classpath*:/cn/huge/*/*/dao/mapper/xml/*Mapper.xml \ No newline at end of file + mapper-locations: classpath*:/cn/huge/*/*/dao/mapper/xml/*Mapper.xml + +#附件配置 +file: + #存储方式 + store-way: ftp + #查看地址 + show-path: /api/fileInfo/show + #下载地址 + down-path: /api/fileInfo/down \ No newline at end of file diff --git a/dyh-service/dyh-utils/src/main/java/cn/huge/module/mediate/controller/web/CaseUtilsWebController.java b/dyh-service/dyh-utils/src/main/java/cn/huge/module/mediate/controller/web/CaseUtilsWebController.java new file mode 100644 index 0000000..8e13be1 --- /dev/null +++ b/dyh-service/dyh-utils/src/main/java/cn/huge/module/mediate/controller/web/CaseUtilsWebController.java @@ -0,0 +1,72 @@ +package cn.huge.module.mediate.controller.web; + +import cn.huge.base.common.constant.GzAreaEnum; +import cn.huge.base.common.utils.DateUtils; +import cn.huge.base.common.utils.ReturnFailUtils; +import cn.huge.base.common.utils.ReturnSucUtils; +import cn.huge.module.mediate.service.CaseInfoService; +import cn.huge.module.mediate.service.JudicInfoService; +import cn.huge.module.mediate.utils.*; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +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.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import javax.servlet.http.HttpServletRequest; +import java.util.Date; + +/** + * @title: 提供前端生成id公共api-纠纷相关 + * @description: 提供前端生成id公共api-纠纷相关 + * @company: hugeinfo + * @author: liyj + * @time: 2022-04-29 10:12:39 + * @version: 1.0.0 + */ +@Slf4j +@RestController +@RequestMapping("/api/web/caseUtils") +public class CaseUtilsWebController { + + @Autowired(required = false) + private HttpServletRequest request; + + @Autowired + private CaseInfoService caseInfoService; + @Autowired + private JudicInfoService judicInfoService; + + + /** + * 公共id-获取时间Id,后四位常量 + * @url {ctx}/api/web/caseUtils/getNewTimeId + * @return Object + */ + @GetMapping("/getNewTimeId") + public Object getNewTimeId() { + try { + return ReturnSucUtils.getRepInfo(MediateIdUtils.getNewTimeId()); + } catch (Exception e) { + return ReturnFailUtils.getRepInfo(); + } + } + + + /** + * 案件id-获取时间Id,后四位常量 + * @url {ctx}/api/web/caseUtils/getNewTimeCaseId + * @return Object + */ + @GetMapping("/getNewTimeCaseId") + public Object getNewTimeCaseId() { + try { + return ReturnSucUtils.getRepInfo(CaseIdUtils.getNewTimeId()); + } catch (Exception e) { + return ReturnFailUtils.getRepInfo(); + } + } + +} -- Gitblit v1.8.0