@things-factory/product-base 10.1.303 → 10.1.304
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-server/service/product-bundle/product-bundle-query.js +3 -3
- package/dist-server/service/product-combination/product-combination-query.js +3 -3
- package/dist-server/service/product-combination-setting/product-combination-setting-query.js +3 -3
- package/dist-server/service/product-set/product-set-query.js +3 -3
- package/package.json +4 -4
|
@@ -57,13 +57,13 @@ let ProductBundleQuery = class ProductBundleQuery {
|
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
async domain(productBundle) {
|
|
60
|
-
return await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: productBundle.domainId });
|
|
60
|
+
return productBundle.domainId ? await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: productBundle.domainId }) : null;
|
|
61
61
|
}
|
|
62
62
|
async creator(productBundle) {
|
|
63
|
-
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: productBundle.creatorId });
|
|
63
|
+
return productBundle.creatorId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: productBundle.creatorId }) : null;
|
|
64
64
|
}
|
|
65
65
|
async updater(productBundle) {
|
|
66
|
-
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: productBundle.updaterId });
|
|
66
|
+
return productBundle.updaterId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: productBundle.updaterId }) : null;
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
69
|
exports.ProductBundleQuery = ProductBundleQuery;
|
|
@@ -23,13 +23,13 @@ let ProductCombinationQuery = class ProductCombinationQuery {
|
|
|
23
23
|
return { items, total };
|
|
24
24
|
}
|
|
25
25
|
async domain(productCombination) {
|
|
26
|
-
return await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: productCombination.domainId });
|
|
26
|
+
return productCombination.domainId ? await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: productCombination.domainId }) : null;
|
|
27
27
|
}
|
|
28
28
|
async updater(productCombination) {
|
|
29
|
-
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: productCombination.updaterId });
|
|
29
|
+
return productCombination.updaterId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: productCombination.updaterId }) : null;
|
|
30
30
|
}
|
|
31
31
|
async creator(productCombination) {
|
|
32
|
-
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: productCombination.creatorId });
|
|
32
|
+
return productCombination.creatorId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: productCombination.creatorId }) : null;
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
exports.ProductCombinationQuery = ProductCombinationQuery;
|
package/dist-server/service/product-combination-setting/product-combination-setting-query.js
CHANGED
|
@@ -110,13 +110,13 @@ let ProductCombinationSettingQuery = class ProductCombinationSettingQuery {
|
|
|
110
110
|
return { items, total };
|
|
111
111
|
}
|
|
112
112
|
async product(productCombinationSetting) {
|
|
113
|
-
return await (0, shell_1.getRepository)(product_1.Product).findOneBy({ id: productCombinationSetting.productId });
|
|
113
|
+
return productCombinationSetting.productId ? await (0, shell_1.getRepository)(product_1.Product).findOneBy({ id: productCombinationSetting.productId }) : null;
|
|
114
114
|
}
|
|
115
115
|
async productDetail(productCombinationSetting) {
|
|
116
|
-
return await (0, shell_1.getRepository)(product_detail_1.ProductDetail).findOneBy({ id: productCombinationSetting.productDetailId });
|
|
116
|
+
return productCombinationSetting.productDetailId ? await (0, shell_1.getRepository)(product_detail_1.ProductDetail).findOneBy({ id: productCombinationSetting.productDetailId }) : null;
|
|
117
117
|
}
|
|
118
118
|
async productCombination(productCombinationSetting) {
|
|
119
|
-
return await (0, shell_1.getRepository)(product_combination_1.ProductCombination).findOneBy({ id: productCombinationSetting.productCombinationId });
|
|
119
|
+
return productCombinationSetting.productCombinationId ? await (0, shell_1.getRepository)(product_combination_1.ProductCombination).findOneBy({ id: productCombinationSetting.productCombinationId }) : null;
|
|
120
120
|
}
|
|
121
121
|
};
|
|
122
122
|
exports.ProductCombinationSettingQuery = ProductCombinationSettingQuery;
|
|
@@ -63,13 +63,13 @@ let ProductSetQuery = class ProductSetQuery {
|
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
async domain(productSet) {
|
|
66
|
-
return await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: productSet.domainId });
|
|
66
|
+
return productSet.domainId ? await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: productSet.domainId }) : null;
|
|
67
67
|
}
|
|
68
68
|
async creator(productSet) {
|
|
69
|
-
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: productSet.creatorId });
|
|
69
|
+
return productSet.creatorId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: productSet.creatorId }) : null;
|
|
70
70
|
}
|
|
71
71
|
async updater(productSet) {
|
|
72
|
-
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: productSet.updaterId });
|
|
72
|
+
return productSet.updaterId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: productSet.updaterId }) : null;
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
75
|
exports.ProductSetQuery = ProductSetQuery;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/product-base",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.304",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.ts",
|
|
6
6
|
"files": [
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"migration:create": "node ../../node_modules/typeorm/cli.js migration:create ./server/migrations/migration"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@things-factory/biz-base": "^10.1.
|
|
41
|
+
"@things-factory/biz-base": "^10.1.304",
|
|
42
42
|
"@things-factory/env": "^10.1.298",
|
|
43
|
-
"@things-factory/routing-base": "^10.1.
|
|
43
|
+
"@things-factory/routing-base": "^10.1.304"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "76ce38519069ba90190d69d2a9d6c130bc981cf0"
|
|
46
46
|
}
|