12 files modified
2 files added
| | |
| | | Map<String, Object> data = getDataTable(dappMemberService.getOutFlowListByDay(memberCoinWithdrawEntity,request)); |
| | | return new FebsResponse().success().data(data); |
| | | } |
| | | |
| | | /** |
| | | * 用户列表-团队详情 |
| | | */ |
| | | @GetMapping("teamInfo") |
| | | public FebsResponse teamInfo(DappMemberEntity dappMemberEntity, QueryRequest request, Integer parentId) { |
| | | if (parentId == null) { |
| | | ViewController.idMemberTeamInfo = 0L; |
| | | } |
| | | User currentUser = FebsUtil.getCurrentUser(); |
| | | if(ObjectUtil.isNotEmpty(currentUser.getDescription())){ |
| | | dappMemberEntity.setDescription(currentUser.getDescription()); |
| | | } |
| | | dappMemberEntity.setId(ViewController.idMemberTeamInfo); |
| | | |
| | | Map<String, Object> data = getDataTable(dappMemberService.getTeamInfo(dappMemberEntity,request)); |
| | | return new FebsResponse().success().data(data); |
| | | } |
| | | } |
| | |
| | | return FebsUtil.view("dapp/money-total-flow-out"); |
| | | } |
| | | |
| | | public static long idMemberTeamInfo; |
| | | /** |
| | | * 用户列表-团队详情 |
| | | * @param id |
| | | * @param model |
| | | * @return |
| | | */ |
| | | @GetMapping("/teamInfo/{id}") |
| | | @RequiresPermissions("teamInfo:update") |
| | | public String teamInfo(@PathVariable long id, Model model) { |
| | | idMemberTeamInfo = id; |
| | | DappMemberEntity data = dappMemberDao.selectById(id); |
| | | model.addAttribute("teamInfo", data); |
| | | return FebsUtil.view("dapp/teamInfo"); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | @TableField(exist = false) |
| | | private BigDecimal availableAmount; |
| | | |
| | | @TableField(exist = false) |
| | | private String refererName; |
| | | } |
| | |
| | | import cc.mrbird.febs.dapp.dto.TeamListDto; |
| | | import cc.mrbird.febs.dapp.entity.*; |
| | | import cc.mrbird.febs.dapp.vo.AdminMemberCoinWithdrawVo; |
| | | import cc.mrbird.febs.dapp.vo.AdminTeamInfoVo; |
| | | import cc.mrbird.febs.dapp.vo.ApiMyTeammateInfoListVo; |
| | | import cc.mrbird.febs.dapp.vo.TeamListVo; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | |
| | | IPage<MemberCoinChargeEntity> getChargeListByDayInPage(Page<MemberCoinChargeEntity> page, @Param("record")MemberCoinChargeEntity memberCoinChargeEntity); |
| | | |
| | | IPage<AdminMemberCoinWithdrawVo> getWithDrawListByDayInPage(Page<AdminMemberCoinWithdrawVo> page, @Param("record")MemberCoinWithdrawEntity memberCoinWithdrawEntity); |
| | | |
| | | IPage<AdminTeamInfoVo> findTeamInfoListInPage(Page<AdminTeamInfoVo> page, @Param("record")DappMemberEntity dappMemberEntity); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | @Param("record")MemberCoinChargeEntity memberCoinChargeEntity); |
| | | |
| | | AdminMemberChargeVo selectTotalAmountByCreateTimeAndInviteId(@Param("createTime") Date createTime, @Param("description") String description); |
| | | |
| | | BigDecimal selectTotalAmountByMemberId(@Param("memberId")Long memberId); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | public interface MemberCoinWithdrawDao extends BaseMapper<MemberCoinWithdrawEntity> { |
| | |
| | | Integer selectByMemberIdAndCreateTime(@Param("memberId")Long memberIdOut, @Param("createTime")String createTime, @Param("type")String type); |
| | | |
| | | AdminMemberWithdrawVo selectTotalAmountByCreateTimeAndInviteId(@Param("createTime") Date createTime, @Param("description") String description); |
| | | |
| | | BigDecimal selectTotalAmountByMemberIdAndType(@Param("memberId") Long memberId, @Param("inside") String n); |
| | | } |
| | |
| | | IPage<MemberCoinChargeEntity> getFlowListByDay(MemberCoinChargeEntity memberCoinChargeEntity, QueryRequest request); |
| | | |
| | | IPage<AdminMemberCoinWithdrawVo> getOutFlowListByDay(MemberCoinWithdrawEntity memberCoinWithdrawEntity, QueryRequest request); |
| | | |
| | | IPage<AdminTeamInfoVo> getTeamInfo(DappMemberEntity dappMemberEntity, QueryRequest request); |
| | | } |
| | |
| | | import cn.hutool.crypto.asymmetric.RSA; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | private final IgtOnHookPlanOrderDao igtOnHookPlanOrderDao; |
| | | private final AppVersionMapper appVersionMapper; |
| | | private final DappMessageDao dappMessageDao; |
| | | private final MemberCoinChargeDao memberCoinChargeDao; |
| | | private final MemberCoinWithdrawDao memberCoinWithdrawDao; |
| | | |
| | | private final RedisTemplate<String, Object> redisTemplate; |
| | | |
| | |
| | | return adminMemberCoinWithdrawVos; |
| | | } |
| | | |
| | | @Override |
| | | public IPage<AdminTeamInfoVo> getTeamInfo(DappMemberEntity dappMemberEntity, QueryRequest request) { |
| | | Page<AdminTeamInfoVo> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | dappMemberEntity = this.baseMapper.selectById(dappMemberEntity.getId()); |
| | | IPage<AdminTeamInfoVo> adminTeamInfoVoIPage = this.baseMapper.findTeamInfoListInPage(page, dappMemberEntity); |
| | | List<AdminTeamInfoVo> records = adminTeamInfoVoIPage.getRecords(); |
| | | if(CollUtil.isNotEmpty(records)){ |
| | | for(AdminTeamInfoVo adminTeamInfoVo : records){ |
| | | Long memberId = adminTeamInfoVo.getId(); |
| | | //获取团队成员的主要信息 |
| | | DappWalletCoinEntity dappWalletCoinEntity = dappWalletCoinDao.selectByMemberId(memberId); |
| | | adminTeamInfoVo.setTotalAmount(dappWalletCoinEntity.getTotalAmount()); |
| | | adminTeamInfoVo.setAvaAmount(dappWalletCoinEntity.getAvailableAmount()); |
| | | adminTeamInfoVo.setFrozenAmount(dappWalletCoinEntity.getFrozenAmount()); |
| | | |
| | | BigDecimal chargeAmount = memberCoinChargeDao.selectTotalAmountByMemberId(memberId); |
| | | adminTeamInfoVo.setChargeAmount(chargeAmount); |
| | | |
| | | BigDecimal withDrawAmount = memberCoinWithdrawDao.selectTotalAmountByMemberIdAndType(memberId,"N"); |
| | | adminTeamInfoVo.setWithDrawAmount(withDrawAmount); |
| | | BigDecimal insideAmount = memberCoinWithdrawDao.selectTotalAmountByMemberIdAndType(memberId,"Y"); |
| | | adminTeamInfoVo.setInsideAmount(insideAmount); |
| | | |
| | | QueryWrapper<IgtOnHookPlanOrder> objectQueryWrapper = new QueryWrapper<>(); |
| | | objectQueryWrapper.eq("member_id",memberId); |
| | | Integer onHookTimes = igtOnHookPlanOrderDao.selectCount(objectQueryWrapper); |
| | | adminTeamInfoVo.setOnHookTimes(onHookTimes); |
| | | BigDecimal totalProfit = igtOnHookPlanOrderDao.selectSumProfitByMemberId(memberId); |
| | | adminTeamInfoVo.setTotalProfit(totalProfit); |
| | | } |
| | | } |
| | | return adminTeamInfoVoIPage; |
| | | } |
| | | |
| | | public String generateAsaToken(String token) { |
| | | RSA rsa = new RSA(null, AppContants.PUBLIC_KEY); |
| | | return rsa.encryptBase64(token + "_" + System.currentTimeMillis(), KeyType.PublicKey); |
| New file |
| | |
| | | package cc.mrbird.febs.dapp.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | @ApiModel(value = "AdminTeamInfoVo", description = "团队详情信息") |
| | | public class AdminTeamInfoVo { |
| | | private String username; |
| | | private Long id; |
| | | //总金额 |
| | | private BigDecimal totalAmount; |
| | | //可用 |
| | | private BigDecimal avaAmount; |
| | | //冻结 |
| | | private BigDecimal FrozenAmount; |
| | | //充值金额 |
| | | private BigDecimal chargeAmount; |
| | | //提现金额 |
| | | private BigDecimal withDrawAmount; |
| | | //内转金额 |
| | | private BigDecimal insideAmount; |
| | | //挂机次数 |
| | | private Integer onHookTimes; |
| | | //总收益 |
| | | private BigDecimal totalProfit; |
| | | } |
| | |
| | | |
| | | <select id="selectInPage" resultType="cc.mrbird.febs.dapp.entity.DappMemberEntity"> |
| | | select a.*, |
| | | c.username refererName, |
| | | b.total_amount totalAmount, |
| | | b.frozen_amount frozenAmount, |
| | | b.available_amount availableAmount |
| | | from dapp_member a |
| | | left join dapp_wallet_coin b on a.id = b.member_id |
| | | left join dapp_member c on a.referer_id = c.invite_id |
| | | <where> |
| | | <!-- <if test="record.currentUser != null">--> |
| | | <!-- and referer_id = (select invite_id from dapp_user_member_relate where user_id=#{record.currentUser})--> |
| | |
| | | </where> |
| | | order by a.create_time desc |
| | | </select> |
| | | |
| | | <select id="findTeamInfoListInPage" resultType="cc.mrbird.febs.dapp.vo.AdminTeamInfoVo"> |
| | | select |
| | | a.username username, |
| | | a.id id |
| | | from dapp_member a |
| | | where |
| | | (a.id in (select id from dapp_member where FIND_IN_SET(#{record.inviteId}, referer_ids))) |
| | | order by a.create_time desc |
| | | </select> |
| | | </mapper> |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectTotalAmountByMemberId" resultType="java.math.BigDecimal"> |
| | | SELECT IFNULL(sum(amount),0) FROM member_coin_charge |
| | | WHERE member_id = #{memberId} |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | |
| | | </select> |
| | | |
| | | <select id="selectTotalAmountByMemberIdAndType" resultType="java.math.BigDecimal"> |
| | | SELECT |
| | | IFNULL(sum(amount),0) |
| | | FROM |
| | | member_coin_withdraw |
| | | WHERE |
| | | is_inside = #{inside} |
| | | and member_id = #{memberId} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | table.on('tool(memberTable)', function (obj) { |
| | | var data = obj.data, |
| | | layEvent = obj.event; |
| | | |
| | | if (layEvent === 'teamInfo') { |
| | | febs.modal.open( '团队详情', 'dappView/teamInfo/' + data.id, { |
| | | maxmin: true, |
| | | }); |
| | | } |
| | | if (layEvent === 'resetTransferCode') { |
| | | febs.modal.confirm('资金密码', '是否重置资金密码为:123456?', function () { |
| | | resetTransferCode(data.id); |
| | |
| | | cols: [[ |
| | | // {type: 'checkbox'}, |
| | | // {type: 'numbers'}, |
| | | {field: 'username', title: '用户名', minWidth: 120}, |
| | | // {field: 'username', title: '用户名', minWidth: 120}, |
| | | {title: '用户名', |
| | | templet: function (d) { |
| | | return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="teamInfo" shiro:hasPermission="teamInfo:update"><span>'+d.username+'</span></button>' |
| | | },minWidth: 130,align:'center'}, |
| | | {field: 'identity', title: '会员', |
| | | templet: function (d) { |
| | | if (d.identity === 'LEVEL_TM') { |
| | |
| | | {field: 'availableAmount', title: '可用余额', minWidth: 100}, |
| | | {field: 'frozenAmount', title: '冻结金额', minWidth: 100}, |
| | | {field: 'inviteId', title: '邀请码', minWidth: 100}, |
| | | {field: 'refererId', title: '上级邀请码', minWidth: 130}, |
| | | {field: 'refererName', title: '上级', minWidth: 130}, |
| | | {field: 'createTime', title: '创建时间', minWidth: 180}, |
| | | ,{field: 'accountStatus', title: '账户状态',templet: '#isAccountStatus', minWidth: 180}, |
| | | // {title: '账户状态', templet: '#user-status', minWidth: 120}, |
| New file |
| | |
| | | <div className="layui-fluid layui-anim febs-anim" id="febs-team-info" lay-title="团队详情"> |
| | | <div className="layui-row febs-container"> |
| | | <div className="layui-col-md12"> |
| | | <div className="layui-card"> |
| | | <div className="layui-card-body febs-table-full"> |
| | | <table lay-filter="teamInfoChild" lay-data="{id: 'teamInfoChild'}"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script data-th-inline="none" type="text/javascript"> |
| | | layui.use(['jquery', 'form', 'table', 'febs'], function () { |
| | | var $ = layui.jquery, |
| | | febs = layui.febs, |
| | | form = layui.form, |
| | | table = layui.table, |
| | | $view = $('#febs-team-info'), |
| | | tableIns; |
| | | |
| | | form.render(); |
| | | |
| | | initTable(); |
| | | |
| | | function initTable() { |
| | | tableIns = febs.table.init({ |
| | | elem: $view.find('table'), |
| | | id: 'teamInfoChild', |
| | | url: ctx + 'member/teamInfo?parentId=1', |
| | | cols: [[ |
| | | {field: 'username', title: '用户名', minWidth: 100}, |
| | | {field: 'totalAmount', title: '总金额', minWidth: 100}, |
| | | {field: 'avaAmount', title: '可用金额', minWidth: 100}, |
| | | {field: 'FrozenAmount', title: '冻结金额', minWidth: 100}, |
| | | {field: 'chargeAmount', title: '充值金额', minWidth: 100}, |
| | | {field: 'withDrawAmount', title: '提现金额', minWidth: 100}, |
| | | {field: 'insideAmount', title: '内转金额', minWidth: 100}, |
| | | {field: 'onHookTimes', title: '挂机次数', minWidth: 100}, |
| | | {field: 'totalProfit', title: '总收益', minWidth: 100}, |
| | | ]] |
| | | }); |
| | | } |
| | | |
| | | }) |
| | | </script> |