dengsixing 6 ヶ月 前
コミット
b0990efc3e

+ 4 - 1
src/main/java/com/fdkankan/contro/schedule/ScheduleJob.java

@@ -4,13 +4,14 @@ import com.fdkankan.contro.service.GzZcdjzxService;
 import com.fdkankan.contro.service.IScene3dNumService;
 import com.fdkankan.contro.util.BdUtil;
 import lombok.extern.log4j.Log4j2;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
 import javax.annotation.Resource;
 
-@Log4j2
+@Slf4j
 @Component
 public class ScheduleJob {
 
@@ -35,6 +36,8 @@ public class ScheduleJob {
      */
     @Scheduled(fixedDelay = 5*60*1000, initialDelay = 1000)
     public void bd() {
+        log.info("定时任务推送开始");
         gzZcdjzxService.bd();
+        log.info("定时任务推送结束");
     }
 }

+ 2 - 2
src/main/java/com/fdkankan/contro/service/impl/HaixinServiceImpl.java

@@ -43,13 +43,13 @@ public class HaixinServiceImpl implements IHaixinService {
 
         String taskId = dto.getTaskId();
         String kNo = dto.getKNo();
-        if(StrUtil.isEmpty(taskId) && StrUtil.isEmpty(taskId)){
+        if(StrUtil.isEmpty(taskId) && StrUtil.isEmpty(kNo)){
             throw new BusinessException(ErrorCode.PARAM_REQUIRED.code(), "taskId和kNo不能同时为空");
         }
 
         SceneOrigBd sceneOrigBd = new SceneOrigBd();
         sceneOrigBd.setFileUrl(dto.getFileUrl());
-        sceneOrigBd.setTaskId(dto.getKNo());
+        sceneOrigBd.setTaskId(dto.getTaskId());
         sceneOrigBd.setKNo(dto.getKNo());
 
         sceneOrigBdService.save(sceneOrigBd);

+ 20 - 20
src/main/java/com/fdkankan/contro/service/impl/SceneFileBuildServiceImpl.java

@@ -442,26 +442,26 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
 
         //舒淇要求场景上传取data.fdage中的用户
         Long userId = null;
-        userName = jsonObject.getString("userId");
-        String password = jsonObject.getString("password");
-        log.info("场景归属账号为:account:{}", userName);
-        if(StrUtil.isNotEmpty(userName)){
-            User user = userService.getByUserName(userName);
-            if(Objects.isNull(user)){
-                //自动注册
-                JSONObject registerParams = new JSONObject();
-                registerParams.put("phoneNum", userName);
-                registerParams.put("password", password);
-                registerParams.put("confirmPwd", password);
-                registerParams.put("msgAuthCode", "2a22bac40f44af4d3b5fdc20ea706fc5");
-                ResultData resultData = httpClient.postJson("http://127.0.0.1:8081/ucenter/sso/user/register", null, registerParams);
-                user = userService.getByUserName(userName);
-            }
-            log.info("场景归属账号id为:userId:{}", user.getId());
-            if(Objects.nonNull(user)){
-                userId = user.getId();
-            }
-        }
+//        userName = jsonObject.getString("userId");
+//        String password = jsonObject.getString("password");
+//        log.info("场景归属账号为:account:{}", userName);
+//        if(StrUtil.isNotEmpty(userName)){
+//            User user = userService.getByUserName(userName);
+//            if(Objects.isNull(user)){
+//                //自动注册
+//                JSONObject registerParams = new JSONObject();
+//                registerParams.put("phoneNum", userName);
+//                registerParams.put("password", password);
+//                registerParams.put("confirmPwd", password);
+//                registerParams.put("msgAuthCode", "2a22bac40f44af4d3b5fdc20ea706fc5");
+//                ResultData resultData = httpClient.postJson("http://127.0.0.1:8081/ucenter/sso/user/register", null, registerParams);
+//                user = userService.getByUserName(userName);
+//            }
+//            log.info("场景归属账号id为:userId:{}", user.getId());
+//            if(Objects.nonNull(user)){
+//                userId = user.getId();
+//            }
+//        }
 
         ScenePlusVO scenePlusVO = this.createScenePlus(sceneNum, cameraDetail.getCameraId(), jsonObject.getString("creator"),
                 jsonObject.getString("pwd"),cameraType, jsonObject.getJSONObject("cam").getIntValue("type"),