//组合后端需要的QueryBody
export function transformPostBody(params) {
	let template = {
		"queryParam": {},
		//"order": "ascending",
		"sort": "updateTime"
	}
	if (params) {
		for (const item in params) {
			if (params[item]) {
				template.queryParam[item] = params[item]
			}
		}
	}
	return template;
}

export function transformPostBody_Device(params) {
	let template = {
		"queryParam": {},
		//"order": "ascending",
		"sort": "updateTime"
	}
	for (const item in params) {
		if (params[item]) {
			template.queryParam[item] = params[item]
		}
	}
	return template;
}

//组合后端需要的QueryURL
export function transformRequestURL(params) {
	let template = {}
	if (!params) { //默认
		params = {
			pageNum: 1,
			pageSize: 10,
		}
	}
	for (const item in params) {
		if (params[item]) {
			template[item] = params[item]
		}
	}
	return template;
}