From b5b25cee41e4971917654766715c5e5068fac453 Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Mon, 27 Jul 2020 10:44:56 +0800 Subject: [PATCH] 20200727 代码提交 --- src/main/java/com/xcong/excoin/modules/member/controller/ViewController.java | 10 ++ src/main/java/com/xcong/excoin/modules/member/mapper/MemberMapper.java | 2 src/main/resources/templates/febs/views/modules/member/member.html | 11 ++ src/main/java/com/xcong/excoin/modules/member/service/IMemberService.java | 2 src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java | 53 +++++++++++++ src/main/resources/templates/febs/views/modules/member/memberDetailInfo.html | 141 +++++++++++++++++++++++++++++++++++ src/main/resources/mapper/modules/MemberMapper.xml | 4 + 7 files changed, 222 insertions(+), 1 deletions(-) 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 1b007d6..727637c 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 @@ -148,6 +148,16 @@ return FebsUtil.view("modules/member/memberDetail"); } /** + * 会员列表---个人详情 + */ + @GetMapping("memberDetailInfo/{inviteId}") + @RequiresPermissions("memberDetailInfo:detail") + public String memberDetailInfo(@PathVariable String inviteId, Model model) { + MemberInfoDetailVo data = memberService.selectMemberInfoDetailByInviteId(inviteId); + model.addAttribute("member", data); + return FebsUtil.view("modules/member/memberInfoDetail"); + } + /** * 提币审核管理---个人详情 */ @GetMapping("memberInfoDetail/{id}") diff --git a/src/main/java/com/xcong/excoin/modules/member/mapper/MemberMapper.java b/src/main/java/com/xcong/excoin/modules/member/mapper/MemberMapper.java index e2abe3b..bc9c73c 100644 --- a/src/main/java/com/xcong/excoin/modules/member/mapper/MemberMapper.java +++ b/src/main/java/com/xcong/excoin/modules/member/mapper/MemberMapper.java @@ -222,5 +222,7 @@ IPage<MemberAccountInfoVo> findmemberAccountInfoAloneTestListInPage(Page<MemberEntity> page, @Param("record")MemberEntity memberEntity); + + MemberEntity selectMemberInfoDetailByInviteId(String inviteId); } 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 7a5d3e1..6e0adfe 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 @@ -93,4 +93,6 @@ IPage<MemberDataInfoVo> findMemberDataInfoAllAloneTestListInPage(MemberEntity memberEntity, QueryRequest request); + MemberInfoDetailVo selectMemberInfoDetailByInviteId(String inviteId); + } 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 163b15e..4ff330c 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 @@ -1274,4 +1274,57 @@ return selectMemberListInPage; } + + @Override + public MemberInfoDetailVo selectMemberInfoDetailByInviteId(String inviteId) { + MemberEntity memberEntity = memberMapper.selectMemberInfoDetailByInviteId(inviteId); + Long memberId = memberEntity.getId(); + MemberInfoDetailVo memberInfoDetailVo = new MemberInfoDetailVo(); + + //USDT充币总额+USDT提币总额 + String totalAmountUsdtB = memberMapper.selectTotalAmountUsdtBForBasicRealDataBymemberId(memberId); + memberInfoDetailVo.setChargeCoin(totalAmountUsdtB == null ? 0 : Double.parseDouble(totalAmountUsdtB)); + String totalAmountUsdtS = memberMapper.selectTotalAmountUsdtSForBasicRealDataBymemberId(memberId); + memberInfoDetailVo.setAppealCoin(totalAmountUsdtS == null ? 0 : Double.parseDouble(totalAmountUsdtS)); + //USDT充值总额+USDT提现总额 + String totalAmountUsdtCZ = memberMapper.selectTotalAmountUsdtCZForBasicRealDataBymemberId(memberId); + memberInfoDetailVo.setChargeUsdt(totalAmountUsdtCZ == null ? 0 : Double.parseDouble(totalAmountUsdtCZ)); + String totalAmountUsdtTX = memberMapper.selectTotalAmountUsdtTXForBasicRealDataBymemberId(memberId); + memberInfoDetailVo.setAppealUsdt(totalAmountUsdtTX == null ? 0 : Double.parseDouble(totalAmountUsdtTX)); + //总剩余 + double platformProfitAndLoss = 0 ; + platformProfitAndLoss = platformProfitAndLoss + (totalAmountUsdtB == null ? 0 : Double.parseDouble(totalAmountUsdtB)); + platformProfitAndLoss = platformProfitAndLoss + (totalAmountUsdtCZ == null ? 0 : Double.parseDouble(totalAmountUsdtCZ)); + platformProfitAndLoss = platformProfitAndLoss - (totalAmountUsdtS == null ? 0 : Double.parseDouble(totalAmountUsdtS)); + platformProfitAndLoss = platformProfitAndLoss - (totalAmountUsdtTX == null ? 0 : Double.parseDouble(totalAmountUsdtTX)); + memberInfoDetailVo.setTotalCoin(platformProfitAndLoss); + //佣金 + String returnMoneyByMid = memberMapper.selectReturnMoneyForBasicRealDataBymemberId(memberId); + memberInfoDetailVo.setFee(returnMoneyByMid == null ? 0 : Double.parseDouble(returnMoneyByMid)); + //开仓手续费总额 + String closingpriceByMid = memberMapper.selectClosingpriceForBasicRealDataBymemberId(memberId); + memberInfoDetailVo.setClosingPrice(closingpriceByMid == null ? 0 : Double.parseDouble(closingpriceByMid)); + //平仓总手续费 + String sellClosingpriceByMid = memberMapper.selectSellClosingpriceForBasicRealDataBymemberId(memberId); + memberInfoDetailVo.setSellClosingPrice(sellClosingpriceByMid == null ? 0 : Double.parseDouble(sellClosingpriceByMid)); + + //总盈亏 + String rewardratioByMid = memberMapper.selectRewardratioForBasicRealDataBymemberId(memberId); + memberInfoDetailVo.setPlatformProfitAndLoss(rewardratioByMid == null ? 0 : Double.parseDouble(rewardratioByMid)); + + //持仓手续费 + String doingPrice = memberMapper.selectprepriceForBasicRealDataBymemberId(memberId); + memberInfoDetailVo.setDoingPrice(doingPrice == null ? 0 : Double.parseDouble(doingPrice)); + + //账户金额 + String walletNum = memberMapper.selectBBZCForBasicRealDataBymemberId(memberId); + memberInfoDetailVo.setWalletCoinNum(walletNum == null ? 0 : Double.parseDouble(walletNum)); + String walletCoinNum = memberMapper.selectHYZCForBasicRealDataBymemberId(memberId); + memberInfoDetailVo.setTotalContract(walletCoinNum == null ? 0 : Double.parseDouble(walletCoinNum)); + String agentNum = memberMapper.selectDLZCForBasicRealDataBymemberId(memberId); + memberInfoDetailVo.setAgentNum(agentNum == null ? 0 : Double.parseDouble(agentNum)); + + return memberInfoDetailVo; + } + } diff --git a/src/main/resources/mapper/modules/MemberMapper.xml b/src/main/resources/mapper/modules/MemberMapper.xml index aa41fe4..c1ab94c 100644 --- a/src/main/resources/mapper/modules/MemberMapper.xml +++ b/src/main/resources/mapper/modules/MemberMapper.xml @@ -1453,4 +1453,8 @@ select id from member where FIND_IN_SET(#{inviteId},referer_ids) </select> + <select id="selectMemberInfoDetailByInviteId" resultType="java.lang.String"> + select * from member where invite_id = #{inviteId} + </select> + </mapper> \ 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 eed7d4d..b99c9db 100644 --- a/src/main/resources/templates/febs/views/modules/member/member.html +++ b/src/main/resources/templates/febs/views/modules/member/member.html @@ -103,6 +103,11 @@ } }); } + if (layEvent === 'examine') { + febs.modal.open( '个人数据详情', 'modules/member/memberDetailInfo/' + data.inviteId, { + maxmin: true, + }); + } }); @@ -128,7 +133,11 @@ {field: 'phone', title: '手机号', minWidth: 100,align:'left'}, {field: 'email', title: '邮箱', minWidth: 200,align:'left'}, {field: 'realName', title: '姓名', minWidth: 200,align:'left'}, - {field: 'inviteId', title: '邀请码UID', minWidth: 80,align:'center'}, + {field: 'inviteId', title: '邀请码UID', + templet: function (d) { + return '<a lay-event="examine" shiro:hasPermission="user:update">'+d.inviteId+'</a>' + } + }, minWidth: 80,align:'center'}, {field: 'refererId', title: '上级邀请码UID', minWidth: 80,align:'center'}, {field: 'accountType', title: '账号类型', templet: function (d) { diff --git a/src/main/resources/templates/febs/views/modules/member/memberDetailInfo.html b/src/main/resources/templates/febs/views/modules/member/memberDetailInfo.html new file mode 100644 index 0000000..f4bd0c5 --- /dev/null +++ b/src/main/resources/templates/febs/views/modules/member/memberDetailInfo.html @@ -0,0 +1,141 @@ +<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"> + <label class="layui-form-label febs-form-item-require">币币余额:</label> + <div class="layui-input-block"> + <input type="text" name="walletCoinNum" minlength="4" maxlength="10" data-th-id="${member.walletCoinNum}" + lay-verify="range|walletCoinNum" 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="totalContract" minlength="4" maxlength="10" data-th-id="${member.totalContract}" + lay-verify="range|totalContract" 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="agentNum" minlength="4" maxlength="10" data-th-id="${member.agentNum}" + lay-verify="range|agentNum" 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="fee" minlength="4" maxlength="10" data-th-id="${member.fee}" + lay-verify="range|fee" 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="chargeUsdt" minlength="4" maxlength="10" data-th-id="${member.chargeUsdt}" + lay-verify="range|chargeUsdt" 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="appealUsdt" minlength="4" maxlength="10" data-th-id="${member.appealUsdt}" + lay-verify="range|appealUsdt" 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="chargeCoin" minlength="4" maxlength="10" data-th-id="${member.chargeCoin}" + lay-verify="range|chargeCoin" 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="appealCoin" minlength="4" maxlength="10" data-th-id="${member.appealCoin}" + lay-verify="range|appealCoin" 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="platformProfitAndLoss" minlength="4" maxlength="10" data-th-id="${member.platformProfitAndLoss}" + lay-verify="range|platformProfitAndLoss" 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="closingPrice" minlength="4" maxlength="10" data-th-id="${member.closingPrice}" + lay-verify="range|closingPrice" 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="sellClosingPrice" minlength="4" maxlength="10" data-th-id="${member.sellClosingPrice}" + lay-verify="range|sellClosingPrice" 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="doingPrice" minlength="4" maxlength="10" data-th-id="${member.doingPrice}" + lay-verify="range|doingPrice" autocomplete="off" class="layui-input" readonly> + </div> + </div> + </form> +</div> + +<script data-th-inline="javascript"> + layui.use(['febs', 'form'], function () { + var $ = layui.$, + febs = layui.febs, + layer = layui.layer, + form = layui.form, + member = [[${member}]], + $view = $('#user-update'), + validate = layui.validate, + _deptTree; + + form.render(); + initUserValue(); + + function initUserValue() { + form.val("user-update-form", { + "doingPrice": member.doingPrice, + "sellClosingPrice": member.sellClosingPrice, + "closingPrice": member.closingPrice, + "platformProfitAndLoss": member.platformProfitAndLoss, + "appealCoin": member.appealCoin, + "chargeCoin": member.chargeCoin, + "appealUsdt": member.appealUsdt, + "chargeUsdt": member.chargeUsdt, + "fee": member.fee, + "agentNum": member.agentNum, + "totalContract": member.totalContract, + "walletCoinNum": member.walletCoinNum, + "totalCoin": member.totalCoin + }); + } + }); +</script> \ No newline at end of file -- Gitblit v1.9.1