|
@@ -46,7 +46,7 @@ public class SysCustomServiceImpl extends ServiceImpl<SysCustomMapper, SysCustom
|
|
|
public IPage<SysCustomResult> query(Page<Map> iPage, ProductTypeEnum type, Long managerId, String name, Long levelId) {
|
|
|
IPage<SysCustomResult> sysCustomResultIPage = this.baseMapper.query(iPage, Objects.nonNull(type) ? type.name() : null, Objects.nonNull(managerId) ? managerId : null, name, Objects.nonNull(levelId) ? levelId : null);
|
|
|
sysCustomResultIPage.getRecords().forEach(e -> {
|
|
|
- e.setRoleList(sysCustomRoleService.list(new QueryWrapper<SysCustomRole>().lambda().eq(SysCustomRole::getCustomId, e.getId())));
|
|
|
+ e.setRoleList(sysCustomRoleService.getList(e.getId()));
|
|
|
});
|
|
|
return sysCustomResultIPage;
|
|
|
}
|
|
@@ -60,8 +60,9 @@ public class SysCustomServiceImpl extends ServiceImpl<SysCustomMapper, SysCustom
|
|
|
this.saveOrUpdate(sysCustom);
|
|
|
sysCustom.getRoleList().forEach(e->{
|
|
|
e.setCustomId(sysCustom.getId());
|
|
|
+ sysCustomRoleService.saveOrUpdate(e);
|
|
|
});
|
|
|
- sysCustomRoleService.saveBatch(sysCustom.getRoleList());
|
|
|
+
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -70,8 +71,9 @@ public class SysCustomServiceImpl extends ServiceImpl<SysCustomMapper, SysCustom
|
|
|
sysCustomRoleService.remove(new QueryWrapper<SysCustomRole>().lambda().eq(SysCustomRole::getCustomId, sysCustom.getId()));
|
|
|
sysCustom.getRoleList().forEach(e->{
|
|
|
e.setCustomId(sysCustom.getId());
|
|
|
+ sysCustomRoleService.saveOrUpdate(e);
|
|
|
});
|
|
|
- sysCustomRoleService.saveBatch(sysCustom.getRoleList());
|
|
|
+
|
|
|
SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
sysCustom.setUpdateId(sysUser.getId());
|
|
|
sysCustom.setUpdateTime(System.currentTimeMillis());
|