Commit 75c7219f by 程裕兵

feat:remove vo enums

parent 0e80182f
package com.jiejing.fitness.finance.api.bank; package com.jiejing.fitness.finance.api.bank;
import com.jiejing.common.model.JsonResult;
import com.jiejing.common.model.PageVO;
import com.jiejing.fitness.finance.api.bank.request.PageBankRequest;
import com.jiejing.fitness.finance.api.bank.request.PageBranchBankRequest;
import com.jiejing.fitness.finance.api.bank.vo.BankVO;
import com.jiejing.fitness.finance.api.bank.vo.BranchBankVO;
import feign.hystrix.FallbackFactory; import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -12,6 +18,16 @@ public class BankApiFallback implements FallbackFactory<BankApi> { ...@@ -12,6 +18,16 @@ public class BankApiFallback implements FallbackFactory<BankApi> {
@Override @Override
public BankApi create(Throwable throwable) { public BankApi create(Throwable throwable) {
return null; return new BankApi() {
@Override
public JsonResult<PageVO<BankVO>> pageBank(PageBankRequest request) {
return JsonResult.rpcError();
}
@Override
public JsonResult<PageVO<BranchBankVO>> pageBranchBank(PageBranchBankRequest request) {
return JsonResult.rpcError();
}
};
} }
} }
...@@ -2,6 +2,7 @@ package com.jiejing.fitness.finance.api.cashier.request; ...@@ -2,6 +2,7 @@ package com.jiejing.fitness.finance.api.cashier.request;
import com.jiejing.fitness.enums.finance.BrandCashierTransStateEnum; import com.jiejing.fitness.enums.finance.BrandCashierTransStateEnum;
import com.jiejing.fitness.enums.finance.BrandCashierTransTypeEnum; import com.jiejing.fitness.enums.finance.BrandCashierTransTypeEnum;
import com.jiejing.fitness.enums.finance.PayOrderTypeEnum;
import com.jiejing.paycenter.common.enums.merchant.SubChannelEnums; import com.jiejing.paycenter.common.enums.merchant.SubChannelEnums;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -45,7 +46,7 @@ public class PageStudioCashierRequest { ...@@ -45,7 +46,7 @@ public class PageStudioCashierRequest {
private BrandCashierTransStateEnum transState; private BrandCashierTransStateEnum transState;
@ApiModelProperty("业务订单类型(来源)") @ApiModelProperty("业务订单类型(来源)")
private Integer orderType; private PayOrderTypeEnum orderType;
@ApiModelProperty("交易类型:PAY-收款;REFUND-退款;") @ApiModelProperty("交易类型:PAY-收款;REFUND-退款;")
private BrandCashierTransTypeEnum transType; private BrandCashierTransTypeEnum transType;
......
...@@ -16,7 +16,7 @@ import com.jiejing.fitness.finance.api.merchant.vo.StudioMerchantApplyVO; ...@@ -16,7 +16,7 @@ import com.jiejing.fitness.finance.api.merchant.vo.StudioMerchantApplyVO;
import com.jiejing.fitness.finance.api.merchant.vo.StudioMerchantAuthSubChannelVO; import com.jiejing.fitness.finance.api.merchant.vo.StudioMerchantAuthSubChannelVO;
import com.jiejing.fitness.finance.api.merchant.vo.StudioMerchantBindXcxAppIdVO; import com.jiejing.fitness.finance.api.merchant.vo.StudioMerchantBindXcxAppIdVO;
import com.jiejing.fitness.finance.api.merchant.vo.StudioMerchantVO; import com.jiejing.fitness.finance.api.merchant.vo.StudioMerchantVO;
import com.jiejing.paycenter.api.pay.vo.PayVO; import com.jiejing.paycenter.common.model.vo.PayVO;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import java.util.List; import java.util.List;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
......
...@@ -16,7 +16,7 @@ import com.jiejing.fitness.finance.api.merchant.vo.StudioMerchantApplyVO; ...@@ -16,7 +16,7 @@ import com.jiejing.fitness.finance.api.merchant.vo.StudioMerchantApplyVO;
import com.jiejing.fitness.finance.api.merchant.vo.StudioMerchantAuthSubChannelVO; import com.jiejing.fitness.finance.api.merchant.vo.StudioMerchantAuthSubChannelVO;
import com.jiejing.fitness.finance.api.merchant.vo.StudioMerchantBindXcxAppIdVO; import com.jiejing.fitness.finance.api.merchant.vo.StudioMerchantBindXcxAppIdVO;
import com.jiejing.fitness.finance.api.merchant.vo.StudioMerchantVO; import com.jiejing.fitness.finance.api.merchant.vo.StudioMerchantVO;
import com.jiejing.paycenter.api.pay.vo.PayVO; import com.jiejing.paycenter.common.model.vo.PayVO;
import feign.hystrix.FallbackFactory; import feign.hystrix.FallbackFactory;
import java.util.List; import java.util.List;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
......
package com.jiejing.fitness.finance.api.merchant.vo; package com.jiejing.fitness.finance.api.merchant.vo;
import com.jiejing.common.swagger.EnumMapping; import com.jiejing.common.swagger.EnumMapping;
import com.jiejing.paycenter.api.merchant.vo.SubChannelConfigVO;
import com.jiejing.paycenter.common.enums.common.OpenStateEnums; import com.jiejing.paycenter.common.enums.common.OpenStateEnums;
import com.jiejing.paycenter.common.enums.merchant.CompanyTypeEnums; import com.jiejing.paycenter.common.enums.merchant.CompanyTypeEnums;
import com.jiejing.paycenter.common.model.vo.SubChannelConfigVO;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.util.List; import java.util.List;
......
...@@ -2,9 +2,9 @@ package com.jiejing.fitness.finance.api.merchant.vo; ...@@ -2,9 +2,9 @@ package com.jiejing.fitness.finance.api.merchant.vo;
import com.jiejing.common.swagger.EnumMapping; import com.jiejing.common.swagger.EnumMapping;
import com.jiejing.fitness.finance.api.merchant.request.model.BrandResourceInfo; import com.jiejing.fitness.finance.api.merchant.request.model.BrandResourceInfo;
import com.jiejing.paycenter.api.merchant.vo.SubChannelConfigVO;
import com.jiejing.paycenter.common.enums.common.OpenStateEnums; import com.jiejing.paycenter.common.enums.common.OpenStateEnums;
import com.jiejing.paycenter.common.enums.merchant.CompanyTypeEnums; import com.jiejing.paycenter.common.enums.merchant.CompanyTypeEnums;
import com.jiejing.paycenter.common.model.vo.SubChannelConfigVO;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.util.List; import java.util.List;
......
...@@ -23,7 +23,7 @@ import com.jiejing.fitness.finance.service.merchant.params.ApplyStudioMerchantPa ...@@ -23,7 +23,7 @@ import com.jiejing.fitness.finance.service.merchant.params.ApplyStudioMerchantPa
import com.jiejing.fitness.finance.service.merchant.params.PageStudioMerchantApplyParams; import com.jiejing.fitness.finance.service.merchant.params.PageStudioMerchantApplyParams;
import com.jiejing.fitness.finance.service.pay.PayService; import com.jiejing.fitness.finance.service.pay.PayService;
import com.jiejing.fitness.finance.service.pay.params.StudioMerchantPayParams; import com.jiejing.fitness.finance.service.pay.params.StudioMerchantPayParams;
import com.jiejing.paycenter.api.pay.vo.PayVO; import com.jiejing.paycenter.common.model.vo.PayVO;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import java.util.List; import java.util.List;
import javax.annotation.Resource; import javax.annotation.Resource;
......
...@@ -66,8 +66,10 @@ public class StudioMerchantApply implements Serializable { ...@@ -66,8 +66,10 @@ public class StudioMerchantApply implements Serializable {
/** /**
* 申请类型:OPEN-进件;RE_OPEN-重进件; * 申请类型:OPEN-进件;RE_OPEN-重进件;
*
* @see ApplyTypeEnum
*/ */
private ApplyTypeEnum applyType; private String applyType;
/** /**
* 渠道号 * 渠道号
...@@ -96,13 +98,17 @@ public class StudioMerchantApply implements Serializable { ...@@ -96,13 +98,17 @@ public class StudioMerchantApply implements Serializable {
/** /**
* 企业类型 * 企业类型
*
* @see CompanyTypeEnums
*/ */
private CompanyTypeEnums companyType; private String companyType;
/** /**
* 开通状态:I-初始态;P-处理中;S-成功;F-失败 默认值: I * 开通状态:I-初始态;P-处理中;S-成功;F-失败 默认值: I
*
* @see OpenStateEnums
*/ */
private OpenStateEnums openState; private String openState;
/** /**
* 开通失败原因 * 开通失败原因
...@@ -111,13 +117,17 @@ public class StudioMerchantApply implements Serializable { ...@@ -111,13 +117,17 @@ public class StudioMerchantApply implements Serializable {
/** /**
* 支付宝开通状态:I-初始态;S-成功;F-失败 默认值: I * 支付宝开通状态:I-初始态;S-成功;F-失败 默认值: I
*
* @see OpenStateEnums
*/ */
private OpenStateEnums aliOpenState; private String aliOpenState;
/** /**
* 支付宝认证状态 * 支付宝认证状态
*
* @see OpenStateEnums
*/ */
private OpenStateEnums aliAuthState; private String aliAuthState;
/** /**
* 支付宝商户号 * 支付宝商户号
...@@ -131,13 +141,17 @@ public class StudioMerchantApply implements Serializable { ...@@ -131,13 +141,17 @@ public class StudioMerchantApply implements Serializable {
/** /**
* 微信线下通道开通状态:I-初始态;S-成功;F-失败 默认值: I * 微信线下通道开通状态:I-初始态;S-成功;F-失败 默认值: I
*
* @see OpenStateEnums
*/ */
private OpenStateEnums wxOfflineOpenState; private String wxOfflineOpenState;
/** /**
* 微信线下通道认证状态:I-初始态;S-成功;F-失败 默认值: I * 微信线下通道认证状态:I-初始态;S-成功;F-失败 默认值: I
*
* @see OpenStateEnums
*/ */
private OpenStateEnums wxOfflineAuthState; private String wxOfflineAuthState;
/** /**
* 微信线下通道商户号 * 微信线下通道商户号
...@@ -151,13 +165,17 @@ public class StudioMerchantApply implements Serializable { ...@@ -151,13 +165,17 @@ public class StudioMerchantApply implements Serializable {
/** /**
* 微信线上通道开通状态:I-初始态;S-成功;F-失败 默认值: I * 微信线上通道开通状态:I-初始态;S-成功;F-失败 默认值: I
*
* @see OpenStateEnums
*/ */
private OpenStateEnums wxOnlineOpenState; private String wxOnlineOpenState;
/** /**
* 微信线上通道认证状态:I-初始态;S-成功;F-失败 默认值: I * 微信线上通道认证状态:I-初始态;S-成功;F-失败 默认值: I
*
* @see OpenStateEnums
*/ */
private OpenStateEnums wxOnlineAuthState; private String wxOnlineAuthState;
/** /**
* 微信线上通道商户号 * 微信线上通道商户号
......
...@@ -2,6 +2,7 @@ package com.jiejing.fitness.finance.repository.query; ...@@ -2,6 +2,7 @@ package com.jiejing.fitness.finance.repository.query;
import com.jiejing.fitness.enums.finance.BrandCashierTransStateEnum; import com.jiejing.fitness.enums.finance.BrandCashierTransStateEnum;
import com.jiejing.fitness.enums.finance.BrandCashierTransTypeEnum; import com.jiejing.fitness.enums.finance.BrandCashierTransTypeEnum;
import com.jiejing.fitness.enums.finance.PayOrderTypeEnum;
import com.jiejing.paycenter.common.enums.merchant.SubChannelEnums; import com.jiejing.paycenter.common.enums.merchant.SubChannelEnums;
import java.util.Date; import java.util.Date;
import lombok.Data; import lombok.Data;
...@@ -53,7 +54,7 @@ public class PageBrandCashierRecordQuery { ...@@ -53,7 +54,7 @@ public class PageBrandCashierRecordQuery {
/** /**
* 业务订单类型(来源) * 业务订单类型(来源)
*/ */
private Integer orderType; private PayOrderTypeEnum orderType;
/** /**
* 交易类型:PAY-收款;REFUND-退款; * 交易类型:PAY-收款;REFUND-退款;
......
...@@ -67,7 +67,7 @@ public class StudioCashierRecordRpService extends ...@@ -67,7 +67,7 @@ public class StudioCashierRecordRpService extends
wrapper.eq(StudioCashierRecord.TRANS_STATE, query.getTransState()); wrapper.eq(StudioCashierRecord.TRANS_STATE, query.getTransState());
} }
if (null != query.getOrderType()) { if (null != query.getOrderType()) {
wrapper.eq(StudioCashierRecord.ORDER_TYPE, query.getOrderType()); wrapper.eq(StudioCashierRecord.ORDER_TYPE, query.getOrderType().getCode());
} }
if (null != query.getTransType()) { if (null != query.getTransType()) {
wrapper.eq(StudioCashierRecord.TRANS_TYPE, query.getTransType()); wrapper.eq(StudioCashierRecord.TRANS_TYPE, query.getTransType());
......
...@@ -2,6 +2,7 @@ package com.jiejing.fitness.finance.service.cashier.params; ...@@ -2,6 +2,7 @@ package com.jiejing.fitness.finance.service.cashier.params;
import com.jiejing.fitness.enums.finance.BrandCashierTransStateEnum; import com.jiejing.fitness.enums.finance.BrandCashierTransStateEnum;
import com.jiejing.fitness.enums.finance.BrandCashierTransTypeEnum; import com.jiejing.fitness.enums.finance.BrandCashierTransTypeEnum;
import com.jiejing.fitness.enums.finance.PayOrderTypeEnum;
import com.jiejing.paycenter.common.enums.merchant.SubChannelEnums; import com.jiejing.paycenter.common.enums.merchant.SubChannelEnums;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -45,7 +46,7 @@ public class PageStudioCashierParams { ...@@ -45,7 +46,7 @@ public class PageStudioCashierParams {
private BrandCashierTransStateEnum transState; private BrandCashierTransStateEnum transState;
@ApiModelProperty("业务订单类型(来源)") @ApiModelProperty("业务订单类型(来源)")
private Integer orderType; private PayOrderTypeEnum orderType;
@ApiModelProperty("交易类型:PAY-收款;REFUND-退款;") @ApiModelProperty("交易类型:PAY-收款;REFUND-退款;")
private BrandCashierTransTypeEnum transType; private BrandCashierTransTypeEnum transType;
......
package com.jiejing.fitness.finance.service.global.dto; package com.jiejing.fitness.finance.service.global.dto;
import com.jiejing.paycenter.common.model.SubChannelConfigInfo; import com.jiejing.paycenter.common.model.request.SubChannelConfigInfo;
import com.jiejing.paycenter.common.model.SubChannelInfo; import com.jiejing.paycenter.common.model.request.SubChannelInfo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.util.List; import java.util.List;
import lombok.Data; import lombok.Data;
......
package com.jiejing.fitness.finance.service.merchant.convert; package com.jiejing.fitness.finance.service.merchant.convert;
import static com.jiejing.paycenter.common.enums.merchant.ResourceTypeEnums.*;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.jiejing.common.utils.collection.CollectionUtil;
import com.jiejing.common.utils.convert.BeanUtil;
import com.jiejing.common.utils.crypt.AesUtil; import com.jiejing.common.utils.crypt.AesUtil;
import com.jiejing.filecenter.api.resource.vo.ResourceInfoVO; import com.jiejing.filecenter.api.resource.vo.ResourceInfoVO;
import com.jiejing.fitness.enums.finance.ApplyTypeEnum; import com.jiejing.fitness.enums.finance.ApplyTypeEnum;
...@@ -16,7 +12,6 @@ import com.jiejing.fitness.finance.api.merchant.vo.BrandBankCardVO; ...@@ -16,7 +12,6 @@ import com.jiejing.fitness.finance.api.merchant.vo.BrandBankCardVO;
import com.jiejing.fitness.finance.api.merchant.vo.BrandLegalVO; import com.jiejing.fitness.finance.api.merchant.vo.BrandLegalVO;
import com.jiejing.fitness.finance.api.merchant.vo.BrandLicenseVO; import com.jiejing.fitness.finance.api.merchant.vo.BrandLicenseVO;
import com.jiejing.fitness.finance.api.merchant.vo.BrandMerchantVO; import com.jiejing.fitness.finance.api.merchant.vo.BrandMerchantVO;
import com.jiejing.fitness.finance.api.merchant.vo.BrandResourceVO;
import com.jiejing.fitness.finance.api.merchant.vo.StudioMerchantApplyVO; import com.jiejing.fitness.finance.api.merchant.vo.StudioMerchantApplyVO;
import com.jiejing.fitness.finance.api.merchant.vo.StudioMerchantVO; import com.jiejing.fitness.finance.api.merchant.vo.StudioMerchantVO;
import com.jiejing.fitness.finance.repository.entity.PartyToMerchant; import com.jiejing.fitness.finance.repository.entity.PartyToMerchant;
...@@ -26,9 +21,12 @@ import com.jiejing.fitness.finance.service.merchant.params.ApplyStudioMerchantPa ...@@ -26,9 +21,12 @@ import com.jiejing.fitness.finance.service.merchant.params.ApplyStudioMerchantPa
import com.jiejing.fitness.finance.service.utils.JsonUtil; import com.jiejing.fitness.finance.service.utils.JsonUtil;
import com.jiejing.paycenter.api.merchant.request.ApplyMerchantRequest; import com.jiejing.paycenter.api.merchant.request.ApplyMerchantRequest;
import com.jiejing.paycenter.api.merchant.request.UploadRequest; import com.jiejing.paycenter.api.merchant.request.UploadRequest;
import com.jiejing.paycenter.api.merchant.vo.ContactVO; import com.jiejing.paycenter.common.enums.merchant.AuthPhaseEnums;
import com.jiejing.paycenter.api.merchant.vo.LegalVO; import com.jiejing.paycenter.common.enums.merchant.CompanyTypeEnums;
import com.jiejing.paycenter.api.merchant.vo.MerchantVO; import com.jiejing.paycenter.common.enums.merchant.SubChannelEnums;
import com.jiejing.paycenter.common.model.vo.ContactVO;
import com.jiejing.paycenter.common.model.vo.LegalVO;
import com.jiejing.paycenter.common.model.vo.MerchantVO;
import com.jiejing.paycenter.common.enums.common.OpenStateEnums; import com.jiejing.paycenter.common.enums.common.OpenStateEnums;
import com.jiejing.paycenter.common.enums.merchant.BusinessTypeEnums; import com.jiejing.paycenter.common.enums.merchant.BusinessTypeEnums;
import com.jiejing.paycenter.common.enums.merchant.LicenseTypeEnums; import com.jiejing.paycenter.common.enums.merchant.LicenseTypeEnums;
...@@ -38,15 +36,17 @@ import com.jiejing.paycenter.common.enums.merchant.SceneTypeEnums; ...@@ -38,15 +36,17 @@ import com.jiejing.paycenter.common.enums.merchant.SceneTypeEnums;
import com.jiejing.paycenter.common.enums.merchant.SubChannelAuthTypeEnums; import com.jiejing.paycenter.common.enums.merchant.SubChannelAuthTypeEnums;
import com.jiejing.paycenter.common.enums.merchant.SubChannelOpenTypeEnums; import com.jiejing.paycenter.common.enums.merchant.SubChannelOpenTypeEnums;
import com.jiejing.paycenter.common.event.MerchantEvent; import com.jiejing.paycenter.common.event.MerchantEvent;
import com.jiejing.paycenter.common.model.Address; import com.jiejing.paycenter.common.model.request.Address;
import com.jiejing.paycenter.common.model.BankCard; import com.jiejing.paycenter.common.model.request.BankCard;
import com.jiejing.paycenter.common.model.BusinessInfo; import com.jiejing.paycenter.common.model.request.BusinessInfo;
import com.jiejing.paycenter.common.model.Contact; import com.jiejing.paycenter.common.model.request.Contact;
import com.jiejing.paycenter.common.model.Legal; import com.jiejing.paycenter.common.model.request.Legal;
import com.jiejing.paycenter.common.model.License; import com.jiejing.paycenter.common.model.request.License;
import com.jiejing.paycenter.common.model.ResourceInfo; import com.jiejing.paycenter.common.model.request.ResourceInfo;
import com.jiejing.paycenter.common.model.SubChannelAuthInfo; import com.jiejing.paycenter.common.model.request.SubChannelAuthInfo;
import com.jiejing.paycenter.common.model.SubChannelInfo; import com.jiejing.paycenter.common.model.request.SubChannelInfo;
import com.jiejing.paycenter.common.model.vo.SubChannelAuthVO;
import com.jiejing.paycenter.common.model.vo.SubChannelVO;
import com.jiejing.studio.api.studio.vo.StudioVO; import com.jiejing.studio.api.studio.vo.StudioVO;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
...@@ -69,7 +69,7 @@ public class MerchantConvert { ...@@ -69,7 +69,7 @@ public class MerchantConvert {
.bizCode(PartyTypeEnum.STUDIO.getCode()) .bizCode(PartyTypeEnum.STUDIO.getCode())
.applyNo(apply.getApplyNo()) .applyNo(apply.getApplyNo())
.channelNo(apply.getChannelNo()) .channelNo(apply.getChannelNo())
.companyType(apply.getCompanyType()) .companyType(CompanyTypeEnums.getByCode(apply.getCompanyType()))
.merchantName(apply.getMerchantName()) .merchantName(apply.getMerchantName())
.shortName(apply.getShortName()) .shortName(apply.getShortName())
.legal(convertLegal(params)) .legal(convertLegal(params))
...@@ -182,12 +182,12 @@ public class MerchantConvert { ...@@ -182,12 +182,12 @@ public class MerchantConvert {
.applyNo(Long.toString(id)) .applyNo(Long.toString(id))
.brandId(studio.getBrandId()) .brandId(studio.getBrandId())
.studioId(encrypt.getStudioId()) .studioId(encrypt.getStudioId())
.applyType(exist == null ? ApplyTypeEnum.OPEN : ApplyTypeEnum.RE_OPEN) .applyType(exist == null ? ApplyTypeEnum.OPEN.getCode() : ApplyTypeEnum.RE_OPEN.getCode())
.channelNo(channel) .channelNo(channel)
.merchantName(encrypt.getMerchantName()) .merchantName(encrypt.getMerchantName())
.shortName(studio.getName()) .shortName(studio.getName())
.companyType(encrypt.getCompanyType()) .companyType(encrypt.getCompanyType().getCode())
.openState(OpenStateEnums.INIT) .openState(OpenStateEnums.INIT.getCode())
.merchantInfo(convertMerchantInfo(encrypt)) .merchantInfo(convertMerchantInfo(encrypt))
.salt(salt) .salt(salt)
.createTime(new Date()) .createTime(new Date())
...@@ -215,13 +215,28 @@ public class MerchantConvert { ...@@ -215,13 +215,28 @@ public class MerchantConvert {
.build(); .build();
} }
private static List<SubChannelInfo> convertSubChannelInfos(List<SubChannelVO> list) {
return list.stream()
.map(e -> SubChannelInfo.builder()
.subChannel(SubChannelEnums.getByCode(e.getSubChannel()))
.openType(SubChannelOpenTypeEnums.getByCode(e.getOpenType()))
.feeRate(e.getFeeRate())
.state(OpenStateEnums.getByCode(e.getState()))
.merchantNos(e.getMerchantNos())
.failMessage(e.getFailMessage())
.openTime(e.getOpenTime())
.build()).collect(Collectors.toList());
}
public static StudioMerchantApply convertApply(StudioMerchantApply apply, MerchantEvent event, public static StudioMerchantApply convertApply(StudioMerchantApply apply, MerchantEvent event,
List<SubChannelInfo> defaultSubChannels) { List<SubChannelInfo> defaultSubChannels) {
// 品牌商户规则:微信线下公众号、微信线下小程序、支付宝线下通道全部开通成功才算成功 // 品牌商户规则:微信线下公众号、微信线下小程序、支付宝线下通道全部开通成功才算成功
Map<SubChannelOpenTypeEnums, SubChannelInfo> channelMap = convertSubChannelMap(event.getSubChannels(), List<SubChannelInfo> subChannels = convertSubChannelInfos(event.getSubChannels());
List<SubChannelAuthInfo> auths = convertSubChannelAuths(event.getSubChannelAuths());
Map<SubChannelOpenTypeEnums, SubChannelInfo> channelMap = convertSubChannelMap(subChannels,
defaultSubChannels); defaultSubChannels);
OpenStateEnums state = convertOpenState(channelMap, defaultSubChannels); OpenStateEnums state = convertOpenState(channelMap, defaultSubChannels);
String openFailMessage = OpenStateEnums.FAIL == state ? convertFailMessage(event.getSubChannels()) : null; String openFailMessage = OpenStateEnums.FAIL == state ? convertFailMessage(subChannels) : null;
SubChannelInfo ali = channelMap.get(SubChannelOpenTypeEnums.ALI_OFFLINE); SubChannelInfo ali = channelMap.get(SubChannelOpenTypeEnums.ALI_OFFLINE);
SubChannelInfo wxGzhOffline = channelMap.get(SubChannelOpenTypeEnums.WX_GZH_OFFLINE); SubChannelInfo wxGzhOffline = channelMap.get(SubChannelOpenTypeEnums.WX_GZH_OFFLINE);
OpenStateEnums wxOfflineState = convertWxOfflineState(channelMap); OpenStateEnums wxOfflineState = convertWxOfflineState(channelMap);
...@@ -238,21 +253,35 @@ public class MerchantConvert { ...@@ -238,21 +253,35 @@ public class MerchantConvert {
.merchantName(event.getMerchantName()) .merchantName(event.getMerchantName())
.shortName(event.getShortName()) .shortName(event.getShortName())
.companyType(event.getCompanyType()) .companyType(event.getCompanyType())
.openState(state) .openState(state.getCode())
.openFailMessage(openFailMessage) .openFailMessage(openFailMessage)
.aliOpenState(ali.getState()) .aliOpenState(ali.getState().getCode())
.aliAuthState(convertAliAuthState(event.getSubChannelAuths())) .aliAuthState(convertAliAuthState(auths))
.aliMerchantNo(JSON.toJSONString(ali.getMerchantNos())) .aliMerchantNo(JSON.toJSONString(ali.getMerchantNos()))
.aliOpenFailMessage(ali.getFailMessage()) .aliOpenFailMessage(ali.getFailMessage())
.wxOfflineOpenState(wxOfflineState) .wxOfflineOpenState(wxOfflineState.getCode())
.wxOfflineMerchantNo(JSON.toJSONString(wxGzhOffline.getMerchantNos())) .wxOfflineMerchantNo(JSON.toJSONString(wxGzhOffline.getMerchantNos()))
.wxOfflineAuthState(convertWxOfflineAuthState(event.getSubChannelAuths())) .wxOfflineAuthState(convertWxOfflineAuthState(auths))
.wxOfflineOpenFailMessage(wxOfflineFailMessage) .wxOfflineOpenFailMessage(wxOfflineFailMessage)
.finishTime(OpenStateEnums.SUCCESS == state ? new Date() : null) .finishTime(OpenStateEnums.SUCCESS == state ? new Date() : null)
.updateTime(new Date()) .updateTime(new Date())
.build(); .build();
} }
private static List<SubChannelAuthInfo> convertSubChannelAuths(List<SubChannelAuthVO> auths) {
return auths.stream().map(e -> {
return SubChannelAuthInfo.builder()
.subChannel(SubChannelEnums.getByCode(e.getSubChannel()))
.authType(SubChannelAuthTypeEnums.getByCode(e.getAuthType()))
.state(OpenStateEnums.getByCode(e.getState()))
.phase(AuthPhaseEnums.getByCode(e.getPhase()))
.qrCode(e.getQrCode())
.authTime(e.getAuthTime())
.failMessage(e.getFailMessage())
.build();
}).collect(Collectors.toList());
}
private static BrandLegalVO convertLegal(LegalVO legal, ContactVO contact) { private static BrandLegalVO convertLegal(LegalVO legal, ContactVO contact) {
BrandLegalVO legalInfo = JsonUtil.convertObject(legal, BrandLegalVO.class); BrandLegalVO legalInfo = JsonUtil.convertObject(legal, BrandLegalVO.class);
legalInfo.setLegalEmail(contact.getContactEmail()); legalInfo.setLegalEmail(contact.getContactEmail());
...@@ -260,7 +289,7 @@ public class MerchantConvert { ...@@ -260,7 +289,7 @@ public class MerchantConvert {
} }
private static Map<String, BrandResourceInfo> convertResourceMap( private static Map<String, BrandResourceInfo> convertResourceMap(
Map<String, com.jiejing.paycenter.api.merchant.vo.ResourceInfoVO> resourceMap, Map<String, com.jiejing.paycenter.common.model.vo.ResourceInfoVO> resourceMap,
Map<Long, String> urlMap) { Map<Long, String> urlMap) {
Map<String, BrandResourceInfo> map = new HashMap<>(resourceMap.size()); Map<String, BrandResourceInfo> map = new HashMap<>(resourceMap.size());
resourceMap.keySet().forEach(key -> { resourceMap.keySet().forEach(key -> {
...@@ -271,19 +300,19 @@ public class MerchantConvert { ...@@ -271,19 +300,19 @@ public class MerchantConvert {
return map; return map;
} }
private static OpenStateEnums convertWxOfflineAuthState(List<SubChannelAuthInfo> auths) { private static String convertWxOfflineAuthState(List<SubChannelAuthInfo> auths) {
return auths.stream() return auths.stream()
.filter(e -> e.getAuthType() == SubChannelAuthTypeEnums.WX_OFFLINE) .filter(e -> e.getAuthType() == SubChannelAuthTypeEnums.WX_OFFLINE)
.findFirst() .findFirst()
.map(SubChannelAuthInfo::getState) .map(e -> e.getState().getCode())
.orElse(null); .orElse(null);
} }
private static OpenStateEnums convertAliAuthState(List<SubChannelAuthInfo> auths) { private static String convertAliAuthState(List<SubChannelAuthInfo> auths) {
return auths.stream() return auths.stream()
.filter(e -> e.getAuthType() == SubChannelAuthTypeEnums.ALI_OFFLINE) .filter(e -> e.getAuthType() == SubChannelAuthTypeEnums.ALI_OFFLINE)
.findFirst() .findFirst()
.map(SubChannelAuthInfo::getState) .map(e -> e.getState().getCode())
.orElse(null); .orElse(null);
} }
...@@ -388,9 +417,9 @@ public class MerchantConvert { ...@@ -388,9 +417,9 @@ public class MerchantConvert {
SubChannelInfo wxGzhOffline = channelMap.get(SubChannelOpenTypeEnums.WX_GZH_OFFLINE); SubChannelInfo wxGzhOffline = channelMap.get(SubChannelOpenTypeEnums.WX_GZH_OFFLINE);
OpenStateEnums wxOfflineState = convertWxOfflineState(channelMap); OpenStateEnums wxOfflineState = convertWxOfflineState(channelMap);
String wxOfflineFailMessage = convertWxOfflineFailMessage(channelMap); String wxOfflineFailMessage = convertWxOfflineFailMessage(channelMap);
OpenStateEnums aliAuthState = convertAliAuthState( String aliAuthState = convertAliAuthState(
JsonUtil.convertList(merchant.getSubChannelAuths(), SubChannelAuthInfo.class)); JsonUtil.convertList(merchant.getSubChannelAuths(), SubChannelAuthInfo.class));
OpenStateEnums wxOfflineAuthState = convertWxOfflineAuthState( String wxOfflineAuthState = convertWxOfflineAuthState(
JsonUtil.convertList(merchant.getSubChannelAuths(), SubChannelAuthInfo.class)); JsonUtil.convertList(merchant.getSubChannelAuths(), SubChannelAuthInfo.class));
return StudioMerchantVO.builder() return StudioMerchantVO.builder()
.studioId(relation.getPartyId()) .studioId(relation.getPartyId())
...@@ -401,12 +430,12 @@ public class MerchantConvert { ...@@ -401,12 +430,12 @@ public class MerchantConvert {
.shortName(merchant.getShortName()) .shortName(merchant.getShortName())
.companyType(merchant.getCompanyType()) .companyType(merchant.getCompanyType())
.aliOpenState(Optional.ofNullable(ali.getState()).map(Enum::name).orElse(null)) .aliOpenState(Optional.ofNullable(ali.getState()).map(Enum::name).orElse(null))
.aliAuthState(Optional.ofNullable(aliAuthState).map(Enum::name).orElse(null)) .aliAuthState(aliAuthState)
.aliMerchantNo(JSON.toJSONString(ali.getMerchantNos())) .aliMerchantNo(JSON.toJSONString(ali.getMerchantNos()))
.aliOpenFailMessage(ali.getFailMessage()) .aliOpenFailMessage(ali.getFailMessage())
.wxOfflineOpenState(Optional.ofNullable(wxOfflineState).map(Enum::name).orElse(null)) .wxOfflineOpenState(Optional.ofNullable(wxOfflineState).map(Enum::name).orElse(null))
.wxOfflineMerchantNo(JSON.toJSONString(wxGzhOffline.getMerchantNos())) .wxOfflineMerchantNo(JSON.toJSONString(wxGzhOffline.getMerchantNos()))
.wxOfflineAuthState(Optional.ofNullable(wxOfflineAuthState).map(Enum::name).orElse(null)) .wxOfflineAuthState(wxOfflineAuthState)
.wxOfflineOpenFailMessage(wxOfflineFailMessage) .wxOfflineOpenFailMessage(wxOfflineFailMessage)
.license(JsonUtil.convertObject(merchant.getLicense(), BrandLicenseVO.class)) .license(JsonUtil.convertObject(merchant.getLicense(), BrandLicenseVO.class))
.legal(convertLegal(merchant.getLegal(), merchant.getContact())) .legal(convertLegal(merchant.getLegal(), merchant.getContact()))
...@@ -424,25 +453,25 @@ public class MerchantConvert { ...@@ -424,25 +453,25 @@ public class MerchantConvert {
.brandId(apply.getBrandId()) .brandId(apply.getBrandId())
.studioId(apply.getStudioId()) .studioId(apply.getStudioId())
.applyNo(apply.getApplyNo()) .applyNo(apply.getApplyNo())
.applyType(apply.getApplyType().name()) .applyType(apply.getApplyType())
.channelNo(apply.getChannelNo()) .channelNo(apply.getChannelNo())
.merchantId(apply.getMerchantId()) .merchantId(apply.getMerchantId())
.merchantNo(apply.getMerchantNo()) .merchantNo(apply.getMerchantNo())
.merchantName(apply.getMerchantName()) .merchantName(apply.getMerchantName())
.shortName(apply.getShortName()) .shortName(apply.getShortName())
.companyType(apply.getCompanyType().name()) .companyType(apply.getCompanyType())
.openState(apply.getOpenState().name()) .openState(apply.getOpenState())
.openFailMessage(apply.getOpenFailMessage()) .openFailMessage(apply.getOpenFailMessage())
.aliOpenState(apply.getAliOpenState().name()) .aliOpenState(apply.getAliOpenState())
.aliAuthState(apply.getAliAuthState().name()) .aliAuthState(apply.getAliAuthState())
.aliMerchantNo(apply.getAliMerchantNo()) .aliMerchantNo(apply.getAliMerchantNo())
.aliOpenFailMessage(apply.getAliOpenFailMessage()) .aliOpenFailMessage(apply.getAliOpenFailMessage())
.wxOfflineOpenState(apply.getWxOfflineOpenState().name()) .wxOfflineOpenState(apply.getWxOfflineOpenState())
.wxOfflineAuthState(apply.getWxOfflineAuthState().name()) .wxOfflineAuthState(apply.getWxOfflineAuthState())
.wxOfflineMerchantNo(apply.getWxOfflineMerchantNo()) .wxOfflineMerchantNo(apply.getWxOfflineMerchantNo())
.wxOfflineOpenFailMessage(apply.getWxOfflineOpenFailMessage()) .wxOfflineOpenFailMessage(apply.getWxOfflineOpenFailMessage())
.wxOnlineOpenState(apply.getWxOnlineOpenState().name()) .wxOnlineOpenState(apply.getWxOnlineOpenState())
.wxOnlineAuthState(apply.getWxOnlineAuthState().name()) .wxOnlineAuthState(apply.getWxOnlineAuthState())
.wxOnlineMerchantNo(apply.getWxOnlineMerchantNo()) .wxOnlineMerchantNo(apply.getWxOnlineMerchantNo())
.wxOnlineOpenFailMessage(apply.getWxOnlineOpenFailMessage()) .wxOnlineOpenFailMessage(apply.getWxOnlineOpenFailMessage())
.license(info.getLicense()) .license(info.getLicense())
...@@ -494,9 +523,9 @@ public class MerchantConvert { ...@@ -494,9 +523,9 @@ public class MerchantConvert {
SubChannelInfo wxGzhOffline = channelMap.get(SubChannelOpenTypeEnums.WX_GZH_OFFLINE); SubChannelInfo wxGzhOffline = channelMap.get(SubChannelOpenTypeEnums.WX_GZH_OFFLINE);
OpenStateEnums wxOfflineState = convertWxOfflineState(channelMap); OpenStateEnums wxOfflineState = convertWxOfflineState(channelMap);
String wxOfflineFailMessage = convertWxOfflineFailMessage(channelMap); String wxOfflineFailMessage = convertWxOfflineFailMessage(channelMap);
OpenStateEnums aliAuthState = convertAliAuthState( String aliAuthState = convertAliAuthState(
JsonUtil.convertList(merchant.getSubChannelAuths(), SubChannelAuthInfo.class)); JsonUtil.convertList(merchant.getSubChannelAuths(), SubChannelAuthInfo.class));
OpenStateEnums wxOfflineAuthState = convertWxOfflineAuthState( String wxOfflineAuthState = convertWxOfflineAuthState(
JsonUtil.convertList(merchant.getSubChannelAuths(), SubChannelAuthInfo.class)); JsonUtil.convertList(merchant.getSubChannelAuths(), SubChannelAuthInfo.class));
return BrandMerchantVO.builder() return BrandMerchantVO.builder()
.brandId(brandId) .brandId(brandId)
...@@ -508,12 +537,12 @@ public class MerchantConvert { ...@@ -508,12 +537,12 @@ public class MerchantConvert {
.shortName(merchant.getShortName()) .shortName(merchant.getShortName())
.companyType(merchant.getCompanyType()) .companyType(merchant.getCompanyType())
.aliOpenState(Optional.ofNullable(ali.getState()).map(Enum::name).orElse(null)) .aliOpenState(Optional.ofNullable(ali.getState()).map(Enum::name).orElse(null))
.aliAuthState(Optional.ofNullable(aliAuthState).map(Enum::name).orElse(null)) .aliAuthState(aliAuthState)
.aliMerchantNo(JSON.toJSONString(ali.getMerchantNos())) .aliMerchantNo(JSON.toJSONString(ali.getMerchantNos()))
.aliOpenFailMessage(ali.getFailMessage()) .aliOpenFailMessage(ali.getFailMessage())
.wxOfflineOpenState(Optional.ofNullable(wxOfflineState).map(Enum::name).orElse(null)) .wxOfflineOpenState(Optional.ofNullable(wxOfflineState).map(Enum::name).orElse(null))
.wxOfflineMerchantNo(JSON.toJSONString(wxGzhOffline.getMerchantNos())) .wxOfflineMerchantNo(JSON.toJSONString(wxGzhOffline.getMerchantNos()))
.wxOfflineAuthState(Optional.ofNullable(wxOfflineAuthState).map(Enum::name).orElse(null)) .wxOfflineAuthState(wxOfflineAuthState)
.wxOfflineOpenFailMessage(wxOfflineFailMessage) .wxOfflineOpenFailMessage(wxOfflineFailMessage)
.license(JsonUtil.convertObject(merchant.getLicense(), BrandLicenseVO.class)) .license(JsonUtil.convertObject(merchant.getLicense(), BrandLicenseVO.class))
.legal(convertLegal(merchant.getLegal(), merchant.getContact())) .legal(convertLegal(merchant.getLegal(), merchant.getContact()))
......
...@@ -11,7 +11,7 @@ import com.jiejing.fitness.finance.service.merchant.BrandMerchantService; ...@@ -11,7 +11,7 @@ import com.jiejing.fitness.finance.service.merchant.BrandMerchantService;
import com.jiejing.fitness.finance.service.merchant.convert.MerchantConvert; import com.jiejing.fitness.finance.service.merchant.convert.MerchantConvert;
import com.jiejing.fitness.finance.service.rpc.MerchantRpcService; import com.jiejing.fitness.finance.service.rpc.MerchantRpcService;
import com.jiejing.fitness.finance.service.rpc.StudioRpcService; import com.jiejing.fitness.finance.service.rpc.StudioRpcService;
import com.jiejing.paycenter.api.merchant.vo.MerchantVO; import com.jiejing.paycenter.common.model.vo.MerchantVO;
import com.jiejing.studio.api.studio.vo.StudioVO; import com.jiejing.studio.api.studio.vo.StudioVO;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
......
...@@ -29,17 +29,17 @@ import com.jiejing.fitness.finance.service.rpc.MessageRpcService; ...@@ -29,17 +29,17 @@ import com.jiejing.fitness.finance.service.rpc.MessageRpcService;
import com.jiejing.fitness.finance.service.rpc.ResourceRpcService; import com.jiejing.fitness.finance.service.rpc.ResourceRpcService;
import com.jiejing.fitness.finance.service.rpc.StudioRpcService; import com.jiejing.fitness.finance.service.rpc.StudioRpcService;
import com.jiejing.paycenter.api.merchant.request.ApplyMerchantRequest; import com.jiejing.paycenter.api.merchant.request.ApplyMerchantRequest;
import com.jiejing.paycenter.api.merchant.vo.AuthSubChannelVO; import com.jiejing.paycenter.common.model.vo.AuthSubChannelVO;
import com.jiejing.paycenter.api.merchant.vo.ConfigSubChannelVO; import com.jiejing.paycenter.common.model.vo.ConfigSubChannelVO;
import com.jiejing.paycenter.api.merchant.vo.MerchantVO; import com.jiejing.paycenter.common.model.vo.MerchantVO;
import com.jiejing.paycenter.api.merchant.vo.SubChannelAuthVO; import com.jiejing.paycenter.common.model.vo.SubChannelAuthVO;
import com.jiejing.paycenter.common.enums.common.OpenStateEnums; import com.jiejing.paycenter.common.enums.common.OpenStateEnums;
import com.jiejing.paycenter.common.enums.merchant.ResourceTypeEnums; import com.jiejing.paycenter.common.enums.merchant.ResourceTypeEnums;
import com.jiejing.paycenter.common.enums.merchant.SubChannelAuthTypeEnums; import com.jiejing.paycenter.common.enums.merchant.SubChannelAuthTypeEnums;
import com.jiejing.paycenter.common.enums.merchant.SubChannelConfigTypeEnums; import com.jiejing.paycenter.common.enums.merchant.SubChannelConfigTypeEnums;
import com.jiejing.paycenter.common.enums.merchant.SubChannelEnums; import com.jiejing.paycenter.common.enums.merchant.SubChannelEnums;
import com.jiejing.paycenter.common.event.MerchantEvent; import com.jiejing.paycenter.common.event.MerchantEvent;
import com.jiejing.paycenter.common.model.ResourceInfo; import com.jiejing.paycenter.common.model.request.ResourceInfo;
import com.jiejing.studio.api.studio.vo.StudioVO; import com.jiejing.studio.api.studio.vo.StudioVO;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -153,7 +153,7 @@ public class StudioMerchantServiceImpl implements StudioMerchantService { ...@@ -153,7 +153,7 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
@Override @Override
public void callback(MerchantEvent event) { public void callback(MerchantEvent event) {
switch (event.getState()) { switch (OpenStateEnums.getByCode(event.getState())) {
case PROCESS: case PROCESS:
this.doOpenMerchantProcess(Long.parseLong(event.getApplyNo())); this.doOpenMerchantProcess(Long.parseLong(event.getApplyNo()));
break; break;
...@@ -250,7 +250,7 @@ public class StudioMerchantServiceImpl implements StudioMerchantService { ...@@ -250,7 +250,7 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
StudioMerchantApply toModify = MerchantConvert.convertApply(apply, event, StudioMerchantApply toModify = MerchantConvert.convertApply(apply, event,
configService.getDefaultBrandSubChannelInfo().getSubChannels()); configService.getDefaultBrandSubChannelInfo().getSubChannels());
studioMerchantApplyRpService.updateById(toModify); studioMerchantApplyRpService.updateById(toModify);
if (OpenStateEnums.SUCCESS != toModify.getOpenState()) { if (!OpenStateEnums.SUCCESS.getCode().equals(toModify.getOpenState())) {
return; return;
} }
// 所有子通道全部开通成功 // 所有子通道全部开通成功
...@@ -312,7 +312,7 @@ public class StudioMerchantServiceImpl implements StudioMerchantService { ...@@ -312,7 +312,7 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
private List<Long> getResourceIds(MerchantVO merchant) { private List<Long> getResourceIds(MerchantVO merchant) {
return merchant.getResourceMap().values().stream() return merchant.getResourceMap().values().stream()
.map(com.jiejing.paycenter.api.merchant.vo.ResourceInfoVO::getResourceId) .map(com.jiejing.paycenter.common.model.vo.ResourceInfoVO::getResourceId)
.filter(Objects::nonNull) .filter(Objects::nonNull)
.distinct() .distinct()
.collect(Collectors.toList()); .collect(Collectors.toList());
...@@ -320,13 +320,13 @@ public class StudioMerchantServiceImpl implements StudioMerchantService { ...@@ -320,13 +320,13 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
private void doOpenMerchantFail(Long id, String failMessage) { private void doOpenMerchantFail(Long id, String failMessage) {
studioMerchantApplyRpService.updateById( studioMerchantApplyRpService.updateById(
StudioMerchantApply.builder().id(id).openState(OpenStateEnums.FAIL) StudioMerchantApply.builder().id(id).openState(OpenStateEnums.FAIL.getCode())
.openFailMessage(failMessage).build()); .openFailMessage(failMessage).build());
} }
private void doOpenMerchantProcess(Long id) { private void doOpenMerchantProcess(Long id) {
studioMerchantApplyRpService.updateById( studioMerchantApplyRpService.updateById(
StudioMerchantApply.builder().id(id).openState(OpenStateEnums.PROCESS).build()); StudioMerchantApply.builder().id(id).openState(OpenStateEnums.PROCESS.getCode()).build());
} }
private void validSmsCode(String phone, String smsCode) { private void validSmsCode(String phone, String smsCode) {
......
...@@ -2,7 +2,7 @@ package com.jiejing.fitness.finance.service.pay; ...@@ -2,7 +2,7 @@ package com.jiejing.fitness.finance.service.pay;
import com.jiejing.fitness.finance.service.pay.params.StudioMerchantPayParams; import com.jiejing.fitness.finance.service.pay.params.StudioMerchantPayParams;
import com.jiejing.fitness.finance.service.pay.params.BrandMerchantRefundParams; import com.jiejing.fitness.finance.service.pay.params.BrandMerchantRefundParams;
import com.jiejing.paycenter.api.pay.vo.PayVO; import com.jiejing.paycenter.common.model.vo.PayVO;
import com.jiejing.paycenter.api.pay.vo.RefundVO; import com.jiejing.paycenter.api.pay.vo.RefundVO;
import com.jiejing.paycenter.common.event.PayEvent; import com.jiejing.paycenter.common.event.PayEvent;
import com.jiejing.paycenter.common.event.RefundEvent; import com.jiejing.paycenter.common.event.RefundEvent;
......
...@@ -14,8 +14,8 @@ import com.jiejing.fitness.finance.service.pay.params.BrandMerchantRefundParams; ...@@ -14,8 +14,8 @@ import com.jiejing.fitness.finance.service.pay.params.BrandMerchantRefundParams;
import com.jiejing.fitness.finance.service.pay.params.StudioMerchantPayParams; import com.jiejing.fitness.finance.service.pay.params.StudioMerchantPayParams;
import com.jiejing.fitness.finance.service.utils.FeeUtil; import com.jiejing.fitness.finance.service.utils.FeeUtil;
import com.jiejing.fitness.finance.service.utils.MoneyUtil; import com.jiejing.fitness.finance.service.utils.MoneyUtil;
import com.jiejing.paycenter.api.merchant.vo.MerchantVO; import com.jiejing.paycenter.common.model.vo.MerchantVO;
import com.jiejing.paycenter.api.merchant.vo.SubChannelVO; import com.jiejing.paycenter.common.model.vo.SubChannelVO;
import com.jiejing.paycenter.api.pay.request.PayRequest; import com.jiejing.paycenter.api.pay.request.PayRequest;
import com.jiejing.paycenter.api.pay.request.RefundPayRequest; import com.jiejing.paycenter.api.pay.request.RefundPayRequest;
import com.jiejing.paycenter.api.pay.vo.RefundVO; import com.jiejing.paycenter.api.pay.vo.RefundVO;
...@@ -145,7 +145,7 @@ public class PayConvert { ...@@ -145,7 +145,7 @@ public class PayConvert {
.id(record.getId()) .id(record.getId())
.successTime(event.getFinishTime()) .successTime(event.getFinishTime())
.channelNo(event.getChannelNo()) .channelNo(event.getChannelNo())
.transState(convertTransState(event.getPayState())) .transState(convertTransState(PayStateEnums.getByCode(event.getPayState())))
.failMessage(event.getFailMsg()) .failMessage(event.getFailMsg())
.thirdTransNo(event.getThirdTransNo()) .thirdTransNo(event.getThirdTransNo())
.updateTime(new Date()) .updateTime(new Date())
...@@ -218,7 +218,7 @@ public class PayConvert { ...@@ -218,7 +218,7 @@ public class PayConvert {
public static StudioCashierRecord convertRefund(StudioCashierRecord record, RefundEvent event) { public static StudioCashierRecord convertRefund(StudioCashierRecord record, RefundEvent event) {
return StudioCashierRecord.builder() return StudioCashierRecord.builder()
.id(record.getId()) .id(record.getId())
.transState(convertTransState(event.getRefundState())) .transState(convertTransState(TransStateEnums.getByCode(event.getRefundState())))
.failMessage(event.getFailMessage()) .failMessage(event.getFailMessage())
.successTime(event.getSuccessTime()) .successTime(event.getSuccessTime())
.updateTime(new Date()) .updateTime(new Date())
......
...@@ -13,10 +13,10 @@ import com.jiejing.fitness.finance.service.pay.params.StudioMerchantPayParams; ...@@ -13,10 +13,10 @@ import com.jiejing.fitness.finance.service.pay.params.StudioMerchantPayParams;
import com.jiejing.fitness.finance.service.rpc.MerchantRpcService; import com.jiejing.fitness.finance.service.rpc.MerchantRpcService;
import com.jiejing.fitness.finance.service.rpc.PayRpcService; import com.jiejing.fitness.finance.service.rpc.PayRpcService;
import com.jiejing.fitness.finance.service.rpc.StudioRpcService; import com.jiejing.fitness.finance.service.rpc.StudioRpcService;
import com.jiejing.paycenter.api.merchant.vo.MerchantVO; import com.jiejing.paycenter.common.model.vo.MerchantVO;
import com.jiejing.paycenter.api.pay.request.PayRequest; import com.jiejing.paycenter.api.pay.request.PayRequest;
import com.jiejing.paycenter.api.pay.request.RefundPayRequest; import com.jiejing.paycenter.api.pay.request.RefundPayRequest;
import com.jiejing.paycenter.api.pay.vo.PayVO; import com.jiejing.paycenter.common.model.vo.PayVO;
import com.jiejing.paycenter.api.pay.vo.RefundVO; import com.jiejing.paycenter.api.pay.vo.RefundVO;
import com.jiejing.paycenter.common.event.PayEvent; import com.jiejing.paycenter.common.event.PayEvent;
import com.jiejing.paycenter.common.event.RefundEvent; import com.jiejing.paycenter.common.event.RefundEvent;
......
...@@ -10,11 +10,11 @@ import com.jiejing.paycenter.api.merchant.request.ConfigSubChannelRequest; ...@@ -10,11 +10,11 @@ import com.jiejing.paycenter.api.merchant.request.ConfigSubChannelRequest;
import com.jiejing.paycenter.api.merchant.request.GetMerchantByIdRequest; import com.jiejing.paycenter.api.merchant.request.GetMerchantByIdRequest;
import com.jiejing.paycenter.api.merchant.request.ListMerchantByIdsRequest; import com.jiejing.paycenter.api.merchant.request.ListMerchantByIdsRequest;
import com.jiejing.paycenter.api.merchant.request.UploadRequest; import com.jiejing.paycenter.api.merchant.request.UploadRequest;
import com.jiejing.paycenter.api.merchant.vo.ApplyMerchantResultVO; import com.jiejing.paycenter.common.model.vo.ApplyMerchantResultVO;
import com.jiejing.paycenter.api.merchant.vo.AuthSubChannelVO; import com.jiejing.paycenter.common.model.vo.AuthSubChannelVO;
import com.jiejing.paycenter.api.merchant.vo.ConfigSubChannelVO; import com.jiejing.paycenter.common.model.vo.ConfigSubChannelVO;
import com.jiejing.paycenter.api.merchant.vo.MerchantVO; import com.jiejing.paycenter.common.model.vo.MerchantVO;
import com.jiejing.paycenter.api.merchant.vo.UploadVO; import com.jiejing.paycenter.common.model.vo.UploadVO;
import com.jiejing.paycenter.common.enums.common.OpenStateEnums; import com.jiejing.paycenter.common.enums.common.OpenStateEnums;
import com.jiejing.paycenter.common.enums.merchant.AuthPhaseEnums; import com.jiejing.paycenter.common.enums.merchant.AuthPhaseEnums;
import com.jiejing.paycenter.common.enums.merchant.SubChannelAuthTypeEnums; import com.jiejing.paycenter.common.enums.merchant.SubChannelAuthTypeEnums;
......
...@@ -4,7 +4,7 @@ import com.jiejing.common.model.JsonResult; ...@@ -4,7 +4,7 @@ import com.jiejing.common.model.JsonResult;
import com.jiejing.paycenter.api.pay.PayApi; import com.jiejing.paycenter.api.pay.PayApi;
import com.jiejing.paycenter.api.pay.request.PayRequest; import com.jiejing.paycenter.api.pay.request.PayRequest;
import com.jiejing.paycenter.api.pay.request.RefundPayRequest; import com.jiejing.paycenter.api.pay.request.RefundPayRequest;
import com.jiejing.paycenter.api.pay.vo.PayVO; import com.jiejing.paycenter.common.model.vo.PayVO;
import com.jiejing.paycenter.api.pay.vo.RefundVO; import com.jiejing.paycenter.api.pay.vo.RefundVO;
import com.jiejing.paycenter.common.enums.common.TransStateEnums; import com.jiejing.paycenter.common.enums.common.TransStateEnums;
import com.jiejing.paycenter.common.enums.pay.PayStateEnums; import com.jiejing.paycenter.common.enums.pay.PayStateEnums;
......
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