import request from "@/utils/httpRequest";
import { PSI_MANAGEMANT as prefix } from "../AppPath";

export default class CreditCustomerService {
	list(param) {
		return request({
			url: prefix + "/psi/creditCustomer/list",
			method: "get",
			params: param,
		});
	}
	save(param) {
		return request({
			url: prefix + "/psi/creditCustomer/save",
			method: "post",
			data: param,
		});
	}
	saveFlow(param) {
		return request({
			url: prefix + "/psi/creditCustomer/saveFlow",
			method: "post",
			data: param,
		});
	}
	updateStatusById(data) {
		return request({
			url: prefix + "/psi/creditCustomer/updateStatusById",
			method: "post",
			data,
		});
	}
	findById(id) {
		return request({
			url: prefix + "/psi/creditCustomer/findById",
			method: "get",
			params: { id: id },
		});
	}
	delete(ids) {
		return request({
			url: prefix + "/psi/creditCustomer/delete",
			method: "delete",
			params: { ids: ids },
		});
	}
	changeStatus(id, creditStatus) {
		return request({
			url: prefix + "/psi/creditCustomer/changeStatus",
			method: "get",
			params: { id: id, creditStatus: creditStatus },
		});
	}
}

