|
@@ -79,7 +79,6 @@ public class WorkServiceImpl extends IBaseServiceImpl<WorkEntity, Long> implemen
|
|
|
FileUtils fileUtils;
|
|
|
|
|
|
|
|
|
-
|
|
|
@Override
|
|
|
public IBaseMapper<WorkEntity, Long> getBaseMapper() {
|
|
|
return this.entityMapper;
|
|
@@ -94,7 +93,6 @@ public class WorkServiceImpl extends IBaseServiceImpl<WorkEntity, Long> implemen
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 目前只是用来保存密码, 也可以使用保存实体信息
|
|
|
*/
|
|
@@ -115,7 +113,6 @@ public class WorkServiceImpl extends IBaseServiceImpl<WorkEntity, Long> implemen
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
@Override
|
|
|
public Result<WorkEntity> entityAdd() {
|
|
|
WorkEntity entity = new WorkEntity();
|
|
@@ -134,12 +131,11 @@ public class WorkServiceImpl extends IBaseServiceImpl<WorkEntity, Long> implemen
|
|
|
} else {
|
|
|
// 获取文件内容
|
|
|
log.info("创建someData.json");
|
|
|
- content = FileUtils.getResourceContent("data/someData.json");
|
|
|
+ content = FileUtils.getResourceContent("data/someData.json");
|
|
|
FileUtil.writeUtf8String(content, baseSomeDataPath);
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
Long id = entity.getId();
|
|
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(content);
|
|
@@ -261,7 +257,7 @@ public class WorkServiceImpl extends IBaseServiceImpl<WorkEntity, Long> implemen
|
|
|
|
|
|
log.info("更新作品完成");
|
|
|
// 保存someData.json
|
|
|
- editSomeData( param);
|
|
|
+ editSomeData(param);
|
|
|
|
|
|
return Result.success();
|
|
|
}
|
|
@@ -272,7 +268,6 @@ public class WorkServiceImpl extends IBaseServiceImpl<WorkEntity, Long> implemen
|
|
|
private boolean editEntity(SomeDataDto param, WorkEntity entity) {
|
|
|
|
|
|
|
|
|
-
|
|
|
String someData = param.getSomeData();
|
|
|
JSONObject sd = JSONObject.parseObject(someData);
|
|
|
entity.setName(sd.getString("name"));
|
|
@@ -301,8 +296,10 @@ public class WorkServiceImpl extends IBaseServiceImpl<WorkEntity, Long> implemen
|
|
|
|
|
|
}
|
|
|
|
|
|
- /** 更新二维码 */
|
|
|
- private Boolean updateQrCode(Long id, String logoUrl){
|
|
|
+ /**
|
|
|
+ * 更新二维码
|
|
|
+ */
|
|
|
+ private Boolean updateQrCode(Long id, String logoUrl) {
|
|
|
|
|
|
// 网络下载logo图片
|
|
|
logoUrl = logoUrl + "?m=" + System.currentTimeMillis();
|
|
@@ -349,7 +346,6 @@ public class WorkServiceImpl extends IBaseServiceImpl<WorkEntity, Long> implemen
|
|
|
public Result select4dkk(PageDto param, Long workId) {
|
|
|
startPage(param);
|
|
|
|
|
|
-// String url = "https://test.4dkankan.com/api/user/scene/list";
|
|
|
String url = configConstant.domain4dKK + "/api/user/scene/list";
|
|
|
JSONObject reqParam = new JSONObject();
|
|
|
reqParam.put("pageNum", param.getPageNum().toString());
|
|
@@ -357,6 +353,8 @@ public class WorkServiceImpl extends IBaseServiceImpl<WorkEntity, Long> implemen
|
|
|
reqParam.put("searchKey", param.getSearchKey());
|
|
|
// type=11, 计算成功的场景
|
|
|
reqParam.put("type", "11");
|
|
|
+ // 2022-2-10 excludeSceneSource=4, 过滤激光场景数据
|
|
|
+ reqParam.put("excludeSceneSource", 4);
|
|
|
|
|
|
HashMap<String, String> headers = new HashMap<>();
|
|
|
String token = getToken();
|
|
@@ -367,6 +365,7 @@ public class WorkServiceImpl extends IBaseServiceImpl<WorkEntity, Long> implemen
|
|
|
String restResult = null;
|
|
|
JSONObject reJson = null;
|
|
|
try {
|
|
|
+
|
|
|
HttpResponse httpResponse = HttpUtils.doPost(url, headers, reqParam);
|
|
|
restResult = EntityUtils.toString(httpResponse.getEntity(), "UTF-8");
|
|
|
log.debug("restResult: " + restResult);
|
|
@@ -388,8 +387,7 @@ public class WorkServiceImpl extends IBaseServiceImpl<WorkEntity, Long> implemen
|
|
|
return Result.failure(msg);
|
|
|
}
|
|
|
|
|
|
- JSONObject dataJson = reJson.getJSONObject("data");
|
|
|
- } catch (Exception e) {
|
|
|
+ } catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
|