From 23ad1fb25ba377fe0a681a08714172a43e0f9a79 Mon Sep 17 00:00:00 2001 From: tuyp Date: Tue, 17 Jan 2023 11:04:43 +0800 Subject: [PATCH] 2023年前备份 --- pom.xml | 12 +++--------- src/main/java/com/subsidy/controller/MemberTokensController.java | 2 +- src/main/java/com/subsidy/controller/RenSheJuController.java | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 10 deletions(-) create mode 100644 src/main/java/com/subsidy/controller/RenSheJuController.java diff --git a/pom.xml b/pom.xml index f822014..201adc6 100644 --- a/pom.xml +++ b/pom.xml @@ -249,11 +249,6 @@ 2.0.4 - - - - - com.aliyun.oss @@ -261,11 +256,10 @@ 3.15.0 - - net.coobird - thumbnailator - 0.4.8 + com.squareup.okhttp3 + okhttp + 4.10.0 diff --git a/src/main/java/com/subsidy/controller/MemberTokensController.java b/src/main/java/com/subsidy/controller/MemberTokensController.java index d83f0a0..866427e 100644 --- a/src/main/java/com/subsidy/controller/MemberTokensController.java +++ b/src/main/java/com/subsidy/controller/MemberTokensController.java @@ -16,7 +16,7 @@ import io.swagger.annotations.Api; */ @RestController @Api(tags = "用户登录token") -@RequestMapping("/member-tokens-do") +@RequestMapping("/memberTokens") public class MemberTokensController { } diff --git a/src/main/java/com/subsidy/controller/RenSheJuController.java b/src/main/java/com/subsidy/controller/RenSheJuController.java new file mode 100644 index 0000000..62548c1 --- /dev/null +++ b/src/main/java/com/subsidy/controller/RenSheJuController.java @@ -0,0 +1,48 @@ +package com.subsidy.controller; + +import com.squareup.okhttp.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@Api(tags = "人社局数据对接") +@RequestMapping("/rensheju") +public class RenSheJuController { + + + @PostMapping("getSecret") + @ApiOperation("获取秘钥") + public String getSecret(){ + + MediaType mediaType = MediaType.parse("text/plain"); + + OkHttpClient client = new OkHttpClient(); + RequestBody body = RequestBody.create(mediaType, "json"); + Request request = new Request.Builder() + .url("https://api.shzypxy.com/token/accessPrivateKey") + .post(body) + .build(); + try { + Response response = client.newCall(request).execute(); + return response.body().string(); + }catch (Exception e){ + e.printStackTrace(); + } + + return null; + } + + @PostMapping("classBaseInfo") + @ApiOperation("班级基本信息信息采集接口") + public String classBaseInfo(){ + + + + + return null; + } + +} -- libgit2 0.25.0