import request from '@/apps/mobile/utils/request'

// 用户返利规则分页查询
export function queryRebateRuleList(data) {
    return request({
        method: 'post',
        url: '/api/userRebateRules/query-page',
        data,
    });
}


// 用户返利规则新增
export function addRebateRule(data) {
    return request({
        method: 'post',
        url: '/api/userRebateRules/insert',
        data,
    });
}


// 用户返利规则修改
export function updateRebateRule(data) {
    return request({
        method: 'put',
        url: '/api/userRebateRules/update',
        data,
    });
}



// 用户返利规则批量删除
export function rebateRuleBatchDelete(data) {
    return request({
        method: 'delete',
        url: '/api/userRebateRules/delete-batch',
        data,
    });
}


// 用户返利规则根据id删除
export function rebateRuleDeleteById(id) {
    return request({
        method: 'delete',
        url: `/api/userRebateRules/delete/${id}`,
    });
}


// 用户返利规则新增
export function rebateRuleExamine(data) {
    return request({
        method: 'post',
        url: '/api/userRebateRules/examine',
        data,
    });
}


// 查询还没有设置返利信息的角色
export function queryRoleList() {
    return request({
        method: 'post',
        url: '/api/userLevelRules/getNotSetRole',
    });
}

