forked from gzzfw/backEnd/gz-dyh

liyj
2024-08-29 f7a5ccc42485d7b2eac21dffd85f0b8961ea7c82
1、新增给前端获取id的接口
1 files added
3 files modified
96 ■■■■■ changed files
dyh-gateway/src/main/resources/config/application.yml 2 ●●● patch | view | raw | blame | history
dyh-service/dyh-sys/src/main/resources/config/application-dev.yml 13 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-sys/src/main/resources/config/application.yml 9 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-utils/src/main/java/cn/huge/module/mediate/controller/web/CaseUtilsWebController.java 72 ●●●●● patch | view | raw | blame | history
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
  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
dyh-service/dyh-sys/src/main/resources/config/application-dev.yml
@@ -94,3 +94,16 @@
      context-path: /
    ssl:
      enabled: false
#ftp服务配置
ftp:
  #服务器ip地址
  hostname: 120.79.193.119
  #端口
  port: 21
  #用户名
  username: hugeinfo
  #密码
  password: hugeinfo123
  #附件存储根目录
  rootdir: /home/ftp/gzdyh
dyh-service/dyh-sys/src/main/resources/config/application.yml
@@ -61,3 +61,12 @@
        #字段策略,IGNORED:忽略判断,NOT_NULL:非null判断,NOT_EMPTY:非空判断,DEFAULT:默认,NEVER:不加入sql
        update-strategy: IGNORED
  mapper-locations: classpath*:/cn/huge/*/*/dao/mapper/xml/*Mapper.xml
#附件配置
file:
  #存储方式
  store-way: ftp
  #查看地址
  show-path: /api/fileInfo/show
  #下载地址
  down-path: /api/fileInfo/down
dyh-service/dyh-utils/src/main/java/cn/huge/module/mediate/controller/web/CaseUtilsWebController.java
New file
@@ -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();
        }
    }
}