Browse Source

feat 0 支付工程

devlop
yang_shj 4 years ago
parent
commit
78a6b44e3b
  1. 4
      payment-base-app/src/main/java/com/base/springcloud/service/imp/MerchantServiceImp.java
  2. 2
      payment-base-app/src/main/java/com/base/springcloud/util/TokenUtils.java
  3. 52
      payment-base-app/src/main/resources/application-dev.yml
  4. 0
      payment-base-app/src/main/resources/application-prod.yml
  5. 53
      payment-base-app/src/main/resources/application.yml

4
payment-base-app/src/main/java/com/base/springcloud/service/imp/MerchantServiceImp.java

@ -46,14 +46,14 @@ public class MerchantServiceImp implements MerchantService {
@Override @Override
public void paymentConfigure(MerchantConfigBO merchantConfigBO) { public void paymentConfigure(MerchantConfigBO merchantConfigBO) {
// 证书上传服务器 // 证书上传服务器
//String certPath = uplodWecWindow(merchantConfigBO.getMchId(),merchantConfigBO.getCertFile()); String certPath = uplodWecWindow(merchantConfigBO.getMchId(),merchantConfigBO.getCertFile());
// 商户支付信息保存 // 商户支付信息保存
MerchantConfig merchantConfig = new MerchantConfig(); MerchantConfig merchantConfig = new MerchantConfig();
merchantConfig.setId(UUID.randomUUID().toString().replace("-", "")); merchantConfig.setId(UUID.randomUUID().toString().replace("-", ""));
merchantConfig.setCreateId(merchantConfigBO.getCreateId()); merchantConfig.setCreateId(merchantConfigBO.getCreateId());
merchantConfig.setCreateTime(new Date()); merchantConfig.setCreateTime(new Date());
merchantConfig.setCreateCompanyId(merchantConfigBO.getCompanyId()); merchantConfig.setCreateCompanyId(merchantConfigBO.getCompanyId());
//merchantConfig.setCertPath(certPath); merchantConfig.setCertPath(certPath);
BeanUtils.copyProperties(merchantConfigBO,merchantConfig); BeanUtils.copyProperties(merchantConfigBO,merchantConfig);
int count = merchantConfigMapper.insert(merchantConfig); int count = merchantConfigMapper.insert(merchantConfig);
if(count < 1) if(count < 1)

2
payment-base-app/src/main/java/com/base/springcloud/util/TokenUtils.java

@ -81,7 +81,7 @@ public class TokenUtils {
*/ */
public void userInfo(HttpServletRequest request, String userId) { public void userInfo(HttpServletRequest request, String userId) {
if(StringUtils.isBlank(userId)) return; if(StringUtils.isBlank(userId)) return;
request.setAttribute("userId",userId); request.setAttribute("createId",userId);
} }
/** /**

52
payment-base-app/src/main/resources/application-dev.yml

@ -0,0 +1,52 @@
server:
port: 5080 #服务端口
servlet:
context-path: /rbs-pay
#spring相关配置
spring:
application:
name: mcroservice-payment #服务名
datasource:
type: com.alibaba.druid.pool.DruidDataSource #当前数据源操作类型
driver-class-name: org.gjt.mm.mysql.Driver #数据库驱动包
url: jdbc:mysql://106.14.81.251:3306/rbs_erp_test?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false
username: root
password: hnrr%%360
#rabbitmq 配置
#rabbitmq:
#host: localhost
#port: 5672
#username: rbs-payment
#password: pay123123
# redis 配置
redis:
database: 1
host: 47.102.131.171
lettuce:
pool:
max-active: 8 #最大连接数据库连接数,设 0 为没有限制
max-idle: 8 #最大等待连接中的数量,设 0 为没有限制
max-wait: -1ms #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
min-idle: 0 #最小等待连接中的数量,设 0 为没有限制
shutdown-timeout: 100ms
password: Redis@CS0731
port: 6200
cache:
type: simple
servlet:
multipart :
max-request-size : 10MB
max-file-size : 10MB
#mybatis:配置
mybatis:
type-aliases-package: com.base.springcloud.dao #实体类包路径
mapper-locations: classpath*:com/base/payment/mapper/*.xml #mapper.xml路径
ftp:
ftp_ip: 192.168.71.132
ftp_prot : 21
ftp_username : wangying
ftp_password : 123456
ftp_basepath : /home/wangying
test_ftp:
file_path : G:\TestFile\

0
payment-base-app/target/classes/application.yml → payment-base-app/src/main/resources/application-prod.yml

53
payment-base-app/src/main/resources/application.yml

@ -1,52 +1,3 @@
server:
port: 5080 #服务端口
servlet:
context-path: /rbs-pay
#spring相关配置
spring: spring:
application: profiles:
name: mcroservice-payment #服务名 active: dev
datasource:
type: com.alibaba.druid.pool.DruidDataSource #当前数据源操作类型
driver-class-name: org.gjt.mm.mysql.Driver #数据库驱动包
url: jdbc:mysql://106.14.81.251:3306/rbs_erp_test?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false
username: root
password: hnrr%%360
#rabbitmq 配置
#rabbitmq:
#host: localhost
#port: 5672
#username: rbs-payment
#password: pay123123
# redis 配置
redis:
database: 1
host: 47.102.131.171
lettuce:
pool:
max-active: 8 #最大连接数据库连接数,设 0 为没有限制
max-idle: 8 #最大等待连接中的数量,设 0 为没有限制
max-wait: -1ms #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
min-idle: 0 #最小等待连接中的数量,设 0 为没有限制
shutdown-timeout: 100ms
password: Redis@CS0731
port: 6200
cache:
type: simple
servlet:
multipart :
max-request-size : 10MB
max-file-size : 10MB
#mybatis:配置
mybatis:
type-aliases-package: com.base.springcloud.dao #实体类包路径
mapper-locations: classpath*:com/base/payment/mapper/*.xml #mapper.xml路径
ftp:
ftp_ip: 192.168.71.132
ftp_prot : 21
ftp_username : wangying
ftp_password : 123456
ftp_basepath : /home/wangying
test_ftp:
file_path : G:\TestFile\
Loading…
Cancel
Save