Browse Source

修改图片域名等相关配置,更新相关查询接口

tags/v2.5.0
xiaoying 1 year ago
parent
commit
6bee885330
7 changed files with 40 additions and 7 deletions
  1. +14
    -0
      tuoheng_oidc_admin/src/main/java/com/tuoheng/common/CommonConfig.java
  2. +0
    -3
      tuoheng_oidc_admin/src/main/java/com/tuoheng/model/entity/InspectionFile.java
  3. +16
    -0
      tuoheng_oidc_admin/src/main/java/com/tuoheng/service/information/impl/InspectionFileServiceImpl.java
  4. +1
    -1
      tuoheng_oidc_admin/src/main/java/com/tuoheng/service/information/impl/InspectionServiceImpl.java
  5. +3
    -1
      tuoheng_oidc_admin/src/main/resources/application-dev.yml
  6. +3
    -1
      tuoheng_oidc_admin/src/main/resources/application-prod.yml
  7. +3
    -1
      tuoheng_oidc_admin/src/main/resources/application-test.yml

+ 14
- 0
tuoheng_oidc_admin/src/main/java/com/tuoheng/common/CommonConfig.java View File

@@ -24,6 +24,10 @@ public class CommonConfig {
* 高德KEY
*/
public static String gaodeKey;
/**
* 图片域名
*/
public static String imageURL;

/**
* 机场url
@@ -52,4 +56,14 @@ public class CommonConfig {
public void setGaodeKey(String key) {
gaodeKey = key;
}

/**
* 图片域名赋值
*
* @param url 域名地址
*/
@Value("${tuoheng.image-url}")
public void setImageUrl(String url) {
imageURL = url;
}
}

+ 0
- 3
tuoheng_oidc_admin/src/main/java/com/tuoheng/model/entity/InspectionFile.java View File

@@ -119,9 +119,6 @@ public class InspectionFile implements Serializable {
*/
private String questionId;




@TableField(exist = false)
private static final long serialVersionUID = 1L;
}

+ 16
- 0
tuoheng_oidc_admin/src/main/java/com/tuoheng/service/information/impl/InspectionFileServiceImpl.java View File

@@ -1,10 +1,12 @@
package com.tuoheng.service.information.impl;

import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tuoheng.common.CommonConfig;
import com.tuoheng.enums.MarkTypeEnum;
import com.tuoheng.model.entity.Inspection;
import com.tuoheng.model.entity.InspectionFile;
@@ -46,6 +48,20 @@ public class InspectionFileServiceImpl extends ServiceImpl<InspectionFileMapper,
.eq(ObjectUtil.isNotEmpty(query.getClientId()), InspectionFile::getClientId, query.getClientId())
.eq(InspectionFile::getMark, MarkTypeEnum.VALID.getCode())
.orderByDesc(InspectionFile::getCreateTime));
//问题图片带域名
pageDate.convert(item -> {
InspectionFile inspectionFile = Convert.convert(InspectionFile.class, item);
if (ObjectUtil.isNotEmpty(item.getFileOriginal())) {
inspectionFile.setFileOriginal(CommonConfig.imageURL + item.getFileOriginal());
}
if (ObjectUtil.isNotEmpty(item.getFileImage())) {
inspectionFile.setFileImage(CommonConfig.imageURL + item.getFileImage());
}
if (ObjectUtil.isNotEmpty(item.getFileThumbnail())) {
inspectionFile.setFileThumbnail(CommonConfig.imageURL + item.getFileThumbnail());
}
return inspectionFile;
});

return JsonResult.success(pageDate);
}

+ 1
- 1
tuoheng_oidc_admin/src/main/java/com/tuoheng/service/information/impl/InspectionServiceImpl.java View File

@@ -40,7 +40,7 @@ public class InspectionServiceImpl extends ServiceImpl<InspectionMapper, Inspect
//分页校验
query.checkParam();
//分页
IPage<Inspection> page = new Page<>(query.getPage(), query.getLimit());
IPage<Inspection> page = new Page <>(query.getPage(), query.getLimit());

IPage<Inspection> pageDate = inspectionMapper.selectPage(page, Wrappers.<Inspection>lambdaQuery()
.like(ObjectUtil.isNotEmpty(query.getName()), Inspection::getName, query.getName())

+ 3
- 1
tuoheng_oidc_admin/src/main/resources/application-dev.yml View File

@@ -73,4 +73,6 @@ tuoheng:
#dsp配置地址
dsp-url: http://106.15.64.139:7011/api/web/dsp
# 高德Key
gaodeKey: 5a1f63e7563cba471a9d0773e218144a
gaodeKey: 5a1f63e7563cba471a9d0773e218144a
# 图片域名
image-url: https://image.t-aaron.com/

+ 3
- 1
tuoheng_oidc_admin/src/main/resources/application-prod.yml View File

@@ -72,4 +72,6 @@ tuoheng:
#dsp配置地址
dsp-url: https://dsp-portal.t-aaron.com/api/web/dsp
# 高德Key
gaodeKey: 5a1f63e7563cba471a9d0773e218144a
gaodeKey: 5a1f63e7563cba471a9d0773e218144a
# 图片域名
image-url: https://image.t-aaron.com/

+ 3
- 1
tuoheng_oidc_admin/src/main/resources/application-test.yml View File

@@ -72,4 +72,6 @@ tuoheng:
#dsp配置地址
dsp-url: http://106.15.64.139:7011/api/web/dsp
# 高德Key
gaodeKey: 5a1f63e7563cba471a9d0773e218144a
gaodeKey: 5a1f63e7563cba471a9d0773e218144a
# 图片域名
image-url: https://image.t-aaron.com/

Loading…
Cancel
Save