src/main/java/com/xcong/excoin/modules/trademanage/service/impl/TradeManageServiceImpl.java
@@ -114,9 +114,21 @@ Page<MemberEntity> page = new Page<>(request.getPageNum(), request.getPageSize()); IPage<MemberAccountInfoVo> selectMemberListInPage = memberMapper.findMemberAccountInfoListInPage(page, memberEntity); List<MemberAccountInfoVo> records = selectMemberListInPage.getRecords(); if(records.size() > 0) { if(CollUtil.isNotEmpty(records)) { for(MemberAccountInfoVo memberAccountInfoVo : records) { Long memberId = memberAccountInfoVo.getId(); Map<String, Object> columnMap = new HashMap<>(); columnMap.put("member_id", memberId); List<MemberAuthenticationEntity> selectByMap = memberAuthenticationMapper.selectByMap(columnMap ); if(CollUtil.isNotEmpty(selectByMap)) { MemberAuthenticationEntity memberAuthenticationEntity = selectByMap.get(0); String firstName = memberAuthenticationEntity.getFirstName(); String secondName = memberAuthenticationEntity.getSecondName(); String realName = firstName + secondName; memberAccountInfoVo.setRealName(realName); } //总盈亏 String rewardratioByMid = memberMapper.selectRewardratioForBasicRealDataBymid(memberId); BigDecimal bd=new BigDecimal(rewardratioByMid); @@ -127,11 +139,12 @@ }else { memberAccountInfoVo.setIsSuAccount(1); } Map<String, Object> columnMap = new HashMap<>(); Map<String, Object> columnMaps = new HashMap<>(); columnMap.put("member_id", memberId); List<MemberWalletAgentEntity> selectByMap = memberWalletAgentMapper.selectByMap(columnMap); if(selectByMap.size() > 0) { BigDecimal availableBalance = selectByMap.get(0).getAvailableBalance(); List<MemberWalletAgentEntity> selectByMaps = memberWalletAgentMapper.selectByMap(columnMaps); if(CollUtil.isNotEmpty(selectByMaps)) { BigDecimal availableBalance = selectByMaps.get(0).getAvailableBalance(); memberAccountInfoVo.setAgentAvailableBalance(availableBalance); } src/main/java/com/xcong/excoin/modules/trademanage/vo/MemberAccountInfoVo.java
@@ -1,6 +1,8 @@ package com.xcong.excoin.modules.trademanage.vo; import java.math.BigDecimal; import com.baomidou.mybatisplus.annotation.TableField; import com.xcong.excoin.common.entity.BaseEntity; import lombok.Data; @@ -63,5 +65,9 @@ * 姓名 */ private String realName; /** * 查询条件:账号类型 */ private String isTest; } src/main/resources/mapper/modules/MemberMapper.xml
@@ -124,6 +124,9 @@ <if test="record.account!=null and record.account!=''"> and (m.phone = #{record.account} or m.email = #{record.account} or m.invite_id=#{record.account}) </if> <if test="record.isTest!=null and record.isTest!=''"> and m.account_type= #{record.isTest} </if> </where> order by m.create_time desc </select> src/main/resources/templates/febs/views/modules/trademanage/accountInfo.html
@@ -12,6 +12,16 @@ <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="isTest"> <option value=""></option> <option value="1">正常账号</option> <option value="2">测试账号</option> </select> </div> </div> </div> </div> <div class="layui-col-md2 layui-col-sm12 layui-col-xs12 table-action-area"> @@ -59,8 +69,7 @@ // 刷新按钮 $reset.on('click', function () { $searchForm[0].reset(); sortObject.type = 'null'; tableIns.reload({where: getQueryParams(), page: {curr: 1}, initSort: sortObject}); tableIns.reload({where: getQueryParams(), page: {curr: 1}}); }); function initTable() { @@ -71,6 +80,7 @@ totalRow: true, cols: [[ {field: 'phone', title: '手机号', minWidth: 100,align:'left'}, {field: 'realName', title: '姓名', minWidth: 120,align:'left'}, {field: 'email', title: '邮箱', minWidth: 200,align:'left'}, {field: 'inviteId', title: '邀请码UID', minWidth: 80,align:'center'}, {field: 'rewardratioByMid', title: '盈亏', @@ -96,6 +106,15 @@ return '' } }, minWidth: 80,align:'center',totalRow: true}, {field: 'accountType', title: '账号类型', templet: function (d) { if (d.accountType === 2) { return '<span style="color:red;">测试账号</span>' } else { return '<span style="color:green;">正常账号</span>' } },minWidth: 100,align:'center'}, {field: 'agentAvailableBalance', title: '代理账户', minWidth: 80,align:'center',totalRow: true} ]] }); @@ -105,6 +124,7 @@ function getQueryParams() { return { account: $searchForm.find('input[name="account"]').val().trim(), isTest: $searchForm.find("select[name='isTest']").val(), }; }