fix: bug fix.

feihu wang
This commit is contained in:
feihu.wang 2020-08-29 17:45:22 +08:00
parent 8a22172bbf
commit 0b86b0f17f
19 changed files with 32 additions and 31 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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());

View File

@ -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;
}
}

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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");

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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