buildProductManagerListUpgradeGoodsSimpleParams.js 1.76 KB
/* eslint-disable jsdoc/require-property-description, jsdoc/require-returns-description */
/**
 * @typedef {Object} ProductManagerListUpgradeGoodsSimpleParams
 * @property {number} currentPage [optional] - 当前页码
 * @property {number} pageSize [optional] - 每页条数
 * @property {string} commodityCode [optional] - UID(产品编码,模糊查询)对应commodity_code
 * @property {string} productType [optional] - 产品类型 1-轻改 2-权益、延保
 */

/**
 * @typedef {Object} ProductManagerListUpgradeGoodsSimpleRow
 * @property {string} errId - 错误码
 * @property {string} data - 成功返回数据
 */

/**
 * @typedef {Object} ProductManagerListUpgradeGoodsSimplePageResponse
 * @property {number} [pageNum]
 * @property {number} [pageSize]
 * @property {number} [total]
 * @property {ProductManagerListUpgradeGoodsSimpleRow[]} [list]
 */

/**
 * UI/表格参数 → dj.api.smartcarlife.productManager.listUpgradeGoodsSimple 请求体
 * @param {ProductManagerListUpgradeGoodsSimpleParams} [params]
 * @returns {ProductManagerListUpgradeGoodsSimpleParams}
 * @see __contracts__/dj_api_smartcarlife_productManager_listUpgradeGoodsSimple.contract.md
 */
export function buildProductManagerListUpgradeGoodsSimpleParams(params = {}) {
	const payload = {};
	if (params.currentPage != null && params.currentPage !== "") {
		payload.currentPage = params.currentPage;
	}
	if (params.pageSize != null && params.pageSize !== "") {
		payload.pageSize = params.pageSize;
	}
	if (params.commodityCode != null && params.commodityCode !== "") {
		payload.commodityCode = params.commodityCode;
	}
	if (params.productType != null && params.productType !== "") {
		payload.productType = params.productType;
	}
	return payload;
}

export default buildProductManagerListUpgradeGoodsSimpleParams;