biz9-logic 4.9.6 → 4.9.7
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 +2 -2
- package/package.json +1 -1
- package/test.js +5 -1
package/biz9_config
CHANGED
package/index.js
CHANGED
|
@@ -452,7 +452,7 @@ class Page_Logic {
|
|
|
452
452
|
class Order_Logic {
|
|
453
453
|
static get_new = (cart) => {
|
|
454
454
|
let order = DataItem.get_new(DataType.ORDER,0,{
|
|
455
|
-
order_number:
|
|
455
|
+
order_number:Title.ORDER_NUMBER + Num.get_id(99999),
|
|
456
456
|
parent_data_type:cart.parent_data_type,
|
|
457
457
|
user_id:cart.user_id,
|
|
458
458
|
cart_number:cart.cart_number,
|
|
@@ -496,7 +496,7 @@ class Order_Logic {
|
|
|
496
496
|
}
|
|
497
497
|
class Cart_Logic {
|
|
498
498
|
static get_new = (parent_data_type,user_id) => {
|
|
499
|
-
return DataItem.get_new(DataType.CART,0,{user_id:user_id,cart_number:
|
|
499
|
+
return DataItem.get_new(DataType.CART,0,{user_id:user_id,cart_number:Title.CART_NUMBER + Num.get_id(99999),parent_data_type:parent_data_type,grand_total:0,cart_item_list:[]});
|
|
500
500
|
};
|
|
501
501
|
static get_new_cart_item = (parent_data_type,parent_id,cart_number,quanity) =>{
|
|
502
502
|
return DataItem.get_new(DataType.CART_ITEM,0,{parent_data_type:parent_data_type,parent_id:parent_id,cart_number:cart_number,quanity:quanity,cart_sub_item_list:[]});
|
package/package.json
CHANGED
package/test.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const series = require('async-series');
|
|
2
|
-
const {DataItem,DataType,Page_Logic,Product_Logic,Type,Stat_Logic,Service_Logic,Blog_Post_Logic,Event_Logic,Demo_Logic} = require('./index');
|
|
2
|
+
const {DataItem,DataType,Page_Logic,Product_Logic,Type,Stat_Logic,Service_Logic,Blog_Post_Logic,Event_Logic,Demo_Logic,Cart_Logic} = require('./index');
|
|
3
3
|
const {Log,Num} = require('biz9-utility');
|
|
4
4
|
const {Scriptz}= require('biz9-scriptz');
|
|
5
5
|
|
|
@@ -31,6 +31,9 @@ describe("connect", () => {
|
|
|
31
31
|
series([
|
|
32
32
|
function(call) {
|
|
33
33
|
console.log('CONNECT-START');
|
|
34
|
+
console.log(Cart_Logic.get_new(DataType.PRODUCT,123));
|
|
35
|
+
|
|
36
|
+
/*
|
|
34
37
|
let post_type_list = [
|
|
35
38
|
Demo_Logic.get_new_type('Computer 1',{
|
|
36
39
|
get_category:true,category_count:12,category_data_type:DataType.PRODUCT,categorys:'',
|
|
@@ -58,6 +61,7 @@ describe("connect", () => {
|
|
|
58
61
|
Log.w('post_type_list',post_type_list);
|
|
59
62
|
Log.w('post_item_count',post_item_count);
|
|
60
63
|
|
|
64
|
+
*/
|
|
61
65
|
console.log('CONNECT-END');
|
|
62
66
|
call();
|
|
63
67
|
},
|