| | |
| | | public FebsResponse getHistoryList(ContractOrderEntity contractOrderEntity, QueryRequest request) { |
| | | User user = getCurrentUser(); |
| | | if (user.getType().equals(FebsConstant.USER_TYPE_ADMIN)) { |
| | | contractOrderEntity.setRefererId(FebsConstant.DEFAULT_REFERER_ID); |
| | | contractOrderEntity.setRefererIds(FebsConstant.DEFAULT_REFERER_ID); |
| | | } else { |
| | | contractOrderEntity.setRefererId(user.getInviteId()); |
| | | contractOrderEntity.setRefererIds(user.getInviteId()); |
| | | } |
| | | Map<String, Object> data = getDataTable(contractOrderService.findHistoryOrderListInPage(contractOrderEntity, request)); |
| | | return new FebsResponse().success().data(data); |
| | |
| | | package com.xcong.excoin.modules.contract.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.xcong.excoin.common.entity.BaseEntity; |
| | | import lombok.Data; |
| | |
| | | private BigDecimal returnRatio; |
| | | |
| | | private int isProfit; |
| | | |
| | | @TableField(exist = false) |
| | | private String timeType; |
| | | @TableField(exist = false) |
| | | private String openType; |
| | | } |
| | |
| | | package com.xcong.excoin.modules.contract.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.xcong.excoin.common.entity.BaseEntity; |
| | | import lombok.Data; |
| | |
| | | |
| | | private int operateNo; |
| | | |
| | | @TableField(exist = false) |
| | | private String refererId; |
| | | @TableField(exist = false) |
| | | private String refererIds; |
| | | @TableField(exist = false) |
| | | private String phone; |
| | | @TableField(exist = false) |
| | | private String email; |
| | | @TableField(exist = false) |
| | | private String name; |
| | | |
| | | @TableField(exist = false) |
| | | private String timeType; |
| | | |
| | | |
| | | } |
| | |
| | | private Date createTime; |
| | | |
| | | private String refererId; |
| | | |
| | | private String account; |
| | | } |
| | |
| | | from member a |
| | | inner join member_quick_buy_sale b on a.id=b.member_id and b.order_type='B' |
| | | where find_in_set(#{record.refererId}, 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> |
| | | union |
| | | select |
| | | a.invite_id inviteId, |
| | |
| | | from member a |
| | | inner join member_coin_charge b on a.id=b.member_id and b.status=2 |
| | | where find_in_set(#{record.refererId}, 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> |
| | | ) x |
| | | order by createTime desc |
| | | </select> |
| | |
| | | from member a |
| | | inner join member_quick_buy_sale b on a.id=b.member_id and b.order_type='S' |
| | | where find_in_set(#{record.refererId}, 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> |
| | | union |
| | | select |
| | | a.invite_id inviteId, |
| | |
| | | from member a |
| | | inner join member_coin_withdraw b on a.id=b.member_id and b.status=2 |
| | | where find_in_set(#{record.refererId}, 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> |
| | | ) x |
| | | order by createTime desc |
| | | </select> |
| | |
| | | <if test="record.inviteId!=null and record.inviteId!=''"> |
| | | and find_in_set(#{record.inviteId}, b.referer_ids) |
| | | </if> |
| | | <if test="record.symbol!=null and record.symbol!=''"> |
| | | and symbol=#{record.symbol} |
| | | </if> |
| | | <if test="record.openType!=null and record.openType!=''"> |
| | | and opening_type=#{record.openType} |
| | | </if> |
| | | <if test='record.timeType=="1"'> |
| | | and TO_DAYS(create_time) = TO_DAYS(NOW()) |
| | | </if> |
| | | <if test='record.timeType=="2"'> |
| | | and TO_DAYS(NOW()) - TO_DAYS(create_time) = 1 |
| | | </if> |
| | | <if test='record.timeType=="3"'> |
| | | and YEARWEEK(date_format(create_time,'%Y-%m-%d')) = YEARWEEK(now()) |
| | | </if> |
| | | <if test='record.timeType=="4"'> |
| | | and DATE_FORMAT(create_time, '%Y%m' ) = DATE_FORMAT( CURDATE() , '%Y%m' ) |
| | | </if> |
| | | </if> |
| | | </where> |
| | | order by a.create_time desc |
| | |
| | | inner join contract_order c on a.id=c.member_id |
| | | <where> |
| | | <if test="record!=null"> |
| | | <if test="record.refererIds!=null and record.refererIds!=''"> |
| | | find_in_set(#{record.refererIds}, a.referer_ids) |
| | | </if> |
| | | <if test="record.refererId!=null and record.refererId!=''"> |
| | | find_in_set(#{record.refererId}, a.referer_ids) |
| | | and a.referer_id=#{record.refererId} |
| | | </if> |
| | | <if test="record.name!=null and record.name!=''"> |
| | | and (a.phone=#{record.name} or a.email=#{record.name} or a.invite_id=#{record.name}) |
| | | </if> |
| | | <if test='record.timeType=="1"'> |
| | | and TO_DAYS(c.create_time) = TO_DAYS(NOW()) |
| | | </if> |
| | | <if test='record.timeType=="2"'> |
| | | and TO_DAYS(NOW()) - TO_DAYS(c.create_time) = 1 |
| | | </if> |
| | | <if test='record.timeType=="3"'> |
| | | and YEARWEEK(date_format(c.create_time,'%Y-%m-%d')) = YEARWEEK(now()) |
| | | </if> |
| | | <if test='record.timeType=="4"'> |
| | | and DATE_FORMAT(c.create_time, '%Y%m' ) = DATE_FORMAT( CURDATE() , '%Y%m' ) |
| | | </if> |
| | | and order_status = 1 |
| | | </if> |
| | |
| | | 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"> |
| | | <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> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-md2 layui-col-sm12 layui-col-xs12 table-action-area"> |
| | |
| | | $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(), |
| | | 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"> |
| | | <input type="text" placeholder="上级UID" name="refererId" |
| | | 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="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> |
| | |
| | | $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}); |
| | | }); |
| | | |
| | |
| | | |
| | | // 获取查询参数 |
| | | 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, |
| | | 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(), |
| | | timeType : timeType, |
| | | name: $searchForm.find('input[name="account"]').val().trim(), |
| | | 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> |
| | | <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"> |
| | | <select name="symbol"> |
| | | <option value=""></option> |
| | | <option value="1">测试账号</option> |
| | | <option value="2">正常账号</option> |
| | | <option value="BTC/USDT">BTC/USDT</option> |
| | | <option value="BCH/USDT">BCH/USDT</option> |
| | | <option value="ETC/USDT">ETC/USDT</option> |
| | | <option value="ETH/USDT">ETH/USDT</option> |
| | | <option value="EOS/USDT">EOS/USDT</option> |
| | | <option value="XRP/USDT">XRP/USDT</option> |
| | | <option value="LTC/USDT">LTC/USDT</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label layui-form-label-sm">账号状态</label> |
| | | <label class="layui-form-label layui-form-label-sm">开仓类型</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="accountStatus"> |
| | | <select name="openType"> |
| | | <option value=""></option> |
| | | <option value="0">禁用</option> |
| | | <option value="1">正常</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="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> |
| | |
| | | $searchForm = $view.find('form'), |
| | | sortObject = {field: 'createTime', type: null}, |
| | | tableIns, |
| | | createTimeFrom, |
| | | createTimeTo; |
| | | timeType, |
| | | openingType; |
| | | |
| | | 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; |
| | | openingType = 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]; |
| | | var type = $searchForm.find('input[name="timeType"]:checked').val(); |
| | | if (type) { |
| | | timeType = type; |
| | | } |
| | | var openType = $searchForm.find("select[name='openType']").val(); |
| | | if (openType) { |
| | | openingType = openType; |
| | | } |
| | | 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(), |
| | | openType: openingType, |
| | | symbol: $searchForm.find("select[name='symbol']").val(), |
| | | invalidate_ie_cache: new Date() |
| | | }; |
| | | } |
| | |
| | | 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"> |
| | | <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> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-md2 layui-col-sm12 layui-col-xs12 table-action-area"> |
| | |
| | | $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(), |
| | | invalidate_ie_cache: new Date() |
| | | }; |
| | | } |