新建项目
This commit is contained in:
@@ -289,7 +289,8 @@ public class HomeController {
|
||||
.eq(BuyOrder::getUserId,ShiroUtils.getUId())
|
||||
.eq(BuyOrder::getCome,3)
|
||||
.eq(BuyOrder::getOrderType,"abroadBook")
|
||||
.eq(BuyOrder::getOrderStatus,"3"));
|
||||
.eq(BuyOrder::getOrderStatus,"3")
|
||||
.orderByDesc(BuyOrder::getOrderId));
|
||||
for (BuyOrder bo:orders.getRecords()){
|
||||
if ("abroadBook".equals(bo.getOrderType())){
|
||||
bo.setBookEntity(bookService.getById(bo.getAbroadBookId()));
|
||||
|
||||
@@ -52,8 +52,14 @@ public class OrderController {
|
||||
if (totalPrice.compareTo(new BigDecimal(0))<=0){
|
||||
return R.error("订单价格不能为0");
|
||||
}
|
||||
if (totalPrice.compareTo(bookEntity.getAbroadPrice())!=0){
|
||||
return R.error("订单价格异常");
|
||||
if (Constants.PAYMENT_METHOD_VIRTUAL.equals(buyOrder.getPaymentMethod())) {
|
||||
if (totalPrice.compareTo(bookEntity.getAbroadPrice().multiply(new BigDecimal(10)))!=0){
|
||||
return R.error("订单价格异常");
|
||||
}
|
||||
}else {
|
||||
if (totalPrice.compareTo(bookEntity.getAbroadPrice())!=0){
|
||||
return R.error("订单价格异常");
|
||||
}
|
||||
}
|
||||
buyOrder.setRealMoney(totalPrice);
|
||||
buyOrder.setRemark("Purchase the e-book '"+ Pinyin.toPinyin(bookEntity.getName(), " ").toLowerCase()+"'");
|
||||
|
||||
@@ -16,7 +16,7 @@ spring:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
druid:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://13.215.57.194:3306/e_book_test?rewriteBatchedStatements=true
|
||||
url: jdbc:mysql://13.215.57.194:3306/nuttyreading_global?rewriteBatchedStatements=true
|
||||
username: abroadbook
|
||||
password: Wu751019!
|
||||
initial-size: 10
|
||||
|
||||
@@ -2,7 +2,7 @@ spring:
|
||||
redis:
|
||||
open: false # 是否开启redis缓存 true开启 false关闭
|
||||
database: 0
|
||||
host: 47.93.127.115
|
||||
host: 13.215.57.194
|
||||
port: 6379
|
||||
password: Jgll2015 # 密码(默认为空)
|
||||
timeout: 6000000ms # 连接超时时长(毫秒)
|
||||
@@ -16,11 +16,8 @@ spring:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
druid:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://rm-2zev4157t67trxuu3yo.mysql.rds.aliyuncs.com:3306/e_book_test?rewriteBatchedStatements=true
|
||||
# username: root
|
||||
# password: HSXY1234hsxy
|
||||
# password: Jgll2023Nutty
|
||||
username: nuttyreading
|
||||
url: jdbc:mysql://13.215.57.194:3306/nuttyreading_global?rewriteBatchedStatements=true
|
||||
username: abroadbook
|
||||
password: Wu751019!
|
||||
initial-size: 10
|
||||
max-active: 100
|
||||
@@ -52,7 +49,7 @@ spring:
|
||||
initSQL: SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci
|
||||
|
||||
rabbitmq:
|
||||
host: 47.93.127.115
|
||||
host: 13.215.57.194
|
||||
port: 5672
|
||||
username: admin
|
||||
password: 751019
|
||||
@@ -72,14 +69,13 @@ aliyun:
|
||||
sTemplateCode: SMS_463780139
|
||||
|
||||
server:
|
||||
port: 9200
|
||||
|
||||
port: 9300
|
||||
|
||||
wxpay:
|
||||
appId: wx47134a8f15083734
|
||||
zmzmappId: wx912aa600132dc965
|
||||
wumenappId: wx6b17b40171dea988
|
||||
# wmysappId: wx47134a8f15083734
|
||||
# wmysappId: wx47134a8f15083734
|
||||
mchId: 1612860909
|
||||
payUrl: https://api.mch.weixin.qq.com/v3/pay/transactions/app
|
||||
notifyUrl: https://testapi.nuttyreading.com/pay/payNotify
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
spring:
|
||||
redis:
|
||||
open: true # 是否开启redis缓存 true开启 false关闭
|
||||
database: 0
|
||||
host: 47.93.127.115
|
||||
port: 6379
|
||||
password: Jgll2015 # 密码(默认为空)
|
||||
timeout: 6000000ms # 连接超时时长(毫秒)
|
||||
jedis:
|
||||
pool:
|
||||
max-active: 1000 # 连接池最大连接数(使用负值表示没有限制)
|
||||
max-wait: -1ms # 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
max-idle: 10 # 连接池中的最大空闲连接
|
||||
min-idle: 5 # 连接池中的最小空闲连接
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
druid:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://rm-2zev4157t67trxuu3yo.mysql.rds.aliyuncs.com:3306/e_book_test?rewriteBatchedStatements=true
|
||||
# username: root
|
||||
# password: HSXY1234hsxy
|
||||
# password: Jgll2023Nutty
|
||||
username: nuttyreading
|
||||
password: Wu751019!
|
||||
initial-size: 10
|
||||
max-active: 100
|
||||
min-idle: 10
|
||||
max-wait: 60000
|
||||
pool-prepared-statements: true
|
||||
max-pool-prepared-statement-per-connection-size: 20
|
||||
time-between-eviction-runs-millis: 60000
|
||||
min-evictable-idle-time-millis: 300000
|
||||
#Oracle需要打开注释
|
||||
#validation-query: SELECT 1 FROM DUAL
|
||||
test-while-idle: true
|
||||
test-on-borrow: false
|
||||
test-on-return: false
|
||||
stat-view-servlet:
|
||||
enabled: true
|
||||
url-pattern: /druid/*
|
||||
#login-username: admin
|
||||
#login-password: admin
|
||||
filter:
|
||||
stat:
|
||||
log-slow-sql: true
|
||||
slow-sql-millis: 1000
|
||||
merge-sql: false
|
||||
wall:
|
||||
config:
|
||||
multi-statement-allow: true
|
||||
tomcat:
|
||||
initSQL: SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci
|
||||
|
||||
rabbitmq:
|
||||
host: 47.93.127.115
|
||||
port: 5672
|
||||
username: admin
|
||||
password: 751019
|
||||
virtualHost: /
|
||||
aliyun:
|
||||
oss:
|
||||
file:
|
||||
endpoint: oss-cn-beijing.aliyuncs.com
|
||||
keyid: LTAIiSMeo8ztauV5
|
||||
keysecret: pVIYAOIFSUGg61lYfE8cjg2ZNpnLJA
|
||||
bucketname: ehh-private-01
|
||||
sms:
|
||||
accessKeyId: LTAI5tJbbw5fY97pnw635yq3
|
||||
accessKeySecret: LTXQ9v3OYVwNVbDWWfVpbbcVDKErKi
|
||||
singName: 疯子读书国际
|
||||
templateCode: SMS_248840040
|
||||
sTemplateCode: SMS_463780139
|
||||
|
||||
server:
|
||||
port: 9200
|
||||
|
||||
|
||||
wxpay:
|
||||
appId: wx47134a8f15083734
|
||||
zmzmappId: wx912aa600132dc965
|
||||
wumenappId: wx6b17b40171dea988
|
||||
mchId: 1612860909
|
||||
payUrl: https://api.mch.weixin.qq.com/v3/pay/transactions/app
|
||||
notifyUrl: https://testapi.nuttyreading.com/pay/payNotify
|
||||
refundUrl: https://api.mch.weixin.qq.com/v3/refund/domestic/refunds
|
||||
refundNotifyUrl: https://testapi.nuttyreading.com/pay/refundNotify
|
||||
keyPemPath: F:\hs\nuttyreading-java\src\main\resources\cent\apiclient_key.pem
|
||||
serialNo: 679AECB2F7AC4183033F713828892BA640E4EEE3
|
||||
apiV3Key: 4aYFklzaULeGlr7oJPZ6rHWKcxjihZUF
|
||||
wechatPayCertificateUrl: F:\hs\nuttyreading-java\src\main\resources\cent\wechatpay_7B5676E3CDF56680D0414A009CE501C844DBE2D6.pem
|
||||
privateKeyUrl: F:\hs\nuttyreading-java\src\main\resources\cent\apiclient_key.pem
|
||||
|
||||
|
||||
#redisAddress: redis://127.0.0.1:6379
|
||||
redisAddress: redis://47.93.127.115:6379
|
||||
redisPassword: Jgll2015
|
||||
@@ -1,94 +0,0 @@
|
||||
spring:
|
||||
redis:
|
||||
open: false # 是否开启redis缓存 true开启 false关闭
|
||||
database: 0
|
||||
host: 59.110.212.44
|
||||
port: 6379
|
||||
password: Jgll2015 # 密码(默认为空)
|
||||
timeout: 6000000ms # 连接超时时长(毫秒)
|
||||
jedis:
|
||||
pool:
|
||||
max-active: 1000 # 连接池最大连接数(使用负值表示没有限制)
|
||||
max-wait: -1ms # 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
max-idle: 10 # 连接池中的最大空闲连接
|
||||
min-idle: 5 # 连接池中的最小空闲连接
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
druid:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://rm-2zev4157t67trxuu3yo.mysql.rds.aliyuncs.com:3306/e_book?rewriteBatchedStatements=true
|
||||
# username: root
|
||||
# password: HSXY1234hsxy
|
||||
# password: Jgll2023Nutty
|
||||
username: nuttyreading
|
||||
password: Wu751019!
|
||||
initial-size: 10
|
||||
max-active: 100
|
||||
min-idle: 10
|
||||
max-wait: 60000
|
||||
pool-prepared-statements: true
|
||||
max-pool-prepared-statement-per-connection-size: 20
|
||||
time-between-eviction-runs-millis: 60000
|
||||
min-evictable-idle-time-millis: 300000
|
||||
#Oracle需要打开注释
|
||||
#validation-query: SELECT 1 FROM DUAL
|
||||
test-while-idle: true
|
||||
test-on-borrow: false
|
||||
test-on-return: false
|
||||
stat-view-servlet:
|
||||
enabled: true
|
||||
url-pattern: /druid/*
|
||||
#login-username: admin
|
||||
#login-password: admin
|
||||
filter:
|
||||
stat:
|
||||
log-slow-sql: true
|
||||
slow-sql-millis: 1000
|
||||
merge-sql: false
|
||||
wall:
|
||||
config:
|
||||
multi-statement-allow: true
|
||||
|
||||
rabbitmq:
|
||||
host: 59.110.212.44
|
||||
port: 5672
|
||||
username: admin
|
||||
password: 751019
|
||||
virtualHost: /
|
||||
|
||||
aliyun:
|
||||
oss:
|
||||
file:
|
||||
endpoint: oss-cn-beijing.aliyuncs.com
|
||||
keyid: LTAIiSMeo8ztauV5
|
||||
keysecret: pVIYAOIFSUGg61lYfE8cjg2ZNpnLJA
|
||||
bucketname: ehh-private-01
|
||||
sms:
|
||||
accessKeyId: LTAI5tJbbw5fY97pnw635yq3
|
||||
accessKeySecret: LTXQ9v3OYVwNVbDWWfVpbbcVDKErKi
|
||||
singName: 疯子读书国际
|
||||
templateCode: SMS_248840040
|
||||
sTemplateCode: SMS_463780139
|
||||
|
||||
server:
|
||||
port: 9100
|
||||
|
||||
wxpay:
|
||||
appId: wx47134a8f15083734
|
||||
zmzmappId: wx912aa600132dc965
|
||||
wumenappId: wx6b17b40171dea988
|
||||
mchId: 1612860909
|
||||
payUrl: https://api.mch.weixin.qq.com/v3/pay/transactions/app
|
||||
notifyUrl: https://api.nuttyreading.com/pay/payNotify
|
||||
refundUrl: https://api.mch.weixin.qq.com/v3/refund/domestic/refunds
|
||||
refundNotifyUrl: http://pjm6m9.natappfree.cc/pay/refundNotify
|
||||
keyPemPath: /usr/local/hs/peanut_book/target/classes/cent/apiclient_key.pem
|
||||
serialNo: 679AECB2F7AC4183033F713828892BA640E4EEE3
|
||||
apiV3Key: 4aYFklzaULeGlr7oJPZ6rHWKcxjihZUF
|
||||
wechatPayCertificateUrl: /usr/local/hs/peanut_book/target/classes/cent/wechatpay_7B5676E3CDF56680D0414A009CE501C844DBE2D6.pem
|
||||
privateKeyUrl: /usr/local/hs/peanut_book/target/classes/cent/apiclient_key.pem
|
||||
|
||||
|
||||
|
||||
redisAddress: redis://59.110.212.44:6379
|
||||
redisPassword: Jgll2015
|
||||
@@ -1,97 +0,0 @@
|
||||
spring:
|
||||
redis:
|
||||
open: false # 是否开启redis缓存 true开启 false关闭
|
||||
database: 0
|
||||
host: 47.93.127.115
|
||||
port: 6379
|
||||
password: Jgll2015 # 密码(默认为空)
|
||||
timeout: 6000000ms # 连接超时时长(毫秒)
|
||||
jedis:
|
||||
pool:
|
||||
max-active: 1000 # 连接池最大连接数(使用负值表示没有限制)
|
||||
max-wait: -1ms # 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
max-idle: 10 # 连接池中的最大空闲连接
|
||||
min-idle: 5 # 连接池中的最小空闲连接
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
druid:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://rm-2zev4157t67trxuu3yo.mysql.rds.aliyuncs.com:3306/e_book_test?rewriteBatchedStatements=true
|
||||
# username: root
|
||||
# password: HSXY1234hsxy
|
||||
# password: Jgll2023Nutty
|
||||
username: nuttyreading
|
||||
password: Wu751019!
|
||||
initial-size: 10
|
||||
max-active: 100
|
||||
min-idle: 10
|
||||
max-wait: 60000
|
||||
pool-prepared-statements: true
|
||||
max-pool-prepared-statement-per-connection-size: 20
|
||||
time-between-eviction-runs-millis: 60000
|
||||
min-evictable-idle-time-millis: 300000
|
||||
#Oracle需要打开注释
|
||||
#validation-query: SELECT 1 FROM DUAL
|
||||
test-while-idle: true
|
||||
test-on-borrow: false
|
||||
test-on-return: false
|
||||
stat-view-servlet:
|
||||
enabled: true
|
||||
url-pattern: /druid/*
|
||||
#login-username: admin
|
||||
#login-password: admin
|
||||
filter:
|
||||
stat:
|
||||
log-slow-sql: true
|
||||
slow-sql-millis: 1000
|
||||
merge-sql: false
|
||||
wall:
|
||||
config:
|
||||
multi-statement-allow: true
|
||||
tomcat:
|
||||
initSQL: SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci
|
||||
|
||||
rabbitmq:
|
||||
host: 47.93.127.115
|
||||
port: 5672
|
||||
username: admin
|
||||
password: 751019
|
||||
virtualHost: /
|
||||
aliyun:
|
||||
oss:
|
||||
file:
|
||||
endpoint: oss-cn-beijing.aliyuncs.com
|
||||
keyid: LTAIiSMeo8ztauV5
|
||||
keysecret: pVIYAOIFSUGg61lYfE8cjg2ZNpnLJA
|
||||
bucketname: ehh-private-01
|
||||
sms:
|
||||
accessKeyId: LTAI5tJbbw5fY97pnw635yq3
|
||||
accessKeySecret: LTXQ9v3OYVwNVbDWWfVpbbcVDKErKi
|
||||
singName: 疯子读书国际
|
||||
templateCode: SMS_248840040
|
||||
sTemplateCode: SMS_463780139
|
||||
|
||||
server:
|
||||
port: 9200
|
||||
|
||||
wxpay:
|
||||
appId: wx47134a8f15083734
|
||||
zmzmappId: wx912aa600132dc965
|
||||
wumenappId: wx6b17b40171dea988
|
||||
# wmysappId: wx47134a8f15083734
|
||||
mchId: 1612860909
|
||||
payUrl: https://api.mch.weixin.qq.com/v3/pay/transactions/app
|
||||
notifyUrl: https://testapi.nuttyreading.com/pay/payNotify
|
||||
refundUrl: https://api.mch.weixin.qq.com/v3/refund/domestic/refunds
|
||||
refundNotifyUrl: http://pjm6m9.natappfree.cc/pay/refundNotify
|
||||
# keyPemPath: /usr/local/hs/peanut_book/target/classes/cent/apiclient_key.pem
|
||||
keyPemPath: /home/www/nuttyreading/cent/apiclient_key.pem
|
||||
serialNo: 679AECB2F7AC4183033F713828892BA640E4EEE3
|
||||
apiV3Key: 4aYFklzaULeGlr7oJPZ6rHWKcxjihZUF
|
||||
wechatPayCertificateUrl: /home/www/nuttyreading/cent/wechatpay_7B5676E3CDF56680D0414A009CE501C844DBE2D6.pem
|
||||
privateKeyUrl: /home/www/nuttyreading/cent/apiclient_key.pem
|
||||
|
||||
|
||||
|
||||
redisAddress: redis://47.93.127.115:6379
|
||||
redisPassword: Jgll2015
|
||||
@@ -186,7 +186,7 @@
|
||||
<!-- <!– 4. 最终的策略 –>-->
|
||||
<!-- <!– 4.1 开发环境:打印控制台–>-->
|
||||
|
||||
<springProfile name="dev,dev1">
|
||||
<springProfile name="dev">
|
||||
<include resource="org/springframework/boot/logging/logback/base.xml" />
|
||||
<logger name="org.springframework.web" level="DEBUG"/>
|
||||
<logger name="org.springboot.sample" level="DEBUG" />
|
||||
@@ -209,7 +209,7 @@
|
||||
<!-- </root>-->
|
||||
|
||||
<!-- <!– 4.2 生产环境:输出到文档–>-->
|
||||
<springProfile name="test,prod">
|
||||
<springProfile name="aws">
|
||||
<logger name="com.peanut" level="ERROR" additivity="false">
|
||||
<!-- <appender-ref ref="DEBUG_FILE"/>-->
|
||||
<appender-ref ref="ERROR_FILE"/>
|
||||
@@ -217,6 +217,7 @@
|
||||
<root level="info">
|
||||
<appender-ref ref="DEBUG_FILE"/>
|
||||
<appender-ref ref="ERROR_FILE"/>
|
||||
<appender-ref ref="INFO_FILE"/>
|
||||
<appender-ref ref="WARN_FILE"/>
|
||||
</root>
|
||||
</springProfile>
|
||||
|
||||
Reference in New Issue
Block a user