Commit 3ad440b2 by baihe

updated

parent 59d48949
......@@ -116,4 +116,4 @@ weChat:
domain: wechat-xmfit
rpc:
apps: fcfos,fcauth,fcapi
\ No newline at end of file
apps: fcfos,fcauth,fcapi,fccfg
\ No newline at end of file
......@@ -84,7 +84,7 @@
<dependency>
<groupId>com.jiejing.fitness</groupId>
<artifactId>message-sdk</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.0.2-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>com.jiejing.base</groupId>
......@@ -98,8 +98,8 @@
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.jiejing.base</groupId>
<artifactId>configcenter-api</artifactId>
<groupId>com.jiejing.function</groupId>
<artifactId>xmfc-config-sdk</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
......
......@@ -40,8 +40,8 @@
<artifactId>xmfc-auth-sdk</artifactId>
</dependency>
<dependency>
<groupId>com.jiejing.base</groupId>
<artifactId>configcenter-api</artifactId>
<groupId>com.jiejing.function</groupId>
<artifactId>xmfc-config-sdk</artifactId>
</dependency>
<dependency>
<groupId>com.jiejing.base</groupId>
......
......@@ -32,7 +32,7 @@ import com.jiejing.fitness.finance.service.merchant.StudioMerchantService;
import com.jiejing.fitness.finance.service.pay.RefundService;
import com.jiejing.fitness.finance.service.pay.convert.RefundConvert;
import com.jiejing.fitness.finance.service.pay.params.StudioMerchantRefundParams;
import com.jiejing.fitness.finance.service.rpc.ConfigRpcService;
import com.jiejing.fitness.finance.service.rpc.FitConfigService;
import com.jiejing.fitness.finance.service.rpc.PayRpcService;
import com.jiejing.fitness.finance.service.rpc.PermissionRpcService;
import com.jiejing.fitness.finance.service.rpc.StudioRpcService;
......@@ -91,7 +91,7 @@ public class RefundServiceImpl implements RefundService {
private ConfigService configService;
@Resource
private ConfigRpcService configRpcService;
private FitConfigService fitConfigService;
@Resource
private WeChatInstParam weChatInstParam;
......@@ -229,8 +229,8 @@ public class RefundServiceImpl implements RefundService {
return;
}
Boolean wx = configRpcService.getStudioBoolConfig(record.getStudioId(), "WECHAT_MEMBER_REFUND_SUCCESS");
Boolean sms = configRpcService.getStudioBoolConfig(record.getStudioId(), "SMS_MEMBER_REFUND_SUCCESS");
Boolean wx = fitConfigService.getStudioBoolConfig(record.getStudioId(), "WECHAT_MEMBER_REFUND_SUCCESS");
Boolean sms = fitConfigService.getStudioBoolConfig(record.getStudioId(), "SMS_MEMBER_REFUND_SUCCESS");
String targetId = this.getTargetId(record, extra);
List<MsgChannelEnum> channels = this.getMsgChannels(extra, wx, sms);
......
......@@ -2,14 +2,16 @@ package com.jiejing.fitness.finance.service.rpc;
import com.google.common.collect.Lists;
import com.jiejing.common.model.JsonResult;
import com.jiejing.configcenter.api.config.ConfigApi;
import com.jiejing.configcenter.ConfigRpcService;
import com.jiejing.configcenter.api.config.request.GetConfigDetailsRequest;
import com.jiejing.configcenter.api.config.vo.DetailVO;
import com.jiejing.fitness.enums.config.ObjectTypeEnum;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import javax.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
......@@ -19,17 +21,13 @@ import org.springframework.stereotype.Service;
*/
@Slf4j
@Service
public class ConfigRpcService {
public class FitConfigService {
@Resource
private ConfigApi configApi;
private ConfigRpcService configRpcService;
public List<DetailVO> listConfig(ObjectTypeEnum objectType, Long objectId, List<String> codes) {
JsonResult<List<DetailVO>> result = configApi.getConfigDetails(
GetConfigDetailsRequest.builder().objectType(objectType.getCode()).objectId(objectId).codes(codes)
.build());
result.assertSuccess();
return Optional.ofNullable(result.getResult()).orElse(new ArrayList<>());
return configRpcService.getConfigDetails(String.valueOf(objectId), objectType.getCode(), codes);
}
public DetailVO getConfig(ObjectTypeEnum objectType, Long objectId, String code) {
......
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