From 6c2e9ba62c418185361179e7014862c481f34e17 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Wed, 09 Mar 2022 14:22:09 +0800
Subject: [PATCH] conflect merge

---
 src/main/java/com/xcong/excoin/modules/otc/mapper/OtcEntrustOrderMapper.java |   39 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/modules/otc/mapper/OtcEntrustOrderMapper.java b/src/main/java/com/xcong/excoin/modules/otc/mapper/OtcEntrustOrderMapper.java
new file mode 100644
index 0000000..2fc5f42
--- /dev/null
+++ b/src/main/java/com/xcong/excoin/modules/otc/mapper/OtcEntrustOrderMapper.java
@@ -0,0 +1,39 @@
+package com.xcong.excoin.modules.otc.mapper;
+
+
+import com.xcong.excoin.modules.otc.dto.EntrustOrderAddDto;
+import com.xcong.excoin.modules.otc.entity.OtcEntrustOrder;
+import com.xcong.excoin.modules.otc.vo.EntrustListInfoVo;
+import com.xcong.excoin.modules.otc.vo.EntrustOrderDetailVo;
+import org.mapstruct.Mapper;
+import org.mapstruct.Mapping;
+import org.mapstruct.factory.Mappers;
+
+import java.util.List;
+
+@Mapper
+public abstract class OtcEntrustOrderMapper {
+    public static OtcEntrustOrderMapper INSTANCE = Mappers.getMapper(OtcEntrustOrderMapper.class);
+
+    @Mapping(target = "coinAmount", source = "amount")
+    @Mapping(target = "limitMinAmount", source = "min")
+    @Mapping(target = "limitMaxAmount", source = "max")
+    @Mapping(target = "orderType", source = "type")
+    public abstract OtcEntrustOrder entrustOrderDtoToEntity(EntrustOrderAddDto entrustOrderAddDto);
+
+
+    @Mapping(target = "min", source = "limitMinAmount")
+    @Mapping(target = "max", source = "limitMaxAmount")
+    @Mapping(target = "amount", source = "coinAmount")
+    @Mapping(target = "remainAmount", source = "remainCoinAmount")
+    public abstract EntrustListInfoVo entityToListInfoVo(OtcEntrustOrder otcEntrustOrder);
+
+    public abstract List<EntrustListInfoVo> entrustToListInfoVoList(List<OtcEntrustOrder> list);
+
+    @Mapping(target = "min", source = "limitMinAmount")
+    @Mapping(target = "max", source = "limitMaxAmount")
+    @Mapping(target = "amount", source = "coinAmount")
+    @Mapping(target = "remainAmount", source = "remainCoinAmount")
+    @Mapping(target = "orderNo", source = "entrustOrderNo")
+    public abstract EntrustOrderDetailVo entityToOrderDetail(OtcEntrustOrder order);
+}

--
Gitblit v1.9.1