permission
This commit is contained in:
parent
4b43640085
commit
d29a869c26
@ -115,9 +115,6 @@ public class PermissionDistributeService {
|
|||||||
PermissionSubject updateSubject = new PermissionSubject();
|
PermissionSubject updateSubject = new PermissionSubject();
|
||||||
updateSubject.setId(permissionSubject.getId());
|
updateSubject.setId(permissionSubject.getId());
|
||||||
updateSubject.setRemains(permissionSubject.getRemains()-pd.getAmount());
|
updateSubject.setRemains(permissionSubject.getRemains()-pd.getAmount());
|
||||||
if(updateSubject.getRemains()<=0){
|
|
||||||
updateSubject.setStatus(PermissionSubjectStatusEnum.InValid.name());
|
|
||||||
}
|
|
||||||
this.permissionSubjectDAO.updateByPrimaryKeySelective(updateSubject);
|
this.permissionSubjectDAO.updateByPrimaryKeySelective(updateSubject);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -239,9 +236,6 @@ public class PermissionDistributeService {
|
|||||||
PermissionDistribute updateDistribute = new PermissionDistribute();
|
PermissionDistribute updateDistribute = new PermissionDistribute();
|
||||||
updateDistribute.setId(permissionDistribute.getId());
|
updateDistribute.setId(permissionDistribute.getId());
|
||||||
updateDistribute.setRemains(permissionDistribute.getRemains() - permissionSubject.getAmount());
|
updateDistribute.setRemains(permissionDistribute.getRemains() - permissionSubject.getAmount());
|
||||||
if (updateDistribute.getRemains() <= 0) {
|
|
||||||
updateDistribute.setStatus(PermissionDistributeStatusEnum.InValid.getValue());
|
|
||||||
}
|
|
||||||
this.permissionDistributeDAO.updateByPrimaryKeySelective(updateDistribute);
|
this.permissionDistributeDAO.updateByPrimaryKeySelective(updateDistribute);
|
||||||
//
|
//
|
||||||
return permissionSubjectId;
|
return permissionSubjectId;
|
||||||
|
Loading…
Reference in New Issue
Block a user