非root剔除置信度
This commit is contained in:
+5
@@ -3,6 +3,7 @@ package com.fangjia.open.controllers;
|
||||
import com.fangjia.core.util.HttpRequest;
|
||||
import com.fangjia.dal.mongo.model.VillageIdentify;
|
||||
import com.fangjia.dal.seaweed.model.District;
|
||||
import com.fangjia.open.APIConstant;
|
||||
import com.fangjia.open.dto.addressGovernance.DistrictDto;
|
||||
import com.fangjia.open.dto.addressGovernance.DistrictIdentifyDto;
|
||||
import com.fangjia.open.dto.addressGovernance.MatchedBuildingDto;
|
||||
@@ -253,6 +254,10 @@ public class AddrSvcController {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaNlpService/match", params, "UTF-8");
|
||||
BasicModel basicModel = new BasicModel(200, "ok");
|
||||
if (json != null && json.size() > 0) {
|
||||
// 非超级用户不返回置信度
|
||||
if (json.containsKey("credit") && !APIConstant.SUPER_USER_TOKEN.equals(model.getToken())) {
|
||||
json.remove("credit");
|
||||
}
|
||||
basicModel.setResult(CommonDtoUtils.transformV(MatchedBuildingDto.class, json));
|
||||
}
|
||||
mav.setModel(basicModel);
|
||||
|
||||
Reference in New Issue
Block a user