ts-glitter 22.5.1 → 22.5.3
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/collection.json +398 -0
- package/lowcode/Entry.js +1 -1
- package/lowcode/Entry.ts +1 -1
- package/lowcode/backend-manager/bg-product.js +3 -0
- package/lowcode/backend-manager/bg-product.ts +3 -0
- package/lowcode/cms-plugin/shopping-collections.js +851 -831
- package/lowcode/cms-plugin/shopping-collections.ts +909 -1156
- package/lowcode/cms-plugin/shopping-setting-basic.js +1 -0
- package/lowcode/cms-plugin/shopping-setting-basic.ts +1 -0
- package/lowcode/glitter-base/route/public-config.js +1 -1
- package/lowcode/glitter-base/route/public-config.ts +1 -1
- package/lowcode/public-components/product/pd-card-03.ts +1 -0
- package/lowcode/public-components/product/product-list.js +8 -4
- package/lowcode/public-components/product/product-list.ts +6 -5
- package/package.json +1 -1
- package/src/api-public/services/collection.d.ts +3 -0
- package/src/api-public/services/collection.js +100 -0
- package/src/api-public/services/collection.js.map +1 -0
- package/src/api-public/services/collection.ts +98 -0
- package/src/api-public/services/data-analyze.d.ts +1 -1
- package/src/api-public/services/manager.d.ts +2 -1
- package/src/api-public/services/manager.js +67 -13
- package/src/api-public/services/manager.js.map +1 -1
- package/src/api-public/services/manager.ts +86 -14
- package/src/api-public/services/public-table-check.js +14 -1
- package/src/api-public/services/public-table-check.js.map +1 -1
- package/src/api-public/services/public-table-check.ts +14 -1
- package/src/api-public/services/shopping.js +16 -8
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +19 -10
- package/src/api-public/services/updated-table-checked.js +43 -0
- package/src/api-public/services/updated-table-checked.js.map +1 -1
- package/src/api-public/services/updated-table-checked.ts +49 -0
- package/src/seo-config.js +1 -1
- package/src/seo-config.js.map +1 -1
- package/src/seo-config.ts +1 -1
|
@@ -208,7 +208,7 @@ export class ProductList {
|
|
|
208
208
|
else {
|
|
209
209
|
return title;
|
|
210
210
|
}
|
|
211
|
-
})(), array: array, product_id: product_id !== null && product_id !== void 0 ? product_id : [], checked: false, parentTitles: parentTitles.length ? [...parentTitles] : [], allCollections: parentTitles.length ? [...topLevelCollections] : [], subCollections: array.map(subCol => (() => {
|
|
211
|
+
})(), array: array, product_id: product_id !== null && product_id !== void 0 ? product_id : [], checked: false, parentTitles: parentTitles.length ? [...parentTitles] : [], allCollections: parentTitles.length ? [...topLevelCollections] : [], subCollections: (array !== null && array !== void 0 ? array : []).map(subCol => (() => {
|
|
212
212
|
const language_data = subCol.language_data;
|
|
213
213
|
if (language_data &&
|
|
214
214
|
language_data[Language.getLanguage()] &&
|
|
@@ -237,7 +237,7 @@ export class ProductList {
|
|
|
237
237
|
})) {
|
|
238
238
|
flattened.push(flattenedCol);
|
|
239
239
|
}
|
|
240
|
-
if (array.length) {
|
|
240
|
+
if (array && array.length) {
|
|
241
241
|
flattened = flattened.concat(flattenCollections(array, [
|
|
242
242
|
...parentTitles,
|
|
243
243
|
(() => {
|
|
@@ -343,10 +343,14 @@ export class ProductList {
|
|
|
343
343
|
</div>`;
|
|
344
344
|
}
|
|
345
345
|
function renderItem(item, depth, index) {
|
|
346
|
+
var _a, _b;
|
|
346
347
|
let subHTML = '';
|
|
348
|
+
item.array = (_a = item.array) !== null && _a !== void 0 ? _a : [];
|
|
347
349
|
try {
|
|
348
350
|
if (item.array.length > 0) {
|
|
349
|
-
item.array.map((col, index) => {
|
|
351
|
+
((_b = item.array) !== null && _b !== void 0 ? _b : []).map((col, index) => {
|
|
352
|
+
var _a;
|
|
353
|
+
col.array = (_a = col.array) !== null && _a !== void 0 ? _a : [];
|
|
350
354
|
if (!Boolean(col.hidden)) {
|
|
351
355
|
subHTML += col.array.length > 0 ? renderItem(col, depth + 1, index) : printUL(col);
|
|
352
356
|
}
|
|
@@ -625,7 +629,7 @@ export class ProductList {
|
|
|
625
629
|
appName: window.appName,
|
|
626
630
|
tag: 'product_widget',
|
|
627
631
|
gvc: gvc,
|
|
628
|
-
subData: item,
|
|
632
|
+
subData: item.content,
|
|
629
633
|
})}
|
|
630
634
|
</div>
|
|
631
635
|
</div>`;
|
|
@@ -398,7 +398,7 @@ export class ProductList {
|
|
|
398
398
|
checked: false,
|
|
399
399
|
parentTitles: parentTitles.length ? [...parentTitles] : [],
|
|
400
400
|
allCollections: parentTitles.length ? [...topLevelCollections] : [],
|
|
401
|
-
subCollections: array.map(subCol =>
|
|
401
|
+
subCollections: (array ?? []).map(subCol =>
|
|
402
402
|
(() => {
|
|
403
403
|
const language_data = subCol.language_data;
|
|
404
404
|
if (
|
|
@@ -435,7 +435,7 @@ export class ProductList {
|
|
|
435
435
|
) {
|
|
436
436
|
flattened.push(flattenedCol);
|
|
437
437
|
}
|
|
438
|
-
if (array.length) {
|
|
438
|
+
if (array && array.length) {
|
|
439
439
|
flattened = flattened.concat(
|
|
440
440
|
flattenCollections(
|
|
441
441
|
array,
|
|
@@ -565,10 +565,11 @@ export class ProductList {
|
|
|
565
565
|
|
|
566
566
|
function renderItem(item: Collection, depth: number, index: number) {
|
|
567
567
|
let subHTML = '';
|
|
568
|
-
|
|
568
|
+
item.array=item.array ?? []
|
|
569
569
|
try {
|
|
570
570
|
if (item.array.length > 0) {
|
|
571
|
-
item.array.map((col: Collection, index: number) => {
|
|
571
|
+
(item.array ?? []).map((col: Collection, index: number) => {
|
|
572
|
+
col.array=col.array ?? []
|
|
572
573
|
if (!Boolean(col.hidden)) {
|
|
573
574
|
subHTML += col.array.length > 0 ? renderItem(col, depth + 1, index) : printUL(col);
|
|
574
575
|
}
|
|
@@ -861,7 +862,7 @@ export class ProductList {
|
|
|
861
862
|
appName: (window as any).appName,
|
|
862
863
|
tag: 'product_widget',
|
|
863
864
|
gvc: gvc,
|
|
864
|
-
subData: item,
|
|
865
|
+
subData: item.content,
|
|
865
866
|
})}
|
|
866
867
|
</div>
|
|
867
868
|
</div>`;
|
package/package.json
CHANGED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ProductCollection = void 0;
|
|
7
|
+
const database_js_1 = __importDefault(require("../../modules/database.js"));
|
|
8
|
+
const manager_js_1 = require("./manager.js");
|
|
9
|
+
class ProductCollection {
|
|
10
|
+
static async updateProductCollection(app, product_list) {
|
|
11
|
+
var _a, _b, _c, _d;
|
|
12
|
+
const config = (_b = ((_a = (await manager_js_1.Manager.getConfig({
|
|
13
|
+
appName: app,
|
|
14
|
+
key: 'collection',
|
|
15
|
+
language: 'zh-TW'
|
|
16
|
+
}))[0]) !== null && _a !== void 0 ? _a : {})['value']) !== null && _b !== void 0 ? _b : [];
|
|
17
|
+
const update_collection_list = [];
|
|
18
|
+
function loopDelete(array, root) {
|
|
19
|
+
array.map((dd) => {
|
|
20
|
+
var _a;
|
|
21
|
+
const path = [root, dd.title].filter((d1) => d1).join(' / ');
|
|
22
|
+
dd.product_id = (_a = dd.product_id) !== null && _a !== void 0 ? _a : [];
|
|
23
|
+
dd.product_id = dd.product_id.filter((d1) => {
|
|
24
|
+
return !product_list.find((d2) => { return d2.id === d1; });
|
|
25
|
+
});
|
|
26
|
+
if (dd.array) {
|
|
27
|
+
loopDelete(dd.array, path);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
loopDelete(config, '');
|
|
32
|
+
await database_js_1.default.query(`delete from \`${app}\`.t_collection where product_id in (${product_list.map((dd) => dd.id).join(',')})`, []);
|
|
33
|
+
for (const product of product_list) {
|
|
34
|
+
product.collection = ((_c = product.collection) !== null && _c !== void 0 ? _c : []).map((dd) => {
|
|
35
|
+
return dd.split('/')
|
|
36
|
+
.map((segment) => segment.trim())
|
|
37
|
+
.join(' / ');
|
|
38
|
+
}).filter((dd) => {
|
|
39
|
+
return dd;
|
|
40
|
+
});
|
|
41
|
+
((_d = product.collection) !== null && _d !== void 0 ? _d : []).map((dd) => {
|
|
42
|
+
update_collection_list.push([product.id, dd]);
|
|
43
|
+
});
|
|
44
|
+
await database_js_1.default.query(`replace into \`${app}\`.t_collection (product_id,collection) values ?`, [
|
|
45
|
+
update_collection_list.map((dd) => {
|
|
46
|
+
return dd;
|
|
47
|
+
})
|
|
48
|
+
]);
|
|
49
|
+
function insertNestedData(array, path, product_id, index) {
|
|
50
|
+
var _a;
|
|
51
|
+
let find = array.find((dd) => {
|
|
52
|
+
return dd.title === path[index];
|
|
53
|
+
});
|
|
54
|
+
if (!find) {
|
|
55
|
+
function getEmptyLanguageData() {
|
|
56
|
+
return {
|
|
57
|
+
title: path[index],
|
|
58
|
+
seo: {
|
|
59
|
+
domain: '',
|
|
60
|
+
title: path[index],
|
|
61
|
+
content: '',
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
find = {
|
|
66
|
+
title: path[index],
|
|
67
|
+
array: [],
|
|
68
|
+
product_id: [],
|
|
69
|
+
parentTitles: [],
|
|
70
|
+
subCollections: [],
|
|
71
|
+
checked: false,
|
|
72
|
+
seo_title: '',
|
|
73
|
+
seo_content: '',
|
|
74
|
+
language_data: {
|
|
75
|
+
'zh-CN': getEmptyLanguageData(),
|
|
76
|
+
'zh-TW': getEmptyLanguageData(),
|
|
77
|
+
'en-US': getEmptyLanguageData(),
|
|
78
|
+
},
|
|
79
|
+
seo_image: '',
|
|
80
|
+
code: path[index]
|
|
81
|
+
};
|
|
82
|
+
array.push(find);
|
|
83
|
+
}
|
|
84
|
+
if (index === path.length - 1) {
|
|
85
|
+
return find;
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
find.array = (_a = find.array) !== null && _a !== void 0 ? _a : [];
|
|
89
|
+
return insertNestedData(find.array, path, product_id, index + 1);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
product.collection.map((dd) => {
|
|
93
|
+
insertNestedData(config, dd.split(' / '), product.id, 0).product_id.push(product.id);
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
await database_js_1.default.query(`update \`${app}\`.public_config set value=? where \`key\`='collection'`, [JSON.stringify(config)]);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
exports.ProductCollection = ProductCollection;
|
|
100
|
+
//# sourceMappingURL=collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collection.js","sourceRoot":"","sources":["collection.ts"],"names":[],"mappings":";;;;;;AAAA,4EAA2C;AAC3C,6CAAuC;AAGvC,MAAa,iBAAiB;IAErB,MAAM,CAAC,KAAK,CAAC,uBAAuB,CAAC,GAAU,EAAC,YAAkB;;QACvE,MAAM,MAAM,GAAK,MAAA,CAAC,MAAA,CAChB,MAAO,oBAAO,CAAC,SAAS,CAAC;YACvB,OAAO,EAAE,GAAG;YACZ,GAAG,EAAE,YAAY;YACjB,QAAQ,EAAC,OAAO;SACjB,CAAC,CACH,CAAC,CAAC,CAAC,mCAAI,EAAE,CAAC,CAAC,OAAO,CAAC,mCAAI,EAAE,CAAC;QAE3B,MAAM,sBAAsB,GAAO,EAAE,CAAA;QAErC,SAAS,UAAU,CAAC,KAAQ,EAAC,IAAW;YACtC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAM,EAAC,EAAE;;gBAClB,MAAM,IAAI,GAAC,CAAC,IAAI,EAAC,EAAE,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,EAAM,EAAC,EAAE,CAAA,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;gBAC3D,EAAE,CAAC,UAAU,GAAC,MAAA,EAAE,CAAC,UAAU,mCAAI,EAAE,CAAC;gBAClC,EAAE,CAAC,UAAU,GAAC,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,EAAM,EAAC,EAAE;oBACrD,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,EAAC,EAAE,GAAC,OAAO,EA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MAAA,IAAI,CAAC,KAAK,mCAAI,EAAE,CAAA;oBAC7B,OAAO,gBAAgB,CAAC,IAAI,CAAC,KAAK,EAAC,IAAI,EAAC,UAAU,EAAC,KAAK,GAAC,CAAC,CAAC,CAAA;gBAC7D,CAAC;YACH,CAAC;YACD,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,EAAM,EAAC,EAAE;gBAC/B,gBAAgB,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EAAC,OAAO,CAAC,EAAE,EAAC,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;YACpF,CAAC,CAAC,CAAA;QACJ,CAAC;QAED,MAAM,qBAAE,CAAC,KAAK,CAAC,YAAY,GAAG,yDAAyD,EAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;IACnH,CAAC;CACF;AA5FD,8CA4FC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import db from '../../modules/database.js';
|
|
2
|
+
import { Manager } from './manager.js';
|
|
3
|
+
import fs from 'fs';
|
|
4
|
+
|
|
5
|
+
export class ProductCollection {
|
|
6
|
+
|
|
7
|
+
public static async updateProductCollection(app:string,product_list:any[]){
|
|
8
|
+
const config:any=((
|
|
9
|
+
await Manager.getConfig({
|
|
10
|
+
appName: app,
|
|
11
|
+
key: 'collection',
|
|
12
|
+
language:'zh-TW'
|
|
13
|
+
})
|
|
14
|
+
)[0] ?? {})['value'] ?? [];
|
|
15
|
+
|
|
16
|
+
const update_collection_list:any[]=[]
|
|
17
|
+
//先刪除分類裡面有相關的商品ID內容,清理資料
|
|
18
|
+
function loopDelete(array:[],root:string){
|
|
19
|
+
array.map((dd:any)=>{
|
|
20
|
+
const path=[root,dd.title].filter((d1:any)=>d1).join(' / ')
|
|
21
|
+
dd.product_id=dd.product_id ?? [];
|
|
22
|
+
dd.product_id=dd.product_id.filter((d1:any)=>{
|
|
23
|
+
return !product_list.find((d2)=>{return d2.id === d1})
|
|
24
|
+
})
|
|
25
|
+
if(dd.array){
|
|
26
|
+
loopDelete(dd.array,path)
|
|
27
|
+
}
|
|
28
|
+
})
|
|
29
|
+
}
|
|
30
|
+
loopDelete(config,'')
|
|
31
|
+
await db.query(`delete from \`${app}\`.t_collection where product_id in (${product_list.map((dd:any)=>dd.id).join(',')})`,[]);
|
|
32
|
+
for (const product of product_list){
|
|
33
|
+
product.collection=(product.collection ?? []).map((dd:any)=>{
|
|
34
|
+
return dd.split('/') // 拆分所有層級
|
|
35
|
+
.map((segment:string) => segment.trim()) // 去除空白
|
|
36
|
+
.join(' / ') // 統一格式為「空白/空白」;
|
|
37
|
+
}).filter((dd:any)=>{
|
|
38
|
+
return dd
|
|
39
|
+
});
|
|
40
|
+
(product.collection ?? []).map((dd:any)=>{
|
|
41
|
+
update_collection_list.push([product.id,dd])
|
|
42
|
+
})
|
|
43
|
+
await db.query(`replace into \`${app}\`.t_collection (product_id,collection) values ?`,[
|
|
44
|
+
update_collection_list.map((dd)=>{
|
|
45
|
+
return dd
|
|
46
|
+
})
|
|
47
|
+
]);
|
|
48
|
+
|
|
49
|
+
function insertNestedData(array:any, path:string[], product_id:any,index:number):any {
|
|
50
|
+
let find=array.find((dd:any)=>{
|
|
51
|
+
return dd.title === path[index]
|
|
52
|
+
});
|
|
53
|
+
if(!find){
|
|
54
|
+
function getEmptyLanguageData() {
|
|
55
|
+
return {
|
|
56
|
+
title: path[index],
|
|
57
|
+
seo: {
|
|
58
|
+
domain: '',
|
|
59
|
+
title: path[index],
|
|
60
|
+
content: '',
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
find={
|
|
65
|
+
title: path[index],
|
|
66
|
+
array: [],
|
|
67
|
+
product_id: [],
|
|
68
|
+
parentTitles: [],
|
|
69
|
+
subCollections: [],
|
|
70
|
+
checked: false,
|
|
71
|
+
seo_title: '',
|
|
72
|
+
seo_content: '',
|
|
73
|
+
language_data: {
|
|
74
|
+
'zh-CN': getEmptyLanguageData(),
|
|
75
|
+
'zh-TW': getEmptyLanguageData(),
|
|
76
|
+
'en-US': getEmptyLanguageData(),
|
|
77
|
+
},
|
|
78
|
+
seo_image: '',
|
|
79
|
+
code: path[index]
|
|
80
|
+
}
|
|
81
|
+
array.push(find)
|
|
82
|
+
}
|
|
83
|
+
if(index===path.length-1){
|
|
84
|
+
return find
|
|
85
|
+
}else{
|
|
86
|
+
find.array = find.array ?? []
|
|
87
|
+
return insertNestedData(find.array,path,product_id,index+1)
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
product.collection.map((dd:any)=>{
|
|
91
|
+
insertNestedData(config, dd.split(' / '),product.id,0).product_id.push(product.id)
|
|
92
|
+
})
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
await db.query(`update \`${app}\`.public_config set value=? where \`key\`='collection'`,[JSON.stringify(config)])
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
@@ -12,6 +12,7 @@ export declare class Manager {
|
|
|
12
12
|
key: string;
|
|
13
13
|
language: LanguageLocation;
|
|
14
14
|
}): Promise<any[]>;
|
|
15
|
-
static
|
|
15
|
+
static checkSaveData(appName: string, key: string, value: any): Promise<any[]>;
|
|
16
|
+
static checkData(app: string, data: any[], language: LanguageLocation): Promise<any[]>;
|
|
16
17
|
constructor(token: IToken);
|
|
17
18
|
}
|
|
@@ -9,10 +9,10 @@ const database_js_1 = __importDefault(require("../../modules/database.js"));
|
|
|
9
9
|
class Manager {
|
|
10
10
|
async setConfig(config) {
|
|
11
11
|
try {
|
|
12
|
-
await database_js_1.default.
|
|
13
|
-
|
|
12
|
+
await database_js_1.default.query(`replace
|
|
13
|
+
into \`${config.appName}\`.public_config (\`key\`,\`value\`,updated_at)
|
|
14
14
|
values (?,?,?)
|
|
15
|
-
|
|
15
|
+
`, [config.key, JSON.stringify(await Manager.checkSaveData(config.appName, config.key, config.value)), new Date()]);
|
|
16
16
|
}
|
|
17
17
|
catch (e) {
|
|
18
18
|
console.error(e);
|
|
@@ -21,34 +21,88 @@ class Manager {
|
|
|
21
21
|
}
|
|
22
22
|
static async getConfig(config) {
|
|
23
23
|
try {
|
|
24
|
-
return await this.checkData(await database_js_1.default.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
return await this.checkData(config.appName, await database_js_1.default.query(`select *
|
|
25
|
+
from \`${config.appName}\`.public_config
|
|
26
|
+
where \`key\` = ${database_js_1.default.escape(config.key)}
|
|
27
|
+
`, []), config.language);
|
|
28
28
|
}
|
|
29
29
|
catch (e) {
|
|
30
30
|
console.error(e);
|
|
31
31
|
throw exception_js_1.default.BadRequestError('ERROR', 'getConfig ERROR: ' + e, null);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
static async
|
|
34
|
+
static async checkSaveData(appName, key, value) {
|
|
35
|
+
const data = typeof value === 'string' ? JSON.parse(value) : value;
|
|
36
|
+
const path_list = [];
|
|
37
|
+
if (key === 'collection') {
|
|
38
|
+
async function loop(array, delete_action) {
|
|
39
|
+
for (const dd of array) {
|
|
40
|
+
if (dd.deleted || delete_action) {
|
|
41
|
+
if (dd.array && dd.array.length) {
|
|
42
|
+
await loop(dd.array, true);
|
|
43
|
+
}
|
|
44
|
+
await database_js_1.default.query(`delete from \`${appName}\`.t_collection
|
|
45
|
+
where collection = ?`, [dd.og_path]);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
if (dd.array && dd.array.length) {
|
|
49
|
+
await loop(dd.array, false);
|
|
50
|
+
}
|
|
51
|
+
await database_js_1.default.query(`delete from \`${appName}\`.t_collection
|
|
52
|
+
where collection = ?`, [dd.og_path]);
|
|
53
|
+
if (dd.product_id && dd.product_id.length) {
|
|
54
|
+
await database_js_1.default.query(`replace INTO \`${appName}\`.t_collection (collection, product_id) VALUES ?`, [
|
|
55
|
+
dd.product_id.map((d1) => {
|
|
56
|
+
return [dd.new_path, d1];
|
|
57
|
+
})
|
|
58
|
+
]);
|
|
59
|
+
}
|
|
60
|
+
path_list.push(dd.new_path);
|
|
61
|
+
dd.product_id = (await database_js_1.default.query(`SELECT product_id
|
|
62
|
+
FROM \`${appName}\`.t_collection where collection = ?;`, [dd.new_path])).map((dd) => {
|
|
63
|
+
return dd.product_id;
|
|
64
|
+
}).map((dd) => {
|
|
65
|
+
return parseInt(dd);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
await loop(data, false);
|
|
71
|
+
await database_js_1.default.query(`delete from \`${appName}\`.t_collection
|
|
72
|
+
where collection not in (${path_list.map((dd, index) => { return database_js_1.default.escape(dd); }).join(',')})`, []);
|
|
73
|
+
}
|
|
74
|
+
function loop2(array) {
|
|
75
|
+
return array.map((dd) => {
|
|
76
|
+
if (dd.deleted) {
|
|
77
|
+
return undefined;
|
|
78
|
+
}
|
|
79
|
+
if (dd.array && dd.array.length) {
|
|
80
|
+
dd.array = loop2(dd.array);
|
|
81
|
+
}
|
|
82
|
+
return dd;
|
|
83
|
+
}).filter(dd => dd);
|
|
84
|
+
}
|
|
85
|
+
return loop2(data);
|
|
86
|
+
}
|
|
87
|
+
static async checkData(app, data, language) {
|
|
35
88
|
if (data[0]) {
|
|
36
89
|
let data_ = data[0];
|
|
37
90
|
switch (data_.key) {
|
|
38
91
|
case 'collection':
|
|
39
|
-
function loop(array) {
|
|
92
|
+
function loop(array, path) {
|
|
40
93
|
array.map(dd => {
|
|
94
|
+
const path_ = [path, dd.title].filter((dd) => { return dd; }).join(' / ');
|
|
41
95
|
if (dd.language_data && dd.language_data[language]) {
|
|
42
96
|
dd.code = dd.language_data[language].seo.domain || dd.code;
|
|
43
97
|
dd.seo_content = dd.language_data[language].seo.content || dd.seo_content;
|
|
44
98
|
dd.seo_title = dd.language_data[language].seo.title || dd.seo_title;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
99
|
+
}
|
|
100
|
+
if (dd.array) {
|
|
101
|
+
loop(dd.array, path_);
|
|
48
102
|
}
|
|
49
103
|
});
|
|
50
104
|
}
|
|
51
|
-
loop(data_.value);
|
|
105
|
+
loop(data_.value, '');
|
|
52
106
|
break;
|
|
53
107
|
}
|
|
54
108
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manager.js","sourceRoot":"","sources":["manager.ts"],"names":[],"mappings":";;;;;;AACA,8EAAmD;AACnD,4EAA2C;AAG3C,MAAa,OAAO;IAGX,KAAK,CAAC,SAAS,CAAC,MAAoD;QACzE,IAAI,CAAC;YACH,MAAM,qBAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"manager.js","sourceRoot":"","sources":["manager.ts"],"names":[],"mappings":";;;;;;AACA,8EAAmD;AACnD,4EAA2C;AAG3C,MAAa,OAAO;IAGX,KAAK,CAAC,SAAS,CAAC,MAAoD;QACzE,IAAI,CAAC;YACH,MAAM,qBAAE,CAAC,KAAK,CACZ;iBACS,MAAM,CAAC,OAAO;;SAEtB,EACD,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,IAAI,EAAE,CAAC,CAChH,CAAC;QACJ,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACjB,MAAM,sBAAS,CAAC,eAAe,CAAC,OAAO,EAAE,mBAAmB,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;QAC1E,CAAC;IACH,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,MAAoE;QAChG,IAAI,CAAC;YACH,OAAO,MAAM,IAAI,CAAC,SAAS,CACzB,MAAM,CAAC,OAAO,EACd,MAAM,qBAAE,CAAC,KAAK,CACZ;oBACU,MAAM,CAAC,OAAO;6BACL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Q,CAAC,CAAC,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC,WAAW,CAAC;gCAC1E,EAAE,CAAC,SAAS,GAAG,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,SAAS,CAAC;4BACtE,CAAC;4BAED,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC;gCACb,IAAI,CAAC,EAAE,CAAC,KAAK,EAAC,KAAK,CAAC,CAAC;4BACvB,CAAC;wBAEH,CAAC,CAAC,CAAC;oBACL,CAAC;oBAED,IAAI,CAAC,KAAK,CAAC,KAAK,EAAC,EAAE,CAAC,CAAC;oBACrB,MAAM;YACV,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,YAAY,KAAa;QACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF;AAvID,0BAuIC"}
|
|
@@ -8,12 +8,12 @@ export class Manager {
|
|
|
8
8
|
|
|
9
9
|
public async setConfig(config: { appName: string; key: string; value: any }) {
|
|
10
10
|
try {
|
|
11
|
-
await db.
|
|
11
|
+
await db.query(
|
|
12
12
|
`replace
|
|
13
|
-
|
|
13
|
+
into \`${config.appName}\`.public_config (\`key\`,\`value\`,updated_at)
|
|
14
14
|
values (?,?,?)
|
|
15
|
-
|
|
16
|
-
[config.key, config.value, new Date()]
|
|
15
|
+
`,
|
|
16
|
+
[config.key, JSON.stringify(await Manager.checkSaveData(config.appName, config.key, config.value)), new Date()]
|
|
17
17
|
);
|
|
18
18
|
} catch (e) {
|
|
19
19
|
console.error(e);
|
|
@@ -24,11 +24,12 @@ export class Manager {
|
|
|
24
24
|
public static async getConfig(config: { appName: string; key: string; language: LanguageLocation }) {
|
|
25
25
|
try {
|
|
26
26
|
return await this.checkData(
|
|
27
|
-
|
|
27
|
+
config.appName,
|
|
28
|
+
await db.query(
|
|
28
29
|
`select *
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
from \`${config.appName}\`.public_config
|
|
31
|
+
where \`key\` = ${db.escape(config.key)}
|
|
32
|
+
`,
|
|
32
33
|
[]
|
|
33
34
|
),
|
|
34
35
|
config.language
|
|
@@ -39,24 +40,95 @@ export class Manager {
|
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
|
|
42
|
-
public static async
|
|
43
|
+
public static async checkSaveData(appName: string, key: string, value: any) {
|
|
44
|
+
const data = typeof value === 'string' ? JSON.parse(value) : value;
|
|
45
|
+
const path_list:string[]=[]
|
|
46
|
+
if (key === 'collection') {
|
|
47
|
+
async function loop(array: any[],delete_action:boolean) {
|
|
48
|
+
for (const dd of array) {
|
|
49
|
+
|
|
50
|
+
if (dd.deleted||delete_action) {
|
|
51
|
+
if (dd.array && dd.array.length) {
|
|
52
|
+
await loop(dd.array,true);
|
|
53
|
+
}
|
|
54
|
+
await db.query(
|
|
55
|
+
`delete from \`${appName}\`.t_collection
|
|
56
|
+
where collection = ?`,
|
|
57
|
+
[dd.og_path]
|
|
58
|
+
);
|
|
59
|
+
} else{
|
|
60
|
+
if (dd.array && dd.array.length) {
|
|
61
|
+
await loop(dd.array,false);
|
|
62
|
+
}
|
|
63
|
+
await db.query(
|
|
64
|
+
`delete from \`${appName}\`.t_collection
|
|
65
|
+
where collection = ?`,
|
|
66
|
+
[dd.og_path]
|
|
67
|
+
);
|
|
68
|
+
if(dd.product_id && dd.product_id.length){
|
|
69
|
+
await db.query(`replace INTO \`${appName}\`.t_collection (collection, product_id) VALUES ?`,[
|
|
70
|
+
dd.product_id.map((d1:string)=>{
|
|
71
|
+
return [dd.new_path,d1]
|
|
72
|
+
})
|
|
73
|
+
]);
|
|
74
|
+
}
|
|
75
|
+
path_list.push(dd.new_path)
|
|
76
|
+
dd.product_id=(await db.query(`SELECT product_id
|
|
77
|
+
FROM \`${appName}\`.t_collection where collection = ?;`,[dd.new_path])).map((dd:any)=>{
|
|
78
|
+
return dd.product_id
|
|
79
|
+
}).map((dd:any)=>{
|
|
80
|
+
return parseInt(dd)
|
|
81
|
+
})
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
await loop(data,false);
|
|
87
|
+
await db.query(
|
|
88
|
+
`delete from \`${appName}\`.t_collection
|
|
89
|
+
where collection not in (${path_list.map((dd, index) => { return db.escape(dd) }).join(',')})`,
|
|
90
|
+
[]
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
function loop2(array: any[]){
|
|
94
|
+
return array.map((dd)=>{
|
|
95
|
+
if(dd.deleted){
|
|
96
|
+
return undefined
|
|
97
|
+
}
|
|
98
|
+
if (dd.array && dd.array.length) {
|
|
99
|
+
dd.array = loop2(dd.array)
|
|
100
|
+
}
|
|
101
|
+
return dd
|
|
102
|
+
}).filter(dd=>dd)
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
return loop2(data);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
public static async checkData(app:string,data: any[], language: LanguageLocation) {
|
|
43
109
|
if (data[0]) {
|
|
44
110
|
let data_ = data[0];
|
|
111
|
+
|
|
112
|
+
|
|
45
113
|
switch (data_.key) {
|
|
46
114
|
case 'collection':
|
|
47
|
-
function loop(array: any[]) {
|
|
115
|
+
function loop(array: any[],path:string) {
|
|
48
116
|
array.map(dd => {
|
|
117
|
+
const path_=[path,dd.title].filter((dd)=>{return dd}).join(' / ')
|
|
49
118
|
if (dd.language_data && dd.language_data[language]) {
|
|
50
119
|
dd.code = dd.language_data[language].seo.domain || dd.code;
|
|
51
120
|
dd.seo_content = dd.language_data[language].seo.content || dd.seo_content;
|
|
52
121
|
dd.seo_title = dd.language_data[language].seo.title || dd.seo_title;
|
|
53
|
-
if (dd.array) {
|
|
54
|
-
loop(dd.array);
|
|
55
|
-
}
|
|
56
122
|
}
|
|
123
|
+
// dd.product_count=count.find((dd:any)=>{return dd.collection===path_})?.count||0;
|
|
124
|
+
if (dd.array) {
|
|
125
|
+
loop(dd.array,path_);
|
|
126
|
+
}
|
|
127
|
+
// dd.product_id=[]
|
|
57
128
|
});
|
|
58
129
|
}
|
|
59
|
-
|
|
130
|
+
|
|
131
|
+
loop(data_.value,'');
|
|
60
132
|
break;
|
|
61
133
|
}
|
|
62
134
|
}
|