owl-cli 7.21.0 → 7.23.0

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.
@@ -211,7 +211,7 @@ var @projectCodeService = (function (pigeon) {
211
211
  value = f.getEnvValue(value, env)
212
212
  f.setValue(field.key, value, data)
213
213
  }
214
- if((value==null || typeof(value)=='undefined') && field.autoGen=='true'){
214
+ if(((!value) || typeof(value)=='undefined') && field.autoGen=='true'){
215
215
  value =$.getUUID()
216
216
  f.setValue(field.key,value,data);
217
217
  }
@@ -246,7 +246,7 @@ var @projectCodeService = (function (pigeon) {
246
246
  value = f.getEnvValue(value, env)
247
247
  row[subField.origKey] = value;
248
248
  }
249
- if((value==null || typeof(value)=='undefined') && subField.autoGen=='true'){
249
+ if(((!value) || typeof(value)=='undefined') && subField.autoGen=='true'){
250
250
  value = $.getUUID()
251
251
  row[subField.origKey] = value;
252
252
  }
@@ -755,6 +755,7 @@ var @projectCodeService = (function (pigeon) {
755
755
  data.owl_lastModifiedUserId = userId;
756
756
  data.owl_lastModifiedIp = ip;
757
757
  data.owl_lastModifiedUserAgent = ua;
758
+ data.obj.owl_modifyTime = new Date().getTime();
758
759
 
759
760
  var key = pigeon.getRKey(data['owl_createTime'], 13)
760
761
  pigeon.deleteFromList(f.getAllListName(), key, id)
@@ -1,4 +1,5 @@
1
1
  //#import $owl_mall_u:services/modelService.jsx
2
+ //#import $owl_orgs:services/modelService.jsx
2
3
  //#import $owl_org_member:services/modelService.jsx
3
4
  //#import @owl:utils/PermissionUtil.jsx
4
5
 
@@ -11,7 +12,7 @@ function main(){
11
12
 
12
13
 
13
14
  try{
14
- checkBackendPluginPermission("addToOrgMemberPlugin");
15
+ checkBackendPluginPermission(pluginId);
15
16
  }catch(errmsg){
16
17
  var ret = {
17
18
  state:"err",
@@ -32,7 +33,7 @@ function main(){
32
33
  if(!admin){
33
34
  var ret = {
34
35
  state:"err",
35
- msg:"手机号不存在"
36
+ msg:"用户不存在"
36
37
  }
37
38
  out.print(JSON.stringify(ret));
38
39
  return;
@@ -49,16 +50,33 @@ function main(){
49
50
  return;
50
51
  }
51
52
 
53
+ var env = checklogin();
54
+ var orgId = env.orgId;
55
+ var org = owl_orgsService.get(orgId);
56
+ if(!org){
57
+ var ret = {
58
+ state:"err",
59
+ msg:"组织不存在"
60
+ }
61
+ out.print(JSON.stringify(ret));
62
+ return;
63
+ }
64
+
52
65
  // 创建org_user记录
53
66
  var orgUser = {
54
67
  userId: admin.id,
55
68
  name: admin.name || admin.loginId,
69
+ orgId:org.id,
70
+ orgName:org.name,
56
71
  loginId: admin.loginId,
57
72
  realName: admin.realName,
58
73
  nickName: admin.nickName,
59
74
  mobile: admin.mobile,
60
75
  email: admin.email,
61
- isEnable: 1
76
+ isEnable: 1,
77
+ orgId:env.orgId,
78
+ _orgId:env.orgId,
79
+ _orgIds:env.orgIds || [env.orgId]
62
80
  };
63
81
 
64
82
  owl_org_memberService.add(orgUser);
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "id": "string(12),formSize:2,disabled:true,searchable:true;会员Id",
3
3
  "userId": "string(12),isId:true;用户Id",
4
- "orgId": "string(16),formSize:2,searchable:true;所属商家Id",
5
- "orgName": "string(16),formSize:2,searchable:true;所属商家",
4
+ "orgId": "string(16),formSize:2,searchable:true,isId:true;所属商家Id",
5
+ "orgName": "string(16),formSize:2,searchable:true,isId:true;所属商家",
6
6
  "isEnable": "choice,formSize:2,listSize:4,values:1_正常/0_冻结_#be0027,defaultValue:1,searchable:true,hidden:false;状态",
7
7
  "name": "string(12),listSize:5,formSize:2,searchable:true;名称",
8
8
  "loginId": "string(12),listSize:5,formSize:2,searchable:true,unique:true;登录Id",
@@ -10,9 +10,42 @@
10
10
  "nickName": "string(12),listSize:5,formSize:2,searchable:true;昵称",
11
11
  "mobile": "string(16),listSize:5,inputType:mobile,formSize:2,searchable:true,unique:true;手机",
12
12
  "email": "string(64),formSize:2,searchable:true,unique:true;邮箱",
13
+
14
+ "org_member_cat": [
15
+ {
16
+ "#meta": {
17
+ "type": "embed",
18
+ "keyField": "id",
19
+ "fieldLabel": "客户分类",
20
+ "dataSourceModel": "org_member_cat",
21
+ "readOnly": "true",
22
+ "fields": [
23
+ "id",
24
+ "parent_id",
25
+ "name",
26
+ "fullPathIds",
27
+ "fullPathName",
28
+ "parentPathIds"
29
+ ],
30
+ "tab": "50",
31
+ "position": "card",
32
+ "mapping": {
33
+ "id": "id",
34
+ "parent_id": "parent_id",
35
+ "name": "name",
36
+ "fullPathIds": "fullPathIds",
37
+ "fullPathName": "fullPathName",
38
+ "parentPathIds": "parentPathIds"
39
+ }
40
+ },
41
+ "id": "string(10),searchable:true,showList:false;客户分类Id",
42
+ "name": "string(12),searchable:true;客户分类",
43
+ "fullPathName": "string(18),hidden:true;完整路径"
44
+ }
45
+ ],
13
46
  "_t": "org_member",
14
47
  "#meta": {
15
- "rem": "组织会员管理",
48
+ "rem": "客户会员",
16
49
  "id": "<%=#orgId + '_' + userId%>",
17
50
  "projectName": "电商",
18
51
  "changeLogEnabled": true,
@@ -0,0 +1,24 @@
1
+ {
2
+ "id": "string(32),isId:true,searchable:true;分类ID",
3
+ "name": "string(32),searchable:true;分类名称",
4
+ "fullPathName": "string(64),searchable:true;完整路径名称",
5
+ "parent_id": "string(32),searchable:true;父级分类ID",
6
+ "showOnTree": "choice,values:yes_是/no_否,defaultValue:yes,searchable:true;树节点上显示",
7
+ "_t": "org_member_cat",
8
+ "#meta": {
9
+ "rem": "客户分类",
10
+ "projectName": "客户分类",
11
+ "parent": ["platform"],
12
+ "isTree": true,
13
+ "parentField": "parent_id",
14
+ "visitType": ["platform"],
15
+ "pos": 1,
16
+ "group": {
17
+ "id": "mall_user",
18
+ "name": "会员管理",
19
+ "icon": "user",
20
+ "pos": 6
21
+ }
22
+
23
+ }
24
+ }
@@ -1,6 +1,8 @@
1
+ //#import session.js
1
2
  //#import $owl_permission:services/modelService.jsx
2
3
  //#import $owlPermission:services/RolesService.jsx
3
-
4
+ //#import $owl_server_token:services/modelService.jsx
5
+ //#import $owl_backend_session:services/modelService.jsx
4
6
  function getPermissions(roleId){
5
7
  var searchArgs = {
6
8
  roleId: roleId
@@ -172,9 +174,7 @@ function checkBackendPluginPermission(pluginId){
172
174
  throw "用户角色异常";
173
175
  }
174
176
 
175
- if(!checkPluginPermissionByRoleId( pluginId,rroleId)){
177
+ if(!checkPluginPermissionByRoleId( pluginId,roleId)){
176
178
  throw "没有权限执行此操作";
177
179
  }
178
-
179
-
180
180
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "owl-cli",
3
- "version": "7.21.0",
3
+ "version": "7.23.0",
4
4
  "main": "index.js",
5
5
  "preferGlobal": true,
6
6
  "bin": {