|
@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.gis.cms.entity.dto.SomeDataDto;
|
|
|
import com.gis.cms.entity.dto.WorkDto;
|
|
|
+import com.gis.cms.entity.po.FodderEntity;
|
|
|
import com.gis.cms.entity.po.WorkEntity;
|
|
|
import com.gis.cms.mapper.WorkMapper;
|
|
|
import com.gis.cms.service.WorkService;
|
|
@@ -79,6 +80,7 @@ public class WorkServiceImpl extends ServiceImpl<WorkMapper, WorkEntity> impleme
|
|
|
if (StringUtils.isNotBlank(searchKey)){
|
|
|
wrapper.like(WorkEntity::getName, param.getSearchKey());
|
|
|
}
|
|
|
+ wrapper.orderByDesc(WorkEntity::getCreateTime);
|
|
|
IPage<WorkEntity> result = this.page(page, wrapper);
|
|
|
return Result.success(result);
|
|
|
}
|
|
@@ -91,9 +93,7 @@ public class WorkServiceImpl extends ServiceImpl<WorkMapper, WorkEntity> impleme
|
|
|
public Result<WorkEntity> entitySave(WorkDto param) {
|
|
|
WorkEntity entity = this.getById(param.getId());
|
|
|
BaseRuntimeException.isNull(entity, ErrorEnum.FAILURE_SYS_2001);
|
|
|
-
|
|
|
BeanUtils.copyProperties(param, entity);
|
|
|
-
|
|
|
entity.setUpdateTime(LocalDateTime.now());
|
|
|
this.updateById(entity);
|
|
|
return Result.success(entity);
|
|
@@ -176,14 +176,6 @@ public class WorkServiceImpl extends ServiceImpl<WorkMapper, WorkEntity> impleme
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
-// @Override
|
|
|
-// public WorkEntity findByIdForUpdate(String id) {
|
|
|
-// // 查询数据之前先清理分页缓存
|
|
|
-// PageHelper.clearPage();
|
|
|
-// return entityMapper.findByIdForUpdate(id);
|
|
|
-//}
|
|
|
-
|
|
|
@Override
|
|
|
public Result checkToken(String workId) {
|
|
|
|
|
@@ -291,9 +283,7 @@ public class WorkServiceImpl extends ServiceImpl<WorkMapper, WorkEntity> impleme
|
|
|
String sceneCode = parse.getString("sceneCode");
|
|
|
list.add(sceneCode);
|
|
|
}
|
|
|
-
|
|
|
String join = StringUtils.join(list, ",");
|
|
|
-
|
|
|
return join;
|
|
|
|
|
|
|
|
@@ -327,13 +317,10 @@ public class WorkServiceImpl extends ServiceImpl<WorkMapper, WorkEntity> impleme
|
|
|
private void updateSomeData(SomeDataDto param) {
|
|
|
|
|
|
String id = param.getId();
|
|
|
-// String baseSomeDataPath = id + "/someData.json";
|
|
|
// 存放到工作目录, 已workId为目录
|
|
|
String someDataPath = configConstant.serverBasePath + "/work/" + id + "/someData.json";
|
|
|
-// String saveSomeDataPath = configConstant.serverBasePath + baseSomeDataPath;
|
|
|
// 写入服务器
|
|
|
FileUtil.writeUtf8String(param.getSomeData(), someDataPath);
|
|
|
- log.info("");
|
|
|
|
|
|
}
|
|
|
|
|
@@ -420,12 +407,6 @@ public class WorkServiceImpl extends ServiceImpl<WorkMapper, WorkEntity> impleme
|
|
|
|
|
|
|
|
|
|
|
|
-// @Override
|
|
|
-// public List<WorkEntity> likeSceneCode(String sceneCode) {
|
|
|
-// sceneCode = "%" + sceneCode + "%";
|
|
|
-// return entityMapper.likeSceneCode(sceneCode, getUserNameForToken());
|
|
|
-// }
|
|
|
-
|
|
|
|
|
|
|
|
|
|