Commit ec09a886 by 陈健智

Merge remote-tracking branch 'origin/feature' into feature

parents 3c32fd63 172d28b8
...@@ -14,7 +14,7 @@ public class GenericAttribute { ...@@ -14,7 +14,7 @@ public class GenericAttribute {
/** /**
* es index * es index
*/ */
public static final String ES_INDEX_PRE = "brandkbs2"; public static final String ES_INDEX_PRE = "brandkbs2_";
// public static final String ES_INDEX_TEST = "brandkbs2_test"; // public static final String ES_INDEX_TEST = "brandkbs2_test";
public static final String ES_INDEX_TEST = "brandkbs2_2022"; public static final String ES_INDEX_TEST = "brandkbs2_2022";
public static final String ES_CHANNEL_INDEX_TEST = "brandkbs2_channel_record_test"; public static final String ES_CHANNEL_INDEX_TEST = "brandkbs2_channel_record_test";
......
...@@ -10,11 +10,13 @@ import io.swagger.annotations.Api; ...@@ -10,11 +10,13 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.http.HttpEntity;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.http.HttpHeaders;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.http.HttpMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate;
import javax.annotation.Resource; import javax.annotation.Resource;
...@@ -34,6 +36,15 @@ public class LoginController extends BaseController { ...@@ -34,6 +36,15 @@ public class LoginController extends BaseController {
@Value("${jwt.hour}") @Value("${jwt.hour}")
private int jwtHour; private int jwtHour;
@Value("${qbjc.userCenter.url}")
private String yuqingInterface;
@Value("${qbjc.userCenter.token}")
private String token;
@Autowired
private RestTemplate restTemplate;
@Resource(name = "userServiceImpl") @Resource(name = "userServiceImpl")
private UserService UserService; private UserService UserService;
...@@ -91,6 +102,40 @@ public class LoginController extends BaseController { ...@@ -91,6 +102,40 @@ public class LoginController extends BaseController {
return ResponseResult.success(ProjectService.getLoginUserAllProjects()); return ResponseResult.success(ProjectService.getLoginUserAllProjects());
} }
@ApiOperation("第三方接入-验证External-Token")
@GetMapping("/user/login/verify/token")
public ResponseResult verifyToken() {
HttpHeaders httpHeaders = new HttpHeaders();
httpHeaders.set("External-Origin", "BRANDKBS");
httpHeaders.set("External-Service", "BRANDKBS");
httpHeaders.set("External-Token", token);
HttpEntity<String> requestEntity = new HttpEntity<>(httpHeaders);
HttpEntity<JSONObject> entity = restTemplate.exchange(yuqingInterface + "/thirdPart/external/verify/token", HttpMethod.GET,
requestEntity, JSONObject.class);
if (null != entity.getBody() || !entity.getBody().getBoolean("status")) {
String ticket = entity.getBody().getJSONObject("data").getString("ticket");
return ResponseResult.success(ticket);
}
return ResponseResult.failure("ticket获取失败");
}
@ApiOperation("第三方接入-验证External-Ticket")
@GetMapping("/user/login/verify/ticket")
public ResponseResult verifyTicket(@RequestParam String ticket) {
HttpHeaders httpHeaders = new HttpHeaders();
httpHeaders.set("External-Origin", "BRANDKBS");
httpHeaders.set("External-Token", token);
httpHeaders.set("External-Ticket", ticket);
HttpEntity<String> requestEntity = new HttpEntity<>(httpHeaders);
HttpEntity<JSONObject> entity = restTemplate.exchange(yuqingInterface + "/thirdPart/external/verify/ticket", HttpMethod.GET,
requestEntity, JSONObject.class);
if (null != entity.getBody()) {
JSONObject userInfo = entity.getBody().getJSONObject("data");
return ResponseResult.success(userInfo);
}
return ResponseResult.failure("用户信息获取失败");
}
@ApiOperation("测试接口") @ApiOperation("测试接口")
@GetMapping("/test") @GetMapping("/test")
public ResponseResult test() { public ResponseResult test() {
......
...@@ -182,5 +182,12 @@ public class AppArticleController extends BaseController { ...@@ -182,5 +182,12 @@ public class AppArticleController extends BaseController {
return ResponseResult.success(reportService.getPcReportAnalyze(id, true)); return ResponseResult.success(reportService.getPcReportAnalyze(id, true));
} }
@ApiOperation("舆情简报-更新报告结果")
@ApiImplicitParam(name = "id", value = "报告ID", required = true, paramType = "path", dataType = "String")
@PutMapping("/update/{id}")
public ResponseResult updateReportAnalyze(@PathVariable String id) {
reportService.getPcReportAnalyze(id, false);
return ResponseResult.success();
}
} }
...@@ -36,7 +36,7 @@ es.httpClusterNodes=192.168.0.130:9200:qbjc-back:yuqing.zhiweidata.com,192.168.0 ...@@ -36,7 +36,7 @@ es.httpClusterNodes=192.168.0.130:9200:qbjc-back:yuqing.zhiweidata.com,192.168.0
#es.password=3vh65l$i6qQA #es.password=3vh65l$i6qQA
es.username=joker es.username=joker
es.password=jokerdevops es.password=jokerdevops
es.index.test = true es.index.test = false
#channel-index #channel-index
channel.index.registry=zookeeper://192.168.0.104:2182?backup=192.168.0.105:2182,192.168.0.203:2182 channel.index.registry=zookeeper://192.168.0.104:2182?backup=192.168.0.105:2182,192.168.0.203:2182
...@@ -62,6 +62,8 @@ qbjc.project.url=https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/project ...@@ -62,6 +62,8 @@ qbjc.project.url=https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/project
qbjc.event.url=https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/aplan/event qbjc.event.url=https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/aplan/event
qbjc.event.tag.url=https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/tag/event?project={1} qbjc.event.tag.url=https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/tag/event?project={1}
qbjc.platform.url=https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/platform/resource qbjc.platform.url=https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/platform/resource
qbjc.userCenter.url=https://login.zhiweidata.com/plogin/center
qbjc.userCenter.token=AoJ0ooy3HV1EElWnvQw9YTS9b5Y+fmtkbM6DdpPgDO6D/OhNqH4qrJKarzMr
#\u5371\u673A\u5E93\u5916\u90E8\u63A5\u53E3 #\u5371\u673A\u5E93\u5916\u90E8\u63A5\u53E3
crisis.search.url=https://crisis.zhiweidata.com/app/brandkbs/crisisSearch?page={1}&size={2}&keyword={3} crisis.search.url=https://crisis.zhiweidata.com/app/brandkbs/crisisSearch?page={1}&size={2}&keyword={3}
crisis.searchTags.url=https://crisis.zhiweidata.com/app/brandkbs/searchCrisisByTags?page={1}&size={2}&brand={3}&category={4} crisis.searchTags.url=https://crisis.zhiweidata.com/app/brandkbs/searchCrisisByTags?page={1}&size={2}&brand={3}&category={4}
......
...@@ -36,7 +36,7 @@ es.httpClusterNodes=192.168.0.130:9200:qbjc-back:yuqing.zhiweidata.com,192.168.0 ...@@ -36,7 +36,7 @@ es.httpClusterNodes=192.168.0.130:9200:qbjc-back:yuqing.zhiweidata.com,192.168.0
#es.password=3vh65l$i6qQA #es.password=3vh65l$i6qQA
es.username=joker es.username=joker
es.password=jokerdevops es.password=jokerdevops
es.index.test = true es.index.test = false
#channel-index #channel-index
channel.index.registry=zookeeper://192.168.0.104:2182?backup=192.168.0.105:2182,192.168.0.203:2182 channel.index.registry=zookeeper://192.168.0.104:2182?backup=192.168.0.105:2182,192.168.0.203:2182
...@@ -62,6 +62,8 @@ qbjc.project.url=https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/project ...@@ -62,6 +62,8 @@ qbjc.project.url=https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/project
qbjc.event.url=https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/aplan/event qbjc.event.url=https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/aplan/event
qbjc.event.tag.url=https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/tag/event?project={1} qbjc.event.tag.url=https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/tag/event?project={1}
qbjc.platform.url=https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/platform/resource qbjc.platform.url=https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/platform/resource
qbjc.userCenter.url=https://login.zhiweidata.com/plogin/center
qbjc.userCenter.token=AoJ0ooy3HV1EElWnvQw9YTS9b5Y+fmtkbM6DdpPgDO6D/OhNqH4qrJKarzMr
#\u5371\u673A\u5E93\u5916\u90E8\u63A5\u53E3 #\u5371\u673A\u5E93\u5916\u90E8\u63A5\u53E3
crisis.search.url=https://crisis.zhiweidata.com/app/brandkbs/crisisSearch?page={1}&size={2}&keyword={3} crisis.search.url=https://crisis.zhiweidata.com/app/brandkbs/crisisSearch?page={1}&size={2}&keyword={3}
crisis.searchTags.url=https://crisis.zhiweidata.com/app/brandkbs/searchCrisisByTags?page={1}&size={2}&brand={3}&category={4} crisis.searchTags.url=https://crisis.zhiweidata.com/app/brandkbs/searchCrisisByTags?page={1}&size={2}&brand={3}&category={4}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment