permission
This commit is contained in:
parent
4b43640085
commit
d29a869c26
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user