xiaoyong931011
2022-12-02 6feca7b6f433cf4558ad8423d6eb0ff109880c78
20221130
12 files modified
6 files added
604 ■■■■■ changed files
src/main/java/cc/mrbird/febs/dapp/controller/MemberController.java 40 ●●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/dapp/controller/ViewController.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/dapp/entity/DappSystemProfit.java 4 ●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/dapp/mapper/DappMemberDao.java 3 ●●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/dapp/mapper/DappSystemProfitDao.java 8 ●●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/dapp/service/DappMemberService.java 11 ●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/dapp/service/impl/DappMemberServiceImpl.java 41 ●●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/dapp/vo/AdminDappSystemProfitVo.java 20 ●●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/dapp/vo/AdminSystemProfitFlowListVo.java 23 ●●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/dapp/vo/AdminTeamInfoVo.java 31 ●●●●● patch | view | raw | blame | history
src/main/resources/application-dev.yml 16 ●●●● patch | view | raw | blame | history
src/main/resources/mapper/dapp/DappMemberDao.xml 13 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/dapp/DappSystemProfitDao.xml 35 ●●●●● patch | view | raw | blame | history
src/main/resources/templates/febs/views/dapp/member-teamInfo.html 45 ●●●●● patch | view | raw | blame | history
src/main/resources/templates/febs/views/dapp/member.html 44 ●●●●● patch | view | raw | blame | history
src/main/resources/templates/febs/views/dapp/money-change-flow.html 11 ●●●●● patch | view | raw | blame | history
src/main/resources/templates/febs/views/dapp/system-profit-flow.html 70 ●●●●● patch | view | raw | blame | history
src/main/resources/templates/febs/views/dapp/system-profit.html 146 ●●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/dapp/controller/MemberController.java
@@ -3,12 +3,16 @@
import cc.mrbird.febs.common.controller.BaseController;
import cc.mrbird.febs.common.entity.FebsResponse;
import cc.mrbird.febs.common.entity.QueryRequest;
import cc.mrbird.febs.common.utils.FebsUtil;
import cc.mrbird.febs.dapp.chain.ChainService;
import cc.mrbird.febs.dapp.dto.PriceSettingDto;
import cc.mrbird.febs.dapp.entity.DappMemberEntity;
import cc.mrbird.febs.dapp.entity.DappSystemProfit;
import cc.mrbird.febs.dapp.entity.DappTransferRecordEntity;
import cc.mrbird.febs.dapp.service.DappMemberService;
import cc.mrbird.febs.dapp.vo.AdminSystemFeeVo;
import cc.mrbird.febs.system.entity.User;
import cn.hutool.core.util.ObjectUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Param;
@@ -89,4 +93,40 @@
        dappMemberService.setSystemFee(adminSystemFeeVo);
        return new FebsResponse().success();
    }
    /**
     * 动能列表
     * @return
     */
    @RequestMapping(value = "/systemProfitList")
    public FebsResponse systemProfitList(DappSystemProfit dappSystemProfit, QueryRequest request) {
        return new FebsResponse().success().data(getDataTable(dappMemberService.selectSystemProfitInPage(dappSystemProfit, request)));
    }
    /**
     * 动能列表-流水详情
     * @return
     */
    @GetMapping("getSystemProfitFlowList")
    public FebsResponse getSystemProfitFlowList(DappSystemProfit dappSystemProfit, QueryRequest request, Integer parentId) {
        if (parentId == null) {
            ViewController.systemProfitId = 0L;
        }
        dappSystemProfit.setId(ViewController.systemProfitId);
        Map<String, Object> data = getDataTable(dappMemberService.getSystemProfitFlowList(dappSystemProfit, request));
        return new FebsResponse().success().data(data);
    }
    /**
     * 用户列表-团队详情
     */
    @GetMapping("teamInfo")
    public FebsResponse teamInfo(DappMemberEntity dappMemberEntity, QueryRequest request, Integer parentId) {
        if (parentId == null) {
            ViewController.teamInfoMemberId = 0L;
        }
        dappMemberEntity.setId(ViewController.teamInfoMemberId);
        Map<String, Object> data = getDataTable(dappMemberService.getTeamInfo(dappMemberEntity,request));
        return new FebsResponse().success().data(data);
    }
}
src/main/java/cc/mrbird/febs/dapp/controller/ViewController.java
@@ -4,8 +4,11 @@
import cc.mrbird.febs.common.entity.FebsConstant;
import cc.mrbird.febs.common.utils.FebsUtil;
import cc.mrbird.febs.common.utils.RedisUtils;
import cc.mrbird.febs.dapp.entity.DappMemberEntity;
import cc.mrbird.febs.dapp.entity.DappSystemProfit;
import cc.mrbird.febs.dapp.entity.DataDictionaryCustom;
import cc.mrbird.febs.dapp.enumerate.DataDictionaryEnum;
import cc.mrbird.febs.dapp.mapper.DappSystemProfitDao;
import cc.mrbird.febs.dapp.mapper.DataDictionaryCustomMapper;
import cc.mrbird.febs.dapp.service.DappMemberService;
import cc.mrbird.febs.dapp.vo.AdminSystemFeeVo;
@@ -31,6 +34,7 @@
    private final RedisUtils redisUtils;
    private final DataDictionaryCustomMapper dataDictionaryCustomMapper;
    private final DappSystemProfitDao dappSystemProfitDao;
    @GetMapping(value = "admin")
    @RequiresPermissions("admin:view")
@@ -151,4 +155,43 @@
        model.addAttribute("systemFee", adminSystemFeeVo);
        return FebsUtil.view("dapp/system-fee-set");
    }
    /**
     * 动能列表
     * @return
     */
    @GetMapping(value = "systemProfit")
    @RequiresPermissions("systemProfit:view")
    public String systemProfit() {
        return FebsUtil.view("dapp/system-profit");
    }
    public static long systemProfitId;
    /**
     * 动能列表-流水详情
     * @param id
     * @param model
     * @return
     */
    @GetMapping("/systemProfitFlow/{id}")
    @RequiresPermissions("systemProfitFlow:view")
    public String systemProfitFlow(@PathVariable long id, Model model) {
        systemProfitId = id;
        return FebsUtil.view("dapp/system-profit-flow");
    }
    public static long teamInfoMemberId;
    /**
     * 用户列表-团队详情
     * @param id
     * @param model
     * @return
     */
    @GetMapping("/teamInfo/{id}")
    @RequiresPermissions("teamInfo:view")
    public String teamInfo(@PathVariable long id, Model model) {
        teamInfoMemberId = id;
        return FebsUtil.view("dapp/member-teamInfo");
    }
}
src/main/java/cc/mrbird/febs/dapp/entity/DappSystemProfit.java
@@ -1,6 +1,7 @@
package cc.mrbird.febs.dapp.entity;
import cc.mrbird.febs.common.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@@ -26,4 +27,7 @@
        this.memberId = memberId;
        this.amount = amount;
    }
    @TableField(exist = false)
    private String address;
}
src/main/java/cc/mrbird/febs/dapp/mapper/DappMemberDao.java
@@ -1,6 +1,7 @@
package cc.mrbird.febs.dapp.mapper;
import cc.mrbird.febs.dapp.entity.DappMemberEntity;
import cc.mrbird.febs.dapp.vo.AdminTeamInfoVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -50,4 +51,6 @@
    List<DappMemberEntity> selectMemberInfoByRefererId(@Param("refererId")String inviteId);
    Integer selectCountByAccountTypeAndRefererId(@Param("accountType")String code, @Param("refererId")String inviteId);
    IPage<AdminTeamInfoVo> findTeamInfoListInPage(Page<AdminTeamInfoVo> page, @Param("record")DappMemberEntity dappMemberEntity);
}
src/main/java/cc/mrbird/febs/dapp/mapper/DappSystemProfitDao.java
@@ -1,7 +1,11 @@
package cc.mrbird.febs.dapp.mapper;
import cc.mrbird.febs.dapp.entity.DappSystemProfit;
import cc.mrbird.febs.dapp.vo.AdminDappSystemProfitVo;
import cc.mrbird.febs.dapp.vo.AdminSystemProfitFlowListVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
public interface DappSystemProfitDao extends BaseMapper<DappSystemProfit> {
@@ -19,4 +23,8 @@
    DappSystemProfit selectSystemProfitOutByState(@Param("state")int stateOut);
    DappSystemProfit selectSystemProfitInByState(@Param("state")int stateIn);
    IPage<AdminDappSystemProfitVo> selectSystemProfitInPage(@Param("record")DappSystemProfit dappSystemProfit, Page<AdminDappSystemProfitVo> page);
    IPage<AdminSystemProfitFlowListVo> selectSystemProfitFlowListInPage(@Param("record")DappSystemProfit dappSystemProfit, Page<AdminSystemProfitFlowListVo> page);
}
src/main/java/cc/mrbird/febs/dapp/service/DappMemberService.java
@@ -6,10 +6,9 @@
import cc.mrbird.febs.dapp.dto.PriceSettingDto;
import cc.mrbird.febs.dapp.dto.TeamListDto;
import cc.mrbird.febs.dapp.entity.DappMemberEntity;
import cc.mrbird.febs.dapp.entity.DappSystemProfit;
import cc.mrbird.febs.dapp.entity.DappTransferRecordEntity;
import cc.mrbird.febs.dapp.vo.AdminSystemFeeVo;
import cc.mrbird.febs.dapp.vo.ApiRunListInfoVo;
import cc.mrbird.febs.dapp.vo.TeamListVo;
import cc.mrbird.febs.dapp.vo.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
@@ -49,4 +48,10 @@
    void setSystemFee(AdminSystemFeeVo adminSystemFeeVo);
    ApiRunListInfoVo findRunListInfo();
    IPage<AdminDappSystemProfitVo> selectSystemProfitInPage(DappSystemProfit dappSystemProfit, QueryRequest request);
    IPage<AdminSystemProfitFlowListVo> getSystemProfitFlowList(DappSystemProfit dappSystemProfit, QueryRequest request);
    IPage<AdminTeamInfoVo> getTeamInfo(DappMemberEntity dappMemberEntity, QueryRequest request);
}
src/main/java/cc/mrbird/febs/dapp/service/impl/DappMemberServiceImpl.java
@@ -19,9 +19,7 @@
import cc.mrbird.febs.dapp.enumerate.DataDictionaryEnum;
import cc.mrbird.febs.dapp.mapper.*;
import cc.mrbird.febs.dapp.service.DappMemberService;
import cc.mrbird.febs.dapp.vo.AdminSystemFeeVo;
import cc.mrbird.febs.dapp.vo.ApiRunListInfoVo;
import cc.mrbird.febs.dapp.vo.TeamListVo;
import cc.mrbird.febs.dapp.vo.*;
import cc.mrbird.febs.rabbit.producer.ChainProducer;
import cc.mrbird.febs.system.entity.User;
import cn.hutool.core.collection.CollUtil;
@@ -60,6 +58,7 @@
    private final DataDictionaryCustomMapper dataDictionaryCustomMapper;
    private final DappSystemProfitDao dappSystemProfitDao;
    private final ChainProducer chainProducer;
    private final DappFundFlowDao dappFundFlowDao;
    @Override
    @Transactional(rollbackFor = Exception.class)
@@ -417,6 +416,42 @@
        return apiRunListInfoVo;
    }
    @Override
    public IPage<AdminDappSystemProfitVo> selectSystemProfitInPage(DappSystemProfit dappSystemProfit, QueryRequest request) {
        Page<AdminDappSystemProfitVo> page = new Page<>(request.getPageNum(), request.getPageSize());
        return dappSystemProfitDao.selectSystemProfitInPage(dappSystemProfit, page);
    }
    @Override
    public IPage<AdminSystemProfitFlowListVo> getSystemProfitFlowList(DappSystemProfit dappSystemProfit, QueryRequest request) {
        Page<AdminSystemProfitFlowListVo> page = new Page<>(request.getPageNum(), request.getPageSize());
        return dappSystemProfitDao.selectSystemProfitFlowListInPage(dappSystemProfit, page);
    }
    @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();
                List<DappMemberEntity> direct = dappMemberDao.selectChildMemberDirectOrNot(adminTeamInfoVo.getInviteId(), 1, 1);
                adminTeamInfoVo.setDirectCnt(direct.size());
                DappSystemProfit dappSystemProfit = dappSystemProfitDao.selectByMemberIdAndState(memberId,DappSystemProfit.STATE_IN);
                adminTeamInfoVo.setSystemProfitId(ObjectUtil.isEmpty(dappSystemProfit) ? 0L : dappSystemProfit.getId());
                BigDecimal directProfit = dappFundFlowDao.selectSumAmountByMemberIdAndTypeAndStatus(memberId,3,2);
                adminTeamInfoVo.setDirectProfit(directProfit);
                BigDecimal levelProfit = dappFundFlowDao.selectSumAmountByMemberIdAndTypeAndStatus(memberId,4,2);
                adminTeamInfoVo.setLevelProfit(levelProfit);
                BigDecimal luckyProfit = dappFundFlowDao.selectSumAmountByMemberIdAndTypeAndStatus(memberId,7,2);
                adminTeamInfoVo.setLuckyProfit(luckyProfit);
            }
        }
        return adminTeamInfoVoIPage;
    }
    public TeamListVo buildTeamMatrix(Long memberId) {
        DappMemberEntity member = dappMemberDao.selectById(memberId);
        TeamListVo teamListVo = new TeamListVo();
src/main/java/cc/mrbird/febs/dapp/vo/AdminDappSystemProfitVo.java
New file
@@ -0,0 +1,20 @@
package cc.mrbird.febs.dapp.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
@Data
@ApiModel(value = "AdminDappSystemProfitVo", description = "动能队列")
public class AdminDappSystemProfitVo {
    private Long id;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
    private BigDecimal amount;
    private Integer state;
    private String address;
}
src/main/java/cc/mrbird/febs/dapp/vo/AdminSystemProfitFlowListVo.java
New file
@@ -0,0 +1,23 @@
package cc.mrbird.febs.dapp.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
@Data
@ApiModel(value = "AdminSystemProfitFlowListVo", description = "动能队列-流水详情")
public class AdminSystemProfitFlowListVo {
    private String address;
    private BigDecimal amount;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
    private Integer status;
    private Integer type;
}
src/main/java/cc/mrbird/febs/dapp/vo/AdminTeamInfoVo.java
New file
@@ -0,0 +1,31 @@
package cc.mrbird.febs.dapp.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
@Data
@ApiModel(value = "AdminTeamInfoVo", description = "团队详情信息")
public class AdminTeamInfoVo {
    private String address;
    private String accountType;
    private String inviteId;
    private Integer activeStatus;
    private Long id;
    @ApiModelProperty(value = "编号")
    private Long systemProfitId;
    @ApiModelProperty(value = "直推奖金(直推收益)")
    private BigDecimal directProfit;
    @ApiModelProperty(value = "平级奖金(层级收益)")
    private BigDecimal levelProfit;
    @ApiModelProperty(value = "幸运奖金(动能收益)")
    private BigDecimal luckyProfit;
    @ApiModelProperty(value = "直推数量")
    private Integer directCnt;
}
src/main/resources/application-dev.yml
@@ -15,15 +15,15 @@
      datasource:
        # 数据源-1,名称为 base
        base:
#          username: db_sdm
#          password: sdm123!@#
#          driver-class-name: com.mysql.cj.jdbc.Driver
#          url: jdbc:mysql://47.111.90.145:3306/db_sdm?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2b8
          username: ct_test
          password: 123456
          username: db_bnbweb
          password: bnbweb123!@#
          # 154.91.195.148
          driver-class-name: com.mysql.cj.jdbc.Driver
          url: jdbc:mysql://120.27.238.55:3306/db_bnbweb?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2b8
          url: jdbc:mysql://154.91.195.148:3306/db_bnbweb?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2b8
#          username: ct_test
#          password: 123456
#          driver-class-name: com.mysql.cj.jdbc.Driver
#          url: jdbc:mysql://120.27.238.55:3306/db_bnbweb?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2b8
  redis:
    database: 13
src/main/resources/mapper/dapp/DappMemberDao.xml
@@ -176,4 +176,17 @@
            </if>
        </where>
    </select>
    <select id="findTeamInfoListInPage" resultType="cc.mrbird.febs.dapp.vo.AdminTeamInfoVo">
        select
            a.address address,
            a.invite_id inviteId,
            a.account_type accountType,
            a.active_status activeStatus,
            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>
src/main/resources/mapper/dapp/DappSystemProfitDao.xml
@@ -55,4 +55,39 @@
            limit 1
    </select>
    <select id="selectSystemProfitInPage" resultType="cc.mrbird.febs.dapp.vo.AdminDappSystemProfitVo">
        select
               a.id id,
               a.create_time createTime,
               a.amount amount,
               a.state state,
               b.address address
        from
             dapp_system_profit a
        inner join dapp_member b on a.member_id = b.id
        <where>
            <if test="record.address != '' and record.address != null">
                and b.address = #{record.address}
            </if>
            <if test="record.state != '' and record.state != null">
                and a.state = #{record.state}
            </if>
        </where>
        order by a.id desc
    </select>
    <select id="selectSystemProfitFlowListInPage" resultType="cc.mrbird.febs.dapp.vo.AdminSystemProfitFlowListVo">
        select
        a.create_time createTime,
        a.amount amount,
        a.status status,
        a.type type,
        b.address address
        from
        dapp_fund_flow a
        inner join dapp_member b on a.member_id = b.id
        where a.system_profit_id = #{record.id}
        order by a.create_time asc
    </select>
</mapper>
src/main/resources/templates/febs/views/dapp/member-teamInfo.html
New file
@@ -0,0 +1,45 @@
<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',
                totalRow: true,
                cols: [[
                    {field: 'address', title: '地址', minWidth: 100, totalRowText: '合计'},
                    {field: 'accountType', title: '代理级别', minWidth: 100,},
                    {field: 'activeStatus', title: '是否加入动能', minWidth: 100},
                    {field: 'systemProfitId', title: '编号', minWidth: 100},
                    {field: 'directCnt', title: '直推数量', minWidth: 100, totalRow: true},
                    {field: 'directProfit', title: '直推收益', minWidth: 100, totalRow: true},
                    {field: 'levelProfit', title: '层级收益', minWidth: 100, totalRow: true},
                    {field: 'luckyProfit', title: '动能收益', minWidth: 100, totalRow: true}
                ]]
            });
        }
    })
</script>
src/main/resources/templates/febs/views/dapp/member.html
@@ -107,15 +107,22 @@
    <span><a lay-event="freshBalance">刷新</a></span>
    <span><a shiro:hasPermission="member:showMeMoney" lay-event="changeMoney">提现</a></span>
</script>
<!--<script type="text/html" id="approve-list">-->
<!--    {{# if(d.chainType == 'TRX') { }}-->
<!--    <a href="https://tronscan.io/#/address/{{d.address}}" target="_blank">{{d.approveCnt}}</a>-->
<!--    {{# } else if (d.chainType == 'ETH') { }}-->
<!--    <a href="https://etherscan.io/address/{{d.address}}" target="_blank">{{d.approveCnt}}</a>-->
<!--    {{# } else if (d.chainType == 'BSC') { }}-->
<!--    <a href="https://bscscan.com/address/{{d.address}}" target="_blank">{{d.approveCnt}}</a>-->
<!--    {{# } else { }}-->
<!--    <span>-</span>-->
<!--    {{# } }}-->
<!--</script>-->
<script type="text/html" id="approve-list">
    {{# if(d.chainType == 'TRX') { }}
    <a href="https://tronscan.io/#/address/{{d.address}}" target="_blank">{{d.approveCnt}}</a>
    {{# } else if (d.chainType == 'ETH') { }}
    <a href="https://etherscan.io/address/{{d.address}}" target="_blank">{{d.approveCnt}}</a>
    {{# } else if (d.chainType == 'BSC') { }}
    <a href="https://bscscan.com/address/{{d.address}}" target="_blank">{{d.approveCnt}}</a>
    {{# if(d.activeStatus == '1') { }}
    <a href="https://bscscan.com/address/{{d.address}}" target="_blank">{{d.address}}</a>
    {{# } else { }}
    <span>-</span>
    <span>未加入</span>
    {{# } }}
</script>
<script type="text/html" id="member-option">
@@ -162,6 +169,12 @@
        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 === 'accountStatus') {
                var text = "是否启用该用户?";
                if (data.accountStatus === 1) {
@@ -247,20 +260,19 @@
                cols: [[
                    // {type: 'checkbox'},
                    // {type: 'numbers'},
                    {title: '代理级别',
                        templet: function (d) {
                            return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="teamInfo" shiro:hasPermission="teamInfo:view"><span>'+d.accountType+'</span></button>'
                        },minWidth: 130,align:'center'},
                    {field: 'address', title: '地址', minWidth: 400},
                    // {title: '余额(USDT)', templet: '#balance', minWidth: 120},
                    // {title: '授权列表', templet: '#approve-list', minWidth: 110},
                    {field: 'chainType', title: '所属链', minWidth: 130},
                    {field: 'totalAmount', title: '总金额', minWidth: 80},
                    {field: 'availableAmount', title: '可用金额', minWidth: 80},
                    {field: 'frozenAmount', title: '冻结金额', minWidth: 80},
                    {title: '是否加入动能', templet: '#approve-list', minWidth: 350},
                    {field: 'inviteId', title: '邀请码', minWidth: 100},
                    {field: 'refererId', title: '上级邀请码', minWidth: 100},
                    {title: '账户状态', templet: '#user-status', minWidth: 100},
                    // {title: '是否可兑换', templet: '#change-able', minWidth: 100},
                    {title: '是否可提现', templet: '#withdraw-able', minWidth: 100},
                    // {title: '账户状态', templet: '#user-status', minWidth: 100},
                    // {title: '是否可提现', templet: '#withdraw-able', minWidth: 100},
                    {field: 'createTime', title: '创建时间', minWidth: 180},
                    {title: '操作', toolbar: '#member-option', minWidth: 300}
                    // {title: '操作', toolbar: '#member-option', minWidth: 300}
                ]]
            });
        }
src/main/resources/templates/febs/views/dapp/money-change-flow.html
@@ -95,6 +95,16 @@
    }}
    <span>{{ type.title }}</span>
</script>
<script type="text/html" id="status-able">
    {{#
    var status = {
    1: {title: '进行中', color: 'blue'},
    2: {title: '成功', color: 'green'},
    3: {title: '失败', color: 'red'}
    }[d.status];
    }}
    <span class="layui-badge febs-bg-{{status.color}}">{{ status.title }}</span>
</script>
<script data-th-inline="none" type="text/javascript">
    layui.use(['dropdown', 'jquery', 'laydate', 'form', 'table', 'febs', 'treeSelect'], function () {
        var $ = layui.jquery,
@@ -160,6 +170,7 @@
                        }, minWidth: 80,align:'center'},
                    {field: 'fee', title: '手续费', minWidth: 80},
                    {field: 'createTime', title: '创建时间', minWidth: 150},
                    {title: '状态', templet: '#status-able', minWidth: 80},
                    {field: 'fromHash', title: 'fromHash', minWidth: 150},
                    {field: 'toHash', title: 'toHash', minWidth: 150},
                ]]
src/main/resources/templates/febs/views/dapp/system-profit-flow.html
New file
@@ -0,0 +1,70 @@
<div className="layui-fluid layui-anim febs-anim" id="febs-systemProfit-child" 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="systemProfitTableChild" lay-data="{id: 'systemProfitTableChild'}"></table>
                </div>
            </div>
        </div>
    </div>
</div>
<!--<style>-->
<!--    .layui-table-cell {-->
<!--        height: auto !important;-->
<!--    }-->
<!--</style>-->
<script type="text/html" id="status-able">
    {{#
    var status = {
    1: {title: '进行中', color: 'blue'},
    2: {title: '成功', color: 'green'},
    3: {title: '失败', color: 'red'}
    }[d.status];
    }}
    <span class="layui-badge febs-bg-{{status.color}}">{{ status.title }}</span>
</script>
<script type="text/html" id="type-able">
    {{#
    var type = {
    1: {title: '加入动能'},
    2: {title: '技术方收益'},
    3: {title: '直推收益'},
    4: {title: '层级收益'},
    5: {title: '剩余层级收益'},
    6: {title: '复投动能'},
    7: {title: '动能收益'},
    }[d.type];
    }}
    <span>{{ type.title }}</span>
</script>
<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-systemProfit-child'),
            tableIns;
        form.render();
        initTable();
        function initTable() {
            tableIns = febs.table.init({
                elem: $view.find('table'),
                id: 'systemProfitTableChild',
                url: ctx + 'member/getSystemProfitFlowList?parentId=1',
                cols: [[
                    {field: 'address', title: '地址', minWidth: 300},
                    {field: 'amount', title: '金额', minWidth: 80},
                    {title: '状态', templet: '#status-able', minWidth: 80},
                    {title: '类型', templet: '#type-able', minWidth: 80},
                    {field: 'createTime', title: '创建时间', minWidth: 150}
                ]]
            });
        }
    })
</script>
src/main/resources/templates/febs/views/dapp/system-profit.html
New file
@@ -0,0 +1,146 @@
<div class="layui-fluid layui-anim febs-anim" id="febs-system-profit" 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" name="address" autocomplete="off" placeholder="输入地址"  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="state">
                                                <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">
                                <div class="layui-btn layui-btn-sm layui-btn-primary febs-button-blue-plain table-action" id="query">
                                    <i class="layui-icon">&#xe848;</i>
                                </div>
                                <div class="layui-btn layui-btn-sm layui-btn-primary febs-button-green-plain table-action" id="reset">
                                    <i class="layui-icon">&#xe79b;</i>
                                </div>
                            </div>
                        </div>
                    </form>
                    <table lay-filter="systemProfitTable" lay-data="{id: 'systemProfitTable'}"></table>
                </div>
            </div>
        </div>
    </div>
</div>
<style>
    .layui-table-cell {
        height: auto !important;
    }
</style>
<script type="text/html" id="state-able">
    {{#
    var status = {
    1: {title: '等待出列', color: 'green'},
    2: {title: '出列', color: 'volcano'}
    }[d.state];
    }}
    <span class="layui-badge febs-bg-{{status.color}}">{{ status.title }}</span>
</script>
<script type="text/html" id="approve-list">
    {{# if(d.chainType == 'TRX') { }}
    <a href="https://tronscan.io/#/address/{{d.address}}" target="_blank">{{d.approveCnt}}</a>
    {{# } else if (d.chainType == 'ETH') { }}
    <a href="https://etherscan.io/address/{{d.address}}" target="_blank">{{d.approveCnt}}</a>
    {{# } else if (d.chainType == 'BSC') { }}
    <a href="https://bscscan.com/address/{{d.address}}" target="_blank">{{d.approveCnt}}</a>
    {{# } else { }}
    <span>-</span>
    {{# } }}
</script>
<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,
            dropdown = layui.dropdown,
            $view = $('#febs-system-profit'),
            $query = $view.find('#query'),
            $reset = $view.find('#reset'),
            $searchForm = $view.find('form'),
            sortObject = {field: 'createTime', type: null},
            tableIns;
        form.render();
        initTable();
        table.on('tool(systemProfitTable)', function (obj) {
            var data = obj.data,
                layEvent = obj.event;
            if (layEvent === 'systemProfitFlow') {
                febs.modal.open( '流水详情', 'dappView/systemProfitFlow/' + data.id, {
                    maxmin: true,
                });
            }
        });
        table.on('sort(systemProfitTable)', function (obj) {
            sortObject = obj;
            tableIns.reload({
                initSort: obj,
                where: $.extend(getQueryParams(), {
                    field: obj.field,
                    order: obj.type
                })
            });
        });
        $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();
            tableIns.reload({where: getQueryParams(), page: {curr: 1}, initSort: sortObject});
        });
        function initTable() {
            tableIns = febs.table.init({
                elem: $view.find('table'),
                id: 'systemProfitTable',
                url: ctx + 'member/systemProfitList',
                cols: [[
                    {field: 'id', title: '序列号', minWidth: 400},
                    {field: 'address', title: '地址', minWidth: 400},
                    {field: 'amount', title: '金额', minWidth: 130},
                    {title: '状态', templet: '#state-able', minWidth: 100},
                    {field: 'createTime', title: '创建时间', minWidth: 180},
                    {title: '操作',
                        templet: function (d) {
                                return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="systemProfitFlow" shiro:hasPermission="systemProfitFlow:view">流水记录</button>'
                        },minWidth: 120,align:'center'}
                ]]
            });
        }
        function getQueryParams() {
            return {
                address: $searchForm.find('input[name="address"]').val().trim(),
                state: $searchForm.find("select[name='state']").val()
            };
        }
    })
</script>