buildProductManagerListUpgradeGoodsSimpleParams.js
1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/* 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;