From 96fb28f4813edd207161769f03967b37d02f0207 Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期三, 28 一月 2026 10:26:25 +0800
Subject: [PATCH] bug 修复
---
server/services/pom.xml | 10
server/services/src/main/java/com/doumee/dao/business/InterfaceLogMapper.java | 12
server/services/src/main/java/com/doumee/service/business/impl/InterfaceLogServiceImpl.java | 191 +++++++++++
server/services/src/main/resources/application-dev.yml | 3
server/services/src/main/java/com/doumee/dao/business/model/InterfaceLog.java | 98 ++++++
/dev/null | 54 ---
server/admin/src/main/java/com/doumee/api/business/ImportRecordController.java | 2
server/services/src/main/resources/application-test.yml | 41 --
server/services/src/main/java/com/doumee/api/common/PublicController.java | 168 ++++++++++
server/services/src/main/java/com/doumee/core/constants/Constants.java | 9
server/admin/src/main/java/com/doumee/api/business/MemberController.java | 2
server/services/src/main/java/com/doumee/service/business/InterfaceLogService.java | 100 ++++++
server/services/src/main/resources/application-pro.yml | 41 --
server/services/src/main/java/com/doumee/core/utils/tyyun/TyyZosUtil.java | 185 +++++++++++
14 files changed, 775 insertions(+), 141 deletions(-)
diff --git a/server/admin/src/main/java/com/doumee/api/business/ImportRecordController.java b/server/admin/src/main/java/com/doumee/api/business/ImportRecordController.java
index 4f83adc..b7a6427 100644
--- a/server/admin/src/main/java/com/doumee/api/business/ImportRecordController.java
+++ b/server/admin/src/main/java/com/doumee/api/business/ImportRecordController.java
@@ -22,7 +22,7 @@
* @author doumee
* @date 2026-01-27 16:02:37
*/
-@Api(tags = "tableName鎺ュ彛")
+@Api(tags = "鍒嗙被淇℃伅琛ㄦ帴鍙�")
@RestController
@RequestMapping("/business/importRecord")
public class ImportRecordController extends BaseController {
diff --git a/server/admin/src/main/java/com/doumee/api/business/MemberController.java b/server/admin/src/main/java/com/doumee/api/business/MemberController.java
index c174e23..1d5df62 100644
--- a/server/admin/src/main/java/com/doumee/api/business/MemberController.java
+++ b/server/admin/src/main/java/com/doumee/api/business/MemberController.java
@@ -22,7 +22,7 @@
* @author doumee
* @date 2026-01-27 16:02:37
*/
-@Api(tags = "tableName鎺ュ彛")
+@Api(tags = "浼氬憳淇℃伅琛ㄦ帴鍙�")
@RestController
@RequestMapping("/business/member")
public class MemberController extends BaseController {
diff --git a/server/services/pom.xml b/server/services/pom.xml
index 0c39221..17915b2 100644
--- a/server/services/pom.xml
+++ b/server/services/pom.xml
@@ -10,6 +10,16 @@
<version>1.0.0-SNAPSHOT</version>
</parent>
+ <dependencies>
+ <dependency>
+ <groupId>com.tianyiyun</groupId>
+ <artifactId>zob</artifactId>
+ <version>1.0</version>
+ <scope>system</scope>
+ <!--鏈湴鐨刯acob.jar鐨勮矾寰�-->
+ <systemPath>${project.basedir}/lib/zos-sdk.jar</systemPath>
+ </dependency>
+ </dependencies>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
diff --git a/server/services/src/main/java/com/doumee/api/common/PublicCloudController.java b/server/services/src/main/java/com/doumee/api/common/PublicCloudController.java
deleted file mode 100644
index f4addb1..0000000
--- a/server/services/src/main/java/com/doumee/api/common/PublicCloudController.java
+++ /dev/null
@@ -1,249 +0,0 @@
-package com.doumee.api.common;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.doumee.api.BaseController;
-import com.doumee.biz.system.SystemDictDataBiz;
-import com.doumee.config.annotation.EncryptionReq;
-import com.doumee.config.annotation.EncryptionResp;
-import com.doumee.core.annotation.trace.Trace;
-import com.doumee.core.constants.Constants;
-import com.doumee.core.constants.ResponseStatus;
-import com.doumee.core.exception.BusinessException;
-import com.doumee.core.model.ApiResponse;
-import com.doumee.core.utils.DateUtil;
-import com.doumee.core.utils.FtpUtil;
-import com.doumee.core.utils.azure.AzureBlobUtil;
-import com.doumee.core.utils.huaweiOBS.ObsUtil;
-import com.doumee.core.utils.qiyeweixin.QywxUtil;
-import com.doumee.core.utils.qiyeweixin.model.response.QywxUploadMediaResponse;
-import com.doumee.dao.system.model.SystemDictData;
-import com.doumee.service.common.EmailService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-import org.springframework.web.multipart.MultipartHttpServletRequest;
-import org.springframework.web.multipart.MultipartRequest;
-import org.springframework.web.multipart.commons.CommonsMultipartResolver;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PrintWriter;
-import java.util.*;
-
-/**
- * @author Eva.Caesar Liu
- * @date 2023/02/14 11:14
- */
-@Api(tags = "鍏叡涓婁紶鎺ュ彛")
-@Trace(exclude = true)
-@RestController
-@RequestMapping("/web/public")
-@Slf4j
-public class PublicCloudController extends BaseController {
- @Autowired
- private SystemDictDataBiz systemDictDataBiz;
-
- @ApiOperation(value = "涓婁紶OBS", notes = "涓婁紶OBS", httpMethod = "POST", position = 6)
- @ApiImplicitParams({
- @ApiImplicitParam(name = "folder", value = "鏂囦欢澶�", required = true, paramType = "query", dataType = "String", dataTypeClass = String.class),
- @ApiImplicitParam(name = "file", value = "鏂囦欢澶�", required = true, paramType = "query", dataType = "String", dataTypeClass = String.class),
- })
- @PostMapping(value = "/upload", headers = "content-type=multipart/form-data")
- @ResponseBody
- public void upload(HttpServletRequest request, HttpServletResponse response, String folder,String flag) throws Exception {
- Date d1 = new Date();
- log.error("鎬诲緱涓婁紶鏂囦欢鎴愬姛=============寮�濮�========="+DateUtil.getPlusTime2(d1));
- if(Objects.isNull(folder)){
- throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鐩爣鏂囦欢澶归敊璇�");
- }
- String prefixPath = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.RESOURCE_PATH).getCode();
- InputStream is = null;
- response.setCharacterEncoding("UTF-8");
- response.setContentType("text/html;charset=UTF-8");
- Map<String, Object> context = new HashMap<>();
- try {
- CommonsMultipartResolver multipartResovler = new CommonsMultipartResolver();
- if (multipartResovler.isMultipart(request)) {
- MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
- Iterator<String> it = multipartRequest.getFileNames();
- while (it.hasNext()) {
- MultipartFile file = multipartRequest.getFile(it.next());
- System.out.println(file.getSize());
- String originname = file.getOriginalFilename();
- is = file.getInputStream();
- String endType = ".jpg";
- if(originname.indexOf(".")>0){
- endType=originname.substring(originname.lastIndexOf("."),originname.length());
- }
- String date = DateUtil.getNowShortDate();
- String fName = date+"/"+ UUID.randomUUID()+endType;
- String fileName = folder+"/"+fName;
- boolean r =false;
- ObsUtil obsUtil = new ObsUtil( systemDictDataBiz.queryByCode(Constants.HWY_OBS,Constants.HWY_OBS_ACCESSID).getCode(),
- systemDictDataBiz.queryByCode(Constants.HWY_OBS,Constants.HWY_OBS_ACCESSKEY).getCode(),
- systemDictDataBiz.queryByCode(Constants.HWY_OBS,Constants.HWY_OBS_ENDPOINT).getCode());
- r = obsUtil.uploadFile( systemDictDataBiz.queryByCode(Constants.HWY_OBS,Constants.HWY_OBS_BUCKET).getCode(),is,fileName);//涓婁紶
- if(r){
- context.put("success", true);
- context.put("code", 200);
- context.put("errno",0);
- JSONObject fileJSON = new JSONObject();
-// fileJSON.put("prefixPath", prefixPath);
-// fileJSON.put("folder", folder);
- fileJSON.put("url", prefixPath+fileName);
- fileJSON.put("imgaddr", fName);
- fileJSON.put("imgname", fileName);
- fileJSON.put("originname", originname);
- fileJSON.put("flag", flag);
- context.put("data",fileJSON);
- context.put("message","璇锋眰鎴愬姛");
- writerJson(response, context);
- Date d2= new Date();
- log.error("鎬荤殑涓婁紶鏂囦欢鎴愬姛=============缁撴潫========="+DateUtil.getPlusTime2(d2) +"鑰楁椂绉掞細"+( (d2.getTime()-d1.getTime()) /1000));
- return;
- }
- }
- }
- } catch (Exception e) {
- log.error("銆愪笂浼燜TP澶辫触銆�======================"+e.getMessage());
- }
- context.put("code", 0);
- context.put("message", "涓婁紶澶辫触");
- context.put("errno",0);
- writerJson(response, context);
- return;
- }
-
-
- public void uploadFileLocal(HttpServletRequest request, HttpServletResponse response, String rootPath,String dir) throws Exception {
- response.setCharacterEncoding("UTF-8");
- response.setContentType("text/html;charset=UTF-8");
- CommonsMultipartResolver multipartResovler = new CommonsMultipartResolver();
- Map<String, Object> context = new HashMap<>();
- if (multipartResovler.isMultipart(request)) {
- MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
- Iterator<String> it = multipartRequest.getFileNames();
- while (it.hasNext()) {
- MultipartFile file = multipartRequest.getFile((String) it.next());
- if (file != null) {
- if (file.getSize() > 200 * 1024 * 1024L) {
- context.put("code", 4000);
- context.put("message", "涓婁紶鏂囦欢杩囧ぇ");
- return;
- }
- System.out.println(file.getOriginalFilename());
- if (file.getOriginalFilename() == null) {
- context.put("code", 4000);
- context.put("message", "鏂囦欢鍚嶄笉鍙负绌�");
- return;
- }
- String nowDate = DateUtil.getNowShortDate();
- String folder = nowDate + "/";
- String strDirPath = rootPath + folder;
- File dirPath = new File(strDirPath);
- if (!dirPath.exists()) {
- dirPath.mkdirs();
- }
- String uploadFileName = file.getOriginalFilename();
- String x = UUID.randomUUID().toString().replace("-", "")
- + uploadFileName.substring(uploadFileName.lastIndexOf("."));
- String fileName = folder + x;
- String fileNames = nowDate + "/" + x;
- uploadFileName = uploadFileName.replace(" ", "");
- uploadFileName = uploadFileName.replace("锛�", ",");
- uploadFileName = uploadFileName.replaceAll(",", "-");
- String fileAndPath = dir + fileName;
- // 鍒ゆ柇濡傛灉涓存椂鐩綍涓瓨鍦ㄧ浉鍚屽悕绉扮殑鏂囦欢鍏堝垹闄わ紝鍦ㄤ笂浼�
- File tempFile = new File(rootPath + fileName);
- if (tempFile.isFile() && tempFile.exists()) {
- tempFile.getAbsoluteFile().delete();
- }
- // 涓婁紶鍒版湇鍔″櫒涓存椂鏂囦欢澶�
- file.transferTo(tempFile);
- // 杞Щ鍒癋TP鏈嶅姟鍣�
- String nfix = "";
- if (null != uploadFileName) {
- nfix = uploadFileName.substring(uploadFileName.lastIndexOf("."));
- }
-
- if (StringUtils.equalsIgnoreCase(nfix, ".exe")) {
- context.put("code", 4000);
- context.put("message", "瀵逛笉璧凤紝鏂囦欢鏍煎紡\".exe\"涓婁紶鏈夎锛�");
- return;
- }
- if (StringUtils.equalsIgnoreCase(nfix, ".dll")) {
- context.put("code", 4000);
- context.put("message", "瀵逛笉璧凤紝鏂囦欢鏍煎紡\".dll\"涓婁紶鏈夎锛�");
- return;
- }
-
- String remoteFileName = fileAndPath;
-
- if (true) {
- context.put("success", true);
- context.put("code", 200);
- context.put("errno",0);
- JSONObject fileJSON = new JSONObject();
- fileJSON.put("url", remoteFileName);
- fileJSON.put("imgaddr", fileNames);
- fileJSON.put("imgname", uploadFileName);
- fileJSON.put("originname", uploadFileName);
- context.put("data",fileJSON);
- context.put("message","璇锋眰鎴愬姛");
- writerJson(response, context);
- return;
- } else {
- // 绉诲姩澶辫触
- context.put("code", 0);
- context.put("message", "涓婁紶澶辫触");
- writerJson(response, context);
- }
- }
- context.put("code", 0);
- context.put("message", "涓婁紶澶辫触");
- writerJson(response, context);
- return;
- }
- }
- context.put("code", 0);
- context.put("message", "涓婁紶澶辫触");
- writerJson(response, context);
- return;
- }
-
-
-
- public static void writerJson(HttpServletResponse response, Object object) {
- response.setContentType("application/json");
- writer(response, JSONObject.toJSONString(object));
- }
-
- private static void writer(HttpServletResponse response, String str) {
- try {
- StringBuffer result = new StringBuffer();
- //璁剧疆椤甸潰涓嶇紦瀛�
- response.setHeader("Pragma", "No-cache");
- response.setHeader("Cache-Control", "no-cache");
- response.setCharacterEncoding("UTF-8");
- PrintWriter out = null;
- out = response.getWriter();
- out.print(str);
- out.flush();
- out.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
-}
diff --git a/server/services/src/main/java/com/doumee/api/common/PublicController.java b/server/services/src/main/java/com/doumee/api/common/PublicController.java
new file mode 100644
index 0000000..74591df
--- /dev/null
+++ b/server/services/src/main/java/com/doumee/api/common/PublicController.java
@@ -0,0 +1,168 @@
+package com.doumee.api.common;
+
+import com.alibaba.fastjson.JSONObject;
+import com.doumee.api.BaseController;
+import com.doumee.biz.system.SystemDictDataBiz;
+import com.doumee.core.annotation.trace.Trace;
+import com.doumee.core.constants.Constants;
+import com.doumee.core.utils.DateUtil;
+import com.doumee.core.utils.FtpUtil;
+import com.doumee.core.utils.tyyun.TyyZosUtil;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.multipart.commons.CommonsMultipartResolver;
+
+import javax.imageio.ImageIO;
+import javax.imageio.stream.ImageOutputStream;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.awt.*;
+import java.awt.image.BufferedImage;
+import java.io.*;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.UUID;
+
+/**
+ * @author Eva.Caesar Liu
+ * @date 2023/02/14 11:14
+ */
+@Api(tags = "鍏叡鎺ュ彛")
+@Trace(exclude = true)
+@RestController
+@RequestMapping("/public")
+@Slf4j
+public class PublicController extends BaseController {
+
+ @Autowired
+ private SystemDictDataBiz systemDictDataBiz;
+
+ public static FtpUtil ftp = null;
+
+ @ApiOperation(value = "涓婁紶", notes = "涓婁紶", httpMethod = "POST", position = 6)
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "folder", value = "鏂囦欢澶�", required = true, paramType = "query", dataType = "String", dataTypeClass = String.class),
+ })
+ @PostMapping(value = "/upload", headers = "content-type=multipart/form-data")
+ public void uploadMobile(String folder, HttpServletRequest request, HttpServletResponse response) throws Exception {
+ MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
+ upload(multipartRequest, response, folder + "/",
+ systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.BUCKETNAME).getCode(),
+ systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.ACCESS_ID).getCode(),
+ systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.ACCESS_KEY).getCode(),
+ systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.RESOURCE_PATH).getCode(),
+ systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.ENDPOINT).getCode());
+ }
+
+
+ public void upload(HttpServletRequest request, HttpServletResponse response, String folder, String bucketName,
+ String access_id, String access_key, String resourcePath, String endpoint) throws Exception {
+ response.setCharacterEncoding("UTF-8");
+ response.setContentType("text/html;charset=UTF-8");
+ Map<String, Object> context = new HashMap<>();
+ CommonsMultipartResolver multipartResovler = new CommonsMultipartResolver();
+ if (multipartResovler.isMultipart(request)) {
+ MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
+ Iterator<String> it = multipartRequest.getFileNames();
+ while (it.hasNext()) {
+ MultipartFile file = multipartRequest.getFile((String) it.next());// file
+ // multipartRequest.getFile((String)
+ // it.next());
+ if (file != null) {
+ // 1銆佷笂浼犲埌鏈嶅姟鍣ㄤ复鏃舵枃浠跺す
+ String uploadFileName = file.getOriginalFilename();
+ String originname = uploadFileName;
+ if (originname.lastIndexOf("/") >= 0) {
+ originname = originname.substring(originname.lastIndexOf("/") + 1);
+ }
+ String nfix = "";// 鍚庣紑鍚�
+ if (StringUtils.isNotBlank(uploadFileName)) {
+ nfix = uploadFileName.substring(uploadFileName.lastIndexOf("."));
+ }
+ if (StringUtils.equalsIgnoreCase(nfix, ".exe")) {
+ context.put("code", 4000);
+ context.put("message", "瀵逛笉璧凤紝鏂囦欢鏍煎紡\".exe\"涓婁紶鏈夎锛�");
+ return;
+ }
+ if (StringUtils.equalsIgnoreCase(nfix, ".dll")) {
+ context.put("code", 4000);
+ context.put("message", "瀵逛笉璧凤紝鏂囦欢鏍煎紡\".dll\"涓婁紶鏈夎锛�");
+ return;
+ }
+ if (StringUtils.equalsIgnoreCase(nfix, ".so")) {
+ context.put("code", 4000);
+ context.put("message", "瀵逛笉璧凤紝鏂囦欢鏍煎紡\".so\"涓婁紶鏈夎锛�");
+ return;
+ }
+ String nowDate = DateUtil.getNowShortDate();// 褰撳墠鏃堕棿锛堝勾鏈堟棩锛�
+ String fileName = UUID.randomUUID().toString() + nfix;
+ String tempFileName = nowDate + "/" + fileName;
+ String key = folder + tempFileName;// 鏂囦欢鍚�
+ TyyZosUtil obs = new TyyZosUtil(endpoint,access_id, access_key);
+ if (obs.uploadInputstreamObject(file.getInputStream(),bucketName, key)) {
+ // 绉诲姩鎴愬姛,杩斿洖鏂囦欢鍚�
+ // sendSuccessMessage(response, resourcePath+key);
+ context.put("success", true);
+ context.put("code", 200);
+ context.put("errno",0);
+ JSONObject fileJSON = new JSONObject();
+ fileJSON.put("url", resourcePath + key);
+ fileJSON.put("imgaddr", tempFileName);
+ fileJSON.put("imgname", fileName);
+ fileJSON.put("originname", originname);
+ context.put("data",fileJSON);
+ context.put("message","璇锋眰鎴愬姛");
+ writerJson(response, context);
+ return;
+ } else {
+ // 绉诲姩澶辫触
+ context.put("code", 0);
+ context.put("message", "涓婁紶澶辫触");
+ writerJson(response, context);
+ return;
+ }
+ }
+
+ }
+ }
+ context.put("code", 0);
+ context.put("message", "涓婁紶澶辫触");
+ context.put("errno",0);
+ writerJson(response, context);
+ return;
+ }
+
+ public static void writerJson(HttpServletResponse response, Object object) {
+ response.setContentType("application/json");
+ writer(response, JSONObject.toJSONString(object));
+ }
+
+ private static void writer(HttpServletResponse response, String str) {
+ try {
+ StringBuffer result = new StringBuffer();
+ //璁剧疆椤甸潰涓嶇紦瀛�
+ response.setHeader("Pragma", "No-cache");
+ response.setHeader("Cache-Control", "no-cache");
+ response.setCharacterEncoding("UTF-8");
+ PrintWriter out = null;
+ out = response.getWriter();
+ out.print(str);
+ out.flush();
+ out.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+
+
+}
diff --git a/server/services/src/main/java/com/doumee/core/constants/Constants.java b/server/services/src/main/java/com/doumee/core/constants/Constants.java
index ef1250a..cdc5e01 100644
--- a/server/services/src/main/java/com/doumee/core/constants/Constants.java
+++ b/server/services/src/main/java/com/doumee/core/constants/Constants.java
@@ -57,6 +57,14 @@
public static final String AUTO_DISPATCH_DISTANCE ="AUTO_DISPATCH_DISTANCE" ;
public static final String AUTO_CONFIRM ="AUTO_CONFIRM" ;
public static final String AUTO_CANCEL_WAIT_PAY ="AUTO_CANCEL_WAIT_PAY" ;
+
+
+ public static final String ACCESS_ID="ACCESS_ID";
+ public static final String BUCKETNAME = "BUCKETNAME";
+ public static final String ACCESS_KEY = "ACCESS_KEY";
+ public static final String ENDPOINT = "ENDPOINT";
+
+
public static final String UTF = "UTF-8";
public static final String QYWX = "QYWX";
public static final Integer ONE = 1;
@@ -73,6 +81,7 @@
public static final String ZBOM_PARAM ="ZBOM_PARAM" ;
public static final String ZBOM_UK_ERROR_URL ="ZBOM_UK_ERROR_URL" ;
public static final String ZBOM_TICKET_LOGIN_URL ="ZBOM_TICKET_LOGIN_URL" ;
+ public static final String OBJCET_STORAGE = "OBJCET_STORAGE";
public static boolean WORKORDER_SHE_EMAIL_SENDING = false;
public static boolean DEALING_COMPANY_SYNC = false ;
public static boolean DEALING_MEMBER_SYNC = false ;
diff --git a/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/QywxConstant.java b/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/QywxConstant.java
deleted file mode 100644
index b2bad0f..0000000
--- a/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/QywxConstant.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.doumee.core.utils.qiyeweixin;
-
-public class QywxConstant {
- public final static String MSGCORPSECRET = "WXvaZzwN9A3F-oGTHKY03Rxbl1niz1P_3odjwBdRs8g";//浼佷笟寰俊 娑堟伅鎺ㄩ�丼ECRET
- public final static String SCHEDULESECRET = "kDucV45wtQaWjRRZoIlvxbBrLp3khHFouJhsDywBe0I";//浼佷笟寰俊 鏃ョ▼SECRET
- public final static String DOUMIGUANJIA = "1000002";//浼佷笟寰俊 SECRET
- public final static String PARENTID = "1";//椤剁骇閮ㄩ棬缂栫爜
- public final static String PASSWORD = "123456";//榛樿瀵嗙爜
- public final static String CORPID = "wweea8f71b54e3b835";
- public final static String DMSECRET = "mfmGJpvqj1WNPTwo0Cue42uibhUd5W6_iSWpF39XZQ0";//瀹㈢瀹跺簲鐢� SECRET
- public final static String CORPSECRET = "8gl5ndGr824OHZ90CkZdcIewUKHoyk13XN4hfxBS_io";
- public final static String ACCESS_TOKEN = "aOpknXCW7KBBwgGAPuacwfhJRcT1PeIg-IroZicxWamj0JayKJ0rKw2sNXGzpQzK8AMDeDrEJC_kTvPPWTgtefDNLtfsdHS7IpXqBV1P8znLG1EmsYPNgvn78dsQd5bBomLl_qPpOob9hUUsSJJKcEmxXldCNEYVBhKmYnQ4yY8WE8i4xp7aLmm-hRql0AzhzaNhUA7nAzNN5BsgSgbXMA";
- //鑾峰彇accesstoken,corpid=浼佷笟ID,corpsecret=搴旂敤鐨勫嚟璇佸瘑閽�
- public final static String[] GET_ACCESS_TOKEN = new String[]{"/cgi-bin/gettoken?corpid=${corpid}&corpsecret=${secret}","鑾峰彇浼佷笟寰俊accesstoken"};
- //鑾峰彇閮ㄩ棬淇℃伅,閮ㄩ棬id銆傝幏鍙栨寚瀹氶儴闂ㄥ強鍏朵笅鐨勫瓙閮ㄩ棬锛堜互鍙婂強瀛愰儴闂ㄧ殑瀛愰儴闂ㄧ瓑绛夛紝閫掑綊锛夈�� 濡傛灉涓嶅~锛岄粯璁よ幏鍙栧叏閲忕粍缁囨灦鏋�
- public final static String[] GET_DEPARTMENT_LIST = new String[]{"/cgi-bin/department/list?access_token=${accesstoken}&id=${id}","鑾峰彇閮ㄩ棬淇℃伅"};
- public final static String[] GET_DEPARTMENT_SIMPLELIST = new String[]{"/cgi-bin/department/simplelist?access_token=${accesstoken}&id=${id}","鑾峰彇閮ㄩ棬淇℃伅"};
- public final static String[] GET_DEPARTMENT_INFO = new String[]{"/cgi-bin/department/get?access_token=${accesstoken}&id=${id}","鑾峰彇鍗曚釜閮ㄩ棬璇︽儏"};
- //鑾峰彇閮ㄩ棬鎴愬憳,access_token=璋冪敤鎺ュ彛鍑瘉,department_id=鑾峰彇鐨勯儴闂╥d,fetch_child= 鏄惁閫掑綊鑾峰彇瀛愰儴闂ㄤ笅闈㈢殑鎴愬憳锛�1-閫掑綊鑾峰彇锛�0-鍙幏鍙栨湰閮ㄩ棬
- public final static String[] GET_DEPARTMENT_SIMPLE_LIST = new String[]{"/cgi-bin/user/simplelist?access_token=${accesstoken}&department_id=${departmentId}","鑾峰彇閮ㄩ棬鎴愬憳"};
- public final static String[] GET_DEPARTMENT_USER_LIST = new String[]{"/cgi-bin/user/list?access_token=${accesstoken}&department_id=${departmentId}","鑾峰彇閮ㄩ棬鎴愬憳"};
- public final static String[] GET_MEDIA = new String[]{"/cgi-bin/media/get?access_token=${accesstoken}&media_id=${media_id}","鑾峰彇涓存椂绱犳潗"};
- public final static String[] UPLOAD_TEMP_MEDIA = new String[]{"/cgi-bin/media/upload?access_token=${accesstoken}&type=${type}","涓婁紶涓存椂绱犳潗"};
- //鑾峰彇鎴愬憳璇︽儏,access_token=璋冪敤鎺ュ彛鍑瘉,userid=鎴愬憳UserID
- public final static String[] GET_USER_DETAIL =new String[]{ "/cgi-bin/user/get?access_token=${accesstoken}&userid=${id}","鑾峰彇鎴愬憳璇︽儏"};
- //鍙戦�佸簲鐢ㄦ秷鎭�,access_token=璋冪敤鎺ュ彛鍑瘉 POST璇锋眰锛�
- public final static String[] SEND_MSG =new String[]{ "/cgi-bin/message/send?access_token=${accesstoken}","鍙戦�佹帹閫佹秷鎭�"};
- public final static String[] GET_USER_BY_AUTH_CODE =new String[]{ "/cgi-bin/auth/getuserinfo?access_token=${accesstoken}&code=${code}","鑾峰彇鐢ㄦ埛鐧诲綍韬唤"};
- public final static String[] GET_JSAPI_TICKET =new String[]{ "/cgi-bin/get_jsapi_ticket?access_token=${accesstoken}","鑾峰彇浼佷笟 jsapi_ticket"};
-
-
-}
diff --git a/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/QywxUtil.java b/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/QywxUtil.java
deleted file mode 100644
index a501b01..0000000
--- a/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/QywxUtil.java
+++ /dev/null
@@ -1,253 +0,0 @@
-package com.doumee.core.utils.qiyeweixin;
-
-import com.alibaba.fastjson.JSONObject;
-import com.alibaba.fastjson.TypeReference;
-import com.doumee.biz.system.SystemDictDataBiz;
-import com.doumee.core.utils.HttpsUtil;
-import com.doumee.core.utils.qiyeweixin.model.request.QywxSendMsgRequest;
-import com.doumee.core.utils.qiyeweixin.model.response.*;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.PostConstruct;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-
-@Component
-@Slf4j
-public class QywxUtil {
- private static JSONObject json = new JSONObject();
-
-
-
- private static QywxUtil qyUtil;
-
- @Value("${qiwei.serviceurl}")
- private String qiweiUrl;
-
- @PostConstruct
- private void init() {
- qyUtil = this;
-// QywxUtil.qiweiUrl = serviceurl;
- }
-
-
- public static String create(Map<String, Object> map, String url, String token) throws IOException {
- // String token = getToken(QY_Constant.CORPID, QY_Constant.SCHEDULESECRET);
- String postData = createPostData(map);
- String response = HttpsUtil.post(url + token, postData, "application/json", false);
- System.out.println("鑾峰彇鍒扮殑token======>" + token);
- System.out.println("璇锋眰鏁版嵁======>" + postData);
- System.out.println("鍙戦�佸井淇$殑鍝嶅簲鏁版嵁======>" + response);
- return response;
- }
-
- private static String createPostData(Map<String, Object> map) {
- System.out.println("杩涘叆createPostData鏂规硶-------------------------");
- return JSONObject.toJSONString(map);
- }
-
-
- public static String getAccessToken(String corpId, String corpSecret) {
- String[] interfaceUrl = QywxConstant.GET_ACCESS_TOKEN;
- String url = interfaceUrl[0].replace("${corpid}",corpId).replace("${secret}",corpSecret);
- QywxBaseResponse response = sendHttpRequest(url,interfaceUrl[1],"",new TypeReference<QywxBaseResponse<String>>(){});
- if(response.getErrcode()!=null && response.getErrcode() ==0){
- return response.getAccess_token();
- }
- return null;
- }
- public static List<QywxDepartInfoResponse> getDepartmentAll(String token) {
- String[] interfaceUrl = QywxConstant.GET_DEPARTMENT_LIST;
- String url = interfaceUrl[0].replace("${accesstoken}",token).replace("${id}","");
- QywxBaseResponse<List<QywxDepartInfoResponse>> response = sendHttpRequest(url,interfaceUrl[1],"",new TypeReference<QywxBaseResponse<List<QywxDepartInfoResponse>>>(){});
- if(response.getErrcode()!=null && response.getErrcode() ==0){
- return response.getData();
- }
- return null;
- }
- public static QywxDepartInfoResponse getDepartmentInfo(String token,String departid) {
- String[] interfaceUrl = QywxConstant.GET_DEPARTMENT_INFO;
- String url = interfaceUrl[0].replace("${accesstoken}",token).replace("${id}",departid);
- QywxBaseResponse<QywxDepartInfoResponse> response = sendHttpRequest(url,interfaceUrl[1],""
- ,new TypeReference< QywxBaseResponse<QywxDepartInfoResponse>>(){});
- if(response.getErrcode()!=null && response.getErrcode() ==0){
- return response.getData();
- }
- return null;
- }
- public static QywxSendMsgResponse sendMsg(String token, QywxSendMsgRequest param) {
- try{
- String[] interfaceUrl = QywxConstant.SEND_MSG;
- String url = interfaceUrl[0].replace("${accesstoken}",token);
- QywxSendMsgResponse response = sendHttpRequestSingle(url,interfaceUrl[1],JSONObject.toJSONString(param)
- ,new TypeReference<QywxSendMsgResponse>(){});
- log.error("鎺ㄩ�佹秷鎭粨鏋渰}",JSONObject.toJSONString(response));
- if(response.getErrcode()!=null && response.getErrcode() ==0){
- return response;
- }
- }catch (Exception e){
-
- }
-
- return null;
- }
- public static List<QywxUserListResponse> getUserList(String token,String depatId) {
- try {
- String[] interfaceUrl = QywxConstant.GET_DEPARTMENT_USER_LIST;
- String url = interfaceUrl[0].replace("${accesstoken}",token).replace("${departmentId}",depatId);
- QywxBaseResponse<List<QywxUserListResponse>> response = sendHttpRequest(url,interfaceUrl[1],"",new TypeReference<QywxBaseResponse<List<QywxUserListResponse>>>(){});
- if(response.getErrcode()!=null && response.getErrcode() ==0){
- return response.getData();
- }
- }catch (Exception e){
- e.printStackTrace();
- }
-
- return null;
- }
- public static InputStream getMediaInputstream(String token, String media) {
- try {
- String[] interfaceUrl = QywxConstant.GET_MEDIA;
- String url = qyUtil.qiweiUrl+interfaceUrl[0].replace("${accesstoken}",token).replace("${media_id}",media);
- log.info("浼佷笟寰俊涓存椂绱犳潗鑾峰彇url=========="+url);
- return HttpsUtil.connectionInputsteam(url,"GET",null,null);
- }catch (Exception e){
- e.printStackTrace();
- log.error("浼佷笟寰俊涓存椂绱犳潗鑾峰彇error=========="+e.getMessage());
- }
-
- return null;
- }
- public static QywxUserInfoResponse getUserInfo(String token,String id) {
- String[] interfaceUrl = QywxConstant.GET_USER_DETAIL;
- String url = interfaceUrl[0].replace("${accesstoken}",token).replace("${id}",id);
- QywxUserInfoResponse response = sendHttpRequestSingle(url,interfaceUrl[1],""
- ,new TypeReference<QywxUserInfoResponse>(){});
- if(response.getErrcode()!=null && response.getErrcode() ==0){
- return response;
- }
- return null;
- }
-
- /**
- *
- * @param token
- * @param type 濯掍綋鏂囦欢绫诲瀷锛屽垎鍒湁鍥剧墖锛坕mage锛夈�佽闊筹紙voice锛夈�佽棰戯紙video锛夛紝鏅�氭枃浠讹紙file锛�
- * @return
- */
- public static QywxUploadMediaResponse uploadMedia(String token,String type,String imgurl) {
- String[] interfaceUrl = QywxConstant.UPLOAD_TEMP_MEDIA;
- String url = interfaceUrl[0].replace("${accesstoken}",token).replace("${type}",type);
- QywxUploadMediaResponse response = sendHttpRequestMultifile(url,interfaceUrl[1],imgurl
- ,new TypeReference<QywxUploadMediaResponse>(){});
- if(response !=null && response.getErrcode()!=null && response.getErrcode() ==0){
- return response;
- }
- return null;
- }
- public static QywxBaseResponse<String> getUserInfoByCode(String token,String code) {
- String[] interfaceUrl = QywxConstant.GET_USER_BY_AUTH_CODE;
- String url = interfaceUrl[0].replace("${accesstoken}",token).replace("${code}",code);
- QywxBaseResponse<String> response = sendHttpRequest(url,interfaceUrl[1],""
- ,new TypeReference<QywxBaseResponse<String>>(){});
- if(response.getErrcode()!=null && response.getErrcode() ==0){
- return response;
- }
- return null;
- }
-
-
- public static String getJsApiTicket(String token) {
- String[] interfaceUrl = QywxConstant.GET_JSAPI_TICKET;
- String url = interfaceUrl[0].replace("${accesstoken}",token);
- QywxBaseResponse<String> response = sendHttpRequest(url,interfaceUrl[1],""
- ,new TypeReference<QywxBaseResponse<String>>(){});
- if(response.getErrcode()!=null && response.getErrcode() ==0){
- return response.getTicket();
- }
- return null;
- }
-
-
- /**
- * 鍙戣捣wms鎺ュ彛璇锋眰
- * @param url
- * @param name
- * @param param
- * @param typeReference
- * @return
- * @param <T>
- */
- public static <T> QywxBaseResponse<T> sendHttpRequest(String url, String name, String param, TypeReference<QywxBaseResponse<T>> typeReference){
- log.info("銆�"+name+"銆�================寮�濮�===="+url+"\nparam==========================:"+ JSONObject.toJSONString(param));
- if ( StringUtils.isNotBlank(url)) {
- String res = null;
- try {
- Map<String,String> headers = new HashMap<>();
- res = HttpsUtil.postJson(qyUtil.qiweiUrl+url,param);
- QywxBaseResponse result = JSONObject.parseObject(res, typeReference.getType());
- logResult(result,name);
- return result;
- }catch (Exception e){
- e.printStackTrace();
- log.error("銆�"+name+"銆�================澶辫触===="+ JSONObject.toJSONString(param));
- }
- }
- return null;
- }
- public static <T extends QywxBaseSingleResponse> T sendHttpRequestMultifile(String url, String name, String imgUrl , TypeReference<T> typeReference){
- log.info("銆�"+name+"銆�================寮�濮�===="+ imgUrl);
- if ( StringUtils.isNotBlank(url)) {
- String res = null;
- try {
- res = HttpsUtil.uploadTempMedia (qyUtil.qiweiUrl+url,imgUrl);
- log.info("浠庝紒寰帴鍙�:{}----涓婁紶涓存椂绱犳潗缁撴灉:{}",url,res);
- JSONObject jsonObject = JSONObject.parseObject(res);
- T result = JSONObject.parseObject(res, typeReference.getType());
- return result;
- }catch (Exception e){
- e.printStackTrace();
- log.error("銆�"+name+"銆�================澶辫触===="+ imgUrl);
- }
- }
- return null;
- }
- public static <T extends QywxBaseSingleResponse> T sendHttpRequestSingle(String url, String name, String param, TypeReference<T> typeReference){
- log.info("銆�"+name+"銆�================寮�濮�===="+ JSONObject.toJSONString(param));
- if ( StringUtils.isNotBlank(url)) {
- String res = null;
- try {
- Map<String,String> headers = new HashMap<>();
- res = HttpsUtil.postJson(qyUtil.qiweiUrl+url,param);
- T result = JSONObject.parseObject(res, typeReference.getType());
-// logResult(result,name);
- return result;
- }catch (Exception e){
- e.printStackTrace();
- log.error("銆�"+name+"銆�================澶辫触===="+ JSONObject.toJSONString(param));
- }
- }
- return null;
- }
- private static void logResult(QywxBaseResponse res,String name) {
- if( res.getErrcode() !=null && res.getErrcode().equals(0)){
- log.info("銆愪紒涓氬井淇℃帴鍙o細"+name+"銆�================鎴愬姛====\n"+ JSONObject.toJSONString(res));
- }else{
- log.error("銆愪紒涓氬井淇℃帴鍙o細"+name+"銆�================澶辫触====锛歕n"+ JSONObject.toJSONString(res));
- }
- }
-}
-
-
-
-
-
diff --git a/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/request/QywxBaseRequest.java b/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/request/QywxBaseRequest.java
deleted file mode 100644
index a689d33..0000000
--- a/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/request/QywxBaseRequest.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.doumee.core.utils.qiyeweixin.model.request;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.util.List;
-
-/**
- * @author 姹熻箘韫�
- * @date 2023/11/23 14:03
- */
-@Data
-@ApiModel("wms璇锋眰鍏叡鍙傛暟")
-public class QywxBaseRequest<T> {
-
- @ApiModelProperty(value = "data" )
- private List<T> data;
- private List<Integer> jobIdList;
-}
diff --git a/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/request/QywxSendMsgRequest.java b/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/request/QywxSendMsgRequest.java
deleted file mode 100644
index 05e9597..0000000
--- a/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/request/QywxSendMsgRequest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.doumee.core.utils.qiyeweixin.model.request;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-/**
- * @author 姹熻箘韫�
- * @date 2023/11/23 14:03
- */
-@Data
-@ApiModel("浼佷笟寰俊鏂囦欢鍗$墖娑堟伅璇锋眰鍙傛暟")
-public class QywxSendMsgRequest {
- @ApiModelProperty(value = "鎴愬憳ID鍒楄〃锛堟秷鎭帴鏀惰�咃紝澶氫釜鎺ユ敹鑰呯敤鈥榺鈥欏垎闅旓紝鏈�澶氭敮鎸�1000涓級銆傜壒娈婃儏鍐碉細鎸囧畾涓篅all锛屽垯鍚戝叧娉ㄨ浼佷笟搴旂敤鐨勫叏閮ㄦ垚鍛樺彂閫�")
- private String touser;//
- @ApiModelProperty(value = "閮ㄩ棬ID鍒楄〃锛屽涓帴鏀惰�呯敤鈥榺鈥欏垎闅旓紝鏈�澶氭敮鎸�100涓�傚綋touser涓篅all鏃跺拷鐣ユ湰鍙傛暟 ")
- private String toparty;//
- @ApiModelProperty(value = "鏍囩ID鍒楄〃锛屽涓帴鏀惰�呯敤鈥榺鈥欏垎闅旓紝鏈�澶氭敮鎸�100涓�傚綋touser涓篅all鏃跺拷鐣ユ湰鍙傛暟")
- private String totag;//
- @ApiModelProperty(value = "娑堟伅绫诲瀷锛屾鏃跺浐瀹氫负锛歵extcard")
- private String msgtype;//
- @ApiModelProperty(value = "浼佷笟搴旂敤鐨刬d锛屾暣鍨嬨�備紒涓氬唴閮ㄥ紑鍙戯紝鍙湪搴旂敤鐨勮缃〉闈㈡煡鐪嬶紱绗笁鏂规湇鍔″晢锛屽彲閫氳繃鎺ュ彛 鑾峰彇浼佷笟鎺堟潈淇℃伅 鑾峰彇璇ュ弬鏁板��")
- private String agentid;//
- @ApiModelProperty(value = "鏂囨湰鍗$墖娑堟伅瀵硅薄")
- private QywxTextCardMsgRequest textcard;//
- @ApiModelProperty(value = "琛ㄧず鏄惁寮�鍚痠d杞瘧锛�0琛ㄧず鍚︼紝1琛ㄧず鏄紝榛樿0")
- private String enable_id_trans;//
- @ApiModelProperty(value = "琛ㄧず鏄惁寮�鍚噸澶嶆秷鎭鏌ワ紝0琛ㄧず鍚︼紝1琛ㄧず鏄紝榛樿0")
- private String enable_duplicate_check;//
- @ApiModelProperty(value = "琛ㄧず鏄惁閲嶅娑堟伅妫�鏌ョ殑鏃堕棿闂撮殧锛岄粯璁�1800s锛屾渶澶т笉瓒呰繃4灏忔椂")
- private String duplicate_check_interval;//
-}
diff --git a/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/request/QywxTextCardMsgRequest.java b/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/request/QywxTextCardMsgRequest.java
deleted file mode 100644
index 8171fd9..0000000
--- a/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/request/QywxTextCardMsgRequest.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.doumee.core.utils.qiyeweixin.model.request;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-/**
- * @author 姹熻箘韫�
- * @date 2023/11/23 14:03
- */
-@Data
-@ApiModel("浼佷笟寰俊鏂囦欢鍗$墖娑堟伅璇锋眰鍙傛暟")
-public class QywxTextCardMsgRequest {
- @ApiModelProperty(value = "鏍囬锛屼笉瓒呰繃128涓瓧绗︼紝瓒呰繃浼氳嚜鍔ㄦ埅鏂紙鏀寔id杞瘧锛�")
- private String title;//
- @ApiModelProperty(value = "鎻忚堪锛屼笉瓒呰繃512涓瓧绗︼紝瓒呰繃浼氳嚜鍔ㄦ埅鏂紙鏀寔id杞瘧锛�")
- private String description;//
- @ApiModelProperty(value = "鐐瑰嚮鍚庤烦杞殑閾炬帴銆傛渶闀�2048瀛楄妭锛岃纭繚鍖呭惈浜嗗崗璁ご(http/https)")
- private String url;//
- @ApiModelProperty(value = "鎸夐挳鏂囧瓧銆� 榛樿涓衡�滆鎯呪�濓紝 涓嶈秴杩�4涓枃瀛楋紝瓒呰繃鑷姩鎴柇銆�")
- private String btntxt;//
-}
diff --git a/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/response/QywxBaseResponse.java b/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/response/QywxBaseResponse.java
deleted file mode 100644
index f0e02e8..0000000
--- a/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/response/QywxBaseResponse.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.doumee.core.utils.qiyeweixin.model.response;
-
-import com.alibaba.fastjson.annotation.JSONField;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.util.List;
-
-/**
- * @author 姹熻箘韫�
- * @date 2023/11/23 14:03
- */
-@Data
-@ApiModel("浼佷笟寰俊鎺ュ彛澶勭悊杩斿洖鍙傛暟")
-public class QywxBaseResponse<T> {
- public static final String CODE_SUCCESS = "1";
- @ApiModelProperty(value = "杩斿洖鍙傛暟" )
- @JSONField(name="records",alternateNames = {"department","userlist","userid"})
- private T data;
- @ApiModelProperty(value = "鍑洪敊杩斿洖鐮侊紝涓�0琛ㄧず鎴愬姛锛岄潪0琛ㄧず璋冪敤澶辫触")
- private Integer errcode;
-
- @ApiModelProperty(value = "杩斿洖鐮佹彁绀鸿")
- private String errmsg;
- @ApiModelProperty(value = "鑾峰彇鍒扮殑鍑瘉锛屾渶闀夸负512瀛楄妭")
- private String access_token;
- @ApiModelProperty(value = "鑾峰彇鍒扮殑鍑瘉锛屾渶闀夸负512瀛楄妭")
- private String ticket;
-
- @ApiModelProperty(value = "鍑瘉鐨勬湁鏁堟椂闂�")
- private Long expires_in;
-
-}
diff --git a/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/response/QywxBaseSingleResponse.java b/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/response/QywxBaseSingleResponse.java
deleted file mode 100644
index 1b71cd7..0000000
--- a/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/response/QywxBaseSingleResponse.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.doumee.core.utils.qiyeweixin.model.response;
-
-import com.alibaba.fastjson.annotation.JSONField;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-/**
- * @author 姹熻箘韫�
- * @date 2023/11/23 14:03
- */
-@Data
-@ApiModel("浼佷笟寰俊鎺ュ彛澶勭悊杩斿洖鍙傛暟(鐙珛绫诲瀷锛�")
-public class QywxBaseSingleResponse {
- @ApiModelProperty(value = "鍑洪敊杩斿洖鐮侊紝涓�0琛ㄧず鎴愬姛锛岄潪0琛ㄧず璋冪敤澶辫触")
- private Integer errcode;
-
- @ApiModelProperty(value = "杩斿洖鐮佹彁绀鸿")
- private String errmsg;
-
-}
diff --git a/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/response/QywxDepartInfoResponse.java b/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/response/QywxDepartInfoResponse.java
deleted file mode 100644
index 345c235..0000000
--- a/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/response/QywxDepartInfoResponse.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.doumee.core.utils.qiyeweixin.model.response;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.util.List;
-
-/**
- * @author 姹熻箘韫�
- * @date 2023/11/23 14:03
- */
-@Data
-@ApiModel("浼佷笟寰俊閮ㄩ棬鍒楄〃杩斿洖鍙傛暟")
-public class QywxDepartInfoResponse {
- @ApiModelProperty(value = "鍒涘缓鐨勯儴闂╥d")
- private String id;
- @ApiModelProperty(value = "閮ㄩ棬鍚嶇О锛屼唬寮�鍙戣嚜寤哄簲鐢ㄩ渶瑕佺鐞嗗憳鎺堟潈鎵嶈繑鍥烇紱姝ゅ瓧娈典粠2019骞�12鏈�30鏃ヨ捣锛屽鏂板垱寤虹涓夋柟搴旂敤涓嶅啀杩斿洖锛�2020骞�6鏈�30鏃ヨ捣锛屽鎵�鏈夊巻鍙茬涓夋柟搴旂敤涓嶅啀杩斿洖name锛岃繑鍥炵殑name瀛楁浣跨敤id浠f浛锛屽悗缁涓夋柟浠呴�氳褰曞簲鐢ㄥ彲鑾峰彇锛屾湭杩斿洖鍚嶇О鐨勬儏鍐甸渶瑕侀�氳繃閫氳褰曞睍绀虹粍浠舵潵灞曠ず閮ㄩ棬鍚嶇О")
- private String name;
- @ApiModelProperty(value = "鑻辨枃鍚嶇О锛屾瀛楁浠�2019骞�12鏈�30鏃ヨ捣锛屽鏂板垱寤虹涓夋柟搴旂敤涓嶅啀杩斿洖锛�2020骞�6鏈�30鏃ヨ捣锛屽鎵�鏈夊巻鍙茬涓夋柟搴旂敤涓嶅啀杩斿洖璇ュ瓧娈�")
- private String name_en;
- @ApiModelProperty(value = "閮ㄩ棬璐熻矗浜虹殑UserID锛涚涓夋柟浠呴�氳褰曞簲鐢ㄥ彲鑾峰彇")
- private List<String> department_leader;
- @ApiModelProperty(value = "鐖堕儴闂╥d銆傛牴閮ㄩ棬涓�1")
- private String parentid;
- @ApiModelProperty(value = "鍦ㄧ埗閮ㄩ棬涓殑娆″簭鍊笺�俹rder鍊煎ぇ鐨勬帓搴忛潬鍓嶃�傚�艰寖鍥存槸[0, 2^32)")
- private String order;
-
-}
diff --git a/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/response/QywxSendMsgResponse.java b/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/response/QywxSendMsgResponse.java
deleted file mode 100644
index ac450fe..0000000
--- a/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/response/QywxSendMsgResponse.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.doumee.core.utils.qiyeweixin.model.response;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.util.List;
-
-/**
- * @author 姹熻箘韫�
- * @date 2023/11/23 14:03
- */
-@Data
-@ApiModel("浼佷笟寰俊鐢ㄦ埛璇︽儏杩斿洖鍙傛暟")
-public class QywxSendMsgResponse extends QywxBaseSingleResponse {
- @ApiModelProperty(value = "涓嶅悎娉曠殑userid锛屼笉鍖哄垎澶у皬鍐欙紝缁熶竴杞负灏忓啓")
- private String invaliduser;
- @ApiModelProperty(value = "涓嶅悎娉曠殑partyid")
- private String invalidparty;
- @ApiModelProperty(value = "涓嶅悎娉曠殑鏍囩id")
- private String invalidtag;
- @ApiModelProperty(value = "娌℃湁鍩虹鎺ュ彛璁稿彲")
- private String unlicenseduser;
- @ApiModelProperty(value = "娑堟伅id锛岀敤浜庢挙鍥炲簲鐢ㄦ秷鎭�")
- private String msgid;
- @ApiModelProperty(value = "浠呮秷鎭被鍨嬩负鈥滄寜閽氦浜掑瀷鈥濓紝鈥滄姇绁ㄩ�夋嫨鍨嬧�濆拰鈥滃椤归�夋嫨鍨嬧�濈殑妯℃澘鍗$墖娑堟伅杩斿洖锛屽簲鐢ㄥ彲浣跨敤response_code璋冪敤鏇存柊妯$増鍗$墖娑堟伅鎺ュ彛锛�72灏忔椂鍐呮湁鏁堬紝涓斿彧鑳戒娇鐢ㄤ竴娆�")
- private String response_code;
-}
diff --git a/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/response/QywxUploadMediaResponse.java b/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/response/QywxUploadMediaResponse.java
deleted file mode 100644
index 42d01fb..0000000
--- a/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/response/QywxUploadMediaResponse.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.doumee.core.utils.qiyeweixin.model.response;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.util.List;
-
-/**
- * @author 姹熻箘韫�
- * @date 2023/11/23 14:03
- */
-@Data
-@ApiModel("浼佷笟寰俊涓婁紶绱犳潗杩斿洖鍙傛暟")
-public class QywxUploadMediaResponse extends QywxBaseSingleResponse {
- @ApiModelProperty(value = "濯掍綋鏂囦欢绫诲瀷锛屽垎鍒湁鍥剧墖锛坕mage锛夈�佽闊筹紙voice锛夈�佽棰戯紙video锛夛紝鏅�氭枃浠�(file)")
- private String type;//
- @ApiModelProperty(value = "濯掍綋鏂囦欢涓婁紶鍚庤幏鍙栫殑鍞竴鏍囪瘑锛�3澶╁唴鏈夋晥")
- private String media_id ;//
- @ApiModelProperty(value = "濯掍綋鏂囦欢涓婁紶鏃堕棿鎴�")
- private String created_at;//
-}
diff --git a/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/response/QywxUserAttrInfoResponse.java b/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/response/QywxUserAttrInfoResponse.java
deleted file mode 100644
index eb88955..0000000
--- a/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/response/QywxUserAttrInfoResponse.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.doumee.core.utils.qiyeweixin.model.response;
-
-import com.alibaba.fastjson.JSONObject;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.util.List;
-
-/**
- * @author 姹熻箘韫�
- * @date 2023/11/23 14:03
- */
-@Data
-@ApiModel("浼佷笟寰俊鐢ㄦ埛鎵╁睍瀛楁杩斿洖鍙傛暟")
-public class QywxUserAttrInfoResponse {
- @ApiModelProperty(value = "鎴愬憳UserID銆傚搴旂鐞嗙鐨勮处鍙�")
- private String type;//: 0,
- @ApiModelProperty(value = "鏂囨湰鍚嶇О")
- private String name;//: 0,
- @ApiModelProperty(value = "鏂囨湰鍊�")
- private String value;//: 0,
- @ApiModelProperty(value = "鏂囨湰")
- private QywxUserAttrValResponse text;
-}
diff --git a/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/response/QywxUserAttrValResponse.java b/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/response/QywxUserAttrValResponse.java
deleted file mode 100644
index 666465d..0000000
--- a/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/response/QywxUserAttrValResponse.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.doumee.core.utils.qiyeweixin.model.response;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-/**
- * @author 姹熻箘韫�
- * @date 2023/11/23 14:03
- */
-@Data
-@ApiModel("浼佷笟寰俊鐢ㄦ埛鎵╁睍瀛楁value杩斿洖鍙傛暟")
-public class QywxUserAttrValResponse {
- @ApiModelProperty(value = "value")
- private String value;//: 0,
-}
diff --git a/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/response/QywxUserExtAttrResponse.java b/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/response/QywxUserExtAttrResponse.java
deleted file mode 100644
index b232926..0000000
--- a/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/response/QywxUserExtAttrResponse.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.doumee.core.utils.qiyeweixin.model.response;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.util.List;
-
-/**
- * @author 姹熻箘韫�
- * @date 2023/11/23 14:03
- */
-@Data
-@ApiModel("浼佷笟寰俊鐢ㄦ埛鎵╁睍瀛楁杩斿洖鍙傛暟")
-public class QywxUserExtAttrResponse {
- @ApiModelProperty(value = "鎵╁睍瀛楁闆嗗悎")
- private List<QywxUserAttrInfoResponse> attrs;
-}
diff --git a/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/response/QywxUserInfoResponse.java b/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/response/QywxUserInfoResponse.java
deleted file mode 100644
index 45fe549..0000000
--- a/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/response/QywxUserInfoResponse.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package com.doumee.core.utils.qiyeweixin.model.response;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.util.List;
-
-/**
- * @author 姹熻箘韫�
- * @date 2023/11/23 14:03
- */
-@Data
-@ApiModel("浼佷笟寰俊鐢ㄦ埛璇︽儏杩斿洖鍙傛暟")
-public class QywxUserInfoResponse extends QywxBaseSingleResponse {
- @ApiModelProperty(value = "鎴愬憳UserID銆傚搴旂鐞嗙鐨勮处鍙�")
- private String userid;
- @ApiModelProperty(value = "鎴愬憳鍚嶇О锛屼唬寮�鍙戣嚜寤哄簲鐢ㄩ渶瑕佺鐞嗗憳鎺堟潈鎵嶈繑鍥烇紱姝ゅ瓧娈典粠2019骞�12鏈�30鏃ヨ捣锛屽鏂板垱寤虹涓夋柟搴旂敤涓嶅啀杩斿洖鐪熷疄name锛屼娇鐢╱serid浠f浛name锛�2020骞�6鏈�30鏃ヨ捣锛屽鎵�鏈夊巻鍙茬涓夋柟搴旂敤涓嶅啀杩斿洖鐪熷疄name锛屼娇鐢╱serid浠f浛name锛屽悗缁涓夋柟浠呴�氳褰曞簲鐢ㄥ彲鑾峰彇锛屾湭杩斿洖鍚嶇О鐨勬儏鍐甸渶瑕侀�氳繃閫氳褰曞睍绀虹粍浠舵潵灞曠ず鍚嶅瓧")
- private String name;
- @ApiModelProperty(value = "鎴愬憳鎵�灞為儴闂ㄥ垪琛ㄣ�傚垪琛ㄩ」涓洪儴闂↖D锛�32浣嶆暣鍨�")
- private List<String> department;
- @ApiModelProperty(value = "閮ㄩ棬鍐呯殑鎺掑簭鍊硷紝榛樿涓�0")
- private List<String> order;
- @ApiModelProperty(value = "鍏ㄥ眬鍞竴銆傚浜庡悓涓�涓湇鍔″晢锛屼笉鍚屽簲鐢ㄨ幏鍙栧埌浼佷笟鍐呭悓涓�涓垚鍛樼殑open_userid鏄浉鍚岀殑锛屾渶澶�64涓瓧鑺傘�備粎绗笁鏂瑰簲鐢ㄥ彲鑾峰彇")
- private String open_userid;
- @ApiModelProperty(value = "鎵嬫満鍙风爜")
- private String mobile;
- @ApiModelProperty(value = "鑱屽姟淇℃伅")
- private String position;
- @ApiModelProperty(value = "鎬у埆銆�0琛ㄧず鏈畾涔夛紝1琛ㄧず鐢锋�э紝2琛ㄧず濂虫�с��")
- private Integer gender;
- @ApiModelProperty(value = "婵�娲荤姸鎬�: 1=宸叉縺娲伙紝2=宸茬鐢紝4=鏈縺娲伙紝5=閫�鍑轰紒涓氥��")
- private Integer status;
- @ApiModelProperty(value = "閭")
- private String email;
- @ApiModelProperty(value = "鍛樺伐涓汉浜岀淮鐮侊紝鎵弿鍙坊鍔犱负澶栭儴鑱旂郴浜�(娉ㄦ剰杩斿洖鐨勬槸涓�涓猽rl锛屽彲鍦ㄦ祻瑙堝櫒涓婃墦寮�璇rl浠ュ睍绀轰簩缁寸爜)")
- private String qr_code;
- @ApiModelProperty(value = "浼佷笟閭")
- private String biz_mail;
- @ApiModelProperty(value = "琛ㄧず鍦ㄦ墍鍦ㄧ殑閮ㄩ棬鍐呮槸鍚︿负閮ㄩ棬璐熻矗浜恒��0-鍚︼紱1-鏄�傛槸涓�涓垪琛紝鏁伴噺蹇呴』涓巇epartment涓�鑷淬��")
- private List<String> is_leader_in_dept;
- @ApiModelProperty(value = "鐩村睘涓婄骇UserID")
- private List<String> direct_leader;
- @ApiModelProperty(value = "鍍弖rl")
- private String avatar;
- @ApiModelProperty(value = "澶村儚缂╃暐鍥緐rl")
- private String thumb_avatar;
- @ApiModelProperty(value = "搴ф満")
- private String telephone;
- @ApiModelProperty(value = "鍒悕")
- private String alias;
- @ApiModelProperty(value = "鎵╁睍灞炴��")
- private QywxUserExtAttrResponse extattr;
-}
diff --git a/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/response/QywxUserListResponse.java b/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/response/QywxUserListResponse.java
deleted file mode 100644
index 34ed301..0000000
--- a/server/services/src/main/java/com/doumee/core/utils/qiyeweixin/model/response/QywxUserListResponse.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package com.doumee.core.utils.qiyeweixin.model.response;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.util.List;
-
-/**
- * @author 姹熻箘韫�
- * @date 2023/11/23 14:03
- */
-@Data
-@ApiModel("浼佷笟寰俊鐢ㄦ埛鍒楄〃杩斿洖鍙傛暟")
-public class QywxUserListResponse {
- @ApiModelProperty(value = "鎴愬憳UserID銆傚搴旂鐞嗙鐨勮处鍙�")
- private String userid;
- @ApiModelProperty(value = "鎴愬憳鍚嶇О锛屼唬寮�鍙戣嚜寤哄簲鐢ㄩ渶瑕佺鐞嗗憳鎺堟潈鎵嶈繑鍥烇紱姝ゅ瓧娈典粠2019骞�12鏈�30鏃ヨ捣锛屽鏂板垱寤虹涓夋柟搴旂敤涓嶅啀杩斿洖鐪熷疄name锛屼娇鐢╱serid浠f浛name锛�2020骞�6鏈�30鏃ヨ捣锛屽鎵�鏈夊巻鍙茬涓夋柟搴旂敤涓嶅啀杩斿洖鐪熷疄name锛屼娇鐢╱serid浠f浛name锛屽悗缁涓夋柟浠呴�氳褰曞簲鐢ㄥ彲鑾峰彇锛屾湭杩斿洖鍚嶇О鐨勬儏鍐甸渶瑕侀�氳繃閫氳褰曞睍绀虹粍浠舵潵灞曠ず鍚嶅瓧")
- private String name;
- @ApiModelProperty(value = "鎴愬憳鎵�灞為儴闂ㄥ垪琛ㄣ�傚垪琛ㄩ」涓洪儴闂↖D锛�32浣嶆暣鍨�")
- private List<String> department;
- @ApiModelProperty(value = "閮ㄩ棬鍐呯殑鎺掑簭鍊硷紝榛樿涓�0")
- private List<String> order;
- @ApiModelProperty(value = "鍏ㄥ眬鍞竴銆傚浜庡悓涓�涓湇鍔″晢锛屼笉鍚屽簲鐢ㄨ幏鍙栧埌浼佷笟鍐呭悓涓�涓垚鍛樼殑open_userid鏄浉鍚岀殑锛屾渶澶�64涓瓧鑺傘�備粎绗笁鏂瑰簲鐢ㄥ彲鑾峰彇")
- private String open_userid;
- @ApiModelProperty(value = "鎵嬫満鍙风爜")
- private String mobile;
- @ApiModelProperty(value = "鑱屽姟淇℃伅")
- private String position;
- @ApiModelProperty(value = "鎬у埆銆�0琛ㄧず鏈畾涔夛紝1琛ㄧず鐢锋�э紝2琛ㄧず濂虫�с��")
- private Integer gender;
- @ApiModelProperty(value = "婵�娲荤姸鎬�: 1=宸叉縺娲伙紝2=宸茬鐢紝4=鏈縺娲伙紝5=閫�鍑轰紒涓氥��")
- private Integer status;
- @ApiModelProperty(value = "閭")
- private String email;
- @ApiModelProperty(value = "鍛樺伐涓汉浜岀淮鐮侊紝鎵弿鍙坊鍔犱负澶栭儴鑱旂郴浜�(娉ㄦ剰杩斿洖鐨勬槸涓�涓猽rl锛屽彲鍦ㄦ祻瑙堝櫒涓婃墦寮�璇rl浠ュ睍绀轰簩缁寸爜)")
- private String qr_code;
- @ApiModelProperty(value = "浼佷笟閭")
- private String biz_mail;
- @ApiModelProperty(value = "琛ㄧず鍦ㄦ墍鍦ㄧ殑閮ㄩ棬鍐呮槸鍚︿负閮ㄩ棬璐熻矗浜恒��0-鍚︼紱1-鏄�傛槸涓�涓垪琛紝鏁伴噺蹇呴』涓巇epartment涓�鑷淬��")
- private List<Integer> is_leader_in_dept;
- @ApiModelProperty(value = "鐩村睘涓婄骇UserID")
- private List<String> direct_leader;
- @ApiModelProperty(value = "鍍弖rl")
- private String avatar;
- @ApiModelProperty(value = "澶村儚缂╃暐鍥緐rl")
- private String thumb_avatar;
- @ApiModelProperty(value = "搴ф満")
- private String telephone;
- @ApiModelProperty(value = "鍒悕")
- private String alias;
- @ApiModelProperty(value = "鎵╁睍灞炴��")
- private QywxUserExtAttrResponse extattr;
-}
diff --git a/server/services/src/main/java/com/doumee/core/utils/tyyun/TyyZosUtil.java b/server/services/src/main/java/com/doumee/core/utils/tyyun/TyyZosUtil.java
new file mode 100644
index 0000000..81bff86
--- /dev/null
+++ b/server/services/src/main/java/com/doumee/core/utils/tyyun/TyyZosUtil.java
@@ -0,0 +1,185 @@
+package com.doumee.core.utils.tyyun;
+
+import com.amazonaws.ClientConfiguration;
+import com.amazonaws.Protocol;
+import com.amazonaws.auth.AWSCredentials;
+import com.amazonaws.auth.AWSStaticCredentialsProvider;
+import com.amazonaws.auth.BasicAWSCredentials;
+import com.amazonaws.client.builder.AwsClientBuilder;
+import com.amazonaws.services.s3.AmazonS3;
+import com.amazonaws.services.s3.AmazonS3ClientBuilder;
+import com.amazonaws.services.s3.model.*;
+import lombok.extern.slf4j.Slf4j;
+
+import java.io.*;
+import java.net.URL;
+
+@Slf4j
+public class TyyZosUtil {
+
+ private AmazonS3 client;
+
+ // public static final String ENDPOINT = "oss-cn-shanghai.aliyuncs.com";
+
+ public TyyZosUtil(String END_POINT, String ACCESS_KEY, String SECRET_KEY) {
+ try {
+ AWSCredentials credentials = new BasicAWSCredentials(ACCESS_KEY,SECRET_KEY);
+ ClientConfiguration awsClientConfig = new ClientConfiguration();
+ awsClientConfig.setSignerOverride("AWSS3V4SignerType");
+ awsClientConfig.setProtocol(Protocol.HTTP);
+
+ client = AmazonS3ClientBuilder.standard()
+ .withCredentials(new
+ AWSStaticCredentialsProvider(credentials))
+ .withClientConfiguration(awsClientConfig)
+ .withEndpointConfiguration(new
+ AwsClientBuilder.EndpointConfiguration(END_POINT, ""))
+ .disableChunkedEncoding()
+ .enablePathStyleAccess()
+ .build();
+ }catch (Exception e){
+ log.error("瀵硅薄瀛樺偍====================杩炴帴澶╃考浜慫OS澶辫触"+e.getMessage());
+ }
+ }
+
+ /**
+ * 涓婁紶鏂囦欢
+ *
+ * @param bucketName 浜戠瀛樻斁bucket鍚嶇О
+ * @param key 閲嶆柊鍛藉悕鐨勬枃浠跺悕
+ * @param filepath 灏嗚涓婁紶鐨勬枃浠跺悕绉�
+ * @throws FileNotFoundException
+ */
+
+ public void uploadObject(String bucketName, String key, String filepath,
+ String mime){
+ try {
+ File file= new File(filepath);
+ PutObjectRequest request = new PutObjectRequest(bucketName, key, file);
+ PutObjectResult result = client.putObject(request);
+ }catch (Exception e){
+ log.error("瀵硅薄瀛樺偍===================="+filepath+"鏂囦欢涓婁紶澶辫触"+e.getMessage());
+ }finally {
+ shutDown();
+ }
+ }
+
+ /**
+ * 璁瞜ey鏂囦欢瀛樺偍鍦ㄦ湰鍦癴ilename鐩爣鏂囦欢涓�
+ * @param bucketName
+ * @param key
+ * @param filename
+ */
+ public void getObject(String bucketName, String key, String filename ){
+ try {
+ GetObjectRequest request = new GetObjectRequest(bucketName, key);
+ S3Object result = client.getObject(request);
+ System.out.print("=====request success=====\n");
+ try {
+ InputStream in = result.getObjectContent();
+ File outputFile = new File(filename);
+ FileOutputStream outputStream = new
+ FileOutputStream(outputFile);
+ byte[] read_buf = new byte[1024 * 1024];
+ int read_len = 0;
+ while ((read_len = in.read(read_buf)) > 0) {
+ outputStream.write(read_buf, 0, read_len);
+ }
+ in.close();
+ outputStream.close();
+ } catch (IOException e){
+ e.printStackTrace();
+ }
+ }catch (Exception e){
+ log.error("瀵硅薄瀛樺偍===================="+filename+"鏂囦欢璇诲彇澶辫触"+e.getMessage());
+ }finally {
+ shutDown();
+ }
+ }
+ public void deleteObject(String bucketName, String key ){
+ try {
+ DeleteObjectRequest request = new DeleteObjectRequest(bucketName, key);
+ client.deleteObject(request);
+ System.out.print("=====request deleteObject success=====");
+ }catch (Exception e){
+ log.error("瀵硅薄瀛樺偍===================="+key+"鏂囦欢鍒犻櫎澶辫触"+e.getMessage());
+ }finally {
+ shutDown();
+ }
+ }
+
+
+ /**
+ * 鍏抽棴
+ *
+ * @throws FileNotFoundException
+ */
+
+ public void shutDown() {
+ if (client != null) {
+ // 鍏抽棴client
+ client.shutdown();
+ }
+ }
+
+ public static void main(String[] args) {
+ TyyZosUtil aLiYunUtil = new TyyZosUtil("", "uc4nnpsqep1i9fijqr37nokh",
+ "/rp41xCx/XdGEVCptdH6v7xpc9w=");
+ // aLiYunUtil.uploadObject("pongto", "work/li2.txt", "D://鍝�.txt",
+ // ".html,.html text/html");D://瑁呮満杞欢/鍔炲叕瀛︿範
+ // aLiYunUtil.partUploadObject("pongto", "work/ps.exe",
+ // "D://瑁呮満杞欢/鍔炲叕瀛︿範/Adobe_Illustrator_CS6_XiaZaiBa.exe",
+ // ".html,.html text/html");
+ // aLiYunUtil.deleteBucket("pongto");
+ }
+
+ /**
+ * 涓婁紶缃戠粶鏂囦欢
+ *
+ * @param bucketName 浜戠瀛樻斁bucket鍚嶇О
+ * @param key 閲嶆柊鍛藉悕鐨勬枃浠跺悕
+ * 灏嗚涓婁紶鐨勬枃浠跺悕绉�
+ * @throws IOException
+ */
+
+ public boolean uploadOnlineObject(String url, String bucketName, String key ) {
+ try {
+
+ InputStream inputStream = new URL(url).openStream();
+ if (inputStream != null) {
+ ObjectMetadata metadata = new ObjectMetadata();
+ PutObjectRequest request = new PutObjectRequest(bucketName, key, inputStream,metadata);
+ PutObjectResult result = client.putObject(request);
+ }else {
+ log.error("瀵硅薄瀛樺偍===================="+url+"缃戠粶鏂囦欢涓婁紶澶辫触锛岀綉缁滄枃浠惰鍙栧け璐�");
+ }
+ }catch (Exception e){
+ log.error("瀵硅薄瀛樺偍===================="+url+"缃戠粶鏂囦欢涓婁紶澶辫触"+e.getMessage());
+ }finally {
+ shutDown();
+ }
+ return false;
+
+ }
+ public boolean uploadInputstreamObject(InputStream inputStream, String bucketName, String key ) {
+ try {
+
+ if (inputStream != null) {
+ ObjectMetadata metadata = new ObjectMetadata();
+ metadata.setContentLength(inputStream.available());
+
+ PutObjectRequest request = new PutObjectRequest(bucketName, key, inputStream,metadata);
+ request.setCannedAcl(CannedAccessControlList.PublicRead);
+ PutObjectResult result = client.putObject(request);
+ return true;
+ }
+ }catch (Exception e){
+ log.error("瀵硅薄瀛樺偍==================== 鏂囦欢涓婁紶澶辫触"+e.getMessage());
+ }finally {
+ shutDown();
+ }
+ return false;
+
+ }
+
+}
diff --git a/server/services/src/main/java/com/doumee/dao/business/InterfaceLogMapper.java b/server/services/src/main/java/com/doumee/dao/business/InterfaceLogMapper.java
new file mode 100644
index 0000000..5626f4b
--- /dev/null
+++ b/server/services/src/main/java/com/doumee/dao/business/InterfaceLogMapper.java
@@ -0,0 +1,12 @@
+package com.doumee.dao.business;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.doumee.dao.business.model.InterfaceLog;
+
+/**
+ * @author 姹熻箘韫�
+ * @date 2023/11/30 15:33
+ */
+public interface InterfaceLogMapper extends BaseMapper<InterfaceLog> {
+
+}
diff --git a/server/services/src/main/java/com/doumee/dao/business/model/InterfaceLog.java b/server/services/src/main/java/com/doumee/dao/business/model/InterfaceLog.java
new file mode 100644
index 0000000..e2914ac
--- /dev/null
+++ b/server/services/src/main/java/com/doumee/dao/business/model/InterfaceLog.java
@@ -0,0 +1,98 @@
+package com.doumee.dao.business.model;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.doumee.core.annotation.excel.ExcelColumn;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 涓夋柟骞冲彴鎺ュ彛浜や簰璁板綍
+ * @author 姹熻箘韫�
+ * @date 2023/11/30 15:33
+ */
+@Data
+@ApiModel("涓夋柟骞冲彴鎺ュ彛浜や簰璁板綍")
+@TableName("`interface_log`")
+public class InterfaceLog{
+
+ @TableId(type = IdType.AUTO)
+ @ApiModelProperty(value = "涓婚敭", example = "1")
+ @ExcelColumn(name="涓婚敭")
+ private Integer id;
+
+ @ApiModelProperty(value = "鍒涘缓浜虹紪鐮�", example = "1")
+ @ExcelColumn(name="鍒涘缓浜虹紪鐮�")
+ private Integer creator;
+
+ @ApiModelProperty(value = "鍒涘缓鏃堕棿")
+ @ExcelColumn(name="鍒涘缓鏃堕棿")
+ private Date createDate;
+
+ @ApiModelProperty(value = "鏇存柊浜虹紪鐮�", example = "1")
+ @ExcelColumn(name="鏇存柊浜虹紪鐮�")
+ private Integer editor;
+
+ @ApiModelProperty(value = "鏇存柊鏃堕棿")
+ @ExcelColumn(name="鏇存柊鏃堕棿")
+ private Date editDate;
+
+ @ApiModelProperty(value = "鏄惁鍒犻櫎0鍚� 1鏄�", example = "1")
+ @ExcelColumn(name="鏄惁鍒犻櫎0鍚� 1鏄�")
+ private Integer isdeleted;
+
+ @ApiModelProperty(value = "澶囨敞")
+ @ExcelColumn(name="澶囨敞")
+ private String remark;
+
+ @ApiModelProperty(value = "绫诲瀷 0璋冪敤 1鎺ㄩ�佹帴鍙�", example = "1")
+ @ExcelColumn(name="绫诲瀷 0璋冪敤 1鎺ㄩ�佹帴鍙�")
+ private Integer type;
+
+ @ApiModelProperty(value = "鎺ュ彛鍚嶇О")
+ @ExcelColumn(name="鎺ュ彛鍚嶇О")
+ private String name;
+
+ @ApiModelProperty(value = "鍦板潃淇℃伅")
+ @ExcelColumn(name="鍦板潃淇℃伅")
+ private String url;
+
+ @ApiModelProperty(value = "璇锋眰鍙傛暟")
+ @ExcelColumn(name="璇锋眰鍙傛暟")
+ private String request;
+
+ @ApiModelProperty(value = "鍝嶅簲鍙傛暟")
+ @ExcelColumn(name="鍝嶅簲鍙傛暟")
+ private String repose;
+
+ @ApiModelProperty(value = "璋冪敤缁撴灉 0鎴愬姛 1澶辫触", example = "1")
+ @ExcelColumn(name="璋冪敤缁撴灉 0鎴愬姛 1澶辫触")
+ private Integer success;
+
+ @ApiModelProperty(value = "骞冲彴 0娴峰悍瀹夐槻骞冲彴 1ERP绯荤粺", example = "1")
+ @ExcelColumn(name="骞冲彴 0娴峰悍瀹夐槻骞冲彴 1ERP绯荤粺")
+ private Integer plat;
+
+ @ApiModelProperty(value = "鍏宠仈瀵硅薄绫诲瀷 0缁勭粐 1浜哄憳 2闂ㄧ浜嬩欢 3璁惧", example = "1")
+ @ExcelColumn(name="鍏宠仈瀵硅薄绫诲瀷 0缁勭粐 1浜哄憳 2闂ㄧ浜嬩欢 3璁惧")
+ private Integer objType;
+
+ @ApiModelProperty(value = "鍏宠仈瀵硅薄缂栫爜锛堝涓敤鑻辨枃閫楀彿闅斿紑锛�")
+ @ExcelColumn(name="鍏宠仈瀵硅薄缂栫爜锛堝涓敤鑻辨枃閫楀彿闅斿紑锛�")
+ private String objId;
+
+
+ @ApiModelProperty(value = "寮�濮嬫椂闂�")
+ @TableField(exist = false)
+ private Date startDate;
+
+ @ApiModelProperty(value = "缁撴潫鏃堕棿")
+ @TableField(exist = false)
+ private Date endDate;
+
+}
diff --git a/server/services/src/main/java/com/doumee/service/business/InterfaceLogService.java b/server/services/src/main/java/com/doumee/service/business/InterfaceLogService.java
new file mode 100644
index 0000000..8063537
--- /dev/null
+++ b/server/services/src/main/java/com/doumee/service/business/InterfaceLogService.java
@@ -0,0 +1,100 @@
+package com.doumee.service.business;
+
+import com.doumee.core.model.PageData;
+import com.doumee.core.model.PageWrap;
+import com.doumee.dao.business.model.InterfaceLog;
+
+import java.util.List;
+
+/**
+ * 涓夋柟骞冲彴鎺ュ彛浜や簰璁板綍Service瀹氫箟
+ * @author 姹熻箘韫�
+ * @date 2023/11/30 15:33
+ */
+public interface InterfaceLogService {
+
+ /**
+ * 鍒涘缓
+ *
+ * @param interfaceLog 瀹炰綋瀵硅薄
+ * @return Integer
+ */
+ Integer create(InterfaceLog interfaceLog);
+
+ /**
+ * 涓婚敭鍒犻櫎
+ *
+ * @param id 涓婚敭
+ */
+ void deleteById(Integer id);
+
+ /**
+ * 鍒犻櫎
+ *
+ * @param interfaceLog 瀹炰綋瀵硅薄
+ */
+ void delete(InterfaceLog interfaceLog);
+
+ /**
+ * 鎵归噺涓婚敭鍒犻櫎
+ *
+ * @param ids 涓婚敭闆�
+ */
+ void deleteByIdInBatch(List<Integer> ids);
+
+ /**
+ * 涓婚敭鏇存柊
+ *
+ * @param interfaceLog 瀹炰綋瀵硅薄
+ */
+ void updateById(InterfaceLog interfaceLog);
+
+ /**
+ * 鎵归噺涓婚敭鏇存柊
+ *
+ * @param interfaceLogs 瀹炰綋闆�
+ */
+ void updateByIdInBatch(List<InterfaceLog> interfaceLogs);
+
+ /**
+ * 涓婚敭鏌ヨ
+ *
+ * @param id 涓婚敭
+ * @return InterfaceLog
+ */
+ InterfaceLog findById(Integer id);
+
+ /**
+ * 鏉′欢鏌ヨ鍗曟潯璁板綍
+ *
+ * @param interfaceLog 瀹炰綋瀵硅薄
+ * @return InterfaceLog
+ */
+ InterfaceLog findOne(InterfaceLog interfaceLog);
+ void saveInterfaceLog(String url,String name,String param,Integer success,String respone,int type);
+ /**
+ * 鏉′欢鏌ヨ
+ *
+ * @param interfaceLog 瀹炰綋瀵硅薄
+ * @return List<InterfaceLog>
+ */
+ List<InterfaceLog> findList(InterfaceLog interfaceLog);
+
+ /**
+ * 鍒嗛〉鏌ヨ
+ *
+ * @param pageWrap 鍒嗛〉瀵硅薄
+ * @return PageData<InterfaceLog>
+ */
+ PageData<InterfaceLog> findPage(PageWrap<InterfaceLog> pageWrap);
+
+ /**
+ * 鏉′欢缁熻
+ *
+ * @param interfaceLog 瀹炰綋瀵硅薄
+ * @return long
+ */
+ long count(InterfaceLog interfaceLog);
+
+ void clearThreeMonthLog();
+}
diff --git a/server/services/src/main/java/com/doumee/service/business/impl/InterfaceLogServiceImpl.java b/server/services/src/main/java/com/doumee/service/business/impl/InterfaceLogServiceImpl.java
new file mode 100644
index 0000000..215d0b2
--- /dev/null
+++ b/server/services/src/main/java/com/doumee/service/business/impl/InterfaceLogServiceImpl.java
@@ -0,0 +1,191 @@
+package com.doumee.service.business.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.doumee.biz.system.SystemDictDataBiz;
+import com.doumee.core.constants.Constants;
+import com.doumee.core.model.PageData;
+import com.doumee.core.model.PageWrap;
+import com.doumee.core.utils.Utils;
+import com.doumee.dao.business.InterfaceLogMapper;
+import com.doumee.dao.business.model.InterfaceLog;
+import com.doumee.service.business.InterfaceLogService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 涓夋柟骞冲彴鎺ュ彛浜や簰璁板綍Service瀹炵幇
+ * @author 姹熻箘韫�
+ * @date 2023/11/30 15:33
+ */
+@Service
+public class InterfaceLogServiceImpl implements InterfaceLogService {
+
+ @Autowired
+ private InterfaceLogMapper interfaceLogMapper;
+ @Autowired
+ private SystemDictDataBiz systemDictDataBiz;
+
+ @Override
+ public Integer create(InterfaceLog interfaceLog) {
+ interfaceLogMapper.insert(interfaceLog);
+ return interfaceLog.getId();
+ }
+
+ @Override
+ public void deleteById(Integer id) {
+ interfaceLogMapper.deleteById(id);
+ }
+
+ @Override
+ public void delete(InterfaceLog interfaceLog) {
+ UpdateWrapper<InterfaceLog> deleteWrapper = new UpdateWrapper<>(interfaceLog);
+ interfaceLogMapper.delete(deleteWrapper);
+ }
+
+ @Override
+ public void deleteByIdInBatch(List<Integer> ids) {
+ if (CollectionUtils.isEmpty(ids)) {
+ return;
+ }
+ interfaceLogMapper.deleteBatchIds(ids);
+ }
+
+ @Override
+ public void updateById(InterfaceLog interfaceLog) {
+ interfaceLogMapper.updateById(interfaceLog);
+ }
+
+ @Override
+ public void updateByIdInBatch(List<InterfaceLog> interfaceLogs) {
+ if (CollectionUtils.isEmpty(interfaceLogs)) {
+ return;
+ }
+ for (InterfaceLog interfaceLog: interfaceLogs) {
+ this.updateById(interfaceLog);
+ }
+ }
+
+ @Override
+ public InterfaceLog findById(Integer id) {
+ return interfaceLogMapper.selectById(id);
+ }
+
+ @Override
+ public InterfaceLog findOne(InterfaceLog interfaceLog) {
+ QueryWrapper<InterfaceLog> wrapper = new QueryWrapper<>(interfaceLog);
+ return interfaceLogMapper.selectOne(wrapper);
+ }
+ @Override
+ public void saveInterfaceLog(String url,String name,String param,Integer success,String respone,int type){
+ if(interfaceLogMapper ==null){
+ return;
+ }
+ InterfaceLog log = new InterfaceLog();
+ log.setCreateDate(new Date());
+ log.setUrl(url);
+ log.setEditDate(log.getCreateDate());
+ log.setPlat(Constants.ZERO);
+ log.setName(name);
+ log.setIsdeleted(Constants.ZERO);
+ log.setRequest(param);
+ log.setType(type);
+ log.setSuccess(success);
+ log.setRepose(respone);
+ interfaceLogMapper.insert(log);
+ }
+
+ @Override
+ public List<InterfaceLog> findList(InterfaceLog interfaceLog) {
+ QueryWrapper<InterfaceLog> wrapper = new QueryWrapper<>(interfaceLog);
+ return interfaceLogMapper.selectList(wrapper);
+ }
+
+ @Override
+ public PageData<InterfaceLog> findPage(PageWrap<InterfaceLog> pageWrap) {
+ IPage<InterfaceLog> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity());
+ QueryWrapper<InterfaceLog> queryWrapper = new QueryWrapper<>();
+ Utils.MP.blankToNull(pageWrap.getModel());
+ if (pageWrap.getModel().getId() != null) {
+ queryWrapper.lambda().eq(InterfaceLog::getId, pageWrap.getModel().getId());
+ }
+ if (pageWrap.getModel().getCreator() != null) {
+ queryWrapper.lambda().eq(InterfaceLog::getCreator, pageWrap.getModel().getCreator());
+ }
+ if (pageWrap.getModel().getCreateDate() != null) {
+ queryWrapper.lambda().ge(InterfaceLog::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate()));
+ queryWrapper.lambda().le(InterfaceLog::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate()));
+ }
+ if (pageWrap.getModel().getEditor() != null) {
+ queryWrapper.lambda().eq(InterfaceLog::getEditor, pageWrap.getModel().getEditor());
+ }
+ if (pageWrap.getModel().getEditDate() != null) {
+ queryWrapper.lambda().ge(InterfaceLog::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate()));
+ queryWrapper.lambda().le(InterfaceLog::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate()));
+ }
+
+ if (pageWrap.getModel().getStartDate() != null) {
+ queryWrapper.lambda().ge(InterfaceLog::getCreateDate, pageWrap.getModel().getStartDate());
+ }
+ if (pageWrap.getModel().getEndDate() != null) {
+ queryWrapper.lambda().le(InterfaceLog::getCreateDate, pageWrap.getModel().getEndDate());
+ }
+ if (pageWrap.getModel().getIsdeleted() != null) {
+ queryWrapper.lambda().eq(InterfaceLog::getIsdeleted, pageWrap.getModel().getIsdeleted());
+ }
+ if (pageWrap.getModel().getRemark() != null) {
+ queryWrapper.lambda().eq(InterfaceLog::getRemark, pageWrap.getModel().getRemark());
+ }
+ if (pageWrap.getModel().getType() != null) {
+ queryWrapper.lambda().eq(InterfaceLog::getType, pageWrap.getModel().getType());
+ }
+ if (pageWrap.getModel().getName() != null) {
+ queryWrapper.lambda().like(InterfaceLog::getName, pageWrap.getModel().getName());
+ }
+ if (pageWrap.getModel().getUrl() != null) {
+ queryWrapper.lambda().like(InterfaceLog::getUrl, pageWrap.getModel().getUrl());
+ }
+ if (pageWrap.getModel().getRequest() != null) {
+ queryWrapper.lambda().like(InterfaceLog::getRequest, pageWrap.getModel().getRequest());
+ }
+ if (pageWrap.getModel().getRepose() != null) {
+ queryWrapper.lambda().like(InterfaceLog::getRepose, pageWrap.getModel().getRepose());
+ }
+ if (pageWrap.getModel().getSuccess() != null) {
+ queryWrapper.lambda().eq(InterfaceLog::getSuccess, pageWrap.getModel().getSuccess());
+ }
+ if (pageWrap.getModel().getPlat() != null) {
+ queryWrapper.lambda().eq(InterfaceLog::getPlat, pageWrap.getModel().getPlat());
+ }
+ if (pageWrap.getModel().getObjType() != null) {
+ queryWrapper.lambda().eq(InterfaceLog::getObjType, pageWrap.getModel().getObjType());
+ }
+ if (pageWrap.getModel().getObjId() != null) {
+ queryWrapper.lambda().eq(InterfaceLog::getObjId, pageWrap.getModel().getObjId());
+ }
+ queryWrapper.lambda().orderByDesc(InterfaceLog::getCreateDate);
+ return PageData.from(interfaceLogMapper.selectPage(page, queryWrapper));
+ }
+
+ @Override
+ public long count(InterfaceLog interfaceLog) {
+ QueryWrapper<InterfaceLog> wrapper = new QueryWrapper<>(interfaceLog);
+ return interfaceLogMapper.selectCount(wrapper);
+ }
+
+ @Override
+ public void clearThreeMonthLog() {
+ int days =15;
+ try {
+// days = Integer.parseInt(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.HK_LOG_DEL_DAYS_LIMIT).getCode());
+ }catch (Exception e){}
+ interfaceLogMapper.delete(new UpdateWrapper<InterfaceLog>().lambda()
+ .apply("to_days(create_date)+"+days+" < to_days(now())") );
+ }
+}
diff --git a/server/services/src/main/resources/application-dev.yml b/server/services/src/main/resources/application-dev.yml
index 0742d5e..492ab94 100644
--- a/server/services/src/main/resources/application-dev.yml
+++ b/server/services/src/main/resources/application-dev.yml
@@ -69,9 +69,6 @@
username: admin
password: 111111
-qiwei:
- serviceurl: https://qyapi.weixin.qq.com
-
aes:
encrypt:
open: true # 鏄惁寮�鍚姞瀵� true or false
diff --git a/server/services/src/main/resources/application-pro.yml b/server/services/src/main/resources/application-pro.yml
index d917011..a8a65fe 100644
--- a/server/services/src/main/resources/application-pro.yml
+++ b/server/services/src/main/resources/application-pro.yml
@@ -49,49 +49,8 @@
enable: true
username: admin
password: doumee@168
-########################寰俊鏀粯鐩稿叧閰嶇疆########################
-wx:
- pay:
- #鏈嶅姟鍟�---------start------- 鍙傛暟璇﹁В鍦板潃 https://pay.weixin.qq.com/doc/v3/partner/4013080340
- mchId: 1700071922 #鏈嶅姟鍟嗗湪寰俊鏀粯渚х殑鍞竴韬唤鏍囪瘑
- appId: wx6cc1087ca79db7f6 #鏈嶅姟鍟嗗湪寰俊寮�鏀惧钩鍙帮紙绉诲姩搴旂敤锛夋垨鍏紬骞冲彴锛堝叕浼楀彿/灏忕▼搴忥級涓婄敵璇风殑涓�涓敮涓�鏍囪瘑
- apiV3Key: 0a056faa107c2b2944b9d6a9aa6d4142 #7tG4Vk9Zp2L8dXw5Jq0N3hR6yE1sF3cB
- serialNumer: 6696086F6EFB8D6A4F821BD47DDBAF75C3BC1209 #38495CE0137D90E4DC4F64F7ECDE035A35470BE3 #鏈嶅姟鍟嗚瘉涔﹀簭鍒楀彿
- payPublicKeyId: PUB_KEY_ID_0117000719222024112700219100000508 #鍟嗘埛/骞冲彴鏀粯鍏挜id
- #mchKey: W97N53Q71326D6JZ2E9HY5M4VT4BAC8S
- notifyUrl: https://jinkuai.832smartfarm.com/jinkuai_admin/web/wxPayNotify
- refundNotifyUrl: https://jinkuai.832smartfarm.com/jinkuai_admin/web/wxRefundNotify
- keyPath: /usr/local/jars/payFile/apiclient_cert.p12
- privateCertPath: /usr/local/jars/payFile/apiclient_cert.pem
- privateKeyPath: /usr/local/jars/payFile/apiclient_key.pem
- pubKeyPath: /usr/local/jars/payFile/pub_key.pem #鍟嗘埛鏀粯鍏挜
-
- #鏈嶅姟鍟�-------------end---
-
- #鍟嗘埛淇℃伅
- wechatSerialNumer: 12C0F0DD0F3D2B565B45586D3FEA225EBF723BEC
- wechatPayPublicKeyId: PUB_KEY_ID_0117233260692025072500181939000603 #鍟嗘埛/骞冲彴鏀粯鍏挜id
- wechatPubKeyPath: /usr/local/jars/payFile/shanghu/pub_key.pem #鍟嗘埛鏀粯鍏挜
- wechatPrivateKeyPath: /usr/local/jars/payFile/shanghu/apiclient_key.pem #鍟嗘埛绉侀挜
- wechatNotifyUrl: https://jinkuai.832smartfarm.com/jinkuai_admin/web/wechat/transferNotify #鍟嗘埛杞处鍥炶皟鍦板潃
- wechatApiV3Key: 7tG4Vk9Zp2L8dXw5Jq0N3hR6yE1sF3cB
-
-
- existsSub: 1
- appSecret:
- #瀛愬晢鎴�------------start----
- subMchId: 1723326069 #瀛愬晢鎴峰彿
- subAppId: wx332441ae5b12be7d #灏忕▼搴廼d
- subAppSecret: add86d6406f5c14501ac5bbb1a60e004 #灏忕▼搴忕閽�
- #瀛愬晢鎴�------------end----
- # mchKey: u4TSNtv0wFP7WRfnxBgijYOtRhS9FvlM
- typeId: jinkuai
-
upload:
type: blob
-
-qiwei:
- serviceurl: https://wecom-qyapi.unilever-china.com/
project:
diff --git a/server/services/src/main/resources/application-test.yml b/server/services/src/main/resources/application-test.yml
index 10ab350..d4f309f 100644
--- a/server/services/src/main/resources/application-test.yml
+++ b/server/services/src/main/resources/application-test.yml
@@ -69,51 +69,10 @@
username: admin
password: 111111
-########################寰俊鏀粯鐩稿叧閰嶇疆########################
-
-########################寰俊鏀粯鐩稿叧閰嶇疆########################
-wx:
- pay:
- #鏈嶅姟鍟�---------start------- 鍙傛暟璇﹁В鍦板潃 https://pay.weixin.qq.com/doc/v3/partner/4013080340
- mchId: 1700071922 #鏈嶅姟鍟嗗湪寰俊鏀粯渚х殑鍞竴韬唤鏍囪瘑
- appId: wx6cc1087ca79db7f6 #鏈嶅姟鍟嗗湪寰俊寮�鏀惧钩鍙帮紙绉诲姩搴旂敤锛夋垨鍏紬骞冲彴锛堝叕浼楀彿/灏忕▼搴忥級涓婄敵璇风殑涓�涓敮涓�鏍囪瘑
- apiV3Key: 0a056faa107c2b2944b9d6a9aa6d4142 #7tG4Vk9Zp2L8dXw5Jq0N3hR6yE1sF3cB
- serialNumer: 6696086F6EFB8D6A4F821BD47DDBAF75C3BC1209 #38495CE0137D90E4DC4F64F7ECDE035A35470BE3 #鏈嶅姟鍟嗚瘉涔﹀簭鍒楀彿
- payPublicKeyId: PUB_KEY_ID_0117000719222024112700219100000508 #鍟嗘埛/骞冲彴鏀粯鍏挜id
- #mchKey: W97N53Q71326D6JZ2E9HY5M4VT4BAC8S
- notifyUrl: https://test.doumee.cn/zbom_dianjiang_admin/web/wxPayNotify
- refundNotifyUrl: https://test.doumee.cn/zbom_dianjiang_admin/web/wxRefundNotify
- keyPath: /usr/local/jars/payFile/apiclient_cert.p12
- privateCertPath: /usr/local/jars/payFile/apiclient_cert.pem
- privateKeyPath: /usr/local/jars/payFile/apiclient_key.pem
- pubKeyPath: /usr/local/jars/payFile/pub_key.pem #鍟嗘埛鏀粯鍏挜
-
- #鏈嶅姟鍟�-------------end---
-
- #鍟嗘埛淇℃伅
- wechatSerialNumer: 12C0F0DD0F3D2B565B45586D3FEA225EBF723BEC
- wechatPayPublicKeyId: PUB_KEY_ID_0117233260692025072500181939000603 #鍟嗘埛/骞冲彴鏀粯鍏挜id
- wechatPubKeyPath: /usr/local/jars/payFile/shanghu/pub_key.pem #鍟嗘埛鏀粯鍏挜
- wechatPrivateKeyPath: /usr/local/jars/payFile/shanghu/apiclient_key.pem #鍟嗘埛绉侀挜
- wechatNotifyUrl: https://test.doumee.cn/jinkuai_admin/web/wechat/transferNotify #鍟嗘埛杞处鍥炶皟鍦板潃
- wechatApiV3Key: 7tG4Vk9Zp2L8dXw5Jq0N3hR6yE1sF3cB
-
-
- existsSub: 1
- appSecret:
- #瀛愬晢鎴�------------start----
- subMchId: 1723326069 #瀛愬晢鎴峰彿
- subAppId: wx332441ae5b12be7d #灏忕▼搴廼d
- subAppSecret: add86d6406f5c14501ac5bbb1a60e004 #灏忕▼搴忕閽�
- #瀛愬晢鎴�------------end----
- # mchKey: u4TSNtv0wFP7WRfnxBgijYOtRhS9FvlM
- typeId: jinkuai
upload:
type: blob
-qiwei:
- serviceurl: https://qyapi.weixin.qq.com
project:
# 鐜锛岀敓浜х幆澧僷roduction锛屽紑鍙戠幆澧僤evelopment
--
Gitblit v1.9.3