From c6d30e55157e59fe7bb45f9eeaec904a8cf88ec4 Mon Sep 17 00:00:00 2001
From: KKSU <15274802129@163.com>
Date: Mon, 02 Sep 2024 11:00:46 +0800
Subject: [PATCH] test和数据库连接
---
src/main/java/cc/mrbird/febs/pay/service/impl/XcxPayServiceImpl.java | 42 +++++++++++++++++++-----------------------
1 files changed, 19 insertions(+), 23 deletions(-)
diff --git a/src/main/java/cc/mrbird/febs/pay/service/impl/XcxPayServiceImpl.java b/src/main/java/cc/mrbird/febs/pay/service/impl/XcxPayServiceImpl.java
index 0dc3549..52cc8fa 100644
--- a/src/main/java/cc/mrbird/febs/pay/service/impl/XcxPayServiceImpl.java
+++ b/src/main/java/cc/mrbird/febs/pay/service/impl/XcxPayServiceImpl.java
@@ -33,6 +33,7 @@
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
@@ -51,21 +52,17 @@
@RequiredArgsConstructor
public class XcxPayServiceImpl implements IXcxPayService {
- @Autowired
- private MallOrderInfoMapper mallOrderInfoMapper;
- @Autowired
- private MallMemberMapper mallMemberMapper;
- @Autowired
- WeixinServiceUtil weixinServiceUtil;
- @Autowired
- private DataDictionaryCustomMapper dataDictionaryCustomMapper;
- @Autowired
- private MallMoneyFlowMapper mallMoneyFlowMapper;
- @Autowired
- private MallMemberWithdrawMapper mallMemberWithdrawMapper;
+ private final MallOrderInfoMapper mallOrderInfoMapper;
+ private final MallMemberMapper mallMemberMapper;
+ private final WeixinServiceUtil weixinServiceUtil;
+ private final DataDictionaryCustomMapper dataDictionaryCustomMapper;
+ private final MallMoneyFlowMapper mallMoneyFlowMapper;
+ private final MallMemberWithdrawMapper mallMemberWithdrawMapper;
private final IMallMoneyFlowService mallMoneyFlowService;
- @Autowired
- RedisUtils redisUtils;
+
+ private final MallGoodsMapper mallGoodsMapper;
+ private final MallTeamLeaderMapper mallTeamLeaderMapper;
+ private final RedisUtils redisUtils;
private final SpringContextHolder springContextHolder;
@@ -290,11 +287,6 @@
return wxTemplates;
}
- @Autowired
- private MallGoodsMapper mallGoodsMapper;
- @Autowired
- private MallTeamLeaderMapper mallTeamLeaderMapper;
-
@Override
public FebsResponse generateQrCode(WxGenerateQrCodeDto wxGenerateQrCodeDto) {
Integer type = wxGenerateQrCodeDto.getType();
@@ -411,11 +403,15 @@
* @param imgName 图片唯一名称
* @return
*/
- //图片上传路径
- public static final String IMG_UPLOAD_PATH="/mnt/sdc/webresource/blnka/wxcode";
+ // 文件保存目录路径
+ @Value("${static.resource.url}")
+ private String resourceUrl;
+ // 文件保存目录URL
+ @Value("${static.resource.path}")
+ private String resourcePath;
public String generateAcode(String scene,String path,String imgName,String width, Integer type){
- String urlPrefix="https://hwfile.csxuncong.com/blnka/wxcode";
- String imgPath=IMG_UPLOAD_PATH+imgName;
+ String urlPrefix = resourceUrl + "/wxcode";
+ String imgPath=resourcePath +"/wxcode"+imgName;
if(!FileUtil.exist(imgPath)){
cn.hutool.json.JSONObject obj = JSONUtil.createObj();
--
Gitblit v1.9.1