
11 changed files with 320 additions and 5 deletions
@ -0,0 +1,66 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.supervise.system.dictcommon; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: yxt_supervise(宇信通监管) <br/> |
|||
* File: DictCommon.java <br/> |
|||
* Class: com.supervise.api.dictcommon.DictCommon <br/> |
|||
* Description: 数据字典——数据项. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-11-11 11:40:28 <br/> |
|||
* |
|||
* @author dongjianzhao |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "数据字典——数据项", description = "数据字典——数据项") |
|||
@TableName("dict_common") |
|||
public class DictCommon extends BaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@ApiModelProperty("类型code") |
|||
private String dictType; // 类型code
|
|||
@ApiModelProperty("key值") |
|||
private String dictKey; // key值
|
|||
@ApiModelProperty("value值") |
|||
private String dictValue; // value值
|
|||
@ApiModelProperty("路径") |
|||
private String sidPath; // 路径
|
|||
@ApiModelProperty("父级sid") |
|||
private String parentSid; // 父级sid
|
|||
@ApiModelProperty("分组名称") |
|||
private String groupName; // 分组名称
|
|||
|
|||
} |
@ -1,4 +1,4 @@ |
|||
package com.yxt.anrui.portal.api.sysorganization; |
|||
package com.yxt.supervise.system.sysorganization; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
@ -1,4 +1,4 @@ |
|||
package com.yxt.anrui.portal.api.sysstaffinfo; |
|||
package com.yxt.supervise.system.sysstaffinfo; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
@ -0,0 +1,36 @@ |
|||
spring: |
|||
datasource: |
|||
driver-class-name: com.mysql.cj.jdbc.Driver |
|||
url: jdbc:mysql://127.0.0.1:3306/yxt_portal?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true&allowMultiQueries=true&rewriteBatchedStatements=true |
|||
username: root |
|||
password: root |
|||
#password: 1LAiGz$t1*Iw |
|||
cloud: |
|||
nacos: |
|||
discovery: |
|||
server-addr: 127.0.0.1:8848 |
|||
redis: |
|||
database: 3 # Redis数据库索引(默认为0) |
|||
host: 127.0.0.1 |
|||
jedis: |
|||
pool: |
|||
max-active: -1 #连接池最大连接数(使用负值表示没有限制) |
|||
max-idle: 8 #连接池中的最大空闲连接 |
|||
max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) |
|||
min-idle: 0 # 连接池中的最小空闲连接 |
|||
password: 123456 |
|||
port: 6379 |
|||
timeout: 0 # 连接超时时间(毫秒) |
|||
|
|||
image: |
|||
xlsxtmpl: D:/works/projects/yxt/yxtgit/supervise/yxt_supervise/supervise-portal/supervise-portal-biz/target/classes/xlsx-tmpl/ |
|||
# xlsxtmpl: D:/works/projects/javaee/yxtgit/supervise/yxt_supervise/supervise-portal/supervise-portal-biz/target/classes/xlsx-tmpl/ |
|||
upload: |
|||
path: D:/works/projects/yxt/yxtgit/supervise/yxt_supervise/supervise-portal/supervise-portal-biz/target/classes/static/upload/ |
|||
# path: D:/works/projects/javaee/yxtgit/supervise/yxt_supervise/supervise-portal/supervise-portal-biz/target/classes/static/upload/ |
|||
url: |
|||
prefix: http://127.0.0.1:7003/upload/ |
|||
login: |
|||
path: D:/images/pic-click |
|||
|
|||
|
@ -0,0 +1,31 @@ |
|||
spring: |
|||
datasource: |
|||
driver-class-name: com.mysql.cj.jdbc.Driver |
|||
url: jdbc:mysql://120.46.172.184:3306/anrui_portal?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8 |
|||
username: root |
|||
password: '@anrui18033887500' |
|||
cloud: |
|||
nacos: |
|||
discovery: |
|||
server-addr: 127.0.0.1:8848 |
|||
redis: |
|||
database: 3 # Redis数据库索引(默认为0) |
|||
host: 127.0.0.1 |
|||
jedis: |
|||
pool: |
|||
max-active: -1 #连接池最大连接数(使用负值表示没有限制) |
|||
max-idle: 8 #连接池中的最大空闲连接 |
|||
max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) |
|||
min-idle: 0 # 连接池中的最小空闲连接 |
|||
password: 123456 |
|||
port: 6379 |
|||
timeout: 0 # 连接超时时间(毫秒) |
|||
|
|||
image: |
|||
xlsxtmpl: D:/webapps/supervise/xlsx-tmpl/ |
|||
upload: |
|||
path: D:/anrui/upload/ |
|||
url: |
|||
prefix: http://120.46.172.184/api/upload/ |
|||
login: |
|||
path: D:\images\pic-click |
@ -0,0 +1,34 @@ |
|||
spring: |
|||
datasource: |
|||
driver-class-name: com.mysql.cj.jdbc.Driver |
|||
# url: jdbc:mysql://122.14.222.186:3306/supervise_supplychain?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true&allowMultiQueries=true&rewriteBatchedStatements=true |
|||
url: jdbc:mysql://122.14.222.186:3306/yxt_portal?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true&allowMultiQueries=true&rewriteBatchedStatements=true |
|||
username: root |
|||
password: 1LAiGz$t1*Iw |
|||
# cloud: |
|||
# nacos: |
|||
# discovery: |
|||
# server-addr: 127.0.0.1:8848 |
|||
redis: |
|||
database: 3 # Redis数据库索引(默认为0) |
|||
host: 127.0.0.1 |
|||
jedis: |
|||
pool: |
|||
max-active: -1 #连接池最大连接数(使用负值表示没有限制) |
|||
max-idle: 8 #连接池中的最大空闲连接 |
|||
max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) |
|||
min-idle: 0 # 连接池中的最小空闲连接 |
|||
password: 123456 |
|||
port: 6379 |
|||
timeout: 0 # 连接超时时间(毫秒) |
|||
|
|||
image: |
|||
xlsxtmpl: D:/webapps/supervise/xlsx-tmpl/ |
|||
upload: |
|||
path: D:/webapps/supervise/static/upload/ |
|||
url: |
|||
prefix: http://122.14.222.186:7003/upload/ |
|||
login: |
|||
path: D:\\images\\pic-click |
|||
|
|||
|
@ -0,0 +1,55 @@ |
|||
spring: |
|||
application: |
|||
name: supervise-system |
|||
profiles: |
|||
#active: devv |
|||
active: test |
|||
messages: |
|||
# 国际化资源文件路径 |
|||
basename: i18n/messages |
|||
servlet: |
|||
#上传文件 |
|||
multipart: |
|||
max-file-size: 250MB |
|||
max-request-size: 200MB |
|||
devtools: |
|||
restart: |
|||
# 热部署开关 |
|||
enabled: true |
|||
mvc: |
|||
async: |
|||
request-timeout: 20000 |
|||
|
|||
server: |
|||
port: 7008 |
|||
max-http-header-size: 102400 |
|||
tomcat: |
|||
max-http-form-post-size: -1 |
|||
#mybatis |
|||
mybatis-plus: |
|||
# 配置mapper的扫描,找到所有的mapper.xml映射文件 |
|||
mapper-locations: classpath*:**Mapper.xml |
|||
global-config: |
|||
refresh: true |
|||
db-config: |
|||
#定义生成ID的类型 |
|||
id-type: Auto |
|||
db-type: mysql |
|||
configuration: |
|||
map-underscore-to-camel-case: false |
|||
cache-enabled: true |
|||
call-setters-on-nulls: true |
|||
log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl |
|||
logging: |
|||
level: |
|||
com: |
|||
baomidou: |
|||
mybatisplus: DEBUG |
|||
#项目mapper目录 |
|||
dragonsoft: |
|||
demojar: |
|||
mapper: DEBUG |
|||
|
|||
|
|||
|
|||
|
@ -0,0 +1,18 @@ |
|||
package com.yxt.supervise.adapter; |
|||
|
|||
import org.springframework.boot.SpringApplication; |
|||
import org.springframework.boot.autoconfigure.SpringBootApplication; |
|||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; |
|||
import org.springframework.cloud.openfeign.EnableFeignClients; |
|||
|
|||
@SpringBootApplication(scanBasePackages = { |
|||
"com.yxt.common.base.config", |
|||
"com.yxt.supervise.adapter" |
|||
}) |
|||
@EnableDiscoveryClient |
|||
@EnableFeignClients(basePackages = {"com.yxt.supervise.*"}) |
|||
public class AdapterApplication { |
|||
public static void main(String[] args) { |
|||
SpringApplication.run(AdapterApplication.class, args); |
|||
} |
|||
} |
@ -0,0 +1,69 @@ |
|||
package com.yxt.supervise.adapter.controller; |
|||
|
|||
import com.alibaba.fastjson.JSONObject; |
|||
import com.fasterxml.jackson.core.JsonProcessingException; |
|||
import com.fasterxml.jackson.databind.ObjectMapper; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.supervise.portal.api.brandinfo.BrandInfoDto; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.http.*; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import org.springframework.web.client.RestTemplate; |
|||
|
|||
import java.util.ArrayList; |
|||
@Slf4j |
|||
@Api(tags = "适配器") |
|||
@RestController("com.yxt.supervise.adapter.controller.AdapterController") |
|||
@RequestMapping("v1/adapter") |
|||
public class AdapterController { |
|||
@ApiOperation("登录") |
|||
@GetMapping("/login") |
|||
public ResultBean login( ) throws JsonProcessingException { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
String url = "http://192.168.4.28:18080/pasoreport-web/latin/common/getOption.hd?_dc=1673487175151&moduleId=report19874907b7564c2386081fbb84d1b1e3&option=maxExecuteTime"; |
|||
|
|||
RestTemplate restTemplate = new RestTemplate(); |
|||
|
|||
HttpHeaders headers = new HttpHeaders(); |
|||
|
|||
MediaType type = MediaType.parseMediaType("application/json; charset=UTF-8"); |
|||
headers.setContentType(type); |
|||
headers.add("Accept", MediaType.APPLICATION_JSON.toString()); |
|||
headers.add("Cookie","JSESSIONID=48E9C87D99BAE92A170900D85F0F4550; Accept-Language=zh-CN; _uid_=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJUSElSRF9PUkdfSUQiOiIxMDAwMDAwIiwiT1JHX05BTUUiOiLmsrPljJflm73lpKczNjUyNCIsIlVTRVJfSUQiOiJocnloIiwiVVNFUl9MT0dJTk5BTUUiOiJocnloIiwiVEVOQU5UX1VVSUQiOiIyYzkyODFjNDVhYWRhMmJhMDE1YWFkYTJjM2Y3MDAwMiIsIklTX0NVUlJFTlRfU1lTVEVNIjp0cnVlLCJPUkdfVVVJRCI6IjJjOTI4MWM0NWFhZGEyYmEwMTVhYWRhMmMzZjcwMDAyIiwiVEVOQU5UX0NPREUiOiIwMDAxIiwiT1JHX0NPREUiOiIwMDAxIiwiVVNFUl9VVUlEIjoiMmM5MTgwODk4NDE3NGYyMTAxODQ1YWYwZjEzMTQ3ODAiLCJGVUxMX05BTUUiOiLmsYfono3pk7booYwiLCJURU5BTlRfTkFNRSI6Iuays-WMl-WbveWkpzM2NTI0IiwiU1lTVEVNX1RZUEUiOiJIUSIsImV4cCI6MTY3MzU3MzI2NSwiaWF0IjoxNjczNDg2ODY1fQ.i18JQVe9rmtH5FMHnoEdXpwpbS6d4bqOR9yNSW1OKHY"); |
|||
ArrayList<Object> similarList = new ArrayList<>(); |
|||
similarList.add("1"); |
|||
similarList.add("2"); |
|||
similarList.add("3"); |
|||
|
|||
JSONObject requestMap = new JSONObject(); |
|||
requestMap.put("name", "ldj"); |
|||
requestMap.put("age", "15"); |
|||
requestMap.put("similarList",similarList); |
|||
|
|||
HttpEntity<JSONObject> entity = new HttpEntity<>(requestMap, headers); |
|||
|
|||
ObjectMapper objectMapper = new ObjectMapper(); |
|||
try { |
|||
String similarJSON = objectMapper.writeValueAsString(requestMap); |
|||
log.info("similarJSON:{}",similarJSON); |
|||
} catch (Exception e) { |
|||
e.printStackTrace(); |
|||
} |
|||
|
|||
//使用JSONObject,不需要创建实体类VO来接受返参,缺点是别人不知道里面有哪些字段,即不知道有那些key
|
|||
String body1 = restTemplate.postForObject(url, entity, String.class); |
|||
log.info("body1:{}",body1); |
|||
|
|||
ResponseEntity<JSONObject> responseEntity = restTemplate.postForEntity(url, requestMap, JSONObject.class); |
|||
JSONObject body2 = responseEntity.getBody(); //响应体
|
|||
HttpStatus statusCode = responseEntity.getStatusCode(); //状态码
|
|||
HttpHeaders headers1 = responseEntity.getHeaders();//获取到头信息
|
|||
log.info("body2:{}",objectMapper.writeValueAsString(body2)); |
|||
log.info("statusCode:{}",objectMapper.writeValueAsString(statusCode)); |
|||
log.info("headers1:{}",objectMapper.writeValueAsString(headers1)); |
|||
log.info("responseEntity:{}",objectMapper.writeValueAsString(responseEntity)); |
|||
return rb.success(); |
|||
} |
|||
} |
Loading…
Reference in new issue