权限同步调整

This commit is contained in:
tiger_zhou 2022-12-19 13:15:48 +08:00
parent 0548541ff3
commit b5afbac0be
3 changed files with 5 additions and 4 deletions

View File

@ -142,9 +142,7 @@ public class OldPermissionDataSyncService {
if(Objects.isNull(d.getForever())){ if(Objects.isNull(d.getForever())){
d.setForever(false); d.setForever(false);
} }
if(d.getForever()){ if(d.getForever() || d.getEndTime().isAfter(LocalDateTime.now())){
newList.add(d);
}else if(d.getEndTime().isAfter(LocalDateTime.now())){
newList.add(d); newList.add(d);
} }
// newList.add(d); // newList.add(d);
@ -248,6 +246,7 @@ public class OldPermissionDataSyncService {
continue; continue;
} }
PermissionSubject ps = SyncConvertUtil.convertSyncSubjectFromUserPermissionVO(userPermissionVO); PermissionSubject ps = SyncConvertUtil.convertSyncSubjectFromUserPermissionVO(userPermissionVO);
psList.add(ps); psList.add(ps);
} }
return psList; return psList;

View File

@ -21,6 +21,8 @@ public class UserPermissionVO {
private LocalDateTime createTime; private LocalDateTime createTime;
private LocalDateTime updateTime; private LocalDateTime updateTime;
private LocalDateTime userPermissionCreateTime;
private String remarks; private String remarks;
private Long creatorId; private Long creatorId;
//PermissionTypeEnum //PermissionTypeEnum

View File

@ -4,7 +4,7 @@
<select id="findCanUsedData" parameterType="arraylist" resultType="club.joylink.rtss.vo.permission.sync.UserPermissionVO"> <select id="findCanUsedData" parameterType="arraylist" resultType="club.joylink.rtss.vo.permission.sync.UserPermissionVO">
select A.id,A.permission_id,A.distribute_id,A.start_time,A.end_time,A.user_id,trim(B.name) as permission_name select A.id,A.permission_id,A.distribute_id,A.start_time,A.end_time,A.user_id,trim(B.name) as permission_name
,C.id as map_id,B.create_time,B.update_time,B.remarks,B.creator_id,B.type,B.prd_id,B.prd_type,B.is_package,B.rel_permissions ,C.id as map_id,B.create_time,B.update_time,B.remarks,B.creator_id,B.type,B.prd_id,B.prd_type,B.is_package,B.rel_permissions
,A.forever,A.amount,A.remains,C.name as map_name,E.id as organization_id ,E.name as organization_name ,A.forever,A.amount,A.remains,C.name as map_name,E.id as organization_id ,E.name as organization_name,A.create_time as user_permission_create_time
from user_permission A left join permission B on A.permission_id = B.id from user_permission A left join permission B on A.permission_id = B.id
left join map_info C on B.map_id = C.id left join map_info C on B.map_id = C.id
left join permission_distribute D on A.distribute_id = D.id left join permission_distribute D on A.distribute_id = D.id