import { stringify } from 'qs';
import { request } from '@umijs/max';
import webpath from '@/utils/webPath';


export async function deleteByPrimaryKeyForWxUser(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/wxuser/delete?${stringify(params)}`);
}


export async function selectByPrimaryKeyForWxUser(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/wxuser/get?${stringify(params)}`);
}


export async function insertForWxUser(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/wxuser/insert`, {
        method: 'POST',
        data: {
            ...params,
            method: 'insert',
        },
    });
}


export async function updateForWxUser(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/wxuser/update`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}


export async function deleteByMapForWxUser(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/wxuser/deleteByMap`, {
        method: 'POST',
        data: {
            ...params,
            method: 'delete',
        },
    });
}


export async function updateByMapForWxUser(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/wxuser/updateByMap`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}


export async function getOneForWxUser(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/wxuser/getOne`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}



export async function getAllForWxUser(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/wxuser/getAll`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}


export async function queryPageForWxUser(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/wxuser/queryPage`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}


export async function countForWxUser(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/wxuser/count`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}

export async function insertBatchForWxUser(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/wxuser/insertBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'insert',
        },
    });
}


export async function deleteBatchForWxUser(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/wxuser/deleteBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'delete',
        },
    });
}


export async function updateBatchForWxUser(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/wxuser/updateBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}

export async function synchroWxUserForWxUser(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/wxuser/synchron`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}

export async function getAllForWxuserTags(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/wxusertags/list`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}

export async function getTagsAndSelectedWxUserByTagsId(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/wxuser/getTagsAndSelectedWxUserByTagsId`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}

export async function insertTagsForWxUser(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/wxuser/tagidList`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}

export async function updateRemarkForWxUser(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/wxuser/remark`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}
