Browse Source

Merge remote-tracking branch 'remotes/origin/dev' into release

master
jianjun 5 years ago
parent
commit
6ffb245965
  1. 2
      epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-dev.yml
  2. 2
      epmet-module/epmet-oss/epmet-oss-server/pom.xml
  3. 3
      epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java
  4. 5
      epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/utils/ModuleConstant.java
  5. 1
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java

2
epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-dev.yml

@ -3,7 +3,7 @@ services:
epmet-oss-server:
container_name: epmet-oss-server-dev
# image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-dev/epmet-oss-server:0.3.2
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-oss-server:0.3.20
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-oss-server:0.3.21
ports:
- "8083:8083"
network_mode: host # 使用现有网络

2
epmet-module/epmet-oss/epmet-oss-server/pom.xml

@ -2,7 +2,7 @@
<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">
<modelVersion>4.0.0</modelVersion>
<version>0.3.20</version>
<version>0.3.21</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-oss</artifactId>

3
epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java

@ -191,7 +191,8 @@ public class OssController {
public Result<UploadImgResultDTO> uploadArticleImg(@RequestParam("file") MultipartFile file) {
// 校验文件类型
if (!MediaType.IMAGE_PNG_VALUE.equals(file.getContentType()) && !MediaType.IMAGE_JPEG_VALUE.equals(file.getContentType())) {
if (!MediaType.IMAGE_PNG_VALUE.equals(file.getContentType()) && !MediaType.IMAGE_JPEG_VALUE.equals(file.getContentType())
&& !ModuleConstant.FILE_CONTENT_TYPE_JPG.equals(file.getContentType()) ) {
log.error("uploadArticleImg file type:{} is not support 2 upload",file.getContentType() == null? null:file.getContentType());
throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_TYPE_ERROR.getCode()
, EpmetErrorCode.OPER_UPLOAD_FILE_TYPE_ERROR.getMsg());

5
epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/utils/ModuleConstant.java

@ -21,4 +21,9 @@ public interface ModuleConstant extends Constant {
* 云存储配置KEY
*/
String CLOUD_STORAGE_CONFIG_KEY = "CLOUD_STORAGE_CONFIG_KEY";
/**
* jpg文件类型
*/
String FILE_CONTENT_TYPE_JPG = "image/jpg";
}

1
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java

@ -356,7 +356,6 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
@Transactional(rollbackFor = Exception.class)
public void executeSaveDraftAttr(DraftEntity draftEntity, DraftCoverEntity coverEntity, List<DraftPublishRangeEntity> publishRangeEntityList) {
Map<String, Object> draftIdMap = new HashMap<>();
//物理删除
draftCoverDao.deleteByDraftId(draftEntity.getId());
if (coverEntity != null) {

Loading…
Cancel
Save