Skip to content

Commit 84e3332

Browse files
committed
bugfix: share api bug fix
1 parent 763734b commit 84e3332

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/src/main/java/datart/server/service/impl/ShareServiceImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,13 +314,13 @@ public boolean update(BaseUpdateParam updateParam) {
314314
BeanUtils.copyProperties(shareUpdateParam, update);
315315
update.setRowPermissionBy(shareUpdateParam.getRowPermissionBy().name());
316316
update.setAuthenticationMode(shareUpdateParam.getAuthenticationMode().name());
317+
317318
Set<String> roleIds = new HashSet<>();
318319
if (!CollectionUtils.isEmpty(shareUpdateParam.getRoles())) {
319320
for (String role : shareUpdateParam.getRoles()) {
320321
roleIds.add('r' + role);
321322
}
322323
}
323-
324324
if (!CollectionUtils.isEmpty(shareUpdateParam.getUsers())) {
325325
for (String user : shareUpdateParam.getUsers()) {
326326
Role role = roleService.getPerUserRole(retrieve.getOrgId(), user);
@@ -330,7 +330,7 @@ public boolean update(BaseUpdateParam updateParam) {
330330
update.setRoles(JSON.toJSONString(roleIds));
331331
update.setUpdateBy(getCurrentUser().getId());
332332
update.setUpdateTime(new Date());
333-
return 1 == shareMapper.updateByPrimaryKey(update);
333+
return 1 == shareMapper.updateByPrimaryKeySelective(update);
334334
}
335335

336336
private ShareAuthorizedToken validateExecutePermission(String authorizedToken, ViewExecuteParam executeParam) {

0 commit comments

Comments
 (0)