mirror of
https://gitee.com/freshday/radar.git
synced 2024-11-30 02:47:59 +08:00
fix: bug fix.
feihu wang
This commit is contained in:
parent
8a22172bbf
commit
0b86b0f17f
@ -8,7 +8,7 @@ import com.pgmmers.radar.service.common.CommonResult;
|
||||
import com.pgmmers.radar.service.engine.PluginServiceV2;
|
||||
import com.pgmmers.radar.service.engine.vo.DataColumnInfo;
|
||||
import com.pgmmers.radar.service.enums.DataType;
|
||||
import com.pgmmers.radar.service.impl.engine.Plugin.PluginManager;
|
||||
import com.pgmmers.radar.service.impl.engine.plugin.PluginManager;
|
||||
import com.pgmmers.radar.service.model.AbstractionService;
|
||||
import com.pgmmers.radar.service.model.FieldService;
|
||||
import com.pgmmers.radar.service.model.PreItemService;
|
||||
|
@ -9,7 +9,7 @@ import com.pgmmers.radar.service.common.CommonResult;
|
||||
import com.pgmmers.radar.service.engine.PluginServiceV2;
|
||||
import com.pgmmers.radar.service.engine.vo.DataColumnInfo;
|
||||
import com.pgmmers.radar.service.enums.DataType;
|
||||
import com.pgmmers.radar.service.impl.engine.Plugin.PluginManager;
|
||||
import com.pgmmers.radar.service.impl.engine.plugin.PluginManager;
|
||||
import com.pgmmers.radar.service.model.AbstractionService;
|
||||
import com.pgmmers.radar.service.model.ActivationService;
|
||||
import com.pgmmers.radar.service.model.FieldService;
|
||||
|
@ -5,7 +5,7 @@ import com.alibaba.excel.util.IoUtils;
|
||||
import com.pgmmers.radar.enums.FieldType;
|
||||
import com.pgmmers.radar.service.cache.CacheService;
|
||||
import com.pgmmers.radar.service.common.CommonResult;
|
||||
import com.pgmmers.radar.service.impl.engine.Plugin.PluginManager;
|
||||
import com.pgmmers.radar.service.impl.engine.plugin.PluginManager;
|
||||
import com.pgmmers.radar.util.CaptchaUtil;
|
||||
import com.pgmmers.radar.util.ZipUtils;
|
||||
import com.pgmmers.radar.vo.common.PluginVO;
|
||||
|
@ -10,7 +10,7 @@ import com.pgmmers.radar.service.common.CommonResult;
|
||||
import com.pgmmers.radar.service.engine.PluginServiceV2;
|
||||
import com.pgmmers.radar.service.engine.vo.DataColumnInfo;
|
||||
import com.pgmmers.radar.service.enums.DataType;
|
||||
import com.pgmmers.radar.service.impl.engine.Plugin.PluginManager;
|
||||
import com.pgmmers.radar.service.impl.engine.plugin.PluginManager;
|
||||
import com.pgmmers.radar.service.logs.EventService;
|
||||
import com.pgmmers.radar.service.model.ActivationService;
|
||||
import com.pgmmers.radar.service.model.FieldService;
|
||||
|
@ -121,7 +121,7 @@ public class SysLoginApiController {
|
||||
userVO.setUserName(loginName);
|
||||
userVO.setPasswd(encrypt);
|
||||
userVO.setStatus("1");
|
||||
userVO.setVipLevel(0);
|
||||
userVO.setVipLevel(1);
|
||||
userVO.setGiteeAccount(giteeAccount);
|
||||
userVO.setCode(loginName);
|
||||
userVO.setCreateTime(new Date());
|
||||
|
@ -24,7 +24,6 @@ public class MainController {
|
||||
@RequestParam @ApiParam(name="reqId",value="请求流水号",required=true) String reqId,
|
||||
@RequestParam @ApiParam(name="jsonInfo",value="事件内容(json 格式)",required=true) String jsonInfo) {
|
||||
CommonResult result = engineApi.uploadInfo(modelGuid, reqId, jsonInfo);
|
||||
result.setSuccess(true);
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -33,7 +32,6 @@ public class MainController {
|
||||
public CommonResult getScore(@RequestParam @ApiParam(name="modelGuid",value="模型Guid",required=true) String modelGuid,
|
||||
@RequestParam @ApiParam(name="reqId",value="请求流水号",required=true) String reqId) {
|
||||
CommonResult result = engineApi.getScore(modelGuid, reqId);
|
||||
result.setSuccess(true);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import com.pgmmers.radar.EngineApplication;
|
||||
import com.pgmmers.radar.service.engine.PluginServiceV2;
|
||||
import com.pgmmers.radar.service.engine.vo.Location;
|
||||
import com.pgmmers.radar.service.impl.engine.Plugin.PluginManager;
|
||||
import com.pgmmers.radar.service.impl.engine.plugin.PluginManager;
|
||||
import com.pgmmers.radar.vo.model.PreItemVO;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
|
@ -10,7 +10,7 @@ import com.pgmmers.radar.service.engine.vo.AbstractionResult;
|
||||
import com.pgmmers.radar.service.engine.vo.ActivationResult;
|
||||
import com.pgmmers.radar.service.engine.vo.AdaptationResult;
|
||||
import com.pgmmers.radar.service.engine.vo.AntiFraudProcessResult;
|
||||
import com.pgmmers.radar.service.impl.engine.Plugin.PluginManager;
|
||||
import com.pgmmers.radar.service.impl.engine.plugin.PluginManager;
|
||||
import com.pgmmers.radar.service.model.ModelService;
|
||||
import com.pgmmers.radar.service.model.PreItemService;
|
||||
import com.pgmmers.radar.vo.model.PreItemVO;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.pgmmers.radar.service.impl.engine.Plugin;
|
||||
package com.pgmmers.radar.service.impl.engine.plugin;
|
||||
|
||||
import com.pgmmers.radar.service.engine.PluginServiceV2;
|
||||
import com.pgmmers.radar.vo.model.PreItemVO;
|
@ -1,4 +1,4 @@
|
||||
package com.pgmmers.radar.service.impl.engine.Plugin;
|
||||
package com.pgmmers.radar.service.impl.engine.plugin;
|
||||
|
||||
import com.pgmmers.radar.service.engine.PluginServiceV2;
|
||||
import com.pgmmers.radar.vo.model.PreItemVO;
|
@ -1,4 +1,4 @@
|
||||
package com.pgmmers.radar.service.impl.engine.Plugin;
|
||||
package com.pgmmers.radar.service.impl.engine.plugin;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.pgmmers.radar.service.engine.PluginServiceV2;
|
||||
@ -12,6 +12,7 @@ import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
||||
|
||||
import java.util.Map;
|
||||
@ -45,10 +46,12 @@ public class GPS2LOCATION implements PluginServiceV2 {
|
||||
@Override
|
||||
public Object handle(PreItemVO item, Map<String, Object> jsonInfo,
|
||||
String[] sourceField) {
|
||||
// TODO 可以参考 http://jwd.funnyapi.com/#/index , 最好是本地库。
|
||||
//参考 http://jwd.funnyapi.com/#/index , 最好是本地库。
|
||||
Location location = new Location();
|
||||
String latitude = String.valueOf(jsonInfo.get(sourceField[0]));//纬度
|
||||
String longitude = String.valueOf(jsonInfo.get(sourceField[1]));//经度
|
||||
//纬度
|
||||
String latitude = String.valueOf(jsonInfo.get(sourceField[0]));
|
||||
//经度
|
||||
String longitude = String.valueOf(jsonInfo.get(sourceField[1]));
|
||||
if ("".equals(latitude) || "".equals(longitude)) {
|
||||
return null;
|
||||
}
|
||||
@ -60,7 +63,7 @@ public class GPS2LOCATION implements PluginServiceV2 {
|
||||
HttpGet httpget = new HttpGet(url);
|
||||
//执行请求
|
||||
CloseableHttpResponse response = httpclient.execute(httpget);
|
||||
if(response.getStatusLine().getStatusCode()==200) {
|
||||
if(response.getStatusLine().getStatusCode()== HttpStatus.OK.value()) {
|
||||
HttpEntity entity = response.getEntity();
|
||||
//所需内容都在entity里面,这里可以对数据操作
|
||||
String detail = EntityUtils.toString(entity,"UTF-8");
|
@ -1,4 +1,4 @@
|
||||
package com.pgmmers.radar.service.impl.engine.Plugin;
|
||||
package com.pgmmers.radar.service.impl.engine.plugin;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.pgmmers.radar.service.engine.PluginServiceV2;
|
@ -1,4 +1,4 @@
|
||||
package com.pgmmers.radar.service.impl.engine.Plugin;
|
||||
package com.pgmmers.radar.service.impl.engine.plugin;
|
||||
|
||||
import com.pgmmers.radar.service.engine.PluginServiceV2;
|
||||
import com.pgmmers.radar.service.engine.vo.Location;
|
@ -1,4 +1,4 @@
|
||||
package com.pgmmers.radar.service.impl.engine.Plugin;
|
||||
package com.pgmmers.radar.service.impl.engine.plugin;
|
||||
|
||||
import com.pgmmers.radar.service.data.MobileInfoService;
|
||||
import com.pgmmers.radar.service.engine.PluginServiceV2;
|
@ -1,4 +1,4 @@
|
||||
package com.pgmmers.radar.service.impl.engine.Plugin;
|
||||
package com.pgmmers.radar.service.impl.engine.plugin;
|
||||
|
||||
import com.pgmmers.radar.service.engine.PluginServiceV2;
|
||||
import java.util.Comparator;
|
@ -1,4 +1,4 @@
|
||||
package com.pgmmers.radar.service.impl.engine.Plugin;
|
||||
package com.pgmmers.radar.service.impl.engine.plugin;
|
||||
|
||||
import com.pgmmers.radar.service.engine.PluginServiceV2;
|
||||
import com.pgmmers.radar.vo.model.PreItemVO;
|
@ -1,4 +1,4 @@
|
||||
package com.pgmmers.radar.service.impl.engine.Plugin;
|
||||
package com.pgmmers.radar.service.impl.engine.plugin;
|
||||
|
||||
import com.pgmmers.radar.service.engine.PluginServiceV2;
|
||||
import com.pgmmers.radar.vo.model.PreItemVO;
|
@ -14,7 +14,7 @@ import com.pgmmers.radar.service.cache.SubscribeHandle;
|
||||
import com.pgmmers.radar.service.common.CommonResult;
|
||||
import com.pgmmers.radar.service.data.MongoService;
|
||||
import com.pgmmers.radar.service.engine.PluginServiceV2;
|
||||
import com.pgmmers.radar.service.impl.engine.Plugin.PluginManager;
|
||||
import com.pgmmers.radar.service.impl.engine.plugin.PluginManager;
|
||||
import com.pgmmers.radar.service.model.ModelService;
|
||||
import com.pgmmers.radar.service.search.SearchEngineService;
|
||||
import com.pgmmers.radar.util.JsonUtils;
|
||||
|
@ -1,12 +1,12 @@
|
||||
com.pgmmers.radar.service.engine.PluginServiceV2=\
|
||||
com.pgmmers.radar.service.impl.engine.Plugin.DATEFORMAT,\
|
||||
com.pgmmers.radar.service.impl.engine.Plugin.ALLINONE,\
|
||||
com.pgmmers.radar.service.impl.engine.Plugin.GPS2LOCATION,\
|
||||
com.pgmmers.radar.service.impl.engine.Plugin.HTTP_UTIL,\
|
||||
com.pgmmers.radar.service.impl.engine.Plugin.IP2LOCATION,\
|
||||
com.pgmmers.radar.service.impl.engine.Plugin.MOBILE2LOCATION,\
|
||||
com.pgmmers.radar.service.impl.engine.Plugin.SENSITIVE_TIME,\
|
||||
com.pgmmers.radar.service.impl.engine.Plugin.SUBSTRING
|
||||
com.pgmmers.radar.service.impl.engine.plugin.DATEFORMAT,\
|
||||
com.pgmmers.radar.service.impl.engine.plugin.ALLINONE,\
|
||||
com.pgmmers.radar.service.impl.engine.plugin.GPS2LOCATION,\
|
||||
com.pgmmers.radar.service.impl.engine.plugin.HTTP_UTIL,\
|
||||
com.pgmmers.radar.service.impl.engine.plugin.IP2LOCATION,\
|
||||
com.pgmmers.radar.service.impl.engine.plugin.MOBILE2LOCATION,\
|
||||
com.pgmmers.radar.service.impl.engine.plugin.SENSITIVE_TIME,\
|
||||
com.pgmmers.radar.service.impl.engine.plugin.SUBSTRING
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user