lyhzzz 2 лет назад
Родитель
Сommit
58940362e2

+ 1 - 0
src/main/java/com/fdkankan/manage/common/ResultCode.java

@@ -52,6 +52,7 @@ public enum ResultCode  {
     DEL_ROLE_ERROR(50035, "该角色已关联用户,不可删除。请先修改相关用户的角色!"),
     ORDER_SN_ERROR(50036, "订单号不存在"),
     OLD_PASSWORD_ERROR(50037, "原密码错误"),
+    UPLOAD_YUN_TYPE_ERROR(50038, "上传服务器类型错误,请确认环境上传"),
 
     ;
 

+ 6 - 0
src/main/java/com/fdkankan/manage/httpClient/service/LaserService.java

@@ -57,6 +57,12 @@ public class LaserService {
         FdkkResponse response = laserClient.sceneList(newParam);
 
         JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(response.getData()));
+        if(jsonObject == null){
+            Page<SceneVo> voPage = new Page<>(param.getPageNum(),param.getPageSize());
+            voPage.setRecords(new ArrayList<>());
+            voPage.setTotal(0);
+            return PageInfo.PageInfo(voPage);
+        }
         JSONArray list = jsonObject.getJSONArray("list");
         long total =jsonObject.getLong("total");
 

+ 4 - 0
src/main/java/com/fdkankan/manage/service/impl/AppFileServiceImpl.java

@@ -99,6 +99,10 @@ public class AppFileServiceImpl extends ServiceImpl<IAppFileMapper, AppFile> imp
         if(ObjectUtils.isEmpty(param.getName())){
             throw new BusinessException(ResultCode.FILE_NAME_EMPTY);
         }
+        if(!param.getFileServerType().equals(ossType)){
+            throw new BusinessException(ResultCode.UPLOAD_YUN_TYPE_ERROR);
+
+        }
         AppFile managerAPPEntity = new AppFile();
         BeanUtils.copyProperties(param, managerAPPEntity);
         String basePath = FilePath.appLocalPath ;

+ 1 - 1
src/main/java/com/fdkankan/manage/service/impl/SceneProServiceImpl.java

@@ -176,7 +176,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
             HashMap<Long, ScenePlusExt> byPlusIds = scenePlusExtService.getByPlusIds(plusIds);
             for (ScenePlus scenePlus : list){
                 ScenePlusExt scenePlusExt = byPlusIds.get(scenePlus.getId());
-                accumulateSpace += scenePlusExt.getSpace();
+                accumulateSpace += scenePlusExt.getSpace() == null ?0 : scenePlusExt.getSpace();
                 if (count ==0 && accumulateSpace.compareTo(beyondSpace) > 0){
                     break;
                 }

+ 4 - 2
src/main/java/com/fdkankan/manage/service/impl/SpaceSdkServiceImpl.java

@@ -14,6 +14,7 @@ import com.fdkankan.common.util.DateUtil;
 import com.fdkankan.common.util.FileUtils;
 import com.fdkankan.manage.entity.SysUser;
 import com.fdkankan.manage.service.ISysUserService;
+import com.fdkankan.manage.util.Dateutils;
 import com.fdkankan.manage.util.MangerUploadToOssUtil;
 import com.fdkankan.manage.entity.SpaceSdk;
 import com.fdkankan.manage.mapper.ISpaceSdkMapper;
@@ -117,6 +118,7 @@ public class SpaceSdkServiceImpl extends ServiceImpl<ISpaceSdkMapper, SpaceSdk>
         if(isTop == 1){
             this.updateTopFBySdkId(managerSdkEntity.getId());//取消所有置顶
         }
+        this.updateById(managerSdkEntity);
         // 删除本地文件
         FileUtils.deleteFile(filePath);
 
@@ -203,7 +205,7 @@ public class SpaceSdkServiceImpl extends ServiceImpl<ISpaceSdkMapper, SpaceSdk>
 
     private void updateBySdkId(Long id, Integer status) {
         LambdaUpdateWrapper<SpaceSdk> updateWrapper = new LambdaUpdateWrapper<>();
-        updateWrapper.set(SpaceSdk::getStatus,status == 2 ? 0:2)
+        updateWrapper.set(SpaceSdk::getStatus,status == 2 ? 0:status)
                 .eq(SpaceSdk::getId,id);
         this.update(updateWrapper);
     }
@@ -220,7 +222,7 @@ public class SpaceSdkServiceImpl extends ServiceImpl<ISpaceSdkMapper, SpaceSdk>
 
     private void updateBySdkIdPublish(Long id, Integer status) {
         LambdaUpdateWrapper<SpaceSdk> updateWrapper = new LambdaUpdateWrapper<>();
-        updateWrapper.set(SpaceSdk::getStatus,status == 2 ? 0 :2)
+        updateWrapper.set(SpaceSdk::getStatus,status == 2 ? 0 :status)
                 .set(SpaceSdk::getPublishTime,new Date())
                 .eq(SpaceSdk::getId,id);
         this.update(updateWrapper);