部分更改
This commit is contained in:
@@ -70,6 +70,11 @@ public class ZfbAttestationController {
|
||||
merchantCodeMap.put("url", ZfbChannel.YS_CHANNEL.getUrl());
|
||||
merchantCodeMap.put("nameChannel",ZfbChannel.YS_CHANNEL.getName());
|
||||
break;
|
||||
case 7:
|
||||
merchantCodeMap.put("virChannelFlag", merchantCode.getVirChannelFlag());
|
||||
merchantCodeMap.put("url", ZfbChannel.HF_CHANNEL.getUrl());
|
||||
merchantCodeMap.put("nameChannel",ZfbChannel.HF_CHANNEL.getName());
|
||||
break;
|
||||
default:
|
||||
throw new MsgException("未知通道");
|
||||
}
|
||||
|
||||
@@ -79,6 +79,7 @@ public class TokenRegistryInterceptor extends HandlerInterceptorAdapter {
|
||||
limitUri.add("/api/device/stock/bindtablecode");
|
||||
limitUri.add("/api/userApp/getUserId");
|
||||
limitUri.add("/api/payConfig/appconfig");
|
||||
limitUri.add("/api/zxfAttestation/testSuccess");
|
||||
boolean passFlag = limitUri.stream().anyMatch(s -> s.equals(requestUri) || requestUri.startsWith(s));
|
||||
if (passFlag) {
|
||||
return true;
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package cn.pluss.platform.mapper;
|
||||
|
||||
import cn.pluss.platform.entity.MerchantAuthentication;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.tomcat.util.net.openssl.ciphers.Authentication;
|
||||
|
||||
/**
|
||||
* @author lyf
|
||||
*/
|
||||
public interface AuthenticationMapper extends BaseMapper<MerchantAuthentication> {
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package cn.pluss.platform.entity;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author lyf
|
||||
*/
|
||||
@Data
|
||||
@TableName("tb_pluss_merchant_authentication")
|
||||
public class MerchantAuthentication {
|
||||
@TableField("id")
|
||||
private Integer id;
|
||||
@TableField("channel")
|
||||
private Integer channel;
|
||||
@TableField("channelName")
|
||||
private String channelName;
|
||||
@TableField("wxAuthentication")
|
||||
private String wxAuthentication;
|
||||
@TableField("zfbAuthentication")
|
||||
private String zfbAuthentication;
|
||||
}
|
||||
@@ -29,9 +29,9 @@ public enum MccAndStore {
|
||||
|
||||
WATER(11,"7299"),
|
||||
|
||||
VISIT(12, "5691"),
|
||||
VISIT(12, "5949"),
|
||||
|
||||
JEWELRY(13,"5719"),
|
||||
JEWELRY(13,"5094"),
|
||||
|
||||
DIGITAL(14,"5732"),
|
||||
|
||||
@@ -41,7 +41,10 @@ public enum MccAndStore {
|
||||
|
||||
MOTHER(17,"5641"),
|
||||
|
||||
HIGH(18,"5691")
|
||||
HIGH(18,"5691"),
|
||||
|
||||
HOTEL(19,"7011")
|
||||
|
||||
;
|
||||
|
||||
private final Integer value;
|
||||
|
||||
@@ -9,7 +9,10 @@ import lombok.Getter;
|
||||
public enum ZfbChannel {
|
||||
SXF_CHANNEL("随行付","https://czg-oss.oss-cn-hangzhou.aliyuncs.com/app/statics/%E9%9A%8F%E8%A1%8C%E4%BB%98.png"),
|
||||
YS_CHANNEL("银盛","https://czg-oss.oss-cn-hangzhou.aliyuncs.com/app/statics/%E9%93%B6%E7%9B%9B.png"),
|
||||
LKL_CHANNEL("拉卡拉","https://czg-oss.oss-cn-hangzhou.aliyuncs.com/app/statics/%E6%8B%89%E5%8D%A1%E6%8B%89.jpg");
|
||||
LKL_CHANNEL("拉卡拉","https://czg-oss.oss-cn-hangzhou.aliyuncs.com/app/statics/%E6%8B%89%E5%8D%A1%E6%8B%89.jpg"),
|
||||
HF_CHANNEL("汇付", "https://czg-oss.oss-cn-hangzhou.aliyuncs.com/app/statics/%E6%B1%87%E4%BB%98.png");
|
||||
|
||||
|
||||
/**
|
||||
* 通道值
|
||||
*/
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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());
|
||||
|
||||
// 未授权时查询商户的认证信息
|
||||
|
||||
@@ -1607,6 +1607,7 @@ public class MerchantController {
|
||||
String urlString = domain_wap + url;
|
||||
String rurl = java.net.URLEncoder.encode(urlString, "utf-8");
|
||||
String jmp = "https://openauth.alipay.com/oauth2/publicAppAuthorize.htm?app_id=" + ali_appid + "&scope=auth_base&redirect_uri=" + rurl;
|
||||
|
||||
response.sendRedirect(jmp);
|
||||
return null;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user