lyhzzz 5 napja
szülő
commit
1c046f36af

+ 8 - 7
src/main/java/com/fdkankan/fusion/controller/MapConfigController.java

@@ -43,14 +43,15 @@ public class MapConfigController {
 
     @PostMapping("/geocode")
     public ResultData geocode(@RequestBody MapParam param){
-        if(param.getMapId() == null || StringUtils.isBlank(param.getAddress())){
-            throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
-        }
-        MapConfig mapConfig = mapConfigService.getById(param.getMapId());
-        if(mapConfig == null || mapConfig.getGeocodeUrl() == null){
-            throw new BusinessException(ResultCode.RECORD_NOT_EXIST);
-        }
         try {
+            if(param.getMapId() == null || StringUtils.isBlank(param.getAddress())){
+                throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
+            }
+            MapConfig mapConfig = mapConfigService.getById(param.getMapId());
+            if(mapConfig == null || mapConfig.getGeocodeUrl() == null){
+                throw new BusinessException(ResultCode.RECORD_NOT_EXIST);
+            }
+
             String url = mapConfig.getGeocodeUrl().replace("{address}",param.getAddress());
             String s = HttpUtil.get(url);
             log.info("map-resp:{}",s);

+ 2 - 0
src/main/java/com/fdkankan/fusion/entity/CaseEntity.java

@@ -136,4 +136,6 @@ public class CaseEntity implements Serializable {
     @TableField("sys_user_id")
     private Long sysUserId;
 
+    @TableField("platform_id")
+    private Integer platformId;
 }

+ 1 - 0
src/main/java/com/fdkankan/fusion/mq/consumer/CaseAddSceneConsumer.java

@@ -83,6 +83,7 @@ public class CaseAddSceneConsumer {
                 caseEntity.setCaseTitle(kNumber);
                 caseEntity.setUserName(user.getUserName());
                 caseEntity.setSysUserId(jyUser.getSysUserId());
+                caseEntity.setPlatformId(jyUser.getPlatformId());
                 caseEntity.setKNumber(kNumber);
                 caseService.save(caseEntity);
             }