From 1636c6e9db920bb385725314935363d537b30633 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Tue, 16 Jun 2020 15:43:20 +0800
Subject: [PATCH] 20200616 代码提交
---
src/main/java/com/xcong/excoin/modules/member/mapper/MemberAuthenticationMapper.java | 11
src/main/resources/mapper/modules/MemberQuickBuySaleMapper.xml | 35 +
src/main/resources/templates/febs/views/modules/member/chargeUsdt.html | 28
src/main/java/com/xcong/excoin/modules/member/entity/MemberCoinWithdrawEntity.java | 70 ++
src/main/java/com/xcong/excoin/modules/member/mapper/MemberCoinWithdrawMapper.java | 16
src/main/java/com/xcong/excoin/FebsShiroApplication.java | 1
src/main/java/com/xcong/excoin/modules/member/vo/MemberCoinWithdrawVo.java | 59 +
src/main/java/com/xcong/excoin/modules/member/entity/MemberAuthenticationEntity.java | 2
src/main/java/com/xcong/excoin/modules/member/entity/MemberEntity.java | 4
src/main/java/com/xcong/excoin/modules/member/entity/MemberCoinAddressEntity.java | 56 +
src/main/java/com/xcong/excoin/modules/member/controller/ViewController.java | 55 +
src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java | 309 +++++++++
src/main/java/com/xcong/excoin/modules/member/mapper/MemberCoinChargeMapper.java | 16
src/main/resources/templates/febs/views/modules/member/extractUsdt.html | 197 ++++++
src/main/resources/templates/febs/views/modules/member/memberDetail.html | 130 ++++
src/main/java/com/xcong/excoin/modules/member/dto/MemberDetailConfirmDto.java | 13
src/main/resources/templates/febs/views/modules/member/member.html | 116 ---
src/main/resources/mapper/modules/MemberCoinChargeMapper.xml | 20
src/main/resources/templates/febs/views/modules/member/applyCoin.html | 129 ++++
src/main/java/com/xcong/excoin/modules/member/vo/MemberCoinChargeVo.java | 62 +
src/main/java/com/xcong/excoin/modules/member/controller/MemberController.java | 94 ++
src/main/resources/mapper/modules/MemberCoinWithdrawMapper.xml | 25
src/main/java/com/xcong/excoin/modules/member/entity/MemberQuickBuySaleEntity.java | 2
src/main/java/com/xcong/excoin/modules/member/mapper/MemberQuickBuySaleMapper.java | 4
src/main/java/com/xcong/excoin/modules/member/vo/MemberQuickSaleVo.java | 73 ++
/dev/null | 40 -
src/main/resources/templates/febs/views/modules/member/withdrawCoin.html | 192 ++++++
src/main/java/com/xcong/excoin/modules/member/entity/MemberCoinChargeEntity.java | 65 ++
src/main/java/com/xcong/excoin/modules/member/service/IMemberService.java | 26
src/main/resources/mapper/modules/MemberAuthenticationMapper.xml | 9
src/main/java/com/xcong/excoin/modules/member/vo/MemberAuthenticationVo.java | 23
src/main/java/com/xcong/excoin/modules/member/mapper/MemberCoinAddressMapper.java | 8
src/main/resources/mapper/modules/MemberCoinAddressMapper.xml | 20
33 files changed, 1,736 insertions(+), 174 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/FebsShiroApplication.java b/src/main/java/com/xcong/excoin/FebsShiroApplication.java
index 46bea12..1c7efb1 100644
--- a/src/main/java/com/xcong/excoin/FebsShiroApplication.java
+++ b/src/main/java/com/xcong/excoin/FebsShiroApplication.java
@@ -22,5 +22,4 @@
.web(WebApplicationType.SERVLET)
.run(args);
}
-
}
diff --git a/src/main/java/com/xcong/excoin/modules/authentication/controller/AuthenticationController.java b/src/main/java/com/xcong/excoin/modules/authentication/controller/AuthenticationController.java
deleted file mode 100644
index 016ce28..0000000
--- a/src/main/java/com/xcong/excoin/modules/authentication/controller/AuthenticationController.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.xcong.excoin.modules.authentication.controller;
-
-import java.util.Map;
-
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.xcong.excoin.common.controller.BaseController;
-import com.xcong.excoin.common.entity.FebsResponse;
-import com.xcong.excoin.common.entity.QueryRequest;
-import com.xcong.excoin.modules.authentication.entity.MemberAuthenticationEntity;
-import com.xcong.excoin.modules.authentication.service.AuthenticationService;
-import lombok.RequiredArgsConstructor;
-
-/**
- * 身份信息审核
- */
-@Validated
-@RestController
-@RequiredArgsConstructor
-@RequestMapping(value = "/authentication")
-public class AuthenticationController extends BaseController{
-
- private final AuthenticationService authenticationService;
-
- @GetMapping("getList")
- public FebsResponse getList(MemberAuthenticationEntity memberAuthenticationEntity, QueryRequest request) {
- IPage<MemberAuthenticationEntity> findMemberListInPage = authenticationService.findAuthenticationListInPage(memberAuthenticationEntity, request);
- Map<String, Object> data = getDataTable(findMemberListInPage);
- return new FebsResponse().success().data(data);
- }
-
-
-}
diff --git a/src/main/java/com/xcong/excoin/modules/authentication/controller/ViewController.java b/src/main/java/com/xcong/excoin/modules/authentication/controller/ViewController.java
deleted file mode 100644
index 8452b2e..0000000
--- a/src/main/java/com/xcong/excoin/modules/authentication/controller/ViewController.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.xcong.excoin.modules.authentication.controller;
-
-import org.apache.shiro.authz.annotation.RequiresPermissions;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-
-import com.xcong.excoin.common.entity.FebsConstant;
-import com.xcong.excoin.common.utils.FebsUtil;
-
-/**
- * 身份信息审核
- */
-@Controller("authenticationView")
-@RequestMapping(FebsConstant.VIEW_PREFIX + "authentication/confirm")
-public class ViewController {
-
- @GetMapping("authentication")
- @RequiresPermissions("authentication:view")
- public String authenticationConfirmToPage() {
- return FebsUtil.view("modules/authentication/authentication");
- }
-
-}
diff --git a/src/main/java/com/xcong/excoin/modules/authentication/mapper/AuthenticationMapper.java b/src/main/java/com/xcong/excoin/modules/authentication/mapper/AuthenticationMapper.java
deleted file mode 100644
index 58eb6a5..0000000
--- a/src/main/java/com/xcong/excoin/modules/authentication/mapper/AuthenticationMapper.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.xcong.excoin.modules.authentication.mapper;
-
-import org.apache.ibatis.annotations.Param;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.xcong.excoin.modules.authentication.entity.MemberAuthenticationEntity;
-
-public interface AuthenticationMapper extends BaseMapper<MemberAuthenticationEntity> {
-
- IPage<MemberAuthenticationEntity> selectAuthenticationListInPage(Page<MemberAuthenticationEntity> page,
- @Param("record") MemberAuthenticationEntity memberAuthenticationEntity);
-
-}
diff --git a/src/main/java/com/xcong/excoin/modules/authentication/service/AuthenticationService.java b/src/main/java/com/xcong/excoin/modules/authentication/service/AuthenticationService.java
deleted file mode 100644
index 397d40d..0000000
--- a/src/main/java/com/xcong/excoin/modules/authentication/service/AuthenticationService.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.xcong.excoin.modules.authentication.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.xcong.excoin.common.entity.QueryRequest;
-import com.xcong.excoin.modules.authentication.entity.MemberAuthenticationEntity;
-
-public interface AuthenticationService extends IService<MemberAuthenticationEntity>{
-
- IPage<MemberAuthenticationEntity> findAuthenticationListInPage(MemberAuthenticationEntity memberAuthenticationEntity, QueryRequest request);
-
-}
diff --git a/src/main/java/com/xcong/excoin/modules/authentication/service/Impl/AuthenticationServiceImpl.java b/src/main/java/com/xcong/excoin/modules/authentication/service/Impl/AuthenticationServiceImpl.java
deleted file mode 100644
index 7fbb918..0000000
--- a/src/main/java/com/xcong/excoin/modules/authentication/service/Impl/AuthenticationServiceImpl.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.xcong.excoin.modules.authentication.service.Impl;
-
-import java.awt.List;
-
-import javax.annotation.Resource;
-
-import org.springframework.stereotype.Service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.xcong.excoin.common.entity.QueryRequest;
-import com.xcong.excoin.modules.authentication.entity.MemberAuthenticationEntity;
-import com.xcong.excoin.modules.authentication.mapper.AuthenticationMapper;
-import com.xcong.excoin.modules.authentication.service.AuthenticationService;
-import com.xcong.excoin.modules.member.mapper.MemberMapper;
-
-@Service
-public class AuthenticationServiceImpl extends ServiceImpl<AuthenticationMapper, MemberAuthenticationEntity> implements AuthenticationService{
-
- @Resource
- MemberMapper memberMapper;
-
- @Override
- public IPage<MemberAuthenticationEntity> findAuthenticationListInPage(MemberAuthenticationEntity memberAuthenticationEntity,
- QueryRequest request) {
-
- Page<MemberAuthenticationEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
- return this.baseMapper.selectAuthenticationListInPage(page, memberAuthenticationEntity);
- }
-
-}
diff --git a/src/main/java/com/xcong/excoin/modules/member/controller/MemberController.java b/src/main/java/com/xcong/excoin/modules/member/controller/MemberController.java
index 0d5f272..4707454 100644
--- a/src/main/java/com/xcong/excoin/modules/member/controller/MemberController.java
+++ b/src/main/java/com/xcong/excoin/modules/member/controller/MemberController.java
@@ -4,20 +4,26 @@
import com.xcong.excoin.common.controller.BaseController;
import com.xcong.excoin.common.entity.FebsResponse;
import com.xcong.excoin.common.entity.QueryRequest;
+import com.xcong.excoin.modules.member.dto.MemberDetailConfirmDto;
+import com.xcong.excoin.modules.member.entity.MemberCoinChargeEntity;
+import com.xcong.excoin.modules.member.entity.MemberCoinWithdrawEntity;
import com.xcong.excoin.modules.member.entity.MemberEntity;
import com.xcong.excoin.modules.member.entity.MemberQuickBuySaleEntity;
import com.xcong.excoin.modules.member.service.IMemberService;
+import com.xcong.excoin.system.entity.User;
+
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;
-import javax.validation.constraints.NotBlank;
+import javax.validation.Valid;
import javax.validation.constraints.NotNull;
/**
@@ -37,6 +43,16 @@
public FebsResponse getList(MemberEntity member, QueryRequest request) {
Map<String, Object> data = getDataTable(memberService.findMemberListInPage(member, request));
return new FebsResponse().success().data(data);
+ }
+
+ /**
+ * 实名认证---确认
+ * @return
+ */
+ @PostMapping("memberDetailConfirm")
+ @ControllerEndpoint(operation = "实名认证---确认", exceptionMessage = "认证失败")
+ public FebsResponse memberDetailConfirm(@Valid MemberDetailConfirmDto memberDetailConfirmDto) {
+ return memberService.memberDetailConfirm(memberDetailConfirmDto);
}
/**
@@ -67,4 +83,80 @@
public FebsResponse memberChargeUsdtCancel(@NotNull(message = "{required}") @PathVariable Long id) {
return memberService.memberChargeUsdtCancel(id);
}
+
+ /**
+ * 会员USDT提现---列表
+ */
+ @GetMapping("memberExtractUsdt")
+ public FebsResponse memberExtractUsdt(MemberQuickBuySaleEntity memberQuickBuySaleEntity, QueryRequest request) {
+ Map<String, Object> data = getDataTable(memberService.findmemberQuickSaleListInPage(memberQuickBuySaleEntity, request));
+ return new FebsResponse().success().data(data);
+ }
+
+ /**
+ * 会员USDT提现---确认
+ * @return
+ */
+ @GetMapping("memberExtractUsdtConfirm/{id}")
+ @ControllerEndpoint(operation = "会员USDT提现---确认", exceptionMessage = "划转失败")
+ public FebsResponse memberExtractUsdtConfirm(@NotNull(message = "{required}") @PathVariable Long id) {
+ return memberService.memberExtractUsdtConfirm(id);
+ }
+
+ /**
+ * 会员USDT提现---取消
+ * @return
+ */
+ @GetMapping("memberExtractUsdtCancel/{id}")
+ @ControllerEndpoint(operation = "会员USDT提现---取消", exceptionMessage = "取消失败")
+ public FebsResponse memberExtractUsdtCancel(@NotNull(message = "{required}") @PathVariable Long id) {
+ return memberService.memberExtractUsdtCancel(id);
+ }
+
+ /**
+ * 充币记录---列表
+ */
+ @GetMapping("memberApplyCoin")
+ public FebsResponse memberApplyCoin(MemberCoinChargeEntity memberCoinChargeEntity, QueryRequest request) {
+ Map<String, Object> data = getDataTable(memberService.findMemberApplyCoinListInPage(memberCoinChargeEntity, request));
+ return new FebsResponse().success().data(data);
+ }
+
+ /**
+ * 提币记录---列表
+ */
+ @GetMapping("memberWithdrawCoin")
+ public FebsResponse memberWithdrawCoin(MemberCoinWithdrawEntity memberCoinWithdrawEntity, QueryRequest request) {
+ String isInside = memberCoinWithdrawEntity.getIsInside();
+ if(!"".equals(isInside) && isInside != null) {
+ if("1".equals(isInside)) {
+ memberCoinWithdrawEntity.setIsInside("Y");
+ }else {
+ memberCoinWithdrawEntity.setIsInside("N");
+ }
+ }
+ Map<String, Object> data = getDataTable(memberService.findmemberWithdrawCoinListInPage(memberCoinWithdrawEntity, request));
+ return new FebsResponse().success().data(data);
+ }
+
+ /**
+ * 提币记录---确认
+ * @return
+ */
+ @GetMapping("memberWithdrawCoinConfirm/{id}")
+ @ControllerEndpoint(operation = "提币记录---确认", exceptionMessage = "划转失败")
+ public FebsResponse memberWithdrawCoinConfirm(@NotNull(message = "{required}") @PathVariable Long id) {
+ return memberService.memberWithdrawCoinConfirm(id);
+ }
+
+ /**
+ * 提币记录---取消
+ * @return
+ */
+ @GetMapping("memberWithdrawCoinCancel/{id}")
+ @ControllerEndpoint(operation = "提币记录---取消", exceptionMessage = "取消失败")
+ public FebsResponse memberWithdrawCoinCancel(@NotNull(message = "{required}") @PathVariable Long id) {
+ return memberService.memberWithdrawCoinCancel(id);
+ }
+
}
diff --git a/src/main/java/com/xcong/excoin/modules/member/controller/ViewController.java b/src/main/java/com/xcong/excoin/modules/member/controller/ViewController.java
index 6c34410..692e346 100644
--- a/src/main/java/com/xcong/excoin/modules/member/controller/ViewController.java
+++ b/src/main/java/com/xcong/excoin/modules/member/controller/ViewController.java
@@ -1,10 +1,18 @@
package com.xcong.excoin.modules.member.controller;
+import com.xcong.excoin.common.controller.BaseController;
import com.xcong.excoin.common.entity.FebsConstant;
import com.xcong.excoin.common.utils.FebsUtil;
+import com.xcong.excoin.modules.member.service.IMemberService;
+import com.xcong.excoin.modules.member.vo.MemberAuthenticationVo;
+
+import lombok.RequiredArgsConstructor;
+
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
/**
@@ -13,15 +21,26 @@
**/
@Controller("memberView")
@RequestMapping(FebsConstant.VIEW_PREFIX + "modules/member")
-public class ViewController {
-
+@RequiredArgsConstructor
+public class ViewController extends BaseController{
+
+ private final IMemberService memberService;
+
@GetMapping("member")
@RequiresPermissions("member:view")
public String member() {
return FebsUtil.view("modules/member/member");
}
- /**
+ @GetMapping("memberDetail/{id}")
+ @RequiresPermissions("member:update")
+ public String memberDetail(@PathVariable long id, Model model) {
+ MemberAuthenticationVo data = memberService.selectMemberAuthenticationById(id);
+ model.addAttribute("member", data);
+ return FebsUtil.view("modules/member/memberDetail");
+ }
+
+ /**
* 会员充值USDT记录
* @return
*/
@@ -31,5 +50,35 @@
return FebsUtil.view("modules/member/chargeUsdt");
}
+ /**
+ * 会员USDT提现记录
+ * @return
+ */
+ @GetMapping("extractUsdt")
+ @RequiresPermissions("extractUsdt:view")
+ public String extractUsdt() {
+ return FebsUtil.view("modules/member/extractUsdt");
+ }
+
+ /**
+ * 充币记录
+ * @return
+ */
+ @GetMapping("applyCoin")
+ @RequiresPermissions("applyCoins:view")
+ public String applyCoin() {
+ return FebsUtil.view("modules/member/applyCoin");
+ }
+
+ /**
+ * 提币记录
+ * @return
+ */
+ @GetMapping("withdrawCoin")
+ @RequiresPermissions("withdrawCoins:view")
+ public String withdrawCoin() {
+ return FebsUtil.view("modules/member/withdrawCoin");
+ }
+
}
diff --git a/src/main/java/com/xcong/excoin/modules/member/dto/MemberDetailConfirmDto.java b/src/main/java/com/xcong/excoin/modules/member/dto/MemberDetailConfirmDto.java
new file mode 100644
index 0000000..a6b52b5
--- /dev/null
+++ b/src/main/java/com/xcong/excoin/modules/member/dto/MemberDetailConfirmDto.java
@@ -0,0 +1,13 @@
+package com.xcong.excoin.modules.member.dto;
+
+import javax.validation.constraints.NotNull;
+
+import lombok.Data;
+
+@Data
+public class MemberDetailConfirmDto {
+
+ @NotNull(message = "ID不能为空")
+ private Long id;
+
+}
diff --git a/src/main/java/com/xcong/excoin/modules/authentication/entity/MemberAuthenticationEntity.java b/src/main/java/com/xcong/excoin/modules/member/entity/MemberAuthenticationEntity.java
similarity index 93%
rename from src/main/java/com/xcong/excoin/modules/authentication/entity/MemberAuthenticationEntity.java
rename to src/main/java/com/xcong/excoin/modules/member/entity/MemberAuthenticationEntity.java
index a98d50a..636ee54 100644
--- a/src/main/java/com/xcong/excoin/modules/authentication/entity/MemberAuthenticationEntity.java
+++ b/src/main/java/com/xcong/excoin/modules/member/entity/MemberAuthenticationEntity.java
@@ -1,4 +1,4 @@
-package com.xcong.excoin.modules.authentication.entity;
+package com.xcong.excoin.modules.member.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xcong.excoin.common.entity.BaseEntity;
diff --git a/src/main/java/com/xcong/excoin/modules/member/entity/MemberCoinAddressEntity.java b/src/main/java/com/xcong/excoin/modules/member/entity/MemberCoinAddressEntity.java
new file mode 100644
index 0000000..fcd7b42
--- /dev/null
+++ b/src/main/java/com/xcong/excoin/modules/member/entity/MemberCoinAddressEntity.java
@@ -0,0 +1,56 @@
+package com.xcong.excoin.modules.member.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.xcong.excoin.common.entity.BaseEntity;
+
+import lombok.Data;
+
+/**
+ * 会员币地址
+ * @author Administrator
+ *
+ */
+@Data
+@TableName("member_coin_address")
+public class MemberCoinAddressEntity extends BaseEntity {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+ /**
+ * 会员ID
+ */
+ private Long memberId;
+ /**
+ * 地址
+ */
+ private String address;
+ /**
+ * 私钥
+ */
+ private String privateKey;
+ /**
+ * 币种
+ */
+ private String symbol;
+ /**
+ * 是否是本平台地址1:是 0:否
+ */
+ private String isBiyict;
+ public static final String IS_BIYICT_YES = "1";
+ public static final String IS_BIYICT_NO = "0";
+ /**
+ *
+ */
+ private String label;
+ /**
+ *
+ */
+ private String tag;
+ /**
+ * 币种ID
+ */
+ private Long symbolscoinId;
+
+
+}
diff --git a/src/main/java/com/xcong/excoin/modules/member/entity/MemberCoinChargeEntity.java b/src/main/java/com/xcong/excoin/modules/member/entity/MemberCoinChargeEntity.java
new file mode 100644
index 0000000..8e72ecc
--- /dev/null
+++ b/src/main/java/com/xcong/excoin/modules/member/entity/MemberCoinChargeEntity.java
@@ -0,0 +1,65 @@
+package com.xcong.excoin.modules.member.entity;
+
+import java.math.BigDecimal;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.xcong.excoin.common.entity.BaseEntity;
+
+import lombok.Data;
+
+/**
+ * 会员充币表
+ *
+ * @author wzy
+ * @date 2020-05-12
+ **/
+@Data
+@TableName("member_coin_charge")
+public class MemberCoinChargeEntity extends BaseEntity{
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+ /**
+ * 会员ID
+ */
+ private Long memberId;
+ /**
+ * 凭证
+ */
+ private Long certificate;
+ /**
+ * 充值金额
+ */
+ private BigDecimal amount;
+ /**
+ * 上次更新时钱包金额
+ */
+ private BigDecimal lastAmount;
+ /**
+ * 状态
+ */
+ private int status;
+ /**
+ * 币种
+ */
+ private String symbol;
+ /**
+ * 地址
+ */
+ private String address;
+ private String tag;
+ private String hash;
+ /**
+ * 订单编号
+ */
+ private String orderCode;
+
+ /**
+ * 查询条件:第一查询条件
+ */
+ @TableField(exist = false)
+ private String account;
+
+}
diff --git a/src/main/java/com/xcong/excoin/modules/member/entity/MemberCoinWithdrawEntity.java b/src/main/java/com/xcong/excoin/modules/member/entity/MemberCoinWithdrawEntity.java
new file mode 100644
index 0000000..d45e2dd
--- /dev/null
+++ b/src/main/java/com/xcong/excoin/modules/member/entity/MemberCoinWithdrawEntity.java
@@ -0,0 +1,70 @@
+package com.xcong.excoin.modules.member.entity;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.xcong.excoin.common.entity.BaseEntity;
+
+import lombok.Data;
+
+/**
+ * 会员提币表
+ *
+ * @author wzy
+ * @date 2020-05-12
+ **/
+@Data
+@TableName("member_coin_withdraw")
+public class MemberCoinWithdrawEntity extends BaseEntity{
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+ /**
+ * 会员ID
+ */
+ private Long memberId;
+ /**
+ * 地址
+ */
+ private String address;
+ /**
+ * 提币数量
+ */
+ private BigDecimal amount;
+ /**
+ * 手续费
+ */
+ private BigDecimal feeAmount;
+ /**
+ * 币种
+ */
+ private String symbol;
+ /**
+ * 状态
+ */
+ private int status;
+ //等待审核
+ public static final int IS_STATUS_ING = 1;
+ //同意
+ public static final int IS_STATUS_Y = 2;
+ //拒绝
+ public static final int IS_STATUS_N = 3;
+ private String label;
+ private String tag;
+
+ /**
+ * 是否内部转账 Y-是N-不是
+ */
+ private String isInside;
+
+ /**
+ * 查询条件:第一查询条件
+ */
+ @TableField(exist = false)
+ private String account;
+
+
+}
diff --git a/src/main/java/com/xcong/excoin/modules/member/entity/MemberEntity.java b/src/main/java/com/xcong/excoin/modules/member/entity/MemberEntity.java
index b3fa8e4..4afca0c 100644
--- a/src/main/java/com/xcong/excoin/modules/member/entity/MemberEntity.java
+++ b/src/main/java/com/xcong/excoin/modules/member/entity/MemberEntity.java
@@ -51,7 +51,7 @@
/**
* 实名认证 审核通过
*/
- public static final Integer CERTIFY_STATUS_Y = 1;
+ public static final Integer CERTIFY_STATUS_Y = 2;
/**
* 实名认证 审核不通过
*/
@@ -59,7 +59,7 @@
/**
* 实名认证 审核中
*/
- public static final Integer CERTIFY_STATUS_ING = 2;
+ public static final Integer CERTIFY_STATUS_ING = 1;
/**
* 实名认证 未提交
*/
diff --git a/src/main/java/com/xcong/excoin/modules/member/entity/MemberQuickBuySaleEntity.java b/src/main/java/com/xcong/excoin/modules/member/entity/MemberQuickBuySaleEntity.java
index 7b02298..282af9c 100644
--- a/src/main/java/com/xcong/excoin/modules/member/entity/MemberQuickBuySaleEntity.java
+++ b/src/main/java/com/xcong/excoin/modules/member/entity/MemberQuickBuySaleEntity.java
@@ -18,7 +18,7 @@
private static final long serialVersionUID = 1L;
/**
- * 订单状态 1-新建
+ * 订单状态 买入 1-新建 卖出 1-待付款
*/
public static final Integer CHARGE_STATUS_CREATE = 1;
diff --git a/src/main/java/com/xcong/excoin/modules/member/mapper/MemberAuthenticationMapper.java b/src/main/java/com/xcong/excoin/modules/member/mapper/MemberAuthenticationMapper.java
new file mode 100644
index 0000000..b026898
--- /dev/null
+++ b/src/main/java/com/xcong/excoin/modules/member/mapper/MemberAuthenticationMapper.java
@@ -0,0 +1,11 @@
+package com.xcong.excoin.modules.member.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.xcong.excoin.modules.member.entity.MemberAuthenticationEntity;
+import com.xcong.excoin.modules.member.vo.MemberAuthenticationVo;
+
+public interface MemberAuthenticationMapper extends BaseMapper<MemberAuthenticationEntity> {
+
+ MemberAuthenticationVo findMemberAuthenticationByMemberId(long id);
+
+}
diff --git a/src/main/java/com/xcong/excoin/modules/member/mapper/MemberCoinAddressMapper.java b/src/main/java/com/xcong/excoin/modules/member/mapper/MemberCoinAddressMapper.java
new file mode 100644
index 0000000..b295ea4
--- /dev/null
+++ b/src/main/java/com/xcong/excoin/modules/member/mapper/MemberCoinAddressMapper.java
@@ -0,0 +1,8 @@
+package com.xcong.excoin.modules.member.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.xcong.excoin.modules.member.entity.MemberCoinAddressEntity;
+
+public interface MemberCoinAddressMapper extends BaseMapper<MemberCoinAddressEntity> {
+
+}
diff --git a/src/main/java/com/xcong/excoin/modules/member/mapper/MemberCoinChargeMapper.java b/src/main/java/com/xcong/excoin/modules/member/mapper/MemberCoinChargeMapper.java
new file mode 100644
index 0000000..5595658
--- /dev/null
+++ b/src/main/java/com/xcong/excoin/modules/member/mapper/MemberCoinChargeMapper.java
@@ -0,0 +1,16 @@
+package com.xcong.excoin.modules.member.mapper;
+
+import org.apache.ibatis.annotations.Param;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.xcong.excoin.modules.member.entity.MemberCoinChargeEntity;
+import com.xcong.excoin.modules.member.vo.MemberCoinChargeVo;
+
+public interface MemberCoinChargeMapper extends BaseMapper<MemberCoinChargeEntity> {
+
+ IPage<MemberCoinChargeVo> findMemberApplyCoinListInPage(Page<MemberCoinChargeEntity> page,
+ @Param("record")MemberCoinChargeEntity memberCoinChargeEntity);
+
+}
diff --git a/src/main/java/com/xcong/excoin/modules/member/mapper/MemberCoinWithdrawMapper.java b/src/main/java/com/xcong/excoin/modules/member/mapper/MemberCoinWithdrawMapper.java
new file mode 100644
index 0000000..f9e4afc
--- /dev/null
+++ b/src/main/java/com/xcong/excoin/modules/member/mapper/MemberCoinWithdrawMapper.java
@@ -0,0 +1,16 @@
+package com.xcong.excoin.modules.member.mapper;
+
+import org.apache.ibatis.annotations.Param;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.xcong.excoin.modules.member.entity.MemberCoinWithdrawEntity;
+import com.xcong.excoin.modules.member.vo.MemberCoinWithdrawVo;
+
+public interface MemberCoinWithdrawMapper extends BaseMapper<MemberCoinWithdrawEntity> {
+
+ IPage<MemberCoinWithdrawVo> findmemberWithdrawCoinListInPage(Page<MemberCoinWithdrawEntity> page,
+ @Param("record")MemberCoinWithdrawEntity memberCoinWithdrawEntity);
+
+}
diff --git a/src/main/java/com/xcong/excoin/modules/member/mapper/MemberQuickBuySaleMapper.java b/src/main/java/com/xcong/excoin/modules/member/mapper/MemberQuickBuySaleMapper.java
index 7decd3d..7e13f2b 100644
--- a/src/main/java/com/xcong/excoin/modules/member/mapper/MemberQuickBuySaleMapper.java
+++ b/src/main/java/com/xcong/excoin/modules/member/mapper/MemberQuickBuySaleMapper.java
@@ -7,10 +7,14 @@
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xcong.excoin.modules.member.entity.MemberQuickBuySaleEntity;
import com.xcong.excoin.modules.member.vo.MemberQuickBuySaleVo;
+import com.xcong.excoin.modules.member.vo.MemberQuickSaleVo;
public interface MemberQuickBuySaleMapper extends BaseMapper<MemberQuickBuySaleEntity> {
IPage<MemberQuickBuySaleVo> findmemberQuickBuySaleListInPage(Page<MemberQuickBuySaleEntity> page,
@Param("record")MemberQuickBuySaleEntity memberQuickBuySaleEntity);
+ IPage<MemberQuickSaleVo> findmemberQuickSaleListInPage(Page<MemberQuickBuySaleEntity> page,
+ @Param("record")MemberQuickBuySaleEntity memberQuickBuySaleEntity);
+
}
diff --git a/src/main/java/com/xcong/excoin/modules/member/service/IMemberService.java b/src/main/java/com/xcong/excoin/modules/member/service/IMemberService.java
index a4bc97a..f4a9c95 100644
--- a/src/main/java/com/xcong/excoin/modules/member/service/IMemberService.java
+++ b/src/main/java/com/xcong/excoin/modules/member/service/IMemberService.java
@@ -1,14 +1,22 @@
package com.xcong.excoin.modules.member.service;
+import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xcong.excoin.common.entity.FebsResponse;
import com.xcong.excoin.common.entity.QueryRequest;
+import com.xcong.excoin.modules.member.dto.MemberDetailConfirmDto;
+import com.xcong.excoin.modules.member.entity.MemberCoinChargeEntity;
+import com.xcong.excoin.modules.member.entity.MemberCoinWithdrawEntity;
import com.xcong.excoin.modules.member.entity.MemberEntity;
import com.xcong.excoin.modules.member.entity.MemberQuickBuySaleEntity;
+import com.xcong.excoin.modules.member.vo.MemberAuthenticationVo;
+import com.xcong.excoin.modules.member.vo.MemberCoinChargeVo;
+import com.xcong.excoin.modules.member.vo.MemberCoinWithdrawVo;
import com.xcong.excoin.modules.member.vo.MemberQuickBuySaleVo;
+import com.xcong.excoin.modules.member.vo.MemberQuickSaleVo;
/**
* @author helius
@@ -23,4 +31,22 @@
FebsResponse memberChargeUsdtCancel(@NotNull(message = "{required}") Long id);
+ IPage<MemberQuickSaleVo> findmemberQuickSaleListInPage(MemberQuickBuySaleEntity memberQuickBuySaleEntity, QueryRequest request);
+
+ FebsResponse memberExtractUsdtCancel(@NotNull(message = "{required}") Long id);
+
+ FebsResponse memberExtractUsdtConfirm(@NotNull(message = "{required}") Long id);
+
+ IPage<MemberCoinChargeVo> findMemberApplyCoinListInPage(MemberCoinChargeEntity memberCoinChargeEntity, QueryRequest request);
+
+ IPage<MemberCoinWithdrawVo> findmemberWithdrawCoinListInPage(MemberCoinWithdrawEntity memberCoinWithdrawEntity, QueryRequest request);
+
+ FebsResponse memberWithdrawCoinConfirm(@NotNull(message = "{required}") Long id);
+
+ FebsResponse memberWithdrawCoinCancel(@NotNull(message = "{required}") Long id);
+
+ MemberAuthenticationVo selectMemberAuthenticationById(@NotNull(message = "{required}") long id);
+
+ FebsResponse memberDetailConfirm(@Valid MemberDetailConfirmDto memberDetailConfirmDto);
+
}
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 72f4d90..867a793 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
@@ -6,19 +6,37 @@
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xcong.excoin.common.entity.FebsResponse;
import com.xcong.excoin.common.entity.QueryRequest;
+import com.xcong.excoin.modules.member.dto.MemberDetailConfirmDto;
import com.xcong.excoin.modules.member.entity.MemberAccountMoneyChangeEntity;
+import com.xcong.excoin.modules.member.entity.MemberCoinAddressEntity;
+import com.xcong.excoin.modules.member.entity.MemberCoinChargeEntity;
+import com.xcong.excoin.modules.member.entity.MemberCoinWithdrawEntity;
import com.xcong.excoin.modules.member.entity.MemberEntity;
import com.xcong.excoin.modules.member.entity.MemberQuickBuySaleEntity;
import com.xcong.excoin.modules.member.entity.MemberWalletCoinEntity;
import com.xcong.excoin.modules.member.mapper.MemberAccountMoneyChangeMapper;
+import com.xcong.excoin.modules.member.mapper.MemberAuthenticationMapper;
+import com.xcong.excoin.modules.member.mapper.MemberCoinAddressMapper;
+import com.xcong.excoin.modules.member.mapper.MemberCoinChargeMapper;
+import com.xcong.excoin.modules.member.mapper.MemberCoinWithdrawMapper;
import com.xcong.excoin.modules.member.mapper.MemberMapper;
import com.xcong.excoin.modules.member.mapper.MemberQuickBuySaleMapper;
import com.xcong.excoin.modules.member.mapper.MemberWalletCoinMapper;
import com.xcong.excoin.modules.member.service.IMemberService;
+import com.xcong.excoin.modules.member.vo.MemberAuthenticationVo;
+import com.xcong.excoin.modules.member.vo.MemberCoinChargeVo;
+import com.xcong.excoin.modules.member.vo.MemberCoinWithdrawVo;
import com.xcong.excoin.modules.member.vo.MemberQuickBuySaleVo;
+import com.xcong.excoin.modules.member.vo.MemberQuickSaleVo;
import lombok.RequiredArgsConstructor;
import java.math.BigDecimal;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -31,11 +49,21 @@
@RequiredArgsConstructor
public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberEntity> implements IMemberService {
+ private final MemberMapper memberMapper;
+
private final MemberQuickBuySaleMapper memberQuickBuySaleMapper;
private final MemberWalletCoinMapper memberWalletCoinMapper;
private final MemberAccountMoneyChangeMapper memberAccountMoneyChangeMapper;
+
+ private final MemberCoinChargeMapper memberCoinChargeMapper;
+
+ private final MemberCoinWithdrawMapper memberCoinWithdrawMapper;
+
+ private final MemberCoinAddressMapper memberCoinAddressMapper;
+
+ private final MemberAuthenticationMapper memberAuthenticationMapper;
@Override
@@ -90,6 +118,11 @@
memberAccountMoneyChangeEntity.setStatus(MemberAccountMoneyChangeEntity.STATUS_SUCCESS_INTEGER);
memberAccountMoneyChangeEntity.setSymbol("USDT");
memberAccountMoneyChangeEntity.setType(MemberAccountMoneyChangeEntity.TYPE_WALLET_COIN);
+ memberAccountMoneyChangeEntity.setCreateBy(selectById.getCreateBy());
+ memberAccountMoneyChangeEntity.setCreateTime(new Date());
+ memberAccountMoneyChangeEntity.setUpdateBy(selectById.getCreateBy());
+ memberAccountMoneyChangeEntity.setUpdateTime(new Date());
+
memberAccountMoneyChangeMapper.insert(memberAccountMoneyChangeEntity);
/**
* todo
@@ -101,7 +134,7 @@
SmsUtils.hxSmsSend(member.getPhone(), smsContent);
*/
- return new FebsResponse().message("拨币成功");
+ return new FebsResponse().success();
}
@Override
@@ -121,4 +154,278 @@
return new FebsResponse().success();
}
+
+ @Override
+ public IPage<MemberQuickSaleVo> findmemberQuickSaleListInPage(MemberQuickBuySaleEntity memberQuickBuySaleEntity,
+ QueryRequest request) {
+ Page<MemberQuickBuySaleEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
+ IPage<MemberQuickSaleVo> findmemberQuickBuySaleListInPage = memberQuickBuySaleMapper.findmemberQuickSaleListInPage(page, memberQuickBuySaleEntity);
+ return findmemberQuickBuySaleListInPage;
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public FebsResponse memberExtractUsdtCancel(@NotNull(message = "{required}") Long id) {
+ MemberQuickBuySaleEntity memberQuickBuySaleEntity = memberQuickBuySaleMapper.selectById(id);
+
+ if(!MemberQuickBuySaleEntity.CHARGE_STATUS_CREATE.equals(memberQuickBuySaleEntity.getOrderStatus())) {
+ return new FebsResponse().message("只允许待付款状态操作");
+ }
+
+ Long memberId = memberQuickBuySaleEntity.getMemberId();
+ BigDecimal amountUsdt = memberQuickBuySaleEntity.getAmountUsdt();
+ String walletCode = "USDT";
+
+ MemberEntity selectById = this.baseMapper.selectById(memberId);
+ if(ObjectUtils.isEmpty(selectById)) {
+ return new FebsResponse().message("用户已不存在");
+ }
+ //获取币币钱包
+ MemberWalletCoinEntity memberWalletCoinEntity = memberWalletCoinMapper.findWalletCoinByMemberIdAndWalletCode(memberId,walletCode);
+ BigDecimal frozenBalance = memberWalletCoinEntity.getFrozenBalance();
+ BigDecimal availableBalance = memberWalletCoinEntity.getAvailableBalance();
+ BigDecimal totalBalance = memberWalletCoinEntity.getTotalBalance();
+ memberWalletCoinEntity.setFrozenBalance(frozenBalance.subtract(amountUsdt));
+ memberWalletCoinEntity.setAvailableBalance(availableBalance.add(amountUsdt));
+ memberWalletCoinEntity.setTotalBalance(totalBalance.add(amountUsdt));
+ // 更新
+ memberWalletCoinMapper.updateById(memberWalletCoinEntity);
+ // 更新状态
+ memberQuickBuySaleEntity.setOrderStatus(MemberQuickBuySaleEntity.CHARGE_STATUS_CANCEL_SYSTEM);
+ memberQuickBuySaleMapper.updateById(memberQuickBuySaleEntity);
+
+ /**
+ * todo
+ SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
+ String chargeTime = format.format(memberQuickBuySaleEntity.getChargeTime()); // 将当前时间袼式化为指定的格式
+ String usdt = memberQuickBuySaleEntity.getAmountUsdt()+"USDT";
+ //发送短信提醒
+ String smsContent = "【Excoin】尊敬的用户您好!您于"+chargeTime+"充值"+usdt+"已成功到账,请您及时查收!订单号为:"+memberChargeUsdt.getOrderCode()+"。";
+ SmsUtils.hxSmsSend(member.getPhone(), smsContent);
+
+ */
+ return new FebsResponse().success();
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public FebsResponse memberExtractUsdtConfirm(@NotNull(message = "{required}") Long id) {
+
+ MemberQuickBuySaleEntity memberQuickBuySaleEntity = memberQuickBuySaleMapper.selectById(id);
+
+ if(!MemberQuickBuySaleEntity.CHARGE_STATUS_CREATE.equals(memberQuickBuySaleEntity.getOrderStatus())) {
+ return new FebsResponse().message("只允许待付款状态操作");
+ }
+
+ Long memberId = memberQuickBuySaleEntity.getMemberId();
+ BigDecimal amountUsdt = memberQuickBuySaleEntity.getAmountUsdt();
+ String walletCode = "USDT";
+
+ MemberEntity selectById = this.baseMapper.selectById(memberId);
+ if(ObjectUtils.isEmpty(selectById)) {
+ return new FebsResponse().message("用户已不存在");
+ }
+
+ //获取币币钱包
+ MemberWalletCoinEntity memberWalletCoinEntity = memberWalletCoinMapper.findWalletCoinByMemberIdAndWalletCode(memberId,walletCode);
+ BigDecimal frozenBalance = memberWalletCoinEntity.getFrozenBalance();
+ memberWalletCoinEntity.setFrozenBalance(frozenBalance.subtract(amountUsdt));
+ memberWalletCoinMapper.updateById(memberWalletCoinEntity);
+
+ memberQuickBuySaleEntity.setOrderStatus(MemberQuickBuySaleEntity.CHARGE_STATUS_PAID);
+ memberQuickBuySaleMapper.updateById(memberQuickBuySaleEntity);
+
+ //添加币币资金划转历史记录
+ MemberAccountMoneyChangeEntity memberAccountMoneyChangeEntity = new MemberAccountMoneyChangeEntity();
+ memberAccountMoneyChangeEntity.setContent("提现");
+ memberAccountMoneyChangeEntity.setMemberId(memberId);
+ memberAccountMoneyChangeEntity.setAmount(amountUsdt);
+ memberAccountMoneyChangeEntity.setStatus(MemberAccountMoneyChangeEntity.STATUS_SUCCESS_INTEGER);
+ memberAccountMoneyChangeEntity.setSymbol(walletCode);
+ memberAccountMoneyChangeEntity.setType(MemberAccountMoneyChangeEntity.TYPE_WALLET_COIN);
+ memberAccountMoneyChangeEntity.setCreateBy(selectById.getCreateBy());
+ memberAccountMoneyChangeEntity.setCreateTime(new Date());
+ memberAccountMoneyChangeEntity.setUpdateBy(selectById.getCreateBy());
+ memberAccountMoneyChangeEntity.setUpdateTime(new Date());
+ memberAccountMoneyChangeMapper.insert(memberAccountMoneyChangeEntity);
+
+ /**
+ SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
+ String chargeTime = format.format(memberQuickBuySaleEntity.getUpdateTime()); // 将当前时间袼式化为指定的格式
+ String usdt = amountUsdt+"USDT";
+ //发送短信提醒
+ String smsContent = "【Excoin】尊敬的用户您好!您于"+chargeTime+"提现"+usdt+"已成功到账,请您及时查收!订单号为:"+memberQuickBuySaleEntity.getOrderCode()+"。";
+ SmsUtils.hxSmsSend(selectById.getPhone(), smsContent);
+ *
+ */
+
+ return new FebsResponse().success();
+ }
+
+ @Override
+ public IPage<MemberCoinChargeVo> findMemberApplyCoinListInPage(MemberCoinChargeEntity memberCoinChargeEntity,
+ QueryRequest request) {
+ Page<MemberCoinChargeEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
+ IPage<MemberCoinChargeVo> findmemberQuickBuySaleListInPage = memberCoinChargeMapper.findMemberApplyCoinListInPage(page, memberCoinChargeEntity);
+ return findmemberQuickBuySaleListInPage;
+ }
+
+ @Override
+ public IPage<MemberCoinWithdrawVo> findmemberWithdrawCoinListInPage(
+ MemberCoinWithdrawEntity memberCoinWithdrawEntity, QueryRequest request) {
+ Page<MemberCoinWithdrawEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
+ IPage<MemberCoinWithdrawVo> findmemberQuickBuySaleListInPage = memberCoinWithdrawMapper.findmemberWithdrawCoinListInPage(page, memberCoinWithdrawEntity);
+ return findmemberQuickBuySaleListInPage;
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public FebsResponse memberWithdrawCoinConfirm(@NotNull(message = "{required}") Long id) {
+
+ MemberCoinWithdrawEntity selectById = memberCoinWithdrawMapper.selectById(id);
+ Long memberId = selectById.getMemberId();
+ String symbol = selectById.getSymbol();
+ String address = selectById.getAddress();
+ int status = selectById.getStatus();
+ if(status != 1) {
+ return new FebsResponse().fail().message("只有等待审核的状态才能确认!");
+ }
+
+ // 查询币币钱包
+ MemberWalletCoinEntity walletCoin = memberWalletCoinMapper.findWalletCoinByMemberIdAndWalletCode(memberId, symbol);
+
+ BigDecimal total = walletCoin.getTotalBalance().subtract(selectById.getAmount()).subtract(selectById.getFeeAmount());
+ walletCoin.setTotalBalance(total);
+ BigDecimal frozen = walletCoin.getFrozenBalance().subtract(selectById.getAmount()).subtract(selectById.getFeeAmount());
+ walletCoin.setFrozenBalance(frozen);
+
+ memberWalletCoinMapper.updateById(walletCoin);
+
+ if ("Y".equals(selectById.getIsInside())) {
+ Map<String, Object> columnMap = new HashMap<>();
+ columnMap.put("symbol", symbol);
+ columnMap.put("address", address);
+ // 如果是内部转账 则需要将币加到内部地址
+ List<MemberCoinAddressEntity> selectByMap = memberCoinAddressMapper.selectByMap(columnMap);
+ if(selectByMap == null || selectByMap.isEmpty()) {
+ return new FebsResponse().fail().message("地址有误,请拒绝!");
+ }
+ Long aimMemberId = selectByMap.get(0).getMemberId();
+ MemberWalletCoinEntity aimWalletCoin = memberWalletCoinMapper.findWalletCoinByMemberIdAndWalletCode(aimMemberId, symbol);
+
+ BigDecimal addTotal = aimWalletCoin.getTotalBalance().add(selectById.getAmount());
+ BigDecimal addAvailable = aimWalletCoin.getAvailableBalance().add(selectById.getAmount());
+ aimWalletCoin.setTotalBalance(addTotal);
+ aimWalletCoin.setAvailableBalance(addAvailable);
+
+ memberWalletCoinMapper.updateById(aimWalletCoin);
+
+ MemberAccountMoneyChangeEntity memberAccountMoneyChangeEntity = new MemberAccountMoneyChangeEntity();
+ memberAccountMoneyChangeEntity.setContent("收款");
+ memberAccountMoneyChangeEntity.setMemberId(aimMemberId);
+ memberAccountMoneyChangeEntity.setAmount(selectById.getAmount());
+ memberAccountMoneyChangeEntity.setStatus(MemberAccountMoneyChangeEntity.STATUS_SUCCESS_INTEGER);
+ memberAccountMoneyChangeEntity.setSymbol(selectById.getSymbol());
+ memberAccountMoneyChangeEntity.setType(MemberAccountMoneyChangeEntity.TYPE_WALLET_COIN);
+ memberAccountMoneyChangeEntity.setCreateBy(selectById.getCreateBy());
+ memberAccountMoneyChangeEntity.setCreateTime(new Date());
+ memberAccountMoneyChangeEntity.setUpdateBy(selectById.getCreateBy());
+ memberAccountMoneyChangeEntity.setUpdateTime(new Date());
+ memberAccountMoneyChangeMapper.insert(memberAccountMoneyChangeEntity);
+ }
+
+ MemberAccountMoneyChangeEntity memberAccountMoneyChangeEntity = new MemberAccountMoneyChangeEntity();
+ memberAccountMoneyChangeEntity.setContent("提币");
+ memberAccountMoneyChangeEntity.setMemberId(memberId);
+ memberAccountMoneyChangeEntity.setAmount(selectById.getAmount());
+ memberAccountMoneyChangeEntity.setStatus(MemberAccountMoneyChangeEntity.STATUS_SUCCESS_INTEGER);
+ memberAccountMoneyChangeEntity.setSymbol(selectById.getSymbol());
+ memberAccountMoneyChangeEntity.setType(MemberAccountMoneyChangeEntity.TYPE_WALLET_COIN);
+ memberAccountMoneyChangeEntity.setCreateBy(selectById.getCreateBy());
+ memberAccountMoneyChangeEntity.setCreateTime(new Date());
+ memberAccountMoneyChangeEntity.setUpdateBy(selectById.getCreateBy());
+ memberAccountMoneyChangeEntity.setUpdateTime(new Date());
+ memberAccountMoneyChangeMapper.insert(memberAccountMoneyChangeEntity);
+
+ selectById.setStatus(MemberCoinWithdrawEntity.IS_STATUS_Y);
+ memberCoinWithdrawMapper.updateById(selectById);
+ /**
+ //短信提醒
+ SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
+ String chargeTime = format.format(new Date()); // 将当前时间袼式化为指定的格式
+ String usdt = selectById.getAmount()+"USDT";
+ * 发送短信提醒 todo
+ String smsContent = "【Excoin】尊敬的用户您好!您于"+chargeTime+"提现"+usdt+"已成功到账,请您及时查收!";
+ SmsUtils.hxSmsSend(member.getPhone(), smsContent);
+ */
+ return new FebsResponse().success();
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public FebsResponse memberWithdrawCoinCancel(@NotNull(message = "{required}") Long id) {
+
+ MemberCoinWithdrawEntity selectById = memberCoinWithdrawMapper.selectById(id);
+ Long memberId = selectById.getMemberId();
+ String symbol = selectById.getSymbol();
+ int status = selectById.getStatus();
+ if(status != 1) {
+ return new FebsResponse().fail().message("只有等待审核的状态才能拒绝!");
+ }
+ // 查询币币钱包
+ MemberWalletCoinEntity walletCoin = memberWalletCoinMapper.findWalletCoinByMemberIdAndWalletCode(memberId, symbol);
+
+ BigDecimal available = walletCoin.getAvailableBalance().add(selectById.getAmount()).add(selectById.getFeeAmount());
+ walletCoin.setAvailableBalance(available);
+ BigDecimal frozen = walletCoin.getFrozenBalance().subtract(selectById.getAmount()).subtract(selectById.getFeeAmount());
+ walletCoin.setFrozenBalance(frozen);
+
+ memberWalletCoinMapper.updateById(walletCoin);
+
+ // 提币退款记录
+ MemberAccountMoneyChangeEntity memberAccountMoneyChangeEntity = new MemberAccountMoneyChangeEntity();
+ memberAccountMoneyChangeEntity.setContent("提币");
+ memberAccountMoneyChangeEntity.setMemberId(memberId);
+ memberAccountMoneyChangeEntity.setAmount(selectById.getAmount());
+ memberAccountMoneyChangeEntity.setStatus(MemberAccountMoneyChangeEntity.STATUS_FAIL_INTEGER);
+ memberAccountMoneyChangeEntity.setSymbol(selectById.getSymbol());
+ memberAccountMoneyChangeEntity.setType(MemberAccountMoneyChangeEntity.TYPE_WALLET_COIN);
+ memberAccountMoneyChangeEntity.setCreateBy(selectById.getCreateBy());
+ memberAccountMoneyChangeEntity.setCreateTime(new Date());
+ memberAccountMoneyChangeEntity.setUpdateBy(selectById.getCreateBy());
+ memberAccountMoneyChangeEntity.setUpdateTime(new Date());
+ memberAccountMoneyChangeMapper.insert(memberAccountMoneyChangeEntity);
+
+ selectById.setStatus(MemberCoinWithdrawEntity.IS_STATUS_N);
+ memberCoinWithdrawMapper.updateById(selectById);
+ return new FebsResponse().success();
+ }
+
+ @Override
+ public MemberAuthenticationVo selectMemberAuthenticationById(long id) {
+ MemberAuthenticationVo memberAuthenticationEntity = memberAuthenticationMapper.findMemberAuthenticationByMemberId(id);
+ String firstName = memberAuthenticationEntity.getFirstName();
+ String secondName = memberAuthenticationEntity.getSecondName();
+ memberAuthenticationEntity.setRealName(firstName+"-"+secondName);
+ return memberAuthenticationEntity;
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public FebsResponse memberDetailConfirm(@Valid MemberDetailConfirmDto memberDetailConfirmDto) {
+ Long id = memberDetailConfirmDto.getId();
+ MemberEntity selectById = memberMapper.selectById(id);
+ Integer certifyStatus = selectById.getCertifyStatus();
+ if(!MemberEntity.CERTIFY_STATUS_ING.equals(certifyStatus)) {
+ return new FebsResponse().fail().message("只有【待审核】状态才能提交!");
+ }
+
+ MemberAuthenticationVo memberAuthenticationEntity = memberAuthenticationMapper.findMemberAuthenticationByMemberId(id);
+ selectById.setCertifyStatus(MemberEntity.CERTIFY_STATUS_Y);
+ selectById.setIdcardNo(memberAuthenticationEntity.getIdcardNo());
+
+ memberMapper.updateById(selectById);
+ return new FebsResponse().success();
+ }
+
}
diff --git a/src/main/java/com/xcong/excoin/modules/authentication/entity/MemberAuthenticationEntity.java b/src/main/java/com/xcong/excoin/modules/member/vo/MemberAuthenticationVo.java
similarity index 61%
copy from src/main/java/com/xcong/excoin/modules/authentication/entity/MemberAuthenticationEntity.java
copy to src/main/java/com/xcong/excoin/modules/member/vo/MemberAuthenticationVo.java
index a98d50a..1c55868 100644
--- a/src/main/java/com/xcong/excoin/modules/authentication/entity/MemberAuthenticationEntity.java
+++ b/src/main/java/com/xcong/excoin/modules/member/vo/MemberAuthenticationVo.java
@@ -1,16 +1,21 @@
-package com.xcong.excoin.modules.authentication.entity;
+package com.xcong.excoin.modules.member.vo;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.xcong.excoin.common.entity.BaseEntity;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+
import lombok.Data;
@Data
-@TableName("member_authentication")
-public class MemberAuthenticationEntity extends BaseEntity{
- /**
- *
- */
- private static final long serialVersionUID = 1L;
+public class MemberAuthenticationVo {
+
+ @TableId(value = "id",type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 实名认证状态 0-审核未通过 1-审核通过 2-等待审核
+ */
+ private Integer certifyStatus;
+
/**
* 用户ID
*/
diff --git a/src/main/java/com/xcong/excoin/modules/member/vo/MemberCoinChargeVo.java b/src/main/java/com/xcong/excoin/modules/member/vo/MemberCoinChargeVo.java
new file mode 100644
index 0000000..f1b5993
--- /dev/null
+++ b/src/main/java/com/xcong/excoin/modules/member/vo/MemberCoinChargeVo.java
@@ -0,0 +1,62 @@
+package com.xcong.excoin.modules.member.vo;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import lombok.Data;
+
+@Data
+public class MemberCoinChargeVo {
+ @TableId(value = "id",type = IdType.AUTO)
+ private Long id;
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ private Date createTime;
+ /**
+ * 手机号(包含国际手机号)
+ */
+ private String phone;
+
+ /**
+ * 邮箱
+ */
+ private String email;
+ /**
+ * 会员ID
+ */
+ private Long memberId;
+ /**
+ * 凭证
+ */
+ private Long certificate;
+ /**
+ * 充值金额
+ */
+ private BigDecimal amount;
+ /**
+ * 上次更新时钱包金额
+ */
+ private BigDecimal lastAmount;
+ /**
+ * 状态
+ */
+ private int status;
+ /**
+ * 币种
+ */
+ private String symbol;
+ /**
+ * 地址
+ */
+ private String address;
+ private String tag;
+ private String hash;
+ /**
+ * 订单编号
+ */
+ private String orderCode;
+
+}
diff --git a/src/main/java/com/xcong/excoin/modules/member/vo/MemberCoinWithdrawVo.java b/src/main/java/com/xcong/excoin/modules/member/vo/MemberCoinWithdrawVo.java
new file mode 100644
index 0000000..1ddfa0b
--- /dev/null
+++ b/src/main/java/com/xcong/excoin/modules/member/vo/MemberCoinWithdrawVo.java
@@ -0,0 +1,59 @@
+package com.xcong.excoin.modules.member.vo;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import lombok.Data;
+
+@Data
+public class MemberCoinWithdrawVo {
+
+ @TableId(value = "id",type = IdType.AUTO)
+ private Long id;
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ private Date createTime;
+ /**
+ * 手机号(包含国际手机号)
+ */
+ private String phone;
+ /**
+ * 邮箱
+ */
+ private String email;
+ /**
+ * 会员ID
+ */
+ private Long memberId;
+ /**
+ * 地址
+ */
+ private String address;
+ /**
+ * 提币数量
+ */
+ private BigDecimal amount;
+ /**
+ * 手续费
+ */
+ private BigDecimal feeAmount;
+ /**
+ * 币种
+ */
+ private String symbol;
+ /**
+ * 状态
+ */
+ private int status;
+ private String label;
+ private String tag;
+
+ /**
+ * 是否内部转账 Y-是N-不是
+ */
+ private String isInside;
+
+}
diff --git a/src/main/java/com/xcong/excoin/modules/member/vo/MemberQuickSaleVo.java b/src/main/java/com/xcong/excoin/modules/member/vo/MemberQuickSaleVo.java
new file mode 100644
index 0000000..dd6933e
--- /dev/null
+++ b/src/main/java/com/xcong/excoin/modules/member/vo/MemberQuickSaleVo.java
@@ -0,0 +1,73 @@
+package com.xcong.excoin.modules.member.vo;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import lombok.Data;
+
+@Data
+public class MemberQuickSaleVo {
+
+ @TableId(value = "id",type = IdType.AUTO)
+ private Long id;
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ private Date createTime;
+ /**
+ * 手机号(包含国际手机号)
+ */
+ private String phone;
+
+ /**
+ * 邮箱
+ */
+ private String email;
+ /**
+ * 用户Id
+ */
+ private Long memberId;
+ /**
+ * 单价
+ */
+ private BigDecimal unitPrice;
+ /**
+ * 金额(人民币)
+ */
+ private BigDecimal amountCny;
+ /**
+ * 金额(USDT)
+ */
+ private BigDecimal amountUsdt;
+ /**
+ * 订单状态 1-待审核2-已付款3-已审核4-撤单5-系统取消
+ */
+ private int orderStatus;
+ /**
+ * 收款姓名
+ */
+ private String name;
+ /**
+ * 收款账号
+ */
+ private String account;
+ /**
+ * 收款二维码
+ */
+ private String paymentQrcode;
+ /**
+ * 银行
+ */
+ private String bank;
+ /**
+ * 付款方式 1-支付宝2-微信3-银行卡
+ */
+ private Integer paymentType;
+ /**
+ * 订单编号
+ */
+ private String orderNo;
+
+}
diff --git a/src/main/resources/mapper/modules/AuthenticationMapper.xml b/src/main/resources/mapper/modules/AuthenticationMapper.xml
deleted file mode 100644
index 329c86c..0000000
--- a/src/main/resources/mapper/modules/AuthenticationMapper.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.xcong.excoin.modules.authentication.mapper.AuthenticationMapper">
-
-
- <select id="selectAuthenticationListInPage" resultType="com.xcong.excoin.modules.authentication.entity.MemberAuthenticationEntity">
- select * from member a LEFT JOIN member_authentication m on m.member_id = a.id
- <where>
- <if test="record != null" >
- <if test="record.startTime!=null">
- and create_time >=#{record.startTime}
- </if>
- <if test="record.endTime!=null">
- and #{record.endTime} >= create_time
- </if>
- <if test="record.account!=null and record.account!=''">
- and (phone = #{record.account} or email = #{record.account} or invite_id=#{record.account})
- </if>
- <if test="record.accountStatus!=null">
- and account_status = #{record.accountStatus}
- </if>
- <if test="record.accountType != null" >
- and account_type = #{record.accountType}
- </if>
- <if test="record.certifyStatus != null">
- and certify_status = #{record.certifyStatus}
- </if>
- </if>
- </where>
- order by create_time desc
- </select>
-
- <select id="selectMemberListInPage" resultType="com.xcong.excoin.modules.member.entity.MemberEntity">
-
- select * from member order by create_time desc
-
- </select>
-
-
-</mapper>
\ No newline at end of file
diff --git a/src/main/resources/mapper/modules/MemberAuthenticationMapper.xml b/src/main/resources/mapper/modules/MemberAuthenticationMapper.xml
new file mode 100644
index 0000000..42445ab
--- /dev/null
+++ b/src/main/resources/mapper/modules/MemberAuthenticationMapper.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xcong.excoin.modules.member.mapper.MemberAuthenticationMapper">
+
+ <select id="findMemberAuthenticationByMemberId" resultType="com.xcong.excoin.modules.member.vo.MemberAuthenticationVo">
+ select * from member a LEFT JOIN member_authentication m on m.member_id = a.id where a.id = #{id}
+ </select>
+
+</mapper>
\ No newline at end of file
diff --git a/src/main/resources/mapper/modules/MemberCoinAddressMapper.xml b/src/main/resources/mapper/modules/MemberCoinAddressMapper.xml
new file mode 100644
index 0000000..45e595e
--- /dev/null
+++ b/src/main/resources/mapper/modules/MemberCoinAddressMapper.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xcong.excoin.modules.member.mapper.MemberCoinAddressMapper">
+
+ <select id="findMemberApplyCoinListInPage" resultType="com.xcong.excoin.modules.member.vo.MemberCoinChargeVo">
+ select * from member_coin_charge s left join member m on m.id = s.member_id
+ <where>
+ <if test="record != null" >
+ <if test="record.account!=null and record.account!=''">
+ and (m.phone = #{record.account} or m.email = #{record.account} or s.member_id=#{record.account})
+ </if>
+ <if test="record.address!=null and record.address!=''">
+ and s.address=#{record.address}
+ </if>
+ </if>
+ </where>
+ order by s.create_time desc
+ </select>
+
+</mapper>
\ No newline at end of file
diff --git a/src/main/resources/mapper/modules/MemberCoinChargeMapper.xml b/src/main/resources/mapper/modules/MemberCoinChargeMapper.xml
new file mode 100644
index 0000000..c57cc3f
--- /dev/null
+++ b/src/main/resources/mapper/modules/MemberCoinChargeMapper.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xcong.excoin.modules.member.mapper.MemberCoinChargeMapper">
+
+ <select id="findMemberApplyCoinListInPage" resultType="com.xcong.excoin.modules.member.vo.MemberCoinChargeVo">
+ select * from member_coin_charge s left join member m on m.id = s.member_id
+ <where>
+ <if test="record != null" >
+ <if test="record.account!=null and record.account!=''">
+ and (m.phone = #{record.account} or m.email = #{record.account} or s.member_id=#{record.account})
+ </if>
+ <if test="record.address!=null and record.address!=''">
+ and s.address=#{record.address}
+ </if>
+ </if>
+ </where>
+ order by s.create_time desc
+ </select>
+
+</mapper>
\ No newline at end of file
diff --git a/src/main/resources/mapper/modules/MemberCoinWithdrawMapper.xml b/src/main/resources/mapper/modules/MemberCoinWithdrawMapper.xml
new file mode 100644
index 0000000..2616c75
--- /dev/null
+++ b/src/main/resources/mapper/modules/MemberCoinWithdrawMapper.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xcong.excoin.modules.member.mapper.MemberCoinWithdrawMapper">
+
+ <select id="findmemberWithdrawCoinListInPage" resultType="com.xcong.excoin.modules.member.vo.MemberCoinWithdrawVo">
+ SELECT
+ *
+ FROM
+ member_coin_withdraw s left join member m on m.id = s.member_id
+ <where>
+ <if test="record != null" >
+ <if test="record.account!=null and record.account!=''">
+ and (m.phone = #{record.account} or m.email = #{record.account} or s.member_id=#{record.account})
+ </if>
+ <if test="record.isInside!=null and record.isInside!=''">
+ and s.is_inside= #{record.isInside}
+ </if>
+ <if test="record.status!=null and record.status!='' and record.status!='0'">
+ and s.status= #{record.status}
+ </if>
+ </if>
+ </where>
+ </select>
+
+</mapper>
\ No newline at end of file
diff --git a/src/main/resources/mapper/modules/MemberQuickBuySaleMapper.xml b/src/main/resources/mapper/modules/MemberQuickBuySaleMapper.xml
index 95fbff9..1e6caa7 100644
--- a/src/main/resources/mapper/modules/MemberQuickBuySaleMapper.xml
+++ b/src/main/resources/mapper/modules/MemberQuickBuySaleMapper.xml
@@ -18,5 +18,40 @@
</where>
order by s.create_time desc
</select>
+
+ <select id="findmemberQuickSaleListInPage" resultType="com.xcong.excoin.modules.member.vo.MemberQuickSaleVo">
+ SELECT
+ s.id,
+ s.create_time createTime,
+ a.phone,
+ a.email,
+ s.member_id memberId,
+ s.unit_price unitPrice,
+ s.amount_cny amountCny,
+ s.amount_usdt amountUsdt,
+ s.order_status orderStatus,
+ m.name,
+ m.account,
+ m.payment_qrcode paymentQrcode,
+ m.bank,
+ m.payment_type paymentType,
+ s.order_no orderNo
+ FROM
+ member_quick_buy_sale s
+ LEFT JOIN member_payment_method m ON m.id = s.member_id
+ LEFT JOIN member a ON a.id = s.member_id
+ <where>
+ s.order_type = 'S'
+ <if test="record != null" >
+ <if test="record.account!=null and record.account!=''">
+ and (a.phone = #{record.account} or a.email = #{record.account} or s.member_id=#{record.account})
+ </if>
+ <if test="record.orderStatus!=null and record.orderStatus!= 0" >
+ and s.order_status = #{record.orderStatus}
+ </if>
+ </if>
+ </where>
+ order by s.create_time desc
+ </select>
</mapper>
\ No newline at end of file
diff --git a/src/main/resources/templates/febs/views/modules/member/applyCoin.html b/src/main/resources/templates/febs/views/modules/member/applyCoin.html
new file mode 100644
index 0000000..a66aa37
--- /dev/null
+++ b/src/main/resources/templates/febs/views/modules/member/applyCoin.html
@@ -0,0 +1,129 @@
+<div class="layui-fluid layui-anim febs-anim" id="febs-user" lay-title="充币审核管理">
+ <div class="layui-row febs-container">
+ <div class="layui-col-md12">
+ <div class="layui-card">
+ <div class="layui-card-body febs-table-full">
+ <form class="layui-form layui-table-form" lay-filter="user-table-form">
+ <div class="layui-row">
+ <div class="layui-col-md10">
+ <div class="layui-form-item">
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input type="text" placeholder="手机号/邮箱/邀请码" name="account" autocomplete="off" class="layui-input">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input type="text" placeholder="充币地址" name="address" autocomplete="off" class="layui-input">
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="layui-col-md2 layui-col-sm12 layui-col-xs12 table-action-area">
+ <div class="layui-btn layui-btn-sm layui-btn-primary febs-button-blue-plain table-action" id="query">
+ <i class="layui-icon"></i>
+ </div>
+ <div class="layui-btn layui-btn-sm layui-btn-primary febs-button-green-plain table-action" id="reset">
+ <i class="layui-icon"></i>
+ </div>
+ </div>
+ </div>
+ </form>
+ <table lay-filter="userTable" lay-data="{id: 'userTable'}"></table>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+<!-- 表格字段状态格式化 start -->
+<script type="text/html" id="status">
+ {{#
+ var status = {
+ 1: {title: '已到账' , color: 'green'},
+ 0: {title: '已到账' },
+ 2: {title: '已到账' },
+ 3: {title: '已到账' },
+ 4: {title: '已到账' }
+ }[d.status];
+ }}
+ <span class="layui-badge febs-tag-{{status.color}}">{{ status.title }}</span>
+</script>
+
+<!-- 表格字段状态格式化 start -->
+
+<!-- 表格操作栏 end -->
+<script data-th-inline="none" type="text/javascript">
+ // 引入组件并初始化
+ layui.use(['dropdown', 'jquery', 'laydate', 'form', 'table', 'febs', 'treeSelect'], function () {
+ var $ = layui.jquery,
+ laydate = layui.laydate,
+ febs = layui.febs,
+ form = layui.form,
+ table = layui.table,
+ treeSelect = layui.treeSelect,
+ dropdown = layui.dropdown,
+ $view = $('#febs-user'),
+ $query = $view.find('#query'),
+ $reset = $view.find('#reset'),
+ $searchForm = $view.find('form'),
+ sortObject = {field: 'createTime', type: null},
+ tableIns;
+
+ form.render();
+
+ // 表格初始化
+ initTable();
+
+ // 下拉框选择器
+ treeSelect.render({
+ elem: $view.find('#dept'),
+ type: 'get',
+ data: ctx + 'dept/select/tree',
+ placeholder: '请选择',
+ search: false
+ });
+
+ // 查询按钮
+ $query.on('click', function () {
+ var params = $.extend(getQueryParams(), {field: sortObject.field, order: sortObject.type});
+ tableIns.reload({where: params, page: {curr: 1}});
+ });
+
+ // 刷新按钮
+ $reset.on('click', function () {
+ $searchForm[0].reset();
+ treeSelect.revokeNode('dept');
+ sortObject.type = 'null';
+ tableIns.reload({where: getQueryParams(), page: {curr: 1}, initSort: sortObject});
+ });
+
+ function initTable() {
+ tableIns = febs.table.init({
+ elem: $view.find('table'),
+ id: 'userTable',
+ url: ctx + 'member/memberApplyCoin',
+ cols: [[
+ {field: 'phone', title: '手机号码', minWidth: 120,align:'left'},
+ {field: 'email', title: '邮箱', minWidth: 200,align:'left'},
+ {field: 'memberId', title: '邀请码UID', minWidth: 100,align:'center'},
+ {field: 'symbol', title: '币种', minWidth: 60,align:'center'},
+ {field: 'tag', title: 'USDT类型', minWidth: 60,align:'center'},
+ {field: 'amount', title: '充币数量', minWidth: 100,align:'center'},
+ {field: 'lastAmount', title: '本次余额', minWidth: 100,align:'center'},
+ {field: 'address', title: '平台钱包地址', minWidth: 280,align:'center'},
+ {field: 'createTime', title: '创建时间', minWidth: 200,align:'center'},
+ {title: '状态', templet: '#status', minWidth: 100,align:'center'}
+ ]]
+ });
+ }
+
+ // 获取查询参数
+ function getQueryParams() {
+ return {
+ account: $searchForm.find('input[name="account"]').val().trim(),
+ address: $searchForm.find('input[name="address"]').val().trim(),
+ };
+ }
+
+ })
+</script>
\ No newline at end of file
diff --git a/src/main/resources/templates/febs/views/modules/member/chargeUsdt.html b/src/main/resources/templates/febs/views/modules/member/chargeUsdt.html
index eaefca1..c73732b 100644
--- a/src/main/resources/templates/febs/views/modules/member/chargeUsdt.html
+++ b/src/main/resources/templates/febs/views/modules/member/chargeUsdt.html
@@ -1,4 +1,4 @@
-<div class="layui-fluid layui-anim febs-anim" id="febs-user" lay-title="会员充值USDT记录">
+<div class="layui-fluid layui-anim febs-anim" id="febs-user" lay-title="会员充值USDT">
<div class="layui-row febs-container">
<div class="layui-col-md12">
<div class="layui-card">
@@ -164,19 +164,19 @@
id: 'userTable',
url: ctx + 'member/memberChargeUsdt',
cols: [[
- {field: 'phone', title: '手机号码'},
- {field: 'email', title: '邮箱'},
- {field: 'memberId', title: '邀请码UID'},
- {field: 'amountCny', title: '人民币金额'},
- {field: 'amountUsdt', title: 'USDT金额'},
- {field: 'unitPrice', title: '单价'},
- {field: 'createTime', title: '充值时间', minWidth: 180},
- {title: '付款状态', templet: '#order-Status'},
- {field: 'orderNo', title: '订单编号'},
- {field: 'paymentName', title: '收款人'},
- {field: 'paymentAccount', title: '收款账号'},
- {title: '收款方式', templet: '#payment-Type'},
- {title: '操作', toolbar: '#user-option', minWidth: 140, fixed : 'right'}
+ {field: 'phone', title: '手机号码', minWidth: 120,align:'left'},
+ {field: 'email', title: '邮箱', minWidth: 200,align:'left'},
+ {field: 'memberId', title: '邀请码UID', minWidth: 100,align:'center'},
+ {field: 'amountCny', title: '人民币金额', minWidth: 120,align:'center'},
+ {field: 'amountUsdt', title: 'USDT金额', minWidth: 120,align:'center'},
+ {field: 'unitPrice', title: '单价', minWidth: 80,align:'center'},
+ {field: 'createTime', title: '充值时间', minWidth: 180,align:'center'},
+ {title: '付款状态', templet: '#order-Status', minWidth: 100,align:'center'},
+ {field: 'orderNo', title: '订单编号', minWidth: 150,align:'center'},
+ {field: 'paymentName', title: '收款人', minWidth: 150,align:'center'},
+ {field: 'paymentAccount', title: '收款账号', minWidth: 150,align:'center'},
+ {title: '收款方式', templet: '#payment-Type', minWidth: 100,align:'center'},
+ {title: '操作', toolbar: '#user-option', minWidth: 150, fixed : 'right'}
]]
});
}
diff --git a/src/main/resources/templates/febs/views/modules/member/extractUsdt.html b/src/main/resources/templates/febs/views/modules/member/extractUsdt.html
new file mode 100644
index 0000000..ae18824
--- /dev/null
+++ b/src/main/resources/templates/febs/views/modules/member/extractUsdt.html
@@ -0,0 +1,197 @@
+<div class="layui-fluid layui-anim febs-anim" id="febs-user" lay-title="会员USDT提现">
+ <div class="layui-row febs-container">
+ <div class="layui-col-md12">
+ <div class="layui-card">
+ <div class="layui-card-body febs-table-full">
+ <form class="layui-form layui-table-form" lay-filter="user-table-form">
+ <div class="layui-row">
+ <div class="layui-col-md10">
+ <div class="layui-form-item">
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input type="text" placeholder="手机号/邮箱/邀请码" name="account" autocomplete="off" class="layui-input">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label layui-form-label-sm">订单状态</label>
+ <div class="layui-input-inline">
+ <select name="orderStatus">
+ <option value="0"></option>
+ <option value="1">待审核</option>
+ <option value="2">已付款</option>
+ <option value="3">已审核</option>
+ <option value="4">撤单</option>
+ <option value="5">系统取消</option>
+ </select>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="layui-col-md2 layui-col-sm12 layui-col-xs12 table-action-area">
+ <div class="layui-btn layui-btn-sm layui-btn-primary febs-button-blue-plain table-action" id="query">
+ <i class="layui-icon"></i>
+ </div>
+ <div class="layui-btn layui-btn-sm layui-btn-primary febs-button-green-plain table-action" id="reset">
+ <i class="layui-icon"></i>
+ </div>
+ <div class="layui-btn layui-btn-sm layui-btn-primary table-action action-more"
+ shiro:hasAnyPermissions="user:add,user:update,user:password:reset,user:export">
+ <i class="layui-icon"></i>
+ </div>
+ </div>
+ </div>
+ </form>
+ <table lay-filter="userTable" lay-data="{id: 'userTable'}"></table>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+<!-- 表格字段状态格式化 start -->
+<script type="text/html" id="order-Status">
+ {{#
+ var orderStatus = {
+ 1: {title: '待审核' , color: 'gray'},
+ 2: {title: '已付款' , color: 'red'},
+ 3: {title: '已审核' , color: 'green'},
+ 4: {title: '撤单' , color: 'gray'},
+ 5: {title: '系统取消' , color: 'blue'}
+ }[d.orderStatus];
+ }}
+ <span class="layui-badge febs-tag-{{orderStatus.color}}">{{ orderStatus.title }}</span>
+</script>
+<script type="text/html" id="payment-Type">
+ {{#
+ var paymentType = {
+ null: {title: '无' },
+ 1: {title: '支付宝' },
+ 2: {title: '微信'},
+ 3: {title: '银行卡' }
+ }[d.paymentType];
+ }}
+ <span >{{ paymentType.title }}</span>
+</script>
+
+<!-- 表格字段状态格式化 start -->
+
+<!-- 表格操作栏 start -->
+<script type="text/html" id="user-option">
+ <span shiro:lacksPermission="user:view,user:update,user:delete">
+ <span class="layui-badge-dot febs-bg-orange"></span> 无权限
+ </span>
+ <a lay-event="confirm" shiro:hasPermission="user:delete">付款</a>
+ <i class="layui-icon febs-edit-area febs-blue"></i>
+ <a lay-event="cancel" shiro:hasPermission="user:delete">拒绝</a>
+</script>
+<!-- 表格操作栏 end -->
+<script data-th-inline="none" type="text/javascript">
+ // 引入组件并初始化
+ layui.use(['dropdown', 'jquery', 'laydate', 'form', 'table', 'febs', 'treeSelect'], function () {
+ var $ = layui.jquery,
+ laydate = layui.laydate,
+ febs = layui.febs,
+ form = layui.form,
+ table = layui.table,
+ treeSelect = layui.treeSelect,
+ dropdown = layui.dropdown,
+ $view = $('#febs-user'),
+ $query = $view.find('#query'),
+ $reset = $view.find('#reset'),
+ $searchForm = $view.find('form'),
+ sortObject = {field: 'createTime', type: null},
+ tableIns;
+
+ form.render();
+
+ // 表格初始化
+ initTable();
+
+ // 下拉框选择器
+ treeSelect.render({
+ elem: $view.find('#dept'),
+ type: 'get',
+ data: ctx + 'dept/select/tree',
+ placeholder: '请选择',
+ search: false
+ });
+
+ // 初始化表格操作栏各个按钮功能
+ table.on('tool(userTable)', function (obj) {
+ var data = obj.data,
+ layEvent = obj.event;
+ if (layEvent === 'confirm') {
+ febs.modal.confirm('询问', '您是否确认已付款到该会员?', function () {
+ confirmUsers(data.id);
+ });
+ }
+ if (layEvent === 'cancel') {
+ febs.modal.confirm('询问', '您是否确认拒绝?', function () {
+ cancelUsers(data.id);
+ });
+ }
+ });
+
+ function confirmUsers(id) {
+ febs.get(ctx + 'member/memberExtractUsdtConfirm/' + id, null, function () {
+ febs.alert.success('划转成功');
+ $query.click();
+ });
+ }
+
+ function cancelUsers(id) {
+ febs.get(ctx + 'member/memberExtractUsdtCancel/' + id, null, function () {
+ febs.alert.success('设置为系统取消');
+ $query.click();
+ });
+ }
+
+ // 查询按钮
+ $query.on('click', function () {
+ var params = $.extend(getQueryParams(), {field: sortObject.field, order: sortObject.type});
+ tableIns.reload({where: params, page: {curr: 1}});
+ });
+
+ // 刷新按钮
+ $reset.on('click', function () {
+ $searchForm[0].reset();
+ treeSelect.revokeNode('dept');
+ sortObject.type = 'null';
+ tableIns.reload({where: getQueryParams(), page: {curr: 1}, initSort: sortObject});
+ });
+
+ function initTable() {
+ tableIns = febs.table.init({
+ elem: $view.find('table'),
+ id: 'userTable',
+ url: ctx + 'member/memberExtractUsdt',
+ cols: [[
+ {field: 'phone', title: '手机号码', minWidth: 120,align:'left'},
+ {field: 'email', title: '邮箱', minWidth: 200,align:'left'},
+ {field: 'memberId', title: '邀请码UID', minWidth: 100,align:'center'},
+ {field: 'amountCny', title: '人民币金额', minWidth: 120,align:'center'},
+ {field: 'amountUsdt', title: 'USDT金额', minWidth: 120,align:'center'},
+ {field: 'unitPrice', title: '单价', minWidth: 80,align:'center'},
+ {field: 'createTime', title: '提现时间', minWidth: 180,align:'center'},
+ {title: '提现状态', templet: '#order-Status', minWidth: 100,align:'center'},
+ {field: 'orderNo', title: '订单编号', minWidth: 150,align:'center'},
+ {field: 'paymentQrcode', title: '支付码', minWidth: 120,align:'center'},
+ {field: 'name', title: '收款人', minWidth: 150,align:'center'},
+ {field: 'account', title: '收款账号', minWidth: 150,align:'center'},
+ {title: '收款方式', templet: '#payment-Type', minWidth: 100,align:'center'},
+ {field: 'paymentAccount', title: '二维码', minWidth: 150,align:'center'},
+ {field: 'bank', title: '所属银行', minWidth: 150,align:'center'},
+ {title: '操作', toolbar: '#user-option', minWidth: 150, fixed : 'right'}
+ ]]
+ });
+ }
+
+ // 获取查询参数
+ function getQueryParams() {
+ return {
+ account: $searchForm.find('input[name="account"]').val().trim(),
+ orderStatus: $searchForm.find("select[name='orderStatus']").val(),
+ };
+ }
+
+ })
+</script>
\ No newline at end of file
diff --git a/src/main/resources/templates/febs/views/modules/member/member.html b/src/main/resources/templates/febs/views/modules/member/member.html
index d570368..f197168 100644
--- a/src/main/resources/templates/febs/views/modules/member/member.html
+++ b/src/main/resources/templates/febs/views/modules/member/member.html
@@ -77,9 +77,9 @@
{{#
var certifyStatus = {
0: {title: '未通过', color: 'red'},
- 1: {title: '审核中', color: 'blue'},
+ 1: {title: '待审核', color: 'blue'},
2: {title: '审核通过', color: 'green'},
- 3: {title: '未实名', color: 'cyan'}
+ 3: {title: '未实名'}
}[d.certifyStatus];
}}
<span class="layui-badge febs-tag-{{certifyStatus.color}}">{{ certifyStatus.title }}</span>
@@ -109,11 +109,8 @@
<span shiro:lacksPermission="user:view,user:update,user:delete">
<span class="layui-badge-dot febs-bg-orange"></span> 无权限
</span>
- <a lay-event="detail" shiro:hasPermission="user:view"><i
- class="layui-icon febs-edit-area febs-green"></i></a>
<a lay-event="edit" shiro:hasPermission="user:update"><i
- class="layui-icon febs-edit-area febs-blue"></i></a>
- <a lay-event="del" shiro:hasPermission="user:delete"><i class="layui-icon febs-edit-area febs-red"></i></a>
+ class="layui-icon febs-edit-area febs-blue"></i></a>
</script>
<!-- 表格操作栏 end -->
<script data-th-inline="none" type="text/javascript">
@@ -148,79 +145,6 @@
});
// 新增下拉组件
- /**
-
- dropdown.render({
- elem: $view.find('.action-more'),
- click: function (name, elem, event) {
- var checkStatus = table.checkStatus('userTable');
- if (name === 'add') {
- febs.modal.open('新增用户', 'system/user/add', {
- btn: ['提交', '重置'],
- area: $(window).width() <= 750 ? '95%' : '50%',
- offset: '30px',
- yes: function (index, layero) {
- $('#user-add').find('#submit').trigger('click');
- },
- btn2: function () {
- $('#user-add').find('#reset').trigger('click');
- return false;
- }
- });
- }
- if (name === 'delete') {
- if (!checkStatus.data.length) {
- febs.alert.warn('请选择需要删除的用户');
- } else {
- febs.modal.confirm('删除用户', '确定删除该用户?', function () {
- var userIds = [];
- layui.each(checkStatus.data, function (key, item) {
- userIds.push(item.userId)
- });
- deleteUsers(userIds.join(','));
- });
- }
- }
- if (name === 'reset') {
- if (!checkStatus.data.length) {
- febs.alert.warn('请选择需要重置密码的用户');
- } else {
- var usernames = [];
- layui.each(checkStatus.data, function (key, item) {
- usernames.push(item.username)
- });
- febs.post(ctx + 'user/password/reset/' + usernames.join(','), null, function () {
- febs.alert.success('所选用户密码已重置为1234qwer');
- });
- }
- }
- if (name === 'export') {
- var params = $.extend(getQueryParams(), {field: sortObject.field, order: sortObject.type});
- params.pageSize = $view.find(".layui-laypage-limits option:selected").val();
- params.pageNum = $view.find(".layui-laypage-em").next().html();
- febs.download(ctx + 'user/excel', params, '用户信息表.xlsx');
- }
- },
- options: [{
- name: 'add',
- title: '新增用户',
- perms: 'user:add'
- }, {
- name: 'delete',
- title: '删除用户',
- perms: 'user:delete'
- }, {
- name: 'reset',
- title: '密码重置',
- perms: 'user:password:reset'
- }, {
- name: 'export',
- title: '导出Excel',
- perms: 'user:export'
- }]
- });
- */
-
// 下拉框选择器
treeSelect.render({
elem: $view.find('#dept'),
@@ -234,20 +158,10 @@
table.on('tool(userTable)', function (obj) {
var data = obj.data,
layEvent = obj.event;
- if (layEvent === 'detail') {
- febs.modal.view('用户信息', 'system/user/detail/' + data.username, {
- area: $(window).width() <= 750 ? '95%' : '660px'
- });
- }
- if (layEvent === 'del') {
- febs.modal.confirm('删除用户', '确定删除该用户?', function () {
- deleteUsers(data.userId);
- });
- }
+
if (layEvent === 'edit') {
- febs.modal.open('修改用户', 'system/user/update/' + data.username, {
- area: $(window).width() <= 750 ? '90%' : '50%',
- offset: '30px',
+ febs.modal.open('身份认证', 'modules/member/memberDetail/' + data.id, {
+ area: $(window).width() <= 1000 ? '100%' : '50%',
btn: ['提交', '取消'],
yes: function (index, layero) {
$('#user-update').find('#submit').trigger('click');
@@ -258,6 +172,7 @@
});
}
});
+
// 查询按钮
$query.on('click', function () {
@@ -281,15 +196,14 @@
id: 'userTable',
url: ctx + 'member/getList',
cols: [[
- {type: 'checkbox'},
- {field: 'phone', title: '手机号', minWidth: 165},
- {field: 'email', title: '邮箱', minWidth: 200},
- {field: 'inviteId', title: '邀请码UID'},
- {field: 'refererId', title: '上级邀请码UID'},
- {title: '账号类型', templet: '#account-type'},
- {title: '账号状态', templet: '#account-status'},
- {title: '审核状态', templet: '#certify-status'},
- {field: 'createTime', title: '注册时间', minWidth: 180},
+ {field: 'phone', title: '手机号', minWidth: 100,align:'left'},
+ {field: 'email', title: '邮箱', minWidth: 200,align:'left'},
+ {field: 'inviteId', title: '邀请码UID', minWidth: 80,align:'center'},
+ {field: 'refererId', title: '上级邀请码UID', minWidth: 80,align:'center'},
+ {title: '账号类型', templet: '#account-type', minWidth: 80,align:'center'},
+ {title: '账号状态', templet: '#account-status', minWidth: 50,align:'center'},
+ {title: '审核状态', templet: '#certify-status', minWidth: 80,align:'center'},
+ {field: 'createTime', title: '注册时间', minWidth: 180,align:'center'},
{title: '操作', toolbar: '#user-option', minWidth: 140, fixed : 'right'}
]]
});
diff --git a/src/main/resources/templates/febs/views/modules/member/memberDetail.html b/src/main/resources/templates/febs/views/modules/member/memberDetail.html
new file mode 100644
index 0000000..f9ca522
--- /dev/null
+++ b/src/main/resources/templates/febs/views/modules/member/memberDetail.html
@@ -0,0 +1,130 @@
+<style>
+ #user-update {
+ padding: 20px 25px 25px 0;
+ }
+
+ #user-update .layui-treeSelect .ztree li a, .ztree li span {
+ margin: 0 0 2px 3px !important;
+ }
+ #user-update #data-permission-tree-block {
+ border: 1px solid #eee;
+ border-radius: 2px;
+ padding: 3px 0;
+ }
+ #user-add .layui-treeSelect .ztree li span.button.switch {
+ top: 1px;
+ left: 3px;
+ }
+
+</style>
+<div class="layui-fluid" id="user-update">
+ <form class="layui-form" action="" lay-filter="user-update-form">
+ <div class="layui-form-item febs-hide">
+ <label class="layui-form-label febs-form-item-require">用户id:</label>
+ <div class="layui-input-block">
+ <input type="text" name="id" data-th-value="${member.id}">
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label febs-form-item-require">真实姓名:</label>
+ <div class="layui-input-block">
+ <input type="text" name="realName" minlength="4" maxlength="10" data-th-id="${member.realName}"
+ lay-verify="range|realName" autocomplete="off" class="layui-input" readonly>
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label febs-form-item-require">姓:</label>
+ <div class="layui-input-block">
+ <input type="text" name="firstName" minlength="4" maxlength="10" data-th-id="${member.firstName}"
+ lay-verify="range|firstName" autocomplete="off" class="layui-input" readonly>
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label febs-form-item-require">名:</label>
+ <div class="layui-input-block">
+ <input type="text" name="secondName" minlength="4" maxlength="10" data-th-id="${member.secondName}"
+ lay-verify="range|secondName" autocomplete="off" class="layui-input" readonly>
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label febs-form-item-require">国家:</label>
+ <div class="layui-input-block">
+ <input type="text" name="nation" minlength="4" maxlength="10" data-th-id="${member.nation}"
+ lay-verify="range|nation" autocomplete="off" class="layui-input" readonly>
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label febs-form-item-require">身份证号:</label>
+ <div class="layui-input-block">
+ <input type="text" name="idcardNo" minlength="4" maxlength="10" data-th-id="${member.idcardNo}"
+ lay-verify="range|idcardNo" autocomplete="off" class="layui-input" readonly>
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label febs-form-item-require">身份证正面:</label>
+ <div class="layui-input-block">
+ <img alt="头像" title="点我更换头像" data-th-src="${member.idcardImageFront}">
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label febs-form-item-require">身份证背面:</label>
+ <div class="layui-input-block">
+ <img alt="头像" title="点我更换头像" data-th-src="${member.idcardImageBack}">
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label febs-form-item-require">手持身份证:</label>
+ <div class="layui-input-block">
+ <img alt="头像" title="点我更换头像" data-th-src="${member.idcardImageInHand}">
+ </div>
+ </div>
+ <div class="layui-form-item febs-hide">
+ <button class="layui-btn" lay-submit="" lay-filter="user-update-form-submit" id="submit"></button>
+ </div>
+ </form>
+</div>
+
+<script data-th-inline="javascript">
+ layui.use(['febs', 'form', 'formSelects', 'validate', 'treeSelect', 'eleTree'], function () {
+ var $ = layui.$,
+ febs = layui.febs,
+ layer = layui.layer,
+ formSelects = layui.formSelects,
+ treeSelect = layui.treeSelect,
+ form = layui.form,
+ eleTree = layui.eleTree,
+ member = [[${member}]],
+ $view = $('#user-update'),
+ validate = layui.validate,
+ _deptTree;
+
+ form.render();
+
+ initUserValue();
+
+ formSelects.render();
+
+ function initUserValue() {
+ form.val("user-update-form", {
+ "id": member.id,
+ "realName": member.realName,
+ "firstName": member.firstName,
+ "secondName": member.secondName,
+ "nation": member.nation,
+ "idcardNo": member.idcardNo,
+ "idcardImageFront": member.idcardImageFront,
+ "idcardImageBack": member.idcardImageBack,
+ "idcardImageInHand": member.idcardImageInHand
+ });
+ }
+
+ form.on('submit(user-update-form-submit)', function (data) {
+ febs.post(ctx + 'member/memberDetailConfirm', data.field, function () {
+ layer.closeAll();
+ febs.alert.success('认证成功');
+ $('#febs-user').find('#query').click();
+ });
+ return false;
+ });
+ });
+</script>
\ No newline at end of file
diff --git a/src/main/resources/templates/febs/views/modules/member/withdrawCoin.html b/src/main/resources/templates/febs/views/modules/member/withdrawCoin.html
new file mode 100644
index 0000000..041579e
--- /dev/null
+++ b/src/main/resources/templates/febs/views/modules/member/withdrawCoin.html
@@ -0,0 +1,192 @@
+<div class="layui-fluid layui-anim febs-anim" id="febs-user" lay-title="提币审核管理">
+ <div class="layui-row febs-container">
+ <div class="layui-col-md12">
+ <div class="layui-card">
+ <div class="layui-card-body febs-table-full">
+ <form class="layui-form layui-table-form" lay-filter="user-table-form">
+ <div class="layui-row">
+ <div class="layui-col-md10">
+ <div class="layui-form-item">
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input type="text" placeholder="手机号/邮箱/邀请码" name="account" autocomplete="off" class="layui-input">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label layui-form-label-sm">状态</label>
+ <div class="layui-input-inline">
+ <select name="statusOption">
+ <option value="0"></option>
+ <option value="1">等待审核</option>
+ <option value="2">同意</option>
+ <option value="3">拒绝</option>
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label layui-form-label-sm">内部转账</label>
+ <div class="layui-input-inline">
+ <select name="isInsideOption">
+ <option value=""></option>
+ <option value="1">是</option>
+ <option value="0">否</option>
+ </select>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="layui-col-md2 layui-col-sm12 layui-col-xs12 table-action-area">
+ <div class="layui-btn layui-btn-sm layui-btn-primary febs-button-blue-plain table-action" id="query">
+ <i class="layui-icon"></i>
+ </div>
+ <div class="layui-btn layui-btn-sm layui-btn-primary febs-button-green-plain table-action" id="reset">
+ <i class="layui-icon"></i>
+ </div>
+ </div>
+ </div>
+ </form>
+ <table lay-filter="userTable" lay-data="{id: 'userTable'}"></table>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+<!-- 表格字段状态格式化 start -->
+<script type="text/html" id="isInside-table">
+ {{#
+ var isInside = {
+ Y: {title: '是' , color: 'red'},
+ N: {title: '否' , color: 'green'},
+ }[d.isInside];
+ }}
+ <span class="layui-badge febs-tag-{{isInside.color}}">{{ isInside.title }}</span>
+</script>
+<script type="text/html" id="status-table">
+ {{#
+ var status = {
+ 1: {title: '等待审核' , color: 'blue'},
+ 2: {title: '同意', color: 'green'},
+ 3: {title: '拒绝' , color: 'red'}
+ }[d.status];
+ }}
+ <span class="layui-badge febs-tag-{{status.color}}">{{ status.title }}</span>
+</script>
+
+<!-- 表格字段状态格式化 start -->
+
+<!-- 表格操作栏 start -->
+<script type="text/html" id="user-option">
+ <span shiro:lacksPermission="user:view,user:update,user:delete">
+ <span class="layui-badge-dot febs-bg-orange"></span> 无权限
+ </span>
+ <a lay-event="confirm" shiro:hasPermission="user:delete">确认</a>
+ <i class="layui-icon febs-edit-area febs-blue"></i>
+ <a lay-event="cancel" shiro:hasPermission="user:delete">拒绝</a>
+</script>
+<!-- 表格操作栏 end -->
+<script data-th-inline="none" type="text/javascript">
+ // 引入组件并初始化
+ layui.use(['dropdown', 'jquery', 'laydate', 'form', 'table', 'febs', 'treeSelect'], function () {
+ var $ = layui.jquery,
+ laydate = layui.laydate,
+ febs = layui.febs,
+ form = layui.form,
+ table = layui.table,
+ treeSelect = layui.treeSelect,
+ dropdown = layui.dropdown,
+ $view = $('#febs-user'),
+ $query = $view.find('#query'),
+ $reset = $view.find('#reset'),
+ $searchForm = $view.find('form'),
+ sortObject = {field: 'createTime', type: null},
+ tableIns;
+
+ form.render();
+
+ // 表格初始化
+ initTable();
+
+ // 下拉框选择器
+ treeSelect.render({
+ elem: $view.find('#dept'),
+ type: 'get',
+ data: ctx + 'dept/select/tree',
+ placeholder: '请选择',
+ search: false
+ });
+
+ // 初始化表格操作栏各个按钮功能
+ table.on('tool(userTable)', function (obj) {
+ var data = obj.data,
+ layEvent = obj.event;
+ if (layEvent === 'confirm') {
+ febs.modal.confirm('确认', '您是否要进行确认提币操作?', function () {
+ confirmUsers(data.id);
+ });
+ }
+ if (layEvent === 'cancel') {
+ febs.modal.confirm('系统取消', '您是否要进行取消操作?', function () {
+ cancelUsers(data.id);
+ });
+ }
+ });
+
+ function confirmUsers(id) {
+ febs.get(ctx + 'member/memberWithdrawCoinConfirm/' + id, null, function () {
+ febs.alert.success('提币成功');
+ $query.click();
+ });
+ }
+ function cancelUsers(id) {
+ febs.get(ctx + 'member/memberWithdrawCoinCancel/' + id, null, function () {
+ febs.alert.success('取消成功');
+ $query.click();
+ });
+ }
+
+ // 查询按钮
+ $query.on('click', function () {
+ var params = $.extend(getQueryParams(), {field: sortObject.field, order: sortObject.type});
+ tableIns.reload({where: params, page: {curr: 1}});
+ });
+
+ // 刷新按钮
+ $reset.on('click', function () {
+ $searchForm[0].reset();
+ treeSelect.revokeNode('dept');
+ sortObject.type = 'null';
+ tableIns.reload({where: getQueryParams(), page: {curr: 1}, initSort: sortObject});
+ });
+
+ function initTable() {
+ tableIns = febs.table.init({
+ elem: $view.find('table'),
+ id: 'userTable',
+ url: ctx + 'member/memberWithdrawCoin',
+ cols: [[
+ {field: 'phone', title: '手机号码', minWidth: 120,align:'left'},
+ {field: 'email', title: '邮箱', minWidth: 200,align:'left'},
+ {field: 'memberId', title: '邀请码UID', minWidth: 100,align:'center'},
+ {field: 'symbol', title: '币种', minWidth: 100,align:'center'},
+ {field: 'amount', title: '提币数量', minWidth: 120,align:'center'},
+ {field: 'address', title: '提币地址', minWidth: 300,align:'center'},
+ {field: 'feeAmount', title: '提币手续费', minWidth: 100,align:'center'},
+ {field: 'createTime', title: '提币时间', minWidth: 180,align:'center'},
+ {title: '内部转账', templet: '#isInside-table', minWidth: 100,align:'center'},
+ {title: '状态', templet: '#status-table', minWidth: 100,align:'center'},
+ {title: '操作', toolbar: '#user-option', minWidth: 150, fixed : 'right'}
+ ]]
+ });
+ }
+
+ // 获取查询参数
+ function getQueryParams() {
+ return {
+ account: $searchForm.find('input[name="account"]').val().trim(),
+ status: $searchForm.find("select[name='statusOption']").val(),
+ isInside: $searchForm.find("select[name='isInsideOption']").val()
+ };
+ }
+
+ })
+</script>
\ No newline at end of file
--
Gitblit v1.9.1