后台-推广后台-包含补填邀请码的用户
This commit is contained in:
@@ -1,41 +1,43 @@
|
||||
<section class="content">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<section className="content">
|
||||
<div className="box box-primary">
|
||||
<div className="box-body">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<section className="content-header">
|
||||
<h1 id="itemTitle"></h1>
|
||||
</section>
|
||||
<div id="toolbar">
|
||||
<div class="col-sm-12">
|
||||
<label for="groupSelector" class="col-sm-1 control-label">选择团队:</label>
|
||||
<div class="col-sm-3">
|
||||
<select name="query-teamSelector" id="groupSelector" onchange="initTeamSelector(this.options[this.selectedIndex].value, this.name, false)"
|
||||
class="form-control group-selector" data-btn-class="btn-warning">
|
||||
<div className="col-sm-12">
|
||||
<label htmlFor="groupSelector" className="col-sm-1 control-label">选择团队:</label>
|
||||
<div className="col-sm-3">
|
||||
<select name="query-teamSelector" id="groupSelector"
|
||||
onChange="initTeamSelector(this.options[this.selectedIndex].value, this.name, false)"
|
||||
className="form-control group-selector" data-btn-class="btn-warning">
|
||||
</select>
|
||||
</div>
|
||||
<label for="query-teamSelector" class="col-sm-1 control-label">选择小组:</label>
|
||||
<div class="col-sm-3">
|
||||
<select name="teamSelector" id="query-teamSelector" class="form-control" data-btn-class="btn-warning">
|
||||
<label htmlFor="query-teamSelector" className="col-sm-1 control-label">选择小组:</label>
|
||||
<div className="col-sm-3">
|
||||
<select name="teamSelector" id="query-teamSelector" className="form-control"
|
||||
data-btn-class="btn-warning">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<label for="memberName" class="col-sm-1 control-label">姓名:</label>
|
||||
<div class="col-sm-3"><input type="text" class="form-control" name="memberName"
|
||||
id="memberName" placeholder="输入成员姓名"></div>
|
||||
<label for="memberPhone" class="col-sm-1 control-label">手机号:</label>
|
||||
<div class="col-sm-3"><input type="text" class="form-control" name="memberPhone"
|
||||
id="memberPhone" placeholder="输入成员手机号"></div>
|
||||
<label for="inviteCode" class="col-sm-1 control-label">邀请码:</label>
|
||||
<div class="col-sm-3"><input type="text" class="form-control" name="inviteCode"
|
||||
id="inviteCode" placeholder="输入邀请码"></div>
|
||||
<div className="col-sm-12">
|
||||
<label htmlFor="memberName" className="col-sm-1 control-label">姓名:</label>
|
||||
<div className="col-sm-3"><input type="text" className="form-control" name="memberName"
|
||||
id="memberName" placeholder="输入成员姓名"></div>
|
||||
<label htmlFor="memberPhone" className="col-sm-1 control-label">手机号:</label>
|
||||
<div className="col-sm-3"><input type="text" className="form-control" name="memberPhone"
|
||||
id="memberPhone" placeholder="输入成员手机号"></div>
|
||||
<label htmlFor="inviteCode" className="col-sm-1 control-label">邀请码:</label>
|
||||
<div className="col-sm-3"><input type="text" className="form-control" name="inviteCode"
|
||||
id="inviteCode" placeholder="输入邀请码"></div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<button id="btnSearch" class="btn btn-default">
|
||||
<i class="glyphicon glyphicon-search"></i>查询
|
||||
<div className="col-sm-12">
|
||||
<button id="btnSearch" className="btn btn-default">
|
||||
<i className="glyphicon glyphicon-search"></i>查询
|
||||
</button>
|
||||
<button id="addBtn" class="btn btn-default">
|
||||
<i class="glyphicon glyphicon-plus"></i>新增成员
|
||||
<button id="addBtn" className="btn btn-default">
|
||||
<i className="glyphicon glyphicon-plus"></i>新增成员
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -47,32 +49,34 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="modal fade" id="addClanModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span>
|
||||
<div className="modal fade" id="addClanModal" tabIndex="-1" role="dialog" aria-labelledby="modalLabel">
|
||||
<div className="modal-dialog" role="document">
|
||||
<div className="modal-content">
|
||||
<div className="modal-header">
|
||||
<button type="button" className="close" data-dismiss="modal" aria-label="Close"><span
|
||||
aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="modalLabel">添加</h4>
|
||||
<h4 className="modal-title" id="modalLabel">添加</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal" id="addForm">
|
||||
<div className="modal-body">
|
||||
<form className="form-horizontal" id="addForm">
|
||||
<input type="hidden" name="editMemberId" id="editMemberId"/>
|
||||
<div class="form-group">
|
||||
<label for="editMemberName" class="col-sm-3 control-label">姓名</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control validate[required]" name="editMemberName" id="editMemberName">
|
||||
<div className="form-group">
|
||||
<label htmlFor="editMemberName" className="col-sm-3 control-label">姓名</label>
|
||||
<div className="col-sm-9">
|
||||
<input type="text" className="form-control validate[required]" name="editMemberName"
|
||||
id="editMemberName">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="editMemberPhone" class="col-sm-3 control-label">电话</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="editMemberPhone" id="editMemberPhone">
|
||||
<div className="form-group">
|
||||
<label htmlFor="editMemberPhone" className="col-sm-3 control-label">电话</label>
|
||||
<div className="col-sm-9">
|
||||
<input type="text" className="form-control" name="editMemberPhone" id="editMemberPhone">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="teamRoleSelector" class="col-sm-3 control-label">职务</label>
|
||||
<div class="col-sm-9" >
|
||||
<div className="form-group">
|
||||
<label htmlFor="teamRoleSelector" className="col-sm-3 control-label">职务</label>
|
||||
<div className="col-sm-9">
|
||||
<select name="teamRoleSelector" id="teamRoleSelector">
|
||||
<option value="1">组员</option>
|
||||
<option value="2">组长</option>
|
||||
@@ -80,31 +84,33 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="modal-groupSelector" class="col-sm-3 control-label">所属团队</label>
|
||||
<div class="col-sm-9" >
|
||||
<select name="modal-teamSelector" id="modal-groupSelector" onchange="initTeamSelector(this.options[this.selectedIndex].value, this.name, false)">
|
||||
<div className="form-group">
|
||||
<label htmlFor="modal-groupSelector" className="col-sm-3 control-label">所属团队</label>
|
||||
<div className="col-sm-9">
|
||||
<select name="modal-teamSelector" id="modal-groupSelector"
|
||||
onChange="initTeamSelector(this.options[this.selectedIndex].value, this.name, false)">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="modal-teamSelector" class="col-sm-3 control-label">所属小组</label>
|
||||
<div class="col-sm-9" >
|
||||
<div className="form-group">
|
||||
<label htmlFor="modal-teamSelector" className="col-sm-3 control-label">所属小组</label>
|
||||
<div className="col-sm-9">
|
||||
<select name="modal-teamSelector" id="modal-teamSelector">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="editInviteCodes" class="col-sm-3 control-label">邀请码</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="input-sm form-control datetime" name="editInviteCodes" id="editInviteCodes" placeholder="用,隔开填多个">
|
||||
<div className="form-group">
|
||||
<label htmlFor="editInviteCodes" className="col-sm-3 control-label">邀请码</label>
|
||||
<div className="col-sm-9">
|
||||
<input type="text" className="input-sm form-control datetime" name="editInviteCodes"
|
||||
id="editInviteCodes" placeholder="用,隔开填多个">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" id="save">确定</button>
|
||||
<div className="modal-footer">
|
||||
<button type="button" className="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" className="btn btn-primary" id="save">确定</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -121,16 +127,16 @@
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/admin/flowTeam/listTeamByGroupId.action",
|
||||
data : {
|
||||
groupId : groupId
|
||||
data: {
|
||||
groupId: groupId
|
||||
},
|
||||
dataType:"json",
|
||||
success: function(json){
|
||||
if(json.success){
|
||||
dataType: "json",
|
||||
success: function (json) {
|
||||
if (json.success) {
|
||||
for (let i = 0; i < json.data.length; i++) {
|
||||
const flowTeam = json.data[i];
|
||||
//拼接成多个<option><option/>
|
||||
options.push('<option value="'+flowTeam.teamId+'">'+flowTeam.teamName+'</option>')
|
||||
options.push('<option value="' + flowTeam.teamId + '">' + flowTeam.teamName + '</option>')
|
||||
}
|
||||
if (options.length == 0) {
|
||||
options.push('<option value="">暂无数据</option>')
|
||||
@@ -143,18 +149,19 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化编辑弹窗
|
||||
function initEditModalData() {
|
||||
$('#editMemberId').val(editMemberInfo.memberId),
|
||||
$('#modal-groupSelector').val(editMemberInfo.groupId),
|
||||
$('#modal-groupSelector').attr('disabled', true),
|
||||
$('#editMemberName').val(editMemberInfo.memberName),
|
||||
$('#editMemberPhone').val(editMemberInfo.memberPhone),
|
||||
$('#teamRoleSelector').val(editMemberInfo.teamRole),
|
||||
$('#modal-teamSelector').val(editMemberInfo.teamId),
|
||||
$('#modal-teamSelector').attr('disabled', true),
|
||||
$('#editInviteCodes').val(editMemberInfo.inviteCodes),
|
||||
$("#addClanModal").modal('show');
|
||||
$('#modal-groupSelector').val(editMemberInfo.groupId),
|
||||
$('#modal-groupSelector').attr('disabled', true),
|
||||
$('#editMemberName').val(editMemberInfo.memberName),
|
||||
$('#editMemberPhone').val(editMemberInfo.memberPhone),
|
||||
$('#teamRoleSelector').val(editMemberInfo.teamRole),
|
||||
$('#modal-teamSelector').val(editMemberInfo.teamId),
|
||||
$('#modal-teamSelector').attr('disabled', true),
|
||||
$('#editInviteCodes').val(editMemberInfo.inviteCodes),
|
||||
$("#addClanModal").modal('show');
|
||||
}
|
||||
|
||||
$(function () {
|
||||
@@ -165,20 +172,21 @@
|
||||
$.get('/admin/flowteam/group/listGroupByPage',
|
||||
{
|
||||
page: 1,
|
||||
pageSize : 2147483647,
|
||||
groupName : ''
|
||||
pageSize: 2147483647,
|
||||
groupName: ''
|
||||
}, function (res) {
|
||||
if (res) {
|
||||
for (let i = 0; i < res.rows.length; i++) {
|
||||
var item = res.rows[i];
|
||||
//拼接成多个<option><option/>
|
||||
options.push('<option value="'+item.groupId+'">'+item.groupName+'</option>')
|
||||
if (res) {
|
||||
for (let i = 0; i < res.rows.length; i++) {
|
||||
var item = res.rows[i];
|
||||
//拼接成多个<option><option/>
|
||||
options.push('<option value="' + item.groupId + '">' + item.groupName + '</option>')
|
||||
}
|
||||
$("#groupSelector").html(options.join(' '));
|
||||
$("#modal-groupSelector").html(options.join(' '));
|
||||
}
|
||||
$("#groupSelector").html(options.join(' '));
|
||||
$("#modal-groupSelector").html(options.join(' '));
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
initGroupSelector();
|
||||
|
||||
|
||||
@@ -189,7 +197,8 @@
|
||||
columns: [
|
||||
{field: 'memberName', title: '姓名', align: 'center', width: '5%'},
|
||||
{field: 'memberPhone', title: '电话', align: 'center', width: '5%'},
|
||||
{field: 'groupId', title: '所属团队', align: 'center', width: '5%',
|
||||
{
|
||||
field: 'groupId', title: '所属团队', align: 'center', width: '5%',
|
||||
formatter: function (val) {
|
||||
const group = flowGroupsMap[val];
|
||||
if (group) {
|
||||
@@ -197,8 +206,10 @@
|
||||
} else {
|
||||
return '-'
|
||||
}
|
||||
}},
|
||||
{field: 'teamId', title: '所属小组', align: 'center', width: '5%',
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'teamId', title: '所属小组', align: 'center', width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
const team = flowTeamsMap[val];
|
||||
if (team) {
|
||||
@@ -206,8 +217,10 @@
|
||||
} else {
|
||||
return '-'
|
||||
}
|
||||
}},
|
||||
{field: 'teamRole', title: '职务', align: 'center', width: '5%',
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'teamRole', title: '职务', align: 'center', width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
const teamRole = TEAM_ROLE[val];
|
||||
if (teamRole) {
|
||||
@@ -215,15 +228,18 @@
|
||||
} else {
|
||||
return '-'
|
||||
}
|
||||
}},
|
||||
{field: 'memberStatus', title: '当前状态', align: 'center', width: '5%',
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'memberStatus', title: '当前状态', align: 'center', width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
if (val == 1) {
|
||||
return `<span class="text-success">生效</span>`;
|
||||
} else {
|
||||
return `<span style="color: grey">无效</span>`;
|
||||
}
|
||||
}},
|
||||
}
|
||||
},
|
||||
{field: 'inviteCodes', title: '邀请码', align: 'center', width: '5%'},
|
||||
{
|
||||
field: 'memberId',
|
||||
@@ -231,14 +247,15 @@
|
||||
align: 'center',
|
||||
width: '10%',
|
||||
formatter: function (val, row, index) {
|
||||
let statusChangeBtn = '<button class="btn btn-sm btn-success opt-change-status" data-idx=' + index +' data-new-status='+ 1 +'>设为生效</button>';
|
||||
let statusChangeBtn = '<button class="btn btn-sm btn-success opt-change-status" data-idx=' + index + ' data-new-status=' + 1 + '>设为生效</button>';
|
||||
if (row.memberStatus == 1) {
|
||||
statusChangeBtn = '<button class="btn btn-sm btn-primary opt-change-status" data-idx=' + index +' data-new-status='+ 0 +'>设为无效</button>';
|
||||
statusChangeBtn = '<button class="btn btn-sm btn-primary opt-change-status" data-idx=' + index + ' data-new-status=' + 0 + '>设为无效</button>';
|
||||
}
|
||||
return '<button id="btnEdit" name="btnEdit" class="btn btn-sm btn-primary opt-edit" data-idx=' + index + '>' +
|
||||
'<i class="glyphicon glyphicon-edit"></i> 编辑</button>'+
|
||||
statusChangeBtn +
|
||||
'<button class="btn btn-sm btn-danger opt-change-status" data-idx=' + index + ' data-new-status="-1"><i class="glyphicon glyphicon-remove"></i>删除</button>';
|
||||
'<i class="glyphicon glyphicon-edit"></i> 编辑</button>' +
|
||||
statusChangeBtn;
|
||||
//statusChangeBtn +
|
||||
//'<button class="btn btn-sm btn-danger opt-change-status" data-idx=' + index + ' data-new-status="-1"><i class="glyphicon glyphicon-remove"></i>删除</button>';
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -259,8 +276,8 @@
|
||||
memberName: $('#memberName').val(),
|
||||
memberPhone: $('#memberPhone').val(),
|
||||
inviteCode: $('#inviteCode').val(),
|
||||
teamId : $('#query-teamSelector').val(),
|
||||
groupId : $('#groupSelector').val()
|
||||
teamId: $('#query-teamSelector').val(),
|
||||
groupId: $('#groupSelector').val()
|
||||
};
|
||||
return param;
|
||||
},
|
||||
@@ -292,7 +309,7 @@
|
||||
});
|
||||
|
||||
//编辑成员信息
|
||||
$('#table').on('click','.opt-edit', function () {
|
||||
$('#table').on('click', '.opt-edit', function () {
|
||||
const idx = $(this).attr('data-idx');
|
||||
editMemberInfo = memberList[idx];
|
||||
console.log("memberInfo=======", editMemberInfo)
|
||||
@@ -304,7 +321,7 @@
|
||||
if ($("#addForm").validationEngine('validate')) {
|
||||
const requestParam = {
|
||||
memberId: $('#editMemberId').val(),
|
||||
groupId : $('#modal-groupSelector').val(),
|
||||
groupId: $('#modal-groupSelector').val(),
|
||||
teamId: $('#modal-teamSelector').val(),
|
||||
memberName: $('#editMemberName').val(),
|
||||
memberPhone: $('#editMemberPhone').val(),
|
||||
@@ -336,7 +353,7 @@
|
||||
|
||||
});
|
||||
|
||||
$('#table').on('click','.opt-change-status', function () {
|
||||
$('#table').on('click', '.opt-change-status', function () {
|
||||
const idx = $(this).attr('data-idx');
|
||||
const memberInfo = memberList[idx];
|
||||
console.debug('=======memberInfo', memberInfo);
|
||||
|
@@ -384,7 +384,7 @@
|
||||
u.uid,
|
||||
u.erban_no,
|
||||
u.nick,
|
||||
fu.create_time,
|
||||
u.create_time,
|
||||
sum(case when cr.amount is not null then 1 else 0 end) charge_count,
|
||||
sum(case when cr.amount is not null then cr.amount else 0 end) / 100 total_charge,
|
||||
min(cr.create_time) first_charge_time,
|
||||
@@ -396,7 +396,7 @@
|
||||
left join flow_team_member tm on fu.member_id = tm.member_id
|
||||
left join charge_record cr
|
||||
on cr.uid = fu.uid and cr.charge_status = 2 and cr.charge_prod_id <> 'exchange'
|
||||
and cr.create_time >= fu.create_time and cr.buss_type in (0,4)
|
||||
and cr.buss_type in (0,4)
|
||||
<if test="chargeStartTime != null and chargeStartTime != '' ">
|
||||
and cr.create_time >= #{chargeStartTime}
|
||||
</if>
|
||||
@@ -423,19 +423,19 @@
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="startDate != null and startDate != ''">
|
||||
and fu.create_time >= #{startDate}
|
||||
and u.create_time >= #{startDate}
|
||||
</if>
|
||||
<if test="endDate != null and endDate != ''">
|
||||
and fu.create_time < #{endDate}
|
||||
and u.create_time < #{endDate}
|
||||
</if>
|
||||
group by tm.member_name,fu.team_id,fu.invite_code, u.uid, u.erban_no, u.nick, fu.create_time
|
||||
group by tm.member_name,fu.team_id,fu.invite_code, u.uid, u.erban_no, u.nick, u.create_time
|
||||
union
|
||||
select tm.member_name,fu.team_id,
|
||||
fu.invite_code,
|
||||
u.uid,
|
||||
u.erban_no,
|
||||
u.nick,
|
||||
fu.create_time,
|
||||
u.create_time,
|
||||
0 charge_count,
|
||||
0 total_charge,
|
||||
null first_charge_time,
|
||||
@@ -445,7 +445,7 @@
|
||||
from flow_team_member_invite_user fu
|
||||
left join users u on u.uid = fu.uid
|
||||
left join flow_team_member tm on fu.member_id = tm.member_id
|
||||
left join gift_send_record gsr on fu.uid = gsr.uid and gsr.create_time >= fu.create_time
|
||||
left join gift_send_record gsr on fu.uid = gsr.uid and gsr.create_time >= u.create_time
|
||||
where 1 = 1
|
||||
<if test="teamIds != null and teamIds.size > 0">
|
||||
and fu.team_id in
|
||||
@@ -460,12 +460,12 @@
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="startDate != null and startDate != ''">
|
||||
and fu.create_time >= #{startDate}
|
||||
and u.create_time >= #{startDate}
|
||||
</if>
|
||||
<if test="endDate != null and endDate != ''">
|
||||
and fu.create_time < #{endDate}
|
||||
and u.create_time < #{endDate}
|
||||
</if>
|
||||
group by tm.member_name,fu.team_id,fu.invite_code, u.uid, u.erban_no, u.nick, fu.create_time
|
||||
group by tm.member_name,fu.team_id,fu.invite_code, u.uid, u.erban_no, u.nick, u.create_time
|
||||
) t LEFT JOIN account a ON t.erban_no = a.erban_no
|
||||
group by t.member_name, t.team_id,t.invite_code, t.erban_no , t.nick,t.create_time, a.register_ip
|
||||
order by t.create_time desc, t.invite_code
|
||||
|
@@ -12,7 +12,6 @@ package com.xuanyin.flowteam.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.xuanyin.flowteam.constant.FlowTeamConstant;
|
||||
import com.xuanyin.flowteam.mapper.FlowTeamInfoMapper;
|
||||
import com.xuanyin.flowteam.model.FlowTeamInfo;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -31,15 +30,13 @@ public class FlowTeamInfoService extends ServiceImpl<FlowTeamInfoMapper, FlowTea
|
||||
|
||||
public FlowTeamInfo getByTeamId(String teamId) {
|
||||
QueryWrapper<FlowTeamInfo> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(FlowTeamInfo::getTeamId, teamId)
|
||||
.eq(FlowTeamInfo::getStatus, FlowTeamConstant.MemberStatus.MEMBER_STATUS_VALID);
|
||||
queryWrapper.lambda().eq(FlowTeamInfo::getTeamId, teamId);
|
||||
return getOne(queryWrapper);
|
||||
}
|
||||
|
||||
public List<FlowTeamInfo> listByGroupId(Long groupId) {
|
||||
QueryWrapper<FlowTeamInfo> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(FlowTeamInfo::getGroupId, groupId)
|
||||
.eq(FlowTeamInfo::getStatus, FlowTeamConstant.MemberStatus.MEMBER_STATUS_VALID);
|
||||
queryWrapper.lambda().eq(FlowTeamInfo::getGroupId, groupId);
|
||||
return list(queryWrapper);
|
||||
}
|
||||
}
|
||||
|
@@ -11,14 +11,12 @@
|
||||
from
|
||||
(select fm.create_time , team_id, fi.invite_code
|
||||
from flow_team_member fm, flow_team_member_invite_code fi
|
||||
where member_status != -1
|
||||
and fm.member_id = fi.member_id
|
||||
where fm.member_id = fi.member_id
|
||||
<if test="teamId != null and teamId != ''">
|
||||
and team_id = #{teamId}
|
||||
</if>
|
||||
group by fm.create_time, team_id, fi.invite_code) a, users u
|
||||
where a.invite_code = u.invite_code
|
||||
and u.create_time >= a.create_time
|
||||
<if test="onlyQueryOld != null and onlyQueryOld">
|
||||
and date_format(u.create_time, '%Y-%m') < date_format(current_timestamp, '%Y-%m')
|
||||
</if>
|
||||
@@ -30,17 +28,14 @@
|
||||
from
|
||||
(select fm.create_time , team_id, fi.invite_code
|
||||
from flow_team_member fm, flow_team_member_invite_code fi
|
||||
where member_status != -1
|
||||
and fm.member_id = fi.member_id
|
||||
where fm.member_id = fi.member_id
|
||||
<if test="teamId != null and teamId != ''">
|
||||
and team_id = #{teamId}
|
||||
</if>
|
||||
group by fm.create_time, team_id, fi.invite_code) a, users u, charge_record r
|
||||
where u.create_time >= a.create_time
|
||||
and a.invite_code = u.invite_code
|
||||
where a.invite_code = u.invite_code
|
||||
and u.uid = r.uid and r.charge_status = 2
|
||||
and r.charge_prod_id != 'exchange'
|
||||
and date_format(r.create_time, '%Y-%m') = date_format(u.create_time, '%Y-%m')
|
||||
<if test="onlyQueryOld != null and onlyQueryOld">
|
||||
and date_format(r.create_time, '%Y-%m') < date_format(current_timestamp, '%Y-%m')
|
||||
</if>
|
||||
@@ -53,15 +48,13 @@
|
||||
from
|
||||
(select fm.create_time , team_id, fi.invite_code
|
||||
from flow_team_member fm, flow_team_member_invite_code fi
|
||||
where member_status != -1
|
||||
and fm.member_id = fi.member_id
|
||||
where fm.member_id = fi.member_id
|
||||
<if test="teamId != null and teamId != ''">
|
||||
and team_id = #{teamId}
|
||||
</if>
|
||||
group by fm.create_time, team_id, fi.invite_code) a, users u , charge_record r
|
||||
where a.invite_code = u.invite_code
|
||||
and u.uid = r.uid and r.charge_status = 2 and r.charge_prod_id != 'exchange'
|
||||
and u.create_time >= a.create_time
|
||||
<if test="onlyQueryOld != null and onlyQueryOld">
|
||||
and date_format(r.create_time, '%Y-%m') < date_format(current_timestamp, '%Y-%m')
|
||||
</if>
|
||||
@@ -82,13 +75,11 @@
|
||||
from
|
||||
(select fm.create_time , team_id, fi.invite_code
|
||||
from flow_team_member fm, flow_team_member_invite_code fi
|
||||
where member_status != -1
|
||||
and fm.member_id = fi.member_id
|
||||
where fm.member_id = fi.member_id
|
||||
and team_id = #{teamId}
|
||||
group by fm.create_time, team_id, fi.invite_code) a, users u , charge_record r, users u2
|
||||
where a.invite_code = u.invite_code
|
||||
and u.uid = r.uid and r.charge_status = 2 and r.charge_prod_id != 'exchange'
|
||||
and u.create_time >= a.create_time
|
||||
and u2.uid = u.invite_uid
|
||||
and date_format(r.create_time, '%Y-%m') = #{month}
|
||||
<if test="erbanNo != null and erbanNo != ''">
|
||||
@@ -123,8 +114,7 @@
|
||||
, ifnull(sum(r.amount / 100), 0) newUserChargeAmount , 0 totalChargeAmount, 0 totalChargeUserNum, 0 totalChargeNum
|
||||
from
|
||||
flow_team_member_invite_user fi, charge_record r
|
||||
where r.create_time >= fi.create_time
|
||||
and fi.uid = r.uid and r.charge_status = 2
|
||||
where fi.uid = r.uid and r.charge_status = 2
|
||||
and r.charge_prod_id != 'exchange'
|
||||
and r.buss_type in (0,4)
|
||||
<if test="teamIds != null and teamIds.size > 0">
|
||||
@@ -133,7 +123,6 @@
|
||||
#{teamId}
|
||||
</foreach>
|
||||
</if>
|
||||
and date_format(r.create_time, '%Y-%m') = date_format(fi.create_time, '%Y-%m')
|
||||
group by month
|
||||
union
|
||||
-- 小组过去1年邀请的用户在N月的充值概况
|
||||
@@ -144,9 +133,8 @@
|
||||
flow_team_member_invite_user fi , charge_record r
|
||||
where fi.uid = r.uid and r.charge_status = 2 and r.charge_prod_id != 'exchange'
|
||||
and r.buss_type in (0,4)
|
||||
and r.create_time >= fi.create_time
|
||||
<if test="queryLimitTime != null">
|
||||
and fi.create_time >= #{queryLimitTime}
|
||||
and r.create_time >= #{queryLimitTime}
|
||||
</if>
|
||||
<if test="teamIds != null and teamIds.size > 0">
|
||||
and fi.team_id in
|
||||
@@ -172,7 +160,6 @@
|
||||
charge_record r, flow_team_member fm, flow_team_member_invite_user fu
|
||||
left join users u on fu.uid = u.uid
|
||||
where fu.uid = r.uid and r.charge_status = 2 and r.charge_prod_id != 'exchange'
|
||||
and r.create_time >= fu.create_time
|
||||
and fm.member_id = fu.member_id
|
||||
<if test="teamIds != null and teamIds.size > 0">
|
||||
and fu.team_id in
|
||||
@@ -189,14 +176,13 @@
|
||||
|
||||
<select id="listFlowTeamSettleDetailV3" resultType="com.xuanyin.flowteam.dto.FlowTeamSettlementDetail">
|
||||
select u.erban_no erbanNo, u.nick nick,
|
||||
fu.create_time createTime, u.invite_code inviteCode,
|
||||
u.create_time createTime, u.invite_code inviteCode,
|
||||
fm.member_name inviteUserNick,
|
||||
sum(r.amount /100) amount
|
||||
from
|
||||
charge_record r, flow_team_member fm, flow_team_member_invite_user fu
|
||||
left join users u on fu.uid = u.uid
|
||||
where fu.uid = r.uid and r.charge_status = 2 and r.charge_prod_id != 'exchange'
|
||||
and r.create_time >= fu.create_time
|
||||
and fm.member_id = fu.member_id
|
||||
<if test="teamIds != null and teamIds.size > 0">
|
||||
and fu.team_id in
|
||||
@@ -207,7 +193,7 @@
|
||||
and r.buss_type in (0,4)
|
||||
and date_format(r.create_time, '%Y-%m') = #{month}
|
||||
<if test="queryLimitTime != null and queryLimitTime != ''">
|
||||
and fu.create_time >= #{queryLimitTime}
|
||||
and u.create_time >= #{queryLimitTime}
|
||||
</if>
|
||||
<if test="erbanNo != null and erbanNo != ''">
|
||||
and u.erban_no = #{erbanNo}
|
||||
|
Reference in New Issue
Block a user