biz9-logic 4.8.6 → 4.8.19
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/biz9_config +1 -1
- package/index.js +473 -428
- package/package.json +1 -1
- package/test.js +149 -71
package/package.json
CHANGED
package/test.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const series = require('async-series');
|
|
3
|
-
const {DataItem,DataType,Url,Obj,BiZ_Url,Cat,Stock,Schedule,Storage,Business,Product,Service,Event,Template,Page,Category,Review,Blog_Post,
|
|
3
|
+
const {DataItem,DataType,Url,Obj,BiZ_Url,Cat,Stock,Schedule,Storage,Business,Product,Service,Event,Template,Page,Category,Review,Blog_Post,Faq_Logic,Category_Url,Blank_Url,Blank_Logic,Item_Logic,Service_Logic,Template_Logic,Page_Logic,Product_Logic,Event_Logic,Blog_Post_Logic,Content_Logic,Category_Logic,Team_Logic,Business_Logic} = require('./index');
|
|
4
4
|
const {Log,Number} = require('biz9-utility');
|
|
5
5
|
const {Scriptz}= require('biz9-scriptz');
|
|
6
6
|
|
|
@@ -28,6 +28,7 @@ const biz9_config ={
|
|
|
28
28
|
describe("connect", () => {
|
|
29
29
|
it("_connect", () => {
|
|
30
30
|
series([
|
|
31
|
+
|
|
31
32
|
/*
|
|
32
33
|
function(call) {
|
|
33
34
|
console.log('GET-URL-START');
|
|
@@ -46,12 +47,151 @@ describe("connect", () => {
|
|
|
46
47
|
|
|
47
48
|
function(call) {
|
|
48
49
|
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
/* --TEAM--START */
|
|
51
|
+
//let team = Team_Logic.get_test()
|
|
52
|
+
//let team = Team_Logic.get_test("Team 1",{get_value:true,get_member:true})
|
|
53
|
+
//Log.w("team",team);
|
|
54
|
+
//let team_list = Team_Logic.get_test_list();
|
|
55
|
+
//let [team_list,team_list]=Team_Logic.get_test_list_by_team();
|
|
56
|
+
//Log.w('team_list',team_list);
|
|
57
|
+
//Log.w('team_list',team_list);
|
|
58
|
+
/* --TEAM--END */
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
/* --SEARCH--START */
|
|
62
|
+
console.log(Url.get_search(DataType.BLOG_POST,{title:-1},{cool:-1},1,10));
|
|
63
|
+
/* --SEARCH--END */
|
|
64
|
+
|
|
65
|
+
/* --CATEGORY--START */
|
|
66
|
+
//let category = Category_Logic.get_test("Category 1")
|
|
67
|
+
//let category = Category_Logic.get_test("Category 1",{get_value:true,get_item:true})
|
|
68
|
+
//let category_list = Category_Logic.get_test_list({get_value:true,get_item:true})
|
|
69
|
+
//Log.w("category",category);
|
|
70
|
+
//let category_list = Category_Logic.get_test_list_by_type(DataType.PRODUCT,{get_value:true});
|
|
71
|
+
//let [category_list,category_list]=Category_Logic.get_test_list_by_category();
|
|
72
|
+
//Log.w('category_list',category_list);
|
|
73
|
+
//Log.w('category_list',category_list);
|
|
74
|
+
/* --CATEGORY--END */
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
/* --CONTENT--START */
|
|
78
|
+
//let content = Content_Logic.get_test()
|
|
79
|
+
//let content = Content_Logic.get_test("Content 1",{get_value:true,get_item:true})
|
|
80
|
+
//Log.w("content",content);
|
|
81
|
+
//let content_list = Content_Logic.get_test_list();
|
|
82
|
+
//let [category_list,content_list]=Content_Logic.get_test_list_by_category();
|
|
83
|
+
//Log.w('content_list',content_list);
|
|
84
|
+
//Log.w('category_list',category_list);
|
|
85
|
+
/*
|
|
86
|
+
*/
|
|
87
|
+
/* --CONTENT--END */
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
/* --BLOG_POST--START */
|
|
91
|
+
//let blog_post = Blog_Post_Logic.get_test("Blog_Post 1")
|
|
92
|
+
//let blog_post = Blog_Post_Logic.get_test("Blog_Post 1",{get_value:true})
|
|
93
|
+
//let blog_post = Blog_Post_Logic.get_test("Blog_Post 1",{get_value:true})
|
|
94
|
+
//let blog_post = Blog_Post_Logic.get_test("Blog_Post 1",{get_value:true,get_item:true})
|
|
95
|
+
//let [category_list,blog_post_list]=Blog_Post_Logic.get_test_list_by_category();
|
|
96
|
+
//Log.w("blog_post",blog_post);
|
|
97
|
+
//let blog_post_list = Blog_Post_Logic.get_test_list({get_value:true,get_item:true});
|
|
98
|
+
//Log.w('blog_post_list',blog_post_list);
|
|
99
|
+
//Log.w('blog_post_list',blog_post_list[0].items);
|
|
100
|
+
//Log.w('category_list',category_list);
|
|
101
|
+
/*
|
|
102
|
+
*/
|
|
103
|
+
/* --BLOG_POST--END */
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
/* --EVENT--START */
|
|
107
|
+
//let event = Event_Logic.get_test("Event 1");
|
|
108
|
+
//let event = Event_Logic.get_test("Event 1",{get_value:true,get_item:true})
|
|
109
|
+
//Log.w("event",event);
|
|
110
|
+
//let event_list = Event_Logic.get_test_list();
|
|
111
|
+
//let [category_list,event_list]=Event_Logic.get_test_list_by_category();
|
|
112
|
+
//Log.w('event_list',event_list);
|
|
113
|
+
//Log.w('category_list',category_list);
|
|
114
|
+
/*
|
|
115
|
+
*/
|
|
116
|
+
/* --EVENT--END */
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
/* --SERVICE--START */
|
|
120
|
+
//let service = Service_Logic.get_test("Service 1",{get_value:true,get_item:true})
|
|
121
|
+
//Log.w("service",service);
|
|
122
|
+
//let service_list = Service_Logic.get_test_list();
|
|
123
|
+
//let [category_list,service_list]=Service_Logic.get_test_list_by_category();
|
|
124
|
+
//Log.w('service_list',service_list);
|
|
125
|
+
//Log.w('category_list',category_list);
|
|
126
|
+
/*
|
|
127
|
+
*/
|
|
128
|
+
/* --SERVICE--END */
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
/* --PRODUCT--START */
|
|
132
|
+
|
|
133
|
+
//let product = Product_Logic.get_test("Product 1",{get_value:true,get_item:true})
|
|
134
|
+
//Log.w("product",product);
|
|
135
|
+
//let product_list = Product_Logic.get_test_list({product_count:10});
|
|
136
|
+
//let product_list = Product_Logic.get_test_list();
|
|
137
|
+
//Log.w('product_list',product_list);
|
|
138
|
+
//let [category_list,product_list]=Product.get_test_list_by_category({category_count:5,product_count:9});
|
|
139
|
+
//Log.w('category_list',category_list);
|
|
140
|
+
|
|
141
|
+
//let product = Product.get_test()
|
|
142
|
+
//Log.w("Product_section_1",product.section_1);
|
|
143
|
+
//Log.w("Product_section_1_section_1_section_1",product.section_1.section_1.section_1);
|
|
144
|
+
/* --PRODUCT--END */
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
/* --PAGE--START */
|
|
148
|
+
//let page = Page_Logic.get_test()
|
|
149
|
+
//let page = Page_Logic.get_test("Page "+Number.get_id())
|
|
150
|
+
//let page = Page_Logic.get_test("Page "+Number.get_id(),{get_value:true,value_count:5,get_item:true})
|
|
151
|
+
//Log.w("page",page);
|
|
152
|
+
//let page_list = Page_Logic.get_test_list({page_count:10});
|
|
153
|
+
//Log.w("Page_list",page_list);
|
|
154
|
+
/*
|
|
155
|
+
let page = Page.get_test({item_count:9,page_count:19,get_item:true,get_value:true})
|
|
156
|
+
//let page = Page.get_test()
|
|
157
|
+
Log.w("Page_section_1_section_1_section_1",page.section_1.section_1.section_1);
|
|
158
|
+
*/
|
|
159
|
+
/* --PAGE--END */
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
/* --ITEM-TEST--START */
|
|
163
|
+
//let item = Item_Logic.get_test("Item_" +Number.get_id(),DataType.SERVICE,0);
|
|
164
|
+
//Log.w('item',item);
|
|
165
|
+
/*
|
|
166
|
+
let item_list = Item_Logic.get_test_list(DataType.BLANK,{item_count:10,get_value:true});
|
|
167
|
+
Log.w('item_list',item_list);
|
|
168
|
+
Log.w('item_list_len',item_list.length);
|
|
169
|
+
*/
|
|
170
|
+
/* --ITEM-TEST--END */
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
/* --TEMPLATE--START */
|
|
174
|
+
//let template = Template_Logic.get_test("Primary",{});
|
|
175
|
+
//let template = Template_Logic.get_test("Primary",{get_value:true,get_item:true,item_count:2});
|
|
176
|
+
/*
|
|
177
|
+
let template_item_list = Template_Logic.get_test("Primary",template,template,{get_value:false,get_item:false,item_count:2});
|
|
178
|
+
*/
|
|
179
|
+
//Log.w('template',template);
|
|
180
|
+
//Log.w('template_item_list',template_item_list);
|
|
181
|
+
/* --TEMPLATE--END */
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
/* --ITEM-PARENT-TOP-URL-TEST--START */
|
|
186
|
+
//let biz9_config = Scriptz.get_biz9_config({biz9_config_file:path.resolve('../../biz9_config')});
|
|
187
|
+
//let cloud_url = Url.get_item_parent_top(biz9_config,DataType.SERVICE,0,DataType.BLOG_POST,1,DataType.PRODUCT,2);
|
|
188
|
+
//console.log(cloud_url);
|
|
189
|
+
//let item_test_list = Item_Logic.get_test_item_list(DataType.BLANK,{item_count:10,get_value:true});
|
|
190
|
+
//Log.w('item_test_list',item_test_list);
|
|
191
|
+
/* --ITEM-PARENT-TOP-TEST-URL-START */
|
|
51
192
|
|
|
52
|
-
Log.w('item_test_list',item_test_list);
|
|
53
193
|
|
|
54
|
-
|
|
194
|
+
//console.log('CONNECT-START');
|
|
55
195
|
/* --BLANK--START */
|
|
56
196
|
//let biz9_config = Scriptz.get_biz9_config({biz9_config_file:path.resolve('../../biz9_config')});
|
|
57
197
|
|
|
@@ -63,8 +203,8 @@ describe("connect", () => {
|
|
|
63
203
|
//Log.w('blank_list',blank_list);
|
|
64
204
|
//Log.w('category_list',category_list);
|
|
65
205
|
|
|
66
|
-
//let blank = Blank_Logic.get_test({item_count:9,blank_count:19,get_item:true,get_value:true})
|
|
67
|
-
//let blank =
|
|
206
|
+
//let blank = Blank_Logic.get_test("cool",{item_count:9,blank_count:19,get_item:true,get_value:true})
|
|
207
|
+
//let blank = Blank_Logic.get_test()
|
|
68
208
|
//Log.w('blank_list',blank_list);
|
|
69
209
|
//Log.w("Blank",blank);
|
|
70
210
|
//Log.w("BLog_Post_section_1",blank.section_1);
|
|
@@ -88,73 +228,11 @@ describe("connect", () => {
|
|
|
88
228
|
*/
|
|
89
229
|
/* --PAGE--END */
|
|
90
230
|
|
|
91
|
-
/* --BLOG_POST--START */
|
|
92
|
-
//let blog_post_list=Blog_Post.get_test_list({category_count:5,blog_post_count:9,get_value:false,get_item:false});
|
|
93
|
-
//let [category_list,blog_post_list]=Blog_Post.get_test_list_by_category({category_count:5,blog_post_count:9});
|
|
94
|
-
//Log.w('blog_post_list',blog_post_list);
|
|
95
|
-
//Log.w('category_list',category_list);
|
|
96
|
-
|
|
97
|
-
//let blog_post = Blog_Post.get_test({item_count:9,blog_post_count:19,get_item:true,get_value:true})
|
|
98
|
-
//let blog_post = Blog_Post.get_test()
|
|
99
|
-
//Log.w('blog_post_list',blog_post_list);
|
|
100
|
-
//Log.w("Blog_Post",blog_post);
|
|
101
|
-
//Log.w("BLog_Post_section_1",blog_post.section_1);
|
|
102
|
-
//Log.w("BLog_Post_section_1_section_1_section_1",blog_post.section_1.section_1.section_1);
|
|
103
|
-
/* --BLOG_POST--END */
|
|
104
|
-
|
|
105
|
-
/* --CATEGORY--START */
|
|
106
|
-
//let category_list=Category.get_test_list({category_count:5,product_count:9,get_value:false,get_item:false});
|
|
107
|
-
//Log.w('category_list',category_list);
|
|
108
|
-
/* --CATEGORY--END */
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
/* --PRODUCT--START */
|
|
112
|
-
//let product_list=Product.get_test_list({category_count:5,product_count:9,get_value:false,get_item:false});
|
|
113
|
-
//Log.w('product_list',product_list);
|
|
114
|
-
//let [category_list,product_list]=Product.get_test_list_by_category({category_count:5,product_count:9});
|
|
115
|
-
//Log.w('category_list',category_list);
|
|
116
|
-
|
|
117
|
-
//let product = Product.get_test({item_count:9,product_count:19,get_item:true,get_value:true})
|
|
118
|
-
//let product = Product.get_test()
|
|
119
|
-
//Log.w("Product",product);
|
|
120
|
-
//Log.w("Product_section_1",product.section_1);
|
|
121
|
-
//Log.w("Product_section_1_section_1_section_1",product.section_1.section_1.section_1);
|
|
122
|
-
/* --PRODUCT--END */
|
|
123
|
-
|
|
124
|
-
/* --EVENT--START */
|
|
125
|
-
//let event_list=Event.get_test_list({category_count:5,event_count:9,get_value:false,get_item:false});
|
|
126
|
-
//let [category_list,event_list]=Event.get_test_list_by_category({category_count:5,event_count:9});
|
|
127
|
-
//Log.w('event_list',event_list);
|
|
128
|
-
//Log.w('category_list',category_list);
|
|
129
|
-
/* --EVENT--END */
|
|
130
231
|
|
|
131
|
-
/* --SERVICE--START */
|
|
132
|
-
//let service_list=Service.get_test_list({category_count:5,service_count:9,get_value:false,get_item:false});
|
|
133
|
-
//let [category_list,service_list]=Service.get_test_list_by_category({category_count:5,service_count:9});
|
|
134
|
-
//Log.w('service_list',service_list);
|
|
135
|
-
//Log.w('category_list',category_list);
|
|
136
|
-
/*
|
|
137
|
-
let service = Service.get_test({item_count:9,service_count:19,get_item:true,get_value:true})
|
|
138
|
-
//let service = Service.get_test()
|
|
139
|
-
Log.w("Service",service);
|
|
140
|
-
Log.w("Service_section_1",service.section_1);
|
|
141
|
-
Log.w("Service_section_1_section_1_section_1",service.section_1.section_1.section_1);
|
|
142
|
-
*/
|
|
143
|
-
/* --SERVICE--END */
|
|
144
|
-
|
|
145
|
-
/* --SERVICE--START */
|
|
146
|
-
/*
|
|
147
|
-
let event = Event.get_test({item_count:9,event_count:19,get_item:true,get_value:true})
|
|
148
|
-
//let service = Service.get_test()
|
|
149
|
-
Log.w("Event",event);
|
|
150
|
-
Log.w("Event_section_1",event.section_1);
|
|
151
|
-
Log.w("Event_section_1_section_1_section_1",event.section_1.section_1.section_1);
|
|
152
|
-
*/
|
|
153
|
-
/* --SERVICE--END */
|
|
154
232
|
|
|
155
233
|
|
|
156
234
|
/* --FAQ--START */
|
|
157
|
-
//Log.w("FAQ",
|
|
235
|
+
//Log.w("FAQ",Faq_Logic.get_test());
|
|
158
236
|
//Log.w("FAQ List",Faq.get_test_list());
|
|
159
237
|
/*
|
|
160
238
|
let review_list = Review.get_test_list({review_count:3,get_item:true})
|
|
@@ -177,7 +255,7 @@ describe("connect", () => {
|
|
|
177
255
|
|
|
178
256
|
|
|
179
257
|
/* --BUSINESS--START */
|
|
180
|
-
//Log.w("Business",
|
|
258
|
+
//Log.w("Business",Business_Logic.get_test("Business " + Number.get_id()));
|
|
181
259
|
/* --BUSINESS--END */
|
|
182
260
|
|
|
183
261
|
|