44323
2024-01-30 987fd6c12a7dcfb2b6ae9ee585fc182d2d865040
商户认证部分bug修改
5个文件已修改
59 ■■■■■ 已修改文件
cloud-server-account/src/main/resources/sharding-jdbc.properties 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-management/src/main/java/com/dsh/guns/modular/system/api/AliPayMsgConfig.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/OperatorController.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-management/src/main/webapp/WEB-INF/view/system/operator/OperatorUser_proportionAuth.html 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-management/src/main/webapp/static/modular/system/operatorUser/operatorUser.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-account/src/main/resources/sharding-jdbc.properties
@@ -14,7 +14,7 @@
datasource.names=master0
datasource.master0.type=com.alibaba.druid.pool.DruidDataSource
datasource.master0.driverClassName=com.mysql.cj.jdbc.Driver
datasource.master0.url=jdbc:mysql://192.168.110.110/playpai_account?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
datasource.master0.url=jdbc:mysql://192.168.110.80/playpai_account?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
datasource.master0.username=root
datasource.master0.password=123456
datasource.master0.maxActive=20
cloud-server-management/src/main/java/com/dsh/guns/modular/system/api/AliPayMsgConfig.java
@@ -45,7 +45,7 @@
             */
            @Override
            public void onMessage (String msgApi, String msgId, String bizContent) {
                System.err.println("消息对象"+msgApi);
                System.err.println(" 消息对象"+msgApi);
                System.err.println("id"+msgId);
                System.err.println("内容"+bizContent);
                if (msgApi.equals("ant.merchant.expand.indirect.zft.passed")){
@@ -73,11 +73,13 @@
                            .eq("orderNo", order_id));
                    if (orderNo!=null){
                        orderNo.setRefuseReason(reason);
                        operatorAuthService.updateById(orderNo);
                        Integer operatorId = orderNo.getOperatorId();
                        OperatorUser operatorId1 = operatorUserService.getOne(new QueryWrapper<OperatorUser>()
                                .eq("operatorId", operatorId));
                        if (operatorId1!=null){
                            operatorId1.setAlipayAudit(3);
                            operatorUserService.updateById(operatorId1);
                        }
                    }
                }
cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/OperatorController.java
@@ -26,6 +26,7 @@
import com.dsh.guns.modular.system.model.*;
import com.dsh.guns.modular.system.service.*;
import com.dsh.guns.modular.system.util.HttpRequestUtil;
import com.dsh.guns.modular.system.util.PayMoneyUtil;
import com.dsh.guns.modular.system.util.ResultUtil;
@@ -240,6 +241,8 @@
        }else{
            List<TCity> list6 = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0));
            model.addAttribute("list4",list6);
            List<TCity> list5 = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 1));
            model.addAttribute("list5",list5);
        }
@@ -288,16 +291,21 @@
        }
    }
    public static void main(String[] args) {
        String bankName = "中国工商银行"; // 要转换为简写的银行名称
        // 调用支付宝接口 通过银行卡号获取银行信息
        String url = "https://ccdcapi.alipay.com/validateAndCacheCardInfo.json?_input_charset=utf-8&" +
                "cardNo=6217003800041315031&cardBinCheck=true";
        HashMap<String, String> hashMap = new HashMap<>();
        String result = HttpRequestUtil.postRequest(url,hashMap);
        System.err.println(result);
        JSONObject json = JSONObject.parseObject(result);
        String bank = json.getString("bank");
        String cardType = json.getString("cardType");
        System.err.println(bank);
        System.err.println(cardType);
        Pattern pattern = Pattern.compile("([\\u4e00-\\u9fa5]+)(?=\\s+[A-Za-z]+$)");
        Matcher matcher = pattern.matcher(bankName);
        if (matcher.find()) {
            System.out.println(matcher.group()); // 输出结果:"工商银行" -> "ICBC"
        } else {
            System.out.println("无法识别该银行名称!");
        }
    }
    /**
     * 支付宝商户认证提交
     */
@@ -316,11 +324,20 @@
        Integer userId1 = byId.getUserId();
        OperatorUser userId2 = operatorUserService.getOne(new QueryWrapper<OperatorUser>()
                .eq("userId", userId1));
        // 0未认证 1待审核 2通过 3驳回
        userId2.setAlipayAudit(1);
        operatorUserService.updateById(userId2);
        OperatorAuthAlipay data = operatorAuthService.getOne(new QueryWrapper<OperatorAuthAlipay>().eq("operatorId", operatorId));
        String group="ABC";
    // 调用支付宝接口 通过银行卡号获取银行信息
        String url = "https://ccdcapi.alipay.com/validateAndCacheCardInfo.json?_input_charset=utf-8&" +
                "cardNo="+bankCard+"&cardBinCheck=true";
        HashMap<String, String> hashMap = new HashMap<>();
        String result = HttpRequestUtil.postRequest(url,hashMap);
        System.err.println(result);
        JSONObject json2 = JSONObject.parseObject(result);
        String bank = json2.getString("bank");
        String cardType1 = json2.getString("cardType");
        // 根据银行卡号查询所属银行
        String group=bank;
//        if(StringUtils.hasLength(bankName)){
//            Pattern pattern = Pattern.compile(".*[\\u4e00-\\u9fa5]+"); // 只保留汉字部分
//            Matcher matcher = pattern.matcher(bankName);
@@ -467,12 +484,12 @@
        String type ;
        // 结算类型为支付宝 填写支付宝账号 结算类型为银行卡填写银行卡号
        String account;
        if (StringUtils.hasLength(alipayAccount)){
            type =  accountType;
            account = alipayAccount;
        }else{
        if (accountType.equals("bankCard")){
            type = accountType;
            account = bankCard;
        }else{
            type =  accountType;
            account = alipayAccount;
        }
        String res=
                "  \"service\":[" +
cloud-server-management/src/main/webapp/WEB-INF/view/system/operator/OperatorUser_proportionAuth.html
@@ -177,7 +177,6 @@
                            <label class="col-sm-3 control-label">*开户行所在省:</label>
                            <div class="col-sm-9">
                                <select style="width: 300px" class="form-control" id="pCode" name="pCode" onchange="TSite.oneChange2(this)">
                                    <option value="">请选择省</option>
                                    @for(obj in list){
                                    <option style="width: 300px" value="${obj.code}">${obj.name}</option>
                                    @}
@@ -188,7 +187,6 @@
                            <label class="col-sm-3 control-label">*开户行所在市:</label>
                            <div class="col-sm-9">
                                <select style="width: 300px" class="form-control" id="cCode" name="cCode" >
                                    <option value="">请选择市</option>
                                </select>
                            </div>
                        </div>
cloud-server-management/src/main/webapp/static/modular/system/operatorUser/operatorUser.js
@@ -218,7 +218,7 @@
        return;
    }
    if ("" == $("#lIDNumber").val()){
    if ("" == $("#leagleNumber").val()){
        Feng.error("请输入法人身份证号");
        return;
    }