|
@@ -1,6 +1,5 @@
|
|
|
package com.fdkankan.fusion.service.impl;
|
|
|
|
|
|
-import cn.dev33.satoken.stp.StpUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.fdkankan.fusion.common.ResultCode;
|
|
@@ -10,7 +9,6 @@ import com.fdkankan.fusion.common.PageInfo;
|
|
|
import com.fdkankan.fusion.mapper.ICaseMapper;
|
|
|
import com.fdkankan.fusion.request.CaseParam;
|
|
|
import com.fdkankan.fusion.request.ScenePram;
|
|
|
-import com.fdkankan.fusion.response.HotVo;
|
|
|
import com.fdkankan.fusion.response.SceneVo;
|
|
|
import com.fdkankan.fusion.service.*;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
@@ -19,7 +17,6 @@ import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
-import java.time.Period;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
@@ -215,24 +212,16 @@ public class CaseServiceImpl extends ServiceImpl<ICaseMapper, CaseEntity> implem
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void addOrUpdate(CaseParam param, String userName) {
|
|
|
+ public void addOrUpdate(CaseEntity param, String userName) {
|
|
|
if(StringUtils.isEmpty(param.getCaseTitle())){
|
|
|
throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
|
}
|
|
|
- CaseEntity caseEntity ;
|
|
|
if(param.getCaseId() == null){
|
|
|
- caseEntity = new CaseEntity();
|
|
|
TmUser tmUser = tmUserService.getByUserName(userName);
|
|
|
- caseEntity.setDeptId(tmUser.getDeptId());
|
|
|
- caseEntity.setUserName(userName);
|
|
|
- }else {
|
|
|
- caseEntity = this.getById(param.getCaseId());
|
|
|
+ param.setDeptId(tmUser.getDeptId());
|
|
|
+ param.setUserName(userName);
|
|
|
}
|
|
|
- caseEntity.setCaseTitle(param.getCaseTitle());
|
|
|
- caseEntity.setLatAndLong(param.getLatAndLong());
|
|
|
- caseEntity.setMapUrl(param.getMapUrl());
|
|
|
- caseEntity.setUpdateTime(null);
|
|
|
- this.saveOrUpdate(caseEntity);
|
|
|
+ this.saveOrUpdate(param);
|
|
|
}
|
|
|
|
|
|
@Override
|