From 0c43e877184dc886818991a8f8c4bf0f6e3075b7 Mon Sep 17 00:00:00 2001 From: pengren Date: Wed, 24 Apr 2024 10:14:33 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E5=8F=B7=EF=BC=9AZSSAC-585=20?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0=EF=BC=9A=E4=BF=AE=E6=94=B9nginx?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/DeploymentServicePublishServiceImpl.java | 9 ++++++--- sf-ui/nginx.conf | 3 +-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/sf-system/src/main/java/com/sf/system/deployment/service/impl/DeploymentServicePublishServiceImpl.java b/sf-system/src/main/java/com/sf/system/deployment/service/impl/DeploymentServicePublishServiceImpl.java index 1f57ddb..bde7b26 100644 --- a/sf-system/src/main/java/com/sf/system/deployment/service/impl/DeploymentServicePublishServiceImpl.java +++ b/sf-system/src/main/java/com/sf/system/deployment/service/impl/DeploymentServicePublishServiceImpl.java @@ -2,6 +2,9 @@ package com.sf.system.deployment.service.impl; import java.io.IOException; import java.util.List; + +import com.sf.common.constant.HttpStatus; +import com.sf.common.exception.ServiceException; import com.sf.common.utils.DateUtils; import com.sf.common.utils.file.QRCodeUtils; import com.sf.file.domain.SysOss; @@ -110,7 +113,7 @@ public class DeploymentServicePublishServiceImpl implements IDeploymentServicePu @Override public int publish(DeploymentServicePublish deploymentServicePublish) throws Exception { if(1 == deploymentServicePublish.getStatus()){ - return 0;//不允许重复发布 + throw new ServiceException("安装包已发布", HttpStatus.WARN); } deploymentServicePublish.setUpdateTime(DateUtils.getNowDate()); SysApkInfo sysApkInfo = iSysApkInfoService.selectSysApkInfoById(deploymentServicePublish.getApkId()); @@ -123,9 +126,9 @@ public class DeploymentServicePublishServiceImpl implements IDeploymentServicePu @Override public int soldOut(DeploymentServicePublish deploymentServicePublish) { if(2 == deploymentServicePublish.getStatus()){ - return 0;//不允许重复下架 + throw new ServiceException("安装包已下架", HttpStatus.WARN); } - deploymentServicePublish.setStatus(3L); + deploymentServicePublish.setStatus(2L); return deploymentServicePublishMapper.updateDeploymentServicePublish(deploymentServicePublish); } } diff --git a/sf-ui/nginx.conf b/sf-ui/nginx.conf index 1656774..63ce459 100644 --- a/sf-ui/nginx.conf +++ b/sf-ui/nginx.conf @@ -10,8 +10,7 @@ http { default_type application/octet-stream; sendfile on; keepalive_timeout 65; - post_max_size = 100M; - upload_max_filesize = 100M; + client_max_body_size 1024m; #gzip on;