| | |
| | | WxConfigEntity config; |
| | | //未设置支付参数,则使用默认支付参数 |
| | | config = getOne(Wrappers.lambdaQuery(WxConfigEntity.class).eq(WxConfigEntity::getClientId, pole.getClientId()).eq(WxConfigEntity::getState, 1)); |
| | | if (pole.getClientId() == null) { |
| | | config = getById(15); // todo 暂时写死,后续需要改成配置文件 |
| | | } |
| | | // if (pole.getClientId() == null) { |
| | | //没有归属的灯杆使用默认配置 |
| | | // config = getById(15); |
| | | // } |
| | | if (config == null) { |
| | | throw new BusinessException("用户未配置支付配置,请配置后重试"); |
| | | } |
| | |
| | | config.setAppid(configParam.getAppId()); |
| | | config.setAppappid(configParam.getAppAppId()); |
| | | if (SecurityUtils.getClientId() != null) { |
| | | config.setCreateUserId(SecurityUtils.getUserId()); |
| | | if (clientService.findClientId()) { |
| | | config.setClientId(clientService.getClientId()); |
| | | } else { |
| | | config.setClientId(SecurityUtils.getUserId()); |
| | | } |
| | | config.setCreateUserId(SecurityUtils.getUserId()); |
| | | } else { |
| | | config.setClientId(SecurityUtils.getUserId()); |
| | | config.setCreateUserId(SecurityUtils.getUserId()); |
| | |
| | | wxConfigEntity.setAppappid(wxConfigEntity.getAppappid().replaceAll("(?<=.{4}).*(?=.{4})", "*")); |
| | | wxConfigEntity.setMchId(wxConfigEntity.getMchId().replaceAll("(?<=.{4}).*(?=.{4})", "*")); |
| | | wxConfigEntity.setPrivateKey(wxConfigEntity.getPrivateKey().replaceAll("(?<=.{4}).*(?=.{4})", "*")); |
| | | wxConfigEntity.setAppSecret(wxConfigEntity.getAppSecret().replaceAll("(?<=.{4}).*(?=.{4})", "*")); |
| | | } |
| | | ); |
| | | return list; |