import request from '@/utils/request'

// 查询用户会员列表
export function listMallMemberUser(query) {
  return request({
    url: '/mall/mallMemberUser/list',
    method: 'get',
    params: query
  })
}

// 查询用户会员详细
export function getMallMemberUser(id) {
  return request({
    url: '/mall/mallMemberUser/' + id,
    method: 'get'
  })
}

// 新增用户会员
export function addMallMemberUser(data) {
  return request({
    url: '/mall/mallMemberUser',
    method: 'post',
    data: data
  })
}

// 修改用户会员
export function updateMallMemberUser(data) {
  return request({
    url: '/mall/mallMemberUser',
    method: 'put',
    data: data
  })
}

// 删除用户会员
export function delMallMemberUser(id) {
  return request({
    url: '/mall/mallMemberUser/' + id,
    method: 'delete'
  })
}

// 查询我的下级会员列表
export function getMyChildren(query) {
  return request({
    url: '/mall/mallMemberUser/getMyChildren',
    method: 'get',
    params: query
  })
}

// 新增登录用户提交
export function submitUser(data) {
  return request({
    url: '/mall/mallMemberUser/submitUser',
    method: 'put',
    data: data
  })
}

// 客户总营业额统计合计
export function setIsOpenStatisticsNum(query) {
  return request({
    url: '/mall/mallMemberUser/setIsOpenStatisticsNum',
    method: 'get',
    params: query
  })
}
