permission

This commit is contained in:
xzb 2022-10-19 17:47:42 +08:00
parent 4b43640085
commit d29a869c26

View File

@ -115,9 +115,6 @@ public class PermissionDistributeService {
PermissionSubject updateSubject = new PermissionSubject();
updateSubject.setId(permissionSubject.getId());
updateSubject.setRemains(permissionSubject.getRemains()-pd.getAmount());
if(updateSubject.getRemains()<=0){
updateSubject.setStatus(PermissionSubjectStatusEnum.InValid.name());
}
this.permissionSubjectDAO.updateByPrimaryKeySelective(updateSubject);
}
//
@ -239,9 +236,6 @@ public class PermissionDistributeService {
PermissionDistribute updateDistribute = new PermissionDistribute();
updateDistribute.setId(permissionDistribute.getId());
updateDistribute.setRemains(permissionDistribute.getRemains() - permissionSubject.getAmount());
if (updateDistribute.getRemains() <= 0) {
updateDistribute.setStatus(PermissionDistributeStatusEnum.InValid.getValue());
}
this.permissionDistributeDAO.updateByPrimaryKeySelective(updateDistribute);
//
return permissionSubjectId;