| | |
| | | @GetMapping("getFeeAmountList") |
| | | public FebsResponse getFeeAmountList(MemberEntity memberEntity, QueryRequest request) { |
| | | User user = getCurrentUser(); |
| | | memberEntity.setRefererId(FebsConstant.USER_TYPE_ADMIN.equals(user.getType()) ? FebsConstant.DEFAULT_REFERER_ID : user.getInviteId()); |
| | | memberEntity.setRefererIds(FebsConstant.USER_TYPE_ADMIN.equals(user.getType()) ? FebsConstant.DEFAULT_REFERER_ID : user.getInviteId()); |
| | | Map<String, Object> data = getDataTable(memberService.findFeeAmountList(memberEntity, request)); |
| | | return new FebsResponse().success().data(data); |
| | | } |
| | |
| | | @GetMapping("getMemberAssets") |
| | | public FebsResponse getMemberAssets(MemberEntity memberEntity, QueryRequest request) { |
| | | User user = getCurrentUser(); |
| | | memberEntity.setRefererId(FebsConstant.USER_TYPE_ADMIN.equals(user.getType()) ? FebsConstant.DEFAULT_REFERER_ID : user.getInviteId()); |
| | | memberEntity.setRefererIds(FebsConstant.USER_TYPE_ADMIN.equals(user.getType()) ? FebsConstant.DEFAULT_REFERER_ID : user.getInviteId()); |
| | | Map<String, Object> data = getDataTable(memberService.findMemberAssetList(memberEntity, request)); |
| | | return new FebsResponse().success().data(data); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.xcong.excoin.common.entity.BaseEntity; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author wzy |
| | |
| | | |
| | | private int closingType; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @TableField(exist = false) |
| | | private Date startTime; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @TableField(exist = false) |
| | | private Date endTime; |
| | | @TableField(exist = false) |
| | | private String timeType; |
| | | @TableField(exist = false) |
| | | private String account; |
| | | @TableField(exist = false) |
| | | private String phone; |
| | | @TableField(exist = false) |
| | |
| | | c.email |
| | | from kss_framework.agent_return a |
| | | left join member_authentication b on a.member_id=b.member_id |
| | | left join member c on a.member_id=c.id |
| | | where invite_id=#{record.inviteId} |
| | | inner join member c on a.member_id=c.id |
| | | <where> |
| | | <if test="record.inviteId!='rxadr3'"> |
| | | and a.invite_id=#{record.inviteId} |
| | | </if> |
| | | <if test='record.timeType=="1"'> |
| | | and TO_DAYS(a.create_time) = TO_DAYS(NOW()) |
| | | </if> |
| | | <if test='record.timeType=="2"'> |
| | | and TO_DAYS(NOW()) - TO_DAYS(a.create_time) = 1 |
| | | </if> |
| | | <if test='record.timeType=="3"'> |
| | | and YEARWEEK(date_format(a.create_time,'%Y-%m-%d')) = YEARWEEK(now()) |
| | | </if> |
| | | <if test='record.timeType=="4"'> |
| | | and DATE_FORMAT(a.create_time, '%Y%m' ) = DATE_FORMAT( CURDATE() , '%Y%m' ) |
| | | </if> |
| | | <if test='record.account!=null and record.account!=""'> |
| | | and (c.phone=#{record.account} or c.email=#{record.account} or c.invite_id=#{record.account}) |
| | | </if> |
| | | </where> |
| | | order by order_no, referer_id asc |
| | | </select> |
| | | </mapper> |
| | |
| | | sum(hold_amount) holdAmount, |
| | | sum(reward_amount) rewardAmount |
| | | from contract_order where order_type in (3,4) and order_status=1 group by member_id) d on a.id=d.member_id |
| | | where find_in_set(#{record.refererId}, a.referer_ids) |
| | | where find_in_set(#{record.refererIds}, a.referer_ids) |
| | | <if test="record.account!=null and record.account!=''"> |
| | | and (a.phone=#{record.account} or a.email=#{record.account} or a.invite_id=#{record.account}) |
| | | </if> |
| | | <if test="record.refererId!=null and record.refererId!=''"> |
| | | and a.referer_id=#{record.refererId} |
| | | </if> |
| | | group by a.create_time,a.phone, a.email |
| | | order by a.create_time desc |
| | | </select> |
| | |
| | | b.total_balance contractTotal, |
| | | c.total_balance coinTotal, |
| | | d.total_balance agentTotal |
| | | from kss_framework.member a |
| | | from member a |
| | | left join member_wallet_contract b on a.id=b.member_id |
| | | left join member_wallet_coin c on a.id=c.member_id and c.wallet_code='USDT' |
| | | left join member_wallet_agent d on a.id=d.member_id |
| | | left join member_authentication e on a.id=e.member_id |
| | | where find_in_set(#{record.refererId}, a.referer_ids) |
| | | where find_in_set(#{record.refererIds}, a.referer_ids) |
| | | <if test="record.account!=null and record.account!=''"> |
| | | and (a.phone=#{record.account} or a.email=#{record.account} or a.invite_id=#{record.account}) |
| | | </if> |
| | | <if test="record.refererId!=null and record.refererId!=''"> |
| | | and a.referer_id=#{record.refererId} |
| | | </if> |
| | | order by a.create_time desc |
| | | </select> |
| | | </mapper> |
| | |
| | | <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 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 class="layui-inline"> |
| | | <label class="layui-form-label layui-form-label-sm">创建时间</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="createTime" id="user-createTime" |
| | | 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="accountType"> |
| | | <option value=""></option> |
| | | <option value="1">测试账号</option> |
| | | <option value="2">正常账号</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label layui-form-label-sm">账号状态</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="accountStatus"> |
| | | <option value=""></option> |
| | | <option value="0">禁用</option> |
| | | <option value="1">正常</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label layui-form-label-sm">实名状态</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="certifyStatus"> |
| | | <option value=""></option> |
| | | <option value="0">未通过</option> |
| | | <option value="1">审核中</option> |
| | | <option value="2">审核通过</option> |
| | | <option value="2">未实名</option> |
| | | </select> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" placeholder="上级UID" name="refererId" |
| | | autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | $reset = $view.find('#reset'), |
| | | $searchForm = $view.find('form'), |
| | | sortObject = {field: 'createTime', type: null}, |
| | | tableIns, |
| | | createTimeFrom, |
| | | createTimeTo; |
| | | tableIns; |
| | | |
| | | form.render(); |
| | | |
| | | // 表格初始化 |
| | | initTable(); |
| | | |
| | | // 时间组件 |
| | | laydate.render({ |
| | | elem: '#user-createTime', |
| | | range: true, |
| | | trigger: 'click' |
| | | }); |
| | | |
| | | // 查询按钮 |
| | | $query.on('click', function () { |
| | |
| | | |
| | | // 获取查询参数 |
| | | function getQueryParams() { |
| | | var createTime = $searchForm.find('input[name="createTime"]').val(); |
| | | if (createTime) { |
| | | createTimeFrom = createTime.split(' - ')[0]; |
| | | createTimeTo = createTime.split(' - ')[1]; |
| | | } |
| | | return { |
| | | startTime: createTimeFrom, |
| | | endTime: createTimeTo, |
| | | account: $searchForm.find('input[name="account"]').val().trim(), |
| | | accountStatus: $searchForm.find("select[name='accountStatus']").val(), |
| | | accountType: $searchForm.find("select[name='accountType']").val(), |
| | | certifyStatus: $searchForm.find("select[name='certifyStatus']").val(), |
| | | refererId: $searchForm.find('input[name="refererId"]').val().trim(), |
| | | invalidate_ie_cache: new Date() |
| | | }; |
| | | } |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label layui-form-label-sm">创建时间</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="createTime" id="user-createTime" |
| | | 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="accountType"> |
| | | <option value=""></option> |
| | | <option value="1">测试账号</option> |
| | | <option value="2">正常账号</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label layui-form-label-sm">账号状态</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="accountStatus"> |
| | | <option value=""></option> |
| | | <option value="0">禁用</option> |
| | | <option value="1">正常</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label layui-form-label-sm">实名状态</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="certifyStatus"> |
| | | <option value=""></option> |
| | | <option value="0">未通过</option> |
| | | <option value="1">审核中</option> |
| | | <option value="2">审核通过</option> |
| | | <option value="2">未实名</option> |
| | | </select> |
| | | <div class="layui-input-block"> |
| | | <input type="radio" name="timeType" value="1" title="今日"> |
| | | <input type="radio" name="timeType" value="2" title="昨日"> |
| | | <input type="radio" name="timeType" value="3" title="本周"> |
| | | <input type="radio" name="timeType" value="4" title="本月"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | {{# |
| | | var openType = { |
| | | 1: {title: '开多', color : 'blue'}, |
| | | 2: {title: '开空', color : 'red'} |
| | | }[d.openingType]; |
| | | 2: {title: '开空', color : 'red'}, |
| | | 3: {title: '平多', color : 'blue'}, |
| | | 4: {title: '平空', color : 'red'} |
| | | }[d.orderType]; |
| | | }} |
| | | <span class="layui-badge febs-bg-{{openType.color}}">{{ openType.title }}</span> |
| | | </script> |
| | | <script type="text/html" id="closing-type"> |
| | | {{# |
| | | var closingType = { |
| | | 0: {title: '-'}, |
| | | 2: {title: '平多'}, |
| | | 3: {title: '平空'}, |
| | | 4: {title: '爆仓平多'}, |
| | | 5: {title: '爆仓平空'}, |
| | | 6: {title: '止盈平多'}, |
| | | 7: {title: '止盈平空'}, |
| | | 8: {title: '止损平多'}, |
| | | 9: {title: '止损平空'}, |
| | | }[d.closingType]; |
| | | }} |
| | | <span>{{ closingType.title }}</span> |
| | | </script> |
| | | <!-- 表格字段状态格式化 start --> |
| | | |
| | |
| | | $searchForm = $view.find('form'), |
| | | sortObject = {field: 'createTime', type: null}, |
| | | tableIns, |
| | | createTimeFrom, |
| | | createTimeTo; |
| | | timeType; |
| | | |
| | | form.render(); |
| | | |
| | | // 表格初始化 |
| | | initTable(); |
| | | |
| | | // 时间组件 |
| | | laydate.render({ |
| | | elem: '#user-createTime', |
| | | range: true, |
| | | trigger: 'click' |
| | | }); |
| | | |
| | | // 查询按钮 |
| | | $query.on('click', function () { |
| | |
| | | $reset.on('click', function () { |
| | | $searchForm[0].reset(); |
| | | sortObject.type = 'null'; |
| | | createTimeTo = null; |
| | | createTimeFrom = null; |
| | | timeType = null; |
| | | tableIns.reload({where: getQueryParams(), page: {curr: 1}, initSort: sortObject}); |
| | | }); |
| | | |
| | |
| | | url: ctx + 'order/getReturnList', |
| | | cols: [[ |
| | | {type: 'checkbox'}, |
| | | {field: 'orderNo', title: '订单编号', minWidth: 150, align: 'center'}, |
| | | {field: 'returnSymbol', title: '币种', minWidth: 100, align: 'center'}, |
| | | {field: 'refererId', title: '上级UID', minWidth: 100, align: 'center'}, |
| | | {field: 'account', title: '姓名', minWidth: 100, align: 'center'}, |
| | | {field: 'phone', title: '联系方式', minWidth: 130, align: 'center'}, |
| | | {field: 'email', title: '邮箱', minWidth: 100, align: 'center'}, |
| | | {field: 'orderType', title: '订单类型', minWidth: 100, align: 'center'}, |
| | | {field: 'orderNo', title: '订单编号', minWidth: 160, align: 'center'}, |
| | | {templet: '#open-type', title: '订单类型', minWidth: 100, align: 'center'}, |
| | | {field: 'returnSymbol', title: '返佣币种', minWidth: 120, align: 'center'}, |
| | | {field: 'createTime', title: '返佣时间', minWidth: 100, align: 'center'}, |
| | | {field: 'closingType', title: '类型', minWidth: 100, align: 'center'}, |
| | | {field: 'inviteId', title: '返佣对象', minWidth: 120, align: 'center'}, |
| | | {field: 'createTime', title: '返佣时间', minWidth: 140, align: 'center'}, |
| | | {templet: '#closing-type', title: '平仓类型', minWidth: 100, align: 'center'}, |
| | | {field: 'closingFeeAmount', title: '平仓手续费', minWidth: 130, align: 'center'}, |
| | | {field: 'holdingFeeAmount', title: '持仓手续费', minWidth: 130, align: 'center'}, |
| | | {field: 'openingFeeAmount', title: '开仓手续费', minWidth: 160, align: 'center'}, |
| | | {field: 'returnAmount', title: '返佣佣金', minWidth: 140, align: 'center', fixed : "right"}, |
| | | {field: 'returnAmount', title: '返佣佣金', minWidth: 140, align: 'center', fixed : 'right'}, |
| | | ]] |
| | | }); |
| | | } |
| | | |
| | | // 获取查询参数 |
| | | function getQueryParams() { |
| | | var createTime = $searchForm.find('input[name="createTime"]').val(); |
| | | if (createTime) { |
| | | createTimeFrom = createTime.split(' - ')[0]; |
| | | createTimeTo = createTime.split(' - ')[1]; |
| | | var type = $searchForm.find('input[name="timeType"]:checked').val(); |
| | | if (type) { |
| | | timeType = type; |
| | | } |
| | | return { |
| | | startTime: createTimeFrom, |
| | | endTime: createTimeTo, |
| | | timeType : timeType, |
| | | account: $searchForm.find('input[name="account"]').val().trim(), |
| | | accountStatus: $searchForm.find("select[name='accountStatus']").val(), |
| | | accountType: $searchForm.find("select[name='accountType']").val(), |
| | | certifyStatus: $searchForm.find("select[name='certifyStatus']").val(), |
| | | invalidate_ie_cache: new Date() |
| | | }; |
| | | } |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label layui-form-label-sm">创建时间</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="createTime" id="user-createTime" |
| | | 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="accountType"> |
| | | <option value=""></option> |
| | | <option value="1">测试账号</option> |
| | | <option value="2">正常账号</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label layui-form-label-sm">账号状态</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="accountStatus"> |
| | | <option value=""></option> |
| | | <option value="0">禁用</option> |
| | | <option value="1">正常</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label layui-form-label-sm">实名状态</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="certifyStatus"> |
| | | <option value=""></option> |
| | | <option value="0">未通过</option> |
| | | <option value="1">审核中</option> |
| | | <option value="2">审核通过</option> |
| | | <option value="2">未实名</option> |
| | | </select> |
| | | <input type="text" placeholder="上级UID" name="refererId" |
| | | autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | $reset = $view.find('#reset'), |
| | | $searchForm = $view.find('form'), |
| | | sortObject = {field: 'createTime', type: null}, |
| | | tableIns, |
| | | createTimeFrom, |
| | | createTimeTo; |
| | | tableIns; |
| | | |
| | | form.render(); |
| | | |
| | | // 表格初始化 |
| | | initTable(); |
| | | |
| | | // 时间组件 |
| | | laydate.render({ |
| | | elem: '#user-createTime', |
| | | range: true, |
| | | trigger: 'click' |
| | | }); |
| | | |
| | | // 查询按钮 |
| | | $query.on('click', function () { |
| | |
| | | $reset.on('click', function () { |
| | | $searchForm[0].reset(); |
| | | sortObject.type = 'null'; |
| | | createTimeTo = null; |
| | | createTimeFrom = null; |
| | | tableIns.reload({where: getQueryParams(), page: {curr: 1}, initSort: sortObject}); |
| | | }); |
| | | |
| | |
| | | |
| | | // 获取查询参数 |
| | | function getQueryParams() { |
| | | var createTime = $searchForm.find('input[name="createTime"]').val(); |
| | | if (createTime) { |
| | | createTimeFrom = createTime.split(' - ')[0]; |
| | | createTimeTo = createTime.split(' - ')[1]; |
| | | } |
| | | return { |
| | | startTime: createTimeFrom, |
| | | endTime: createTimeTo, |
| | | account: $searchForm.find('input[name="account"]').val().trim(), |
| | | accountStatus: $searchForm.find("select[name='accountStatus']").val(), |
| | | accountType: $searchForm.find("select[name='accountType']").val(), |
| | | certifyStatus: $searchForm.find("select[name='certifyStatus']").val(), |
| | | refererId: $searchForm.find('input[name="refererId"]').val().trim(), |
| | | invalidate_ie_cache: new Date() |
| | | }; |
| | | } |