From de30aec3c3dfe436ad8e9ba73a5ead7a0dc003c7 Mon Sep 17 00:00:00 2001
From: zainali5120 <512061637@qq.com>
Date: Fri, 09 Oct 2020 19:56:34 +0800
Subject: [PATCH] ROC交易所数据库迁移
---
src/main/java/com/xcong/excoin/modules/member/dao/MemberAuthenticationDao.java | 3 ++-
src/main/resources/mapper/member/MemberAuthenticationDao.xml | 4 ++++
src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java | 5 +++++
src/main/resources/application-prod.yml | 2 +-
src/main/resources/application.yml | 2 +-
src/main/resources/mapper/walletCoinOrder/OrderCoinDealDao.xml | 4 ++--
6 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/modules/member/dao/MemberAuthenticationDao.java b/src/main/java/com/xcong/excoin/modules/member/dao/MemberAuthenticationDao.java
index 51e3adb..734780e 100644
--- a/src/main/java/com/xcong/excoin/modules/member/dao/MemberAuthenticationDao.java
+++ b/src/main/java/com/xcong/excoin/modules/member/dao/MemberAuthenticationDao.java
@@ -6,5 +6,6 @@
public interface MemberAuthenticationDao extends BaseMapper<MemberAuthenticationEntity> {
int findMemberbyIdCardNoCount(String idCardNo);
-
+ int findAuthenByMemberId(Long memberId);
+
}
diff --git a/src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java b/src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java
index 42aebe8..1834652 100644
--- a/src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java
+++ b/src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java
@@ -383,6 +383,11 @@
if (count > 0) {
return Result.fail(MessageSourceUtils.getString("member_service_0060"));
}
+ // 同一个人只能认证一次
+ int authenByMemberId = memberAuthenticationDao.findAuthenByMemberId(memberId);
+ if (authenByMemberId > 0) {
+ return Result.fail(MessageSourceUtils.getString("member_service_0055"));
+ }
if (StrUtil.isBlank(memberAuthenticationDto.getIdCardFront())
|| StrUtil.isBlank(memberAuthenticationDto.getIdCardReverse())
|| StrUtil.isBlank(memberAuthenticationDto.getIdCardImage())) {
diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml
index bb4cfa0..171c41a 100644
--- a/src/main/resources/application-prod.yml
+++ b/src/main/resources/application-prod.yml
@@ -7,7 +7,7 @@
profiles:
active: dev
datasource:
- url: jdbc:mysql://47.114.114.219:3306/db_roc?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2b8
+ url: jdbc:mysql://rm-bp1i2g5rg5dubo9s40o.mysql.rds.aliyuncs.com:3306/db_roc?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2b8
username: roc_user
password: roc123pasd!@
driver-class-name: com.mysql.jdbc.Driver
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index a2ed99e..b9fc797 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -5,7 +5,7 @@
spring:
profiles:
- active: test
+ active: prod
datasource:
url: jdbc:mysql://rm-bp151tw8er79ig9kb5o.mysql.rds.aliyuncs.com:3306/db_biue?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2b8
username: ctcoin_data
diff --git a/src/main/resources/mapper/member/MemberAuthenticationDao.xml b/src/main/resources/mapper/member/MemberAuthenticationDao.xml
index 8959e65..2196d43 100644
--- a/src/main/resources/mapper/member/MemberAuthenticationDao.xml
+++ b/src/main/resources/mapper/member/MemberAuthenticationDao.xml
@@ -5,5 +5,9 @@
<select id="findMemberbyIdCardNoCount" resultType="int">
select count(*) from member_authentication where idcard_No = #{idCardNo}
</select>
+
+ <select id="findAuthenByMemberId" resultType="int">
+ select count(*) from member_authentication where member_id = #{memberId}
+ </select>
</mapper>
\ No newline at end of file
diff --git a/src/main/resources/mapper/walletCoinOrder/OrderCoinDealDao.xml b/src/main/resources/mapper/walletCoinOrder/OrderCoinDealDao.xml
index 904723a..aa9912f 100644
--- a/src/main/resources/mapper/walletCoinOrder/OrderCoinDealDao.xml
+++ b/src/main/resources/mapper/walletCoinOrder/OrderCoinDealDao.xml
@@ -47,8 +47,8 @@
<select id="selectAllCoinDealsOrderBySymbol"
resultType="com.xcong.excoin.modules.coin.entity.OrderCoinsDealEntity">
select * from coins_order_deal
- where symbol = #{symbol}
- order by create_time desc limit 100
+ where symbol = #{symbol} and order_status = 3
+ order by create_time desc limit 50
</select>
<select id="selectWalletCoinOrder" resultType="com.xcong.excoin.modules.coin.entity.OrderCoinsDealEntity">
--
Gitblit v1.9.1