部分更改

This commit is contained in:
liuyingfang
2024-01-19 13:54:31 +08:00
parent 6dc546e727
commit fef9a1f703
10 changed files with 80 additions and 13 deletions

View File

@@ -118,7 +118,7 @@ public class AppletStoreUserServiceImpl extends ServiceImpl<AppletStoreUserMappe
public static void main(String[] args) {
// 设置请求地址
String url = "https://door.sxczgkj.cn/api/javaapp/apple/registeredstore";
String url = "http://47.122.2.126/notify/demo";
// 创建WebClient对象
WebClient webClient = WebClient.builder().build();
@@ -129,10 +129,8 @@ public class AppletStoreUserServiceImpl extends ServiceImpl<AppletStoreUserMappe
// 构造请求参数
StringBuilder params = new StringBuilder();
params.append("mobile=11111111111");
params.append("&mcc=7997");
params.append("&type=1");
params.append("&title=测试测试");
params.append("order_id=G1010317389703418481");
params.append("&status=2");
// 发送POST请求并获取响应
Mono<String> response = webClient.post()

View File

@@ -37,6 +37,15 @@ public interface MerchantChannelStatusService extends IService<MerchantChannelSt
qWrapper.eq(MerchantChannelStatus::getAuthorizationStatus,1);
return getOne(qWrapper);
}
default MerchantChannelStatus merchantCodeAndChannelType(String merchantCode, String channelType) {
LambdaQueryWrapper<MerchantChannelStatus> qWrapper = Wrappers.lambdaQuery();
qWrapper.eq(MerchantChannelStatus::getVirChannelFlag, channelType);
qWrapper.eq(MerchantChannelStatus::getMerchantCode, merchantCode);
qWrapper.eq(MerchantChannelStatus::getStatus,3);
return getOne(qWrapper);
}
default MerchantChannelStatus getByMerchantCodeAndChannelTypeV1(String merchantCode, String channelType) {
LambdaQueryWrapper<MerchantChannelStatus> qWrapper = Wrappers.lambdaQuery();
qWrapper.eq(MerchantChannelStatus::getVirChannelFlag, channelType);

View File

@@ -4,6 +4,7 @@ import cn.pluss.platform.channel.MerchantAuditService;
import cn.pluss.platform.channel.MerchantCertService;
import cn.pluss.platform.entity.*;
import cn.pluss.platform.exception.MsgException;
import cn.pluss.platform.mapper.AuthenticationMapper;
import cn.pluss.platform.mapper.MerchantChannelMapper;
import cn.pluss.platform.mapper.MerchantChannelStatusMapper;
import cn.pluss.platform.mapper.SubMerchantApplyOrderMapper;
@@ -71,6 +72,9 @@ public class WxCertServiceImpl implements WxCertService {
@Autowired @Lazy
private MerchantAuditService ryxMerchantAuditService;
@Resource
private AuthenticationMapper authenticationMapper;
@Override
public void wxCert(String userId, String merchantCode, Integer channelId) {
merchantCode = paramCheck(userId, merchantCode);
@@ -222,13 +226,18 @@ public class WxCertServiceImpl implements WxCertService {
}
}
MerchantChannelStatus mcs = mcsService.getByMerchantCodeAndChannelType(mbi.getMerchantCode(), channelType);
MerchantChannelStatus mcs = mcsService.merchantCodeAndChannelType(mbi.getMerchantCode(), channelType);
MerchantAuthentication merchantAuthentication = new MerchantAuthentication();
if (mcs != null){
merchantAuthentication.setChannel(mcs.getChannel());
merchantAuthentication = authenticationMapper.selectOne(new QueryWrapper<>(merchantAuthentication).last("limit 1"));
}
WxCertInfoVO result = WxCertInfoVO.empty(channelType, channelId);
result.setMerchantCode(mbi.getMerchantCode());
if (mcs == null || !(MerchantChannelStatus.AUDIT_STATUS_SUCCESS.equals(mcs.getStatus())
|| MerchantChannelStatus.AUDIT_STATUS_DATA_EDIT.equals(mcs.getStatus()))) {
return result;
result.setInfoQrcode(merchantAuthentication.getWxAuthentication());
return result;
}
result.setChannelId(mcs.getChannel() + "");
@@ -267,6 +276,7 @@ public class WxCertServiceImpl implements WxCertService {
if (Objects.equals(mcs.getAuthorizationStatus(), MerchantChannelStatus.AUTHORIZATION_STATUS_AUTHORIZED)) {
result.setStatus(SubMerchantApplyOrder.RES_STATUS_COMPLETE);
result.setInfoQrcode(merchantAuthentication.getWxAuthentication());
return result;
}
@@ -287,7 +297,9 @@ public class WxCertServiceImpl implements WxCertService {
}
result.setStatus(applyOrder.getResultStatus());
result.setInfoQrcode(applyOrder.getInfoQrcode());
//认证二维码信息
result.setInfoQrcode(merchantAuthentication.getWxAuthentication());
result.setRemark(applyOrder.getRemark());
// 未授权时查询商户的认证信息