Commit 56290163 by YG8999

域名改为配置文件配置

parent dc720283
......@@ -219,3 +219,5 @@ order:
mqtt:
device-op-last-time: -5
device-gateway-last-report-time: -10
api:
domain: https://www.coujio.com
\ No newline at end of file
......@@ -216,3 +216,5 @@ order:
mqtt:
device-op-last-time: -5
device-gateway-last-report-time: -10
api:
domain: https://www.coujio.com
......@@ -7,6 +7,7 @@ import com.saobei.open.sdk.model.response.trade.SaobeiMiniPayResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import share.common.config.SaobeiConfig;
import share.common.config.WeChatConfig;
......@@ -54,6 +55,11 @@ public class OrderPayServiceImpl implements OrderPayService {
@Autowired
private SaobeiService saobeiService;
/**
* 获取域名
*/
@Value("${api.domain}")
private String apiDomain;
@Override
public OrderPayResultResponse payment(SOrder sOrder) {
......@@ -142,8 +148,6 @@ public class OrderPayServiceImpl implements OrderPayService {
* @return 微信预下单对象
*/
private CreateOrderRequestVo getUnifiedorderVo(SOrder sOrder, String openid, String appId, String mchId, String signKey) {
// 获取域名
String apiDomain = Constants.CONFIG_KEY_API_URL;
AttachVo attachVo = new AttachVo(OrderTypeEnum.getEnumByCode(sOrder.getOrderType()).getValue(), sOrder.getConsumerId());
CreateOrderRequestVo vo = new CreateOrderRequestVo();
......@@ -204,8 +208,6 @@ public class OrderPayServiceImpl implements OrderPayService {
* @return 预下单对象
*/
private SaobeiMiniPayRequestVo getSaobeiUnifiedOrderVo(SOrder sOrder, String openid, String appId, String mchId, String signKey) {
// 获取域名
String apiDomain = Constants.CONFIG_KEY_API_URL;
AttachVo attachVo = new AttachVo(OrderTypeEnum.getEnumByCode(sOrder.getOrderType()).getValue(), sOrder.getConsumerId());
SaobeiMiniPayRequestVo vo = new SaobeiMiniPayRequestVo();
......
......@@ -5,6 +5,7 @@ import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.saobei.open.sdk.model.response.trade.SaobeiTradeRefundResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import share.common.config.WeChatConfig;
import share.common.constant.Constants;
......@@ -53,6 +54,11 @@ public class OrderRefundServiceImpl extends ServiceImpl<SOrderMapper, SOrder> im
private ISConsumptionRecordsService sConsumptionRecordsService;
@Autowired
private ISRoomService roomService;
/**
* 获取域名
*/
@Value("${api.domain}")
private String apiDomain;
/**
* 退款 需要优化
......@@ -78,7 +84,6 @@ public class OrderRefundServiceImpl extends ServiceImpl<SOrderMapper, SOrder> im
String mchId = weChatConfig.getMchId();
String signKey = weChatConfig.getSignKey();
String path = weChatConfig.getCertPath(); //TODO 商户证书路径p12(待提供)
String apiDomain = Constants.CONFIG_KEY_API_URL;
//统一下单数据
WxRefundVo wxRefundVo = new WxRefundVo();
wxRefundVo.setAppid(appId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment