This commit is contained in:
张洋川 2024-04-24 10:54:43 +08:00
commit af18464f1d
2 changed files with 7 additions and 5 deletions

View File

@ -2,6 +2,9 @@ package com.sf.system.deployment.service.impl;
import java.io.IOException; import java.io.IOException;
import java.util.List; 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.DateUtils;
import com.sf.common.utils.file.QRCodeUtils; import com.sf.common.utils.file.QRCodeUtils;
import com.sf.file.domain.SysOss; import com.sf.file.domain.SysOss;
@ -110,7 +113,7 @@ public class DeploymentServicePublishServiceImpl implements IDeploymentServicePu
@Override @Override
public int publish(DeploymentServicePublish deploymentServicePublish) throws Exception { public int publish(DeploymentServicePublish deploymentServicePublish) throws Exception {
if(1 == deploymentServicePublish.getStatus()){ if(1 == deploymentServicePublish.getStatus()){
return 0;//不允许重复发布 throw new ServiceException("安装包已发布", HttpStatus.WARN);
} }
deploymentServicePublish.setUpdateTime(DateUtils.getNowDate()); deploymentServicePublish.setUpdateTime(DateUtils.getNowDate());
SysApkInfo sysApkInfo = iSysApkInfoService.selectSysApkInfoById(deploymentServicePublish.getApkId()); SysApkInfo sysApkInfo = iSysApkInfoService.selectSysApkInfoById(deploymentServicePublish.getApkId());
@ -123,9 +126,9 @@ public class DeploymentServicePublishServiceImpl implements IDeploymentServicePu
@Override @Override
public int soldOut(DeploymentServicePublish deploymentServicePublish) { public int soldOut(DeploymentServicePublish deploymentServicePublish) {
if(2 == deploymentServicePublish.getStatus()){ if(2 == deploymentServicePublish.getStatus()){
return 0;//不允许重复下架 throw new ServiceException("安装包已下架", HttpStatus.WARN);
} }
deploymentServicePublish.setStatus(3L); deploymentServicePublish.setStatus(2L);
return deploymentServicePublishMapper.updateDeploymentServicePublish(deploymentServicePublish); return deploymentServicePublishMapper.updateDeploymentServicePublish(deploymentServicePublish);
} }
} }

View File

@ -10,8 +10,7 @@ http {
default_type application/octet-stream; default_type application/octet-stream;
sendfile on; sendfile on;
keepalive_timeout 65; keepalive_timeout 65;
post_max_size = 100M; client_max_body_size 1024m;
upload_max_filesize = 100M;
#gzip on; #gzip on;