|
@@ -8,6 +8,7 @@ import com.baomidou.dynamic.datasource.annotation.DS;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.fdkankan.common.constant.CommonStatus;
|
|
import com.fdkankan.common.constant.CommonStatus;
|
|
|
|
+import com.fdkankan.common.constant.ConstantField;
|
|
import com.fdkankan.common.constant.ErrorCode;
|
|
import com.fdkankan.common.constant.ErrorCode;
|
|
import com.fdkankan.common.constant.UploadFilePath;
|
|
import com.fdkankan.common.constant.UploadFilePath;
|
|
import com.fdkankan.common.exception.BusinessException;
|
|
import com.fdkankan.common.exception.BusinessException;
|
|
@@ -48,8 +49,6 @@ import java.util.stream.Collectors;
|
|
@Service
|
|
@Service
|
|
public class SceneEditInfoExtServiceImpl extends ServiceImpl<SceneEditInfoExtMapper, SceneEditInfoExt> implements SceneEditInfoExtService {
|
|
public class SceneEditInfoExtServiceImpl extends ServiceImpl<SceneEditInfoExtMapper, SceneEditInfoExt> implements SceneEditInfoExtService {
|
|
|
|
|
|
- private final static String CREATE_TIME = "createTime";
|
|
|
|
-
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private SceneService scenePlusService;
|
|
private SceneService scenePlusService;
|
|
@Autowired
|
|
@Autowired
|
|
@@ -112,7 +111,7 @@ public class SceneEditInfoExtServiceImpl extends ServiceImpl<SceneEditInfoExtMap
|
|
AtomicInteger index = new AtomicInteger();
|
|
AtomicInteger index = new AtomicInteger();
|
|
styles.stream().forEach(style->{
|
|
styles.stream().forEach(style->{
|
|
String id = style.getString("sid");
|
|
String id = style.getString("sid");
|
|
- style.put(CREATE_TIME, time + index.getAndIncrement());
|
|
|
|
|
|
+ style.put(ConstantField.CREATE_TIME, time + index.getAndIncrement());
|
|
styleMap.put(id, style.toJSONString());
|
|
styleMap.put(id, style.toJSONString());
|
|
});
|
|
});
|
|
|
|
|
|
@@ -156,8 +155,8 @@ public class SceneEditInfoExtServiceImpl extends ServiceImpl<SceneEditInfoExtMap
|
|
List<TagBean> sortList = list.stream().map(str -> {
|
|
List<TagBean> sortList = list.stream().map(str -> {
|
|
JSONObject jsonObject = JSON.parseObject(str);
|
|
JSONObject jsonObject = JSON.parseObject(str);
|
|
TagBean tagBean = new TagBean();
|
|
TagBean tagBean = new TagBean();
|
|
- tagBean.setCreateTime(jsonObject.getLong(CREATE_TIME));
|
|
|
|
- jsonObject.remove(CREATE_TIME);
|
|
|
|
|
|
+ tagBean.setCreateTime(jsonObject.getLong(ConstantField.CREATE_TIME));
|
|
|
|
+ jsonObject.remove(ConstantField.CREATE_TIME);
|
|
tagBean.setTag(jsonObject);
|
|
tagBean.setTag(jsonObject);
|
|
return tagBean;
|
|
return tagBean;
|
|
}).collect(Collectors.toList());
|
|
}).collect(Collectors.toList());
|
|
@@ -173,8 +172,8 @@ public class SceneEditInfoExtServiceImpl extends ServiceImpl<SceneEditInfoExtMap
|
|
List<TagBean> stileSortList = sytlelist.stream().map(str -> {
|
|
List<TagBean> stileSortList = sytlelist.stream().map(str -> {
|
|
JSONObject jsonObject = JSON.parseObject(str);
|
|
JSONObject jsonObject = JSON.parseObject(str);
|
|
TagBean tagBean = new TagBean();
|
|
TagBean tagBean = new TagBean();
|
|
- tagBean.setCreateTime(jsonObject.getLong(CREATE_TIME));
|
|
|
|
- jsonObject.remove(CREATE_TIME);
|
|
|
|
|
|
+ tagBean.setCreateTime(jsonObject.getLong(ConstantField.CREATE_TIME));
|
|
|
|
+ jsonObject.remove(ConstantField.CREATE_TIME);
|
|
tagBean.setTag(jsonObject);
|
|
tagBean.setTag(jsonObject);
|
|
return tagBean;
|
|
return tagBean;
|
|
}).collect(Collectors.toList());
|
|
}).collect(Collectors.toList());
|
|
@@ -204,7 +203,7 @@ public class SceneEditInfoExtServiceImpl extends ServiceImpl<SceneEditInfoExtMap
|
|
Map<String, String> addOrUpdateMap = new HashMap<>();
|
|
Map<String, String> addOrUpdateMap = new HashMap<>();
|
|
int i = 0;
|
|
int i = 0;
|
|
for (JSONObject jsonObject : data) {
|
|
for (JSONObject jsonObject : data) {
|
|
- jsonObject.put(CREATE_TIME, Calendar.getInstance().getTimeInMillis() + i++);
|
|
|
|
|
|
+ jsonObject.put(ConstantField.CREATE_TIME, Calendar.getInstance().getTimeInMillis() + i++);
|
|
addOrUpdateMap.put(jsonObject.getString("sid"), JSON.toJSONString(jsonObject));
|
|
addOrUpdateMap.put(jsonObject.getString("sid"), JSON.toJSONString(jsonObject));
|
|
}
|
|
}
|
|
|
|
|