import request from "@/utils/httpRequest";

export default {
	list: function (params) {
		return request({
			url: "/wdt/merchantProduct/list",
			method: "get",
			params: params,
		});
	},
	queryById: function (id) {
		return request({
			url: "/wdt/merchantProduct/queryById",
			method: "get",
			params: { id: id },
		});
	},
	save: function (inputForm) {
		return request({
			url: "/wdt/merchantProduct/save",
			method: "post",
			data: inputForm,
		});
	},
	delete: function (ids) {
		return request({
			url: "/wdt/merchantProduct/delete",
			method: "delete",
			params: { ids: ids },
		});
	},

	exportTemplate: function () {
		return request({
			url: "/wdt/merchantProduct/import/template",
			method: "get",
			responseType: "blob",
		});
	},

	exportExcel: function (params) {
		return request({
			url: "/wdt/merchantProduct/export",
			method: "get",
			params: params,
			responseType: "blob",
		});
	},

	importExcel: function (data) {
		return request({
			url: "/wdt/merchantProduct/import",
			method: "post",
			data: data,
		});
	},
};
