From 0d9acfddbe2b0348f0e7dd57ee4a218c8194233d Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Tue, 02 Mar 2021 16:13:48 +0800
Subject: [PATCH] 20210302 地址添加的修改
---
src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java | 6 +++---
src/main/java/com/xcong/excoin/modules/platform/dao/PlatformSymbolsCoinDao.java | 4 +++-
src/main/resources/mapper/platform/PlatformSymbolsCoinDao.xml | 8 ++++++++
src/main/java/com/xcong/excoin/modules/member/parameter/dto/MemberAddCoinAddressDto.java | 13 ++++++++++---
4 files changed, 24 insertions(+), 7 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/modules/member/parameter/dto/MemberAddCoinAddressDto.java b/src/main/java/com/xcong/excoin/modules/member/parameter/dto/MemberAddCoinAddressDto.java
index 4bf9314..8fec68b 100644
--- a/src/main/java/com/xcong/excoin/modules/member/parameter/dto/MemberAddCoinAddressDto.java
+++ b/src/main/java/com/xcong/excoin/modules/member/parameter/dto/MemberAddCoinAddressDto.java
@@ -10,9 +10,16 @@
@ApiModel(value = "MemberAddCoinAddressDto", description = "增加提币地址参数接收类")
public class MemberAddCoinAddressDto {
- @NotNull(message = "币种ID不能为空")
- @ApiModelProperty(value = "币种ID")
- private Long symbolscoinId;
+ //@NotNull(message = "币种ID不能为空")
+ //@ApiModelProperty(value = "币种ID")
+ //private Long symbolscoinId;
+
+ /**
+ * 地址
+ */
+ @NotNull(message = "币种不能为空")
+ @ApiModelProperty(value = "币种")
+ private String symbol;
/**
* 地址
*/
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 92948aa..c58fe37 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
@@ -677,10 +677,10 @@
Long memberId = LoginUserUtils.getAppLoginUser().getId();
String address = memberAddCoinAddressDto.getAddress();
String isBiyict = memberAddCoinAddressDto.getIsBiyict();
- Long symbolscoinId = memberAddCoinAddressDto.getSymbolscoinId();
+ String symbol = memberAddCoinAddressDto.getSymbol();
String remark = memberAddCoinAddressDto.getRemark();
-
- PlatformSymbolsCoinEntity platformSymbolsCoinEntity = platformSymbolsCoinDao.selectById(symbolscoinId);
+ PlatformSymbolsCoinEntity platformSymbolsCoinEntity = platformSymbolsCoinDao.selectOneBySymbol(symbol);
+ Long symbolscoinId = platformSymbolsCoinEntity.getId();
MemberCoinAddressEntity memberCoinAddressEntity = new MemberCoinAddressEntity();
memberCoinAddressEntity.setAddress(address);
diff --git a/src/main/java/com/xcong/excoin/modules/platform/dao/PlatformSymbolsCoinDao.java b/src/main/java/com/xcong/excoin/modules/platform/dao/PlatformSymbolsCoinDao.java
index a116b5a..3595ec9 100644
--- a/src/main/java/com/xcong/excoin/modules/platform/dao/PlatformSymbolsCoinDao.java
+++ b/src/main/java/com/xcong/excoin/modules/platform/dao/PlatformSymbolsCoinDao.java
@@ -5,9 +5,11 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xcong.excoin.modules.member.parameter.vo.MemberCoinAddressCountVo;
import com.xcong.excoin.modules.platform.entity.PlatformSymbolsCoinEntity;
+import org.apache.ibatis.annotations.Param;
public interface PlatformSymbolsCoinDao extends BaseMapper<PlatformSymbolsCoinEntity> {
List<MemberCoinAddressCountVo> selectCoinAddressCount(Long memberId);
-
+
+ PlatformSymbolsCoinEntity selectOneBySymbol(@Param("symbol")String symbol);
}
diff --git a/src/main/resources/mapper/platform/PlatformSymbolsCoinDao.xml b/src/main/resources/mapper/platform/PlatformSymbolsCoinDao.xml
index dc1328b..63033e5 100644
--- a/src/main/resources/mapper/platform/PlatformSymbolsCoinDao.xml
+++ b/src/main/resources/mapper/platform/PlatformSymbolsCoinDao.xml
@@ -15,5 +15,13 @@
a.id,
a. NAME
</select>
+
+ <select id="selectOneBySymbol" resultType="com.xcong.excoin.modules.platform.entity.PlatformSymbolsCoinEntity">
+ SELECT
+ *
+ FROM
+ platform_symbols_coin a
+ where a.name = #{symbol}
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.1