biz9-logic 4.8.196 → 4.8.200

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.
Files changed (3) hide show
  1. package/biz9_config +1 -1
  2. package/index.js +30 -19
  3. package/package.json +1 -1
package/biz9_config CHANGED
@@ -1,4 +1,4 @@
1
- VERSION='6.7.6'
1
+ VERSION='6.8.0'
2
2
  TITLE='BiZ9-Logic';
3
3
  REPO='git@github.com:biz9framework/biz9-logic.git';
4
4
  BRANCH='main';
package/index.js CHANGED
@@ -1050,6 +1050,17 @@ class Favorite_Logic {
1050
1050
  });
1051
1051
  return favorite;
1052
1052
  }
1053
+ static get_favorite_by_list = (favorite_list,item_list) =>{
1054
+ for(let a = 0; a<item_list.length; a++){
1055
+ item_list[a].is_favorite = false;
1056
+ for(let b = 0; b<favorite_list.length; b++){
1057
+ if(item_list[a].id == favorite_list[b].parent_id){
1058
+ item_list[a].is_favorite = true;
1059
+ }
1060
+ }
1061
+ }
1062
+ return item_list;
1063
+ }
1053
1064
  static get_user_search_filter = (parent_data_type,user_id) =>{
1054
1065
  return {
1055
1066
  $and: [
@@ -1283,8 +1294,8 @@ class FAQ_Url {
1283
1294
  };
1284
1295
  }
1285
1296
  class Cart_Url {
1286
- static update = (app_id,url,parent_data_type,user_id,params) => {
1287
- let action_url="cart/update/"+parent_data_type+"/"+user_id;
1297
+ static post = (app_id,url,parent_data_type,user_id,params) => {
1298
+ let action_url="cart/post/"+parent_data_type+"/"+user_id;
1288
1299
  return get_cloud_url_main(app_id,url,action_url,params);
1289
1300
  };
1290
1301
  static get = (app_id,url,cart_number,params) => {
@@ -1297,8 +1308,8 @@ class Cart_Url {
1297
1308
  };
1298
1309
  }
1299
1310
  class Order_Url {
1300
- static update = (app_id,url,params) => {
1301
- let action_url="order/update";
1311
+ static post = (app_id,url,params) => {
1312
+ let action_url="order/post";
1302
1313
  return get_cloud_url_main(app_id,url,action_url,params);
1303
1314
  };
1304
1315
  static get = (app_id,url,order_number,params) => {
@@ -1333,8 +1344,8 @@ class Review_Url {
1333
1344
  let action_url="review/get/"+parent_data_type+"/"+user_id+"/"+page_current+"/"+page_size;
1334
1345
  return get_cloud_url_main(app_id,url,action_url,params);
1335
1346
  };
1336
- static update = (app_id,url,parent_data_type,parent_id,user_id,params) => {
1337
- let action_url="review/update/"+parent_data_type+"/"+parent_id+"/"+user_id;
1347
+ static post = (app_id,url,parent_data_type,parent_id,user_id,params) => {
1348
+ let action_url="review/post/"+parent_data_type+"/"+parent_id+"/"+user_id;
1338
1349
  return get_cloud_url_main(app_id,url,action_url,params);
1339
1350
  };
1340
1351
  }
@@ -1433,14 +1444,14 @@ class Favorite_Url {
1433
1444
  let action_url="favorite/get/"+parent_data_type+"/"+user_id+"/"+page_current+"/"+page_size;
1434
1445
  return get_cloud_url_main(app_id,url,action_url,params);
1435
1446
  };
1436
- static update = (app_id,url,parent_data_type,parent_id,user_id,params) => {
1437
- let action_url="favorite/update/"+parent_data_type+"/"+parent_id +"/"+user_id;
1447
+ static post = (app_id,url,parent_data_type,parent_id,user_id,params) => {
1448
+ let action_url="favorite/post/"+parent_data_type+"/"+parent_id +"/"+user_id;
1438
1449
  return get_cloud_url_main(app_id,url,action_url,params);
1439
1450
  };
1440
1451
  }
1441
1452
  class Item_Url {
1442
- static update_cms_item = (app_id,url,data_type,id,params) => {
1443
- let action_url = "item/update_cms_item/"+data_type+"/"+id;
1453
+ static post_cms_item = (app_id,url,data_type,id,params) => {
1454
+ let action_url = "item/post_cms_item/"+data_type+"/"+id;
1444
1455
  return get_cloud_url_main(app_id,url,action_url,params);
1445
1456
  };
1446
1457
  }
@@ -1507,15 +1518,15 @@ class Url{
1507
1518
  return get_cloud_url_main(app_id,url,action_url,params);
1508
1519
  };
1509
1520
  static upload_file = (app_id,url,data_type,id,params) => {
1510
- let action_url = "main/crud/update/"+data_type + "/" + id;
1521
+ let action_url = "main/crud/post/"+data_type + "/" + id;
1511
1522
  return get_cloud_url_main(app_id,url,action_url,params);
1512
1523
  };
1513
- static update = (app_id,url,data_type,id,params) => {
1514
- let action_url = "main/crud/update/"+data_type + "/" + id;
1524
+ static post = (app_id,url,data_type,id,params) => {
1525
+ let action_url = "main/crud/post/"+data_type + "/" + id;
1515
1526
  return get_cloud_url_main(app_id,url,action_url,params);
1516
1527
  };
1517
- static update_list = (app_id,url,data_type,params) => {
1518
- let action_url = "main/crud/update_list/"+data_type;
1528
+ static post_list = (app_id,url,data_type,params) => {
1529
+ let action_url = "main/crud/post_list/"+data_type;
1519
1530
  return get_cloud_url_main(app_id,url,action_url,params);
1520
1531
  };
1521
1532
  }
@@ -1824,21 +1835,21 @@ class Storage {
1824
1835
  return null;
1825
1836
  }
1826
1837
  }
1827
- static set = (window,key,obj) => {
1838
+ static post = (window,key,obj) => {
1828
1839
  if(!Obj.check_is_empty(window)){
1829
1840
  if(window.localStorage){
1830
1841
  window.localStorage.setItem(key,JSON.stringify(obj));
1831
1842
  }
1832
1843
  }
1833
1844
  }
1834
- static remove = (window,key) =>{
1845
+ static delete = (window,key) =>{
1835
1846
  if(!Obj.check_is_empty(window)){
1836
1847
  if(window.localStorage){
1837
1848
  window.localStorage.removeItem(key);
1838
1849
  }
1839
1850
  }
1840
1851
  }
1841
- static clear = (window) =>{
1852
+ static delete_all = (window) =>{
1842
1853
  if(!Obj.check_is_empty(window)){
1843
1854
  if(window.localStorage){
1844
1855
  window.localStorage.clear();
@@ -1889,7 +1900,7 @@ class User_Logic {
1889
1900
  }
1890
1901
  return req.session.user;
1891
1902
  }
1892
- static set_request_user(req){
1903
+ static post_request_user(req){
1893
1904
  req.session.user=user;
1894
1905
  }
1895
1906
  static del_request_user(req){
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biz9-logic",
3
- "version": "4.8.196",
3
+ "version": "4.8.200",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"