4 files added
6 files modified
| | |
| | | import com.xcong.excoin.common.entity.QueryRequest;
|
| | | import com.xcong.excoin.modules.member.entity.MemberAccountMoneyChangeEntity;
|
| | | import com.xcong.excoin.modules.member.entity.MemberEntity;
|
| | | import com.xcong.excoin.modules.trademanage.entity.AgentReturnEntity;
|
| | | import com.xcong.excoin.modules.trademanage.entity.ContractHoldOrderEntity;
|
| | | import com.xcong.excoin.modules.trademanage.entity.ContractOrderEntity;
|
| | | import com.xcong.excoin.modules.trademanage.service.TradeManageService;
|
| | |
| | | Map<String, Object> data = getDataTable(tradeManageService.findMemberAgentReturnInfoInPage(memberAccountMoneyChangeEntity, request));
|
| | | return new FebsResponse().success().data(data);
|
| | | }
|
| | | |
| | | /**
|
| | | * 返佣总明细---列表
|
| | | */
|
| | | @GetMapping("memberAgentReturnInfos")
|
| | | public FebsResponse memberAgentReturnInfos(AgentReturnEntity agentReturnEntity, QueryRequest request) {
|
| | | Map<String, Object> data = getDataTable(tradeManageService.findMemberAgentReturnInfosInPage(agentReturnEntity, request));
|
| | | return new FebsResponse().success().data(data);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 历史委托明细---列表
|
| | |
| | | } |
| | | |
| | | /** |
| | | * 返佣总明细 |
| | | * @return |
| | | */ |
| | | @GetMapping("agentReturnInfos") |
| | | @RequiresPermissions("agentReturnInfos:view") |
| | | public String agentReturnInfos() { |
| | | return FebsUtil.view("modules/trademanage/agentReturnInfos"); |
| | | } |
| | | |
| | | /** |
| | | * 历史委托明细 |
| | | * @return |
| | | */ |
New file |
| | |
| | | package com.xcong.excoin.modules.trademanage.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;
|
| | |
|
| | | @Data
|
| | | @TableName("agent_return")
|
| | | public class AgentReturnEntity extends BaseEntity {
|
| | |
|
| | | /**
|
| | | * |
| | | */
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | /**
|
| | | * 订单类型 开仓
|
| | | */
|
| | | public static final int ORDER_TYPE_OPEN = 1;
|
| | |
|
| | | /**
|
| | | * 订单类型 平仓
|
| | | */
|
| | | public static final int ORDER_TYPE_CLOSE = 2;
|
| | |
|
| | | /**
|
| | | * 订单类型 持仓
|
| | | */
|
| | | public static final int ORDER_TYPE_HOLD = 3;
|
| | |
|
| | | /**
|
| | | * 是否已返佣 0-否
|
| | | */
|
| | | public static final int IS_RETURN_N = 0;
|
| | |
|
| | | /**
|
| | | * 是否已返佣 1-是
|
| | | */
|
| | | public static final int IS_RETURN_Y = 1;
|
| | |
|
| | | private Long memberId;
|
| | |
|
| | | private Long orderId;
|
| | |
|
| | | private String orderNo;
|
| | |
|
| | | private int orderType;
|
| | |
|
| | | private BigDecimal closingFeeAmount;
|
| | |
|
| | | private BigDecimal holdingFeeAmount;
|
| | |
|
| | | private BigDecimal openingFeeAmount;
|
| | |
|
| | | private BigDecimal returnAmount;
|
| | |
|
| | | private Long refererId;
|
| | |
|
| | | private String inviteId;
|
| | |
|
| | | private BigDecimal returnRatio;
|
| | |
|
| | | private BigDecimal childReturnRatio;
|
| | |
|
| | | /**
|
| | | * 0-否1-是
|
| | | */
|
| | | private int isReturn;
|
| | |
|
| | | private String returnSymbol;
|
| | |
|
| | | private int closingType;
|
| | | |
| | | /**
|
| | | * 手机号(包含国际手机号)
|
| | | */
|
| | | @TableField(exist = false)
|
| | | private String phone;
|
| | | /**
|
| | | * 邮箱
|
| | | */
|
| | | @TableField(exist = false)
|
| | | private String email;
|
| | | @TableField(exist = false)
|
| | | private String account;
|
| | | |
| | | }
|
New file |
| | |
| | | package com.xcong.excoin.modules.trademanage.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.trademanage.entity.AgentReturnEntity;
|
| | |
|
| | | public interface AgentReturnMapper extends BaseMapper<AgentReturnEntity> {
|
| | |
|
| | | IPage<AgentReturnEntity> findMemberAgentReturnInfosInPage(Page<AgentReturnEntity> page,
|
| | | @Param("record") AgentReturnEntity agentReturnEntity);
|
| | |
|
| | | }
|
| | |
| | | import com.xcong.excoin.common.entity.QueryRequest; |
| | | import com.xcong.excoin.modules.member.entity.MemberAccountMoneyChangeEntity; |
| | | import com.xcong.excoin.modules.member.entity.MemberEntity; |
| | | import com.xcong.excoin.modules.trademanage.entity.AgentReturnEntity; |
| | | import com.xcong.excoin.modules.trademanage.entity.ContractHoldOrderEntity; |
| | | import com.xcong.excoin.modules.trademanage.entity.ContractOrderEntity; |
| | | import com.xcong.excoin.modules.trademanage.vo.MemberAccountInfoVo; |
| | |
| | | |
| | | IPage<ContractOrderEntity> findMemberHistoryOrderInfoInPage(ContractOrderEntity contractOrderEntity, QueryRequest request); |
| | | |
| | | IPage<AgentReturnEntity> findMemberAgentReturnInfosInPage(AgentReturnEntity agentReturnEntity, QueryRequest request); |
| | | |
| | | } |
| | |
| | | import com.xcong.excoin.modules.member.entity.MemberEntity; |
| | | import com.xcong.excoin.modules.member.mapper.MemberAccountMoneyChangeMapper; |
| | | import com.xcong.excoin.modules.member.mapper.MemberMapper; |
| | | import com.xcong.excoin.modules.trademanage.entity.AgentReturnEntity; |
| | | import com.xcong.excoin.modules.trademanage.entity.ContractHoldOrderEntity; |
| | | import com.xcong.excoin.modules.trademanage.entity.ContractOrderEntity; |
| | | import com.xcong.excoin.modules.trademanage.entity.MemberWalletAgentEntity; |
| | | import com.xcong.excoin.modules.trademanage.mapper.AgentReturnMapper; |
| | | import com.xcong.excoin.modules.trademanage.mapper.ContractHoldOrderEntityMapper; |
| | | import com.xcong.excoin.modules.trademanage.mapper.ContractOrderMapper; |
| | | import com.xcong.excoin.modules.trademanage.mapper.MemberWalletAgentMapper; |
| | |
| | | private final MemberAccountMoneyChangeMapper memberAccountMoneyChangeMapper; |
| | | |
| | | private final ContractOrderMapper contractHoldOrderMapper; |
| | | |
| | | private final AgentReturnMapper agentReturnMapper; |
| | | |
| | | private final RedisUtils redisUtils; |
| | | |
| | |
| | | return findMemberAccountInfoListInPage; |
| | | } |
| | | |
| | | @Override |
| | | public IPage<AgentReturnEntity> findMemberAgentReturnInfosInPage(AgentReturnEntity agentReturnEntity, |
| | | QueryRequest request) { |
| | | Page<AgentReturnEntity> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | IPage<AgentReturnEntity> findMemberAccountInfoListInPage = agentReturnMapper.findMemberAgentReturnInfosInPage(page, agentReturnEntity); |
| | | return findMemberAccountInfoListInPage; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | <?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.trademanage.mapper.AgentReturnMapper">
|
| | |
|
| | | <select id="findMemberAgentReturnInfosInPage" resultType="com.xcong.excoin.modules.trademanage.entity.AgentReturnEntity">
|
| | | SELECT
|
| | | *
|
| | | FROM
|
| | | agent_return s
|
| | | LEFT JOIN member m ON m.id = s.member_id
|
| | | <where>
|
| | | s.member_id IN (
|
| | | SELECT
|
| | | id
|
| | | FROM
|
| | | member
|
| | | WHERE
|
| | | account_type = '1'
|
| | | )
|
| | | <if test="record != null" >
|
| | | <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>
|
| | | </where>
|
| | | order by s.create_time desc
|
| | | </select>
|
| | | |
| | | </mapper> |
| | |
| | | {field: 'phone', title: '手机号码', minWidth: 120,align:'left',totalRowText: '合计'},
|
| | | {field: 'email', title: '邮箱', minWidth: 200,align:'left'},
|
| | | {field: 'inviteId', title: '邀请码UID', minWidth: 80,align:'center'},
|
| | | {field: 'returnRatio', title: '返佣比例', minWidth: 200,align:'center'},
|
| | | |
| | | {field: 'promotionNumber', title: '推广人数', minWidth: 200,align:'center'},
|
| | | {field: 'totalRecharge', title: '总充值', minWidth: 200,align:'center'},
|
| | | {field: 'totalWithdrawal', title: '总提现', minWidth: 200,align:'center'},
|
| | | {field: 'totalPerformance', title: '总业绩', minWidth: 200,align:'center'},
|
| | | |
| | | {field: 'levelId', title: '代理',
|
| | | templet: function (d) {
|
| | | return '<span style="color:green;">'+d.levelId+'</span>'
|
| | | }, minWidth: 200,align:'center'},
|
| | | {field: 'team', title: '团队',
|
| | | templet: function (d) {
|
| | | if(d.team != null ){
|
| | |
| | | return ''
|
| | | }
|
| | | }, minWidth: 200,align:'center',sort: true},
|
| | | |
| | | {field: 'levelId', title: '代理',
|
| | | templet: function (d) {
|
| | | return '<span style="color:green;">'+d.levelId+'</span>'
|
| | | }, minWidth: 200,align:'center'},
|
| | | {field: 'returnRatio', title: '返佣比例', minWidth: 200,align:'center'},
|
| | | {field: 'feeIsSelf', title: '手续费是否设置自己',
|
| | | templet: function (d) {
|
| | | if(d.feeIsSelf === 1){
|
| | |
| | | {field: 'email', title: '邮箱', minWidth: 200,align:'left'},
|
| | | {field: 'inviteId', title: '邀请码UID', minWidth: 80,align:'center'},
|
| | | {field: 'refererId', title: '上级邀请码UID', minWidth: 80,align:'center'},
|
| | | {field: 'accountType', title: '账号类型',
|
| | | templet: function (d) {
|
| | | if (d.accountType === 2) {
|
| | | return '<span style="color:green;">测试账号</span>'
|
| | | } else if (d.accountType === 1) {
|
| | | return '<span style="color:red;">正常账号</span>'
|
| | | }else{
|
| | | return ''
|
| | | }
|
| | | }, minWidth: 80,align:'center'},
|
| | | {field: 'refererId', title: '账号状态',
|
| | | templet: function (d) {
|
| | | if (d.accountStatus === 1) {
|
New file |
| | |
| | | <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>
|
| | | </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>
|
| | | <!-- 表格操作栏 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();
|
| | |
|
| | | // 查询按钮
|
| | | $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();
|
| | | 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 + 'tradeManage/memberAgentReturnInfo',
|
| | | totalRow: true,
|
| | | cols: [[
|
| | | {field: 'phone', title: '手机号', minWidth: 100,align:'left',totalRowText: '合计'},
|
| | | {field: 'email', title: '邮箱', minWidth: 200,align:'left'},
|
| | | {field: 'inviteId', title: '邀请码UID', minWidth: 80,align:'center'},
|
| | | {field: 'orderNo', title: '编号', minWidth: 80,align:'center'},
|
| | | {field: 'returnAmount', title: '佣金', minWidth: 80,align:'center',totalRow: true},
|
| | | {field: 'closingFeeAmount', title: '平仓手续费', minWidth: 80,align:'center'},
|
| | | {field: 'holdingFeeAmount', title: '持仓手续费', minWidth: 80,align:'center'},
|
| | | {field: 'openingFeeAmount', title: '开仓手续费', minWidth: 80,align:'center'},
|
| | | ]]
|
| | | });
|
| | | }
|
| | |
|
| | | // 获取查询参数
|
| | | function getQueryParams() {
|
| | | return {
|
| | | account: $searchForm.find('input[name="account"]').val().trim(),
|
| | | };
|
| | | }
|
| | | |
| | | })
|
| | | </script> |