正在显示
2 个修改的文件
包含
4 行增加
和
4 行删除
@@ -21,7 +21,7 @@ func (ptr *PgBatchAddOrgService) BatchAddOrg(optUser *domain.OperateInfo, orgLis | @@ -21,7 +21,7 @@ func (ptr *PgBatchAddOrgService) BatchAddOrg(optUser *domain.OperateInfo, orgLis | ||
21 | if err != nil { | 21 | if err != nil { |
22 | return err | 22 | return err |
23 | } | 23 | } |
24 | - _, orgs, err := orgRepository.Find(map[string]interface{}{"companyId": optUser.CompanyId}) | 24 | + _, orgs, err := orgRepository.Find(map[string]interface{}{"companyId": optUser.CompanyId, "limit": 10000}) |
25 | if err != nil { | 25 | if err != nil { |
26 | return err | 26 | return err |
27 | } | 27 | } |
@@ -52,7 +52,7 @@ func (ptr *PgBatchAddOrgService) BatchAddOrg(optUser *domain.OperateInfo, orgLis | @@ -52,7 +52,7 @@ func (ptr *PgBatchAddOrgService) BatchAddOrg(optUser *domain.OperateInfo, orgLis | ||
52 | 52 | ||
53 | orgItem, err = createOrgService.CreateOrg(optUser, orgItem) | 53 | orgItem, err = createOrgService.CreateOrg(optUser, orgItem) |
54 | if err != nil { | 54 | if err != nil { |
55 | - return err | 55 | + return fmt.Errorf("%v %v", item.OrgName, err.Error()) |
56 | } | 56 | } |
57 | if _, ok := mapOrg[orgItem.OrgCode]; !ok { | 57 | if _, ok := mapOrg[orgItem.OrgCode]; !ok { |
58 | mapOrg[orgItem.OrgCode] = orgItem | 58 | mapOrg[orgItem.OrgCode] = orgItem |
@@ -90,7 +90,7 @@ func (ptr *PgBatchAddUserService) BatchAddUser2(optUser *domain.OperateInfo, use | @@ -90,7 +90,7 @@ func (ptr *PgBatchAddUserService) BatchAddUser2(optUser *domain.OperateInfo, use | ||
90 | if err != nil { | 90 | if err != nil { |
91 | return err | 91 | return err |
92 | } | 92 | } |
93 | - _, orgs, err := orgRepository.Find(map[string]interface{}{"companyId": optUser.CompanyId}) | 93 | + _, orgs, err := orgRepository.Find(map[string]interface{}{"companyId": optUser.CompanyId, "limit": 10000}) |
94 | if err != nil { | 94 | if err != nil { |
95 | return err | 95 | return err |
96 | } | 96 | } |
@@ -143,7 +143,7 @@ func (ptr *PgBatchAddUserService) BatchAddUser2(optUser *domain.OperateInfo, use | @@ -143,7 +143,7 @@ func (ptr *PgBatchAddUserService) BatchAddUser2(optUser *domain.OperateInfo, use | ||
143 | UpdatedAt: time.Now(), | 143 | UpdatedAt: time.Now(), |
144 | } | 144 | } |
145 | if newUser, err = createUserService.CreateUser(nil, newUser, password); err != nil { | 145 | if newUser, err = createUserService.CreateUser(nil, newUser, password); err != nil { |
146 | - return err | 146 | + return fmt.Errorf("%v %v", user.UserName, err.Error()) |
147 | } | 147 | } |
148 | } | 148 | } |
149 | return nil | 149 | return nil |
-
请 注册 或 登录 后发表评论