Commit fa8a6cb3 by chentian

代码优化

parent 2ffb855c
####################云天请求token配置参数##开始#################
####################云天励飞请求token配置参数##开始#################
token_url=http://26.3.12.56:8083/api/oauth/token
#header
Authorization=Basic Y2xpZW50YXBwOjEyMzQ1Ng==
......@@ -14,6 +14,11 @@ client_id=clientapp
token=
#\u8FC7\u671F\u65F6\u95F4
expiration=
####################云天请求token配置参数##结束#################
####################云天励飞请求token配置参数##结束#################
####################云天励飞开始########################
image_url=http://26.3.12.56:8083
####################云天励飞结束########################
package com.founder.ytlf;
package com.founder.imageapi;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.ComponentScan;
@SpringBootApplication
@ComponentScan(basePackages = {"com.founder"})
@EnableDiscoveryClient
public class ImageApiApplication {
public static void main(String[] args) {
......
package com.founder.ytlf.controller;
package com.founder.imageapi.controller;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
......@@ -11,6 +11,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
......@@ -18,23 +19,26 @@ import java.util.Map;
/**
* <p>
* 云天接口管理 前端控制器
* 第三方图像接口管理
* </p>
*
* @author yangyang
* @since 2021-03-18
*/
@Api(description = "云天接口管理")
@Api(description = "第三方图像接口管理(云天)")
@RestController
@RequestMapping("/ytlf")
public class YtlfController {
@RequestMapping("/imageapi")
public class ImageController {
//案件查询(存储reids)
@Value("${image_url}")
private String image_url;
//获取token
@OperLog(message = "token获取",operation = OperationType.QUERY)
@ApiOperation(value = "token获取")
@PostMapping("/token")
public MapRestResult getToken() {
//获取token
//获取云天励飞token
String accessToken = TokenUtils.getYtgsToken();
return MapRestResult.build(202,"成功获取token信息",accessToken);
}
......
package com.founder.ytlf.mapper;
package com.founder.imageapi.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.founder.commonutils.asjEntity.TbXwAsjbz;
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.founder.ytlf.mapper.TbStAsjBzMapper">
<mapper namespace="com.founder.imageapi.mapper.TbStAsjBzMapper">
</mapper>
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