| | |
| | | package com.xcong.excoin.modules.agent.controller; |
| | | |
| | | import cn.hutool.core.date.DateTime; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringPool; |
| | | import com.xcong.excoin.common.annotation.ControllerEndpoint; |
| | | import com.xcong.excoin.common.annotation.SubmitRepeat; |
| | |
| | | import javax.validation.Valid; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | public FebsResponse getList(AgentUser agentUser, QueryRequest queryRequest) { |
| | | User user = getCurrentUser(); |
| | | agentUser.setRefererId(user.getInviteId()); |
| | | String startTime = agentUser.getStartTime(); |
| | | if(StrUtil.isNotEmpty(startTime)){ |
| | | Date date = DateUtil.parse(startTime); |
| | | agentUser.setStartDate(date); |
| | | } |
| | | String endTime = agentUser.getEndTime(); |
| | | if(StrUtil.isNotEmpty(endTime)){ |
| | | Date date = DateUtil.parse(endTime); |
| | | agentUser.setEndDate(date); |
| | | } |
| | | |
| | | Map<String, Object> map = getDataTable(agentService.findAgentList(agentUser, queryRequest)); |
| | | return new FebsResponse().success().data(map); |
| | | } |
| | |
| | | package com.xcong.excoin.modules.agent.controller; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.xcong.excoin.common.controller.BaseController; |
| | | import com.xcong.excoin.common.entity.FebsConstant; |
| | | import com.xcong.excoin.common.entity.FebsResponse; |
| | |
| | | @GetMapping("getList") |
| | | public FebsResponse getList(MemberEntity member, QueryRequest request) { |
| | | User user = getCurrentUser(); |
| | | String startTimeDate = member.getStartTimeDate(); |
| | | if(StrUtil.isNotEmpty(startTimeDate)){ |
| | | member.setStartTime(DateUtil.parse(startTimeDate)); |
| | | } |
| | | String endTimeDate = member.getEndTimeDate(); |
| | | if(StrUtil.isNotEmpty(endTimeDate)){ |
| | | member.setEndTime(DateUtil.parse(endTimeDate)); |
| | | } |
| | | member.setInviteId(FebsConstant.USER_TYPE_ADMIN.equals(user.getType()) ? FebsConstant.DEFAULT_REFERER_ID : user.getInviteId()); |
| | | Map<String, Object> data = getDataTable(memberService.findMemberListInPage(member, request)); |
| | | return new FebsResponse().success().data(data); |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @TableField(exist = false) |
| | | private Date startTime; |
| | | @TableField(exist = false) |
| | | private String startTimeDate; |
| | | @TableField(exist = false) |
| | | private String endTimeDate; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @TableField(exist = false) |
| | |
| | | private Integer certifyStatus; |
| | | |
| | | private Integer accountType; |
| | | |
| | | private Integer accountStatus; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date startTime; |
| | | private String startTime; |
| | | private Date startDate; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date endTime; |
| | | private String endTime; |
| | | private Date endDate; |
| | | |
| | | } |
| | |
| | | <where> |
| | | <if test="record != null"> |
| | | <if test="record.inviteId !=null and record.inviteId!=''"> |
| | | and find_in_set(#{record.inviteId}, referer_ids) |
| | | and find_in_set(#{record.inviteId}, a.referer_ids) |
| | | </if> |
| | | <if test="record.startTime!=null"> |
| | | and create_time >=#{record.startTime} |
| | | and a.create_time >=#{record.startTime} |
| | | </if> |
| | | <if test="record.endTime!=null"> |
| | | and #{record.endTime} >= create_time |
| | | and #{record.endTime} >= a.create_time |
| | | </if> |
| | | <if test="record.account!=null and record.account!=''"> |
| | | and (phone = #{record.account} or email = #{record.account} or invite_id=#{record.account}) |
| | | and (a.phone = #{record.account} or a.email = #{record.account} or a.invite_id=#{record.account}) |
| | | </if> |
| | | <if test="record.accountStatus!=null"> |
| | | and account_status = #{record.accountStatus} |
| | | <if test="record.accountStatus!=null and record.accountStatus!='' or record.accountStatus == 0" > |
| | | and a.account_status = #{record.accountStatus} |
| | | </if> |
| | | <if test="record.accountType != null"> |
| | | and account_type = #{record.accountType} |
| | | and a.account_type = #{record.accountType} |
| | | </if> |
| | | <if test="record.certifyStatus != null"> |
| | | and certify_status = #{record.certifyStatus} |
| | | and a.certify_status = #{record.certifyStatus} |
| | | </if> |
| | | </if> |
| | | </where> |
| | |
| | | b.return_ratio, |
| | | a.mobile telphone, |
| | | c.referer_id refererId, |
| | | c.account_status accountStatus, |
| | | c.certify_status |
| | | from t_user a |
| | | inner join agent_friend_relation b on a.user_id = b.user_id |
| | |
| | | find_in_set(#{record.refererId}, b.referer_ids) |
| | | </if> |
| | | <if test="record.startTime!=null and record.startTime!=''"> |
| | | and c.create_time >=#{record.startTime} |
| | | and c.create_time >= #{record.startDate} |
| | | </if> |
| | | <if test="record.endTime!=null and record.endTime!=''"> |
| | | and #{record.endTime} >= c.create_time |
| | | and #{record.endDate} >= c.create_time |
| | | </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> |
| | | <if test="record.accountStatus != null and record.accountStatus!=''" > |
| | | and a.status = #{record.accountStatus} |
| | | <if test="record.accountStatus != null and record.accountStatus!='' or record.accountStatus == 0" > |
| | | and c.account_status = #{record.accountStatus} |
| | | </if> |
| | | <if test="record.accountType != null and record.accountType!=''" > |
| | | and c.account_type = #{record.accountType} |
| | |
| | | <div class="layui-input-inline"> |
| | | <select name="accountType"> |
| | | <option value=""></option> |
| | | <option value="1">测试账号</option> |
| | | <option value="2">正常账号</option> |
| | | <option value="2">测试账号</option> |
| | | <option value="1">正常账号</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | <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="">请选择</option> |
| | | <option value="1">待审核</option> |
| | | <option value="2">审核通过</option> |
| | | <option value="2">未实名</option> |
| | | <option value="3">未实名</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | <script type="text/html" id="certify-status"> |
| | | {{# |
| | | var certifyStatus = { |
| | | 0: {title: '未实名', color: 'blue'}, |
| | | 1: {title: '未实名', color: 'blue'}, |
| | | 1: {title: '待审核', color: 'blue'}, |
| | | 2: {title: '审核通过', color: 'green'}, |
| | | 3: {title: '未实名', color: 'blue'} |
| | | }[d.certifyStatus]; |
| | |
| | | var accountStatus = { |
| | | 1: {title: '正常', color : 'blue'}, |
| | | 0: {title: '禁用', color : 'red'} |
| | | }[d.status]; |
| | | }[d.accountStatus]; |
| | | }} |
| | | <span class="layui-badge febs-bg-{{accountStatus.color}}">{{ accountStatus.title }}</span> |
| | | </script> |
| | |
| | | // 刷新按钮 |
| | | $reset.on('click', function () { |
| | | $searchForm[0].reset(); |
| | | sortObject.type = 'null'; |
| | | createTimeTo = null; |
| | | createTimeFrom = null; |
| | | tableIns.reload({where: getQueryParams(), page: {curr: 1}, initSort: sortObject}); |
| | | tableIns.reload({where: $.extend(getQueryParams(), {field: sortObject.field, order: sortObject.type}), page: {curr: 1}}); |
| | | }); |
| | | |
| | | $add.on('click', function() { |
| | |
| | | createTimeFrom = createTime.split(' - ')[0]; |
| | | createTimeTo = createTime.split(' - ')[1]; |
| | | } |
| | | var accountStatus = $searchForm.find("select[name='accountStatus']").val(); |
| | | console.log(accountStatus); |
| | | return { |
| | | startTime: createTimeFrom, |
| | | endTime: createTimeTo, |
| | |
| | | <div class="layui-input-inline"> |
| | | <select name="accountType"> |
| | | <option value=""></option> |
| | | <option value="1">测试账号</option> |
| | | <option value="2">正常账号</option> |
| | | <option value="2">测试账号</option> |
| | | <option value="1">正常账号</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | <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="">请选择</option> |
| | | <option value="1">待审核</option> |
| | | <option value="2">审核通过</option> |
| | | <option value="2">未实名</option> |
| | | <option value="3">未实名</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | <script type="text/html" id="certify-status"> |
| | | {{# |
| | | var certifyStatus = { |
| | | 0: {title: '未通过', color: 'red'}, |
| | | 1: {title: '审核中', color: 'blue'}, |
| | | 1: {title: '待审核', color: 'blue'}, |
| | | 2: {title: '审核通过', color: 'green'}, |
| | | 3: {title: '未实名', color: 'cyan'} |
| | | 3: {title: '未实名', color: 'blue'} |
| | | }[d.certifyStatus]; |
| | | }} |
| | | <span class="layui-badge febs-tag-{{certifyStatus.color}}">{{ certifyStatus.title }}</span> |
| | |
| | | createTimeTo = createTime.split(' - ')[1]; |
| | | } |
| | | return { |
| | | startTime: createTimeFrom, |
| | | endTime: createTimeTo, |
| | | startTimeDate: createTimeFrom, |
| | | endTimeDate: createTimeTo, |
| | | account: $searchForm.find('input[name="account"]').val().trim(), |
| | | accountStatus: $searchForm.find("select[name='accountStatus']").val(), |
| | | accountType: $searchForm.find("select[name='accountType']").val(), |