| | |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.pipIrrBase.user.QueryVo; |
| | | import com.dy.pipIrrGlobal.daoBa.BaRoleMapper; |
| | | import com.dy.pipIrrGlobal.daoBa.BaRolePermissionsMapper; |
| | | import com.dy.pipIrrGlobal.daoBa.BaRolePrivilegeMapper; |
| | | import com.dy.pipIrrGlobal.pojoBa.BaRole; |
| | | import com.dy.pipIrrGlobal.pojoBa.BaRolePermissions; |
| | | import com.dy.pipIrrGlobal.pojoBa.BaRolePrivilege; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.dubbo.common.utils.PojoUtils; |
| | |
| | | this.rolePrivDao = dao; |
| | | } |
| | | |
| | | @Autowired |
| | | private BaRolePermissionsMapper baRolePermissionsMapper; |
| | | |
| | | /** |
| | | * 得到所有角色 |
| | |
| | | * @param po 实体 |
| | | * @return 影响记录数量 |
| | | */ |
| | | |
| | | /** |
| | | * 12月20日 朱宝民修改返回值,添加角色后返回主键 |
| | | */ |
| | | @Transactional |
| | | public int save(BaRole po){ |
| | | return this.dao.putin(po) ; |
| | | public Long save(BaRole po){ |
| | | //return this.dao.putin(po) ; |
| | | this.dao.putin(po) ; |
| | | return po.getId(); |
| | | } |
| | | |
| | | /** |
| | |
| | | return this.dao.deleteLogicById(id) ; |
| | | } |
| | | |
| | | /** |
| | | * 添加授权记录 |
| | | * @param po |
| | | * @return |
| | | */ |
| | | public Integer addPermissions(BaRolePermissions po) { |
| | | return baRolePermissionsMapper.insert(po); |
| | | } |
| | | |
| | | /** |
| | | * 依据角色编号删除授权记录 |
| | | * @param roleid |
| | | * @return |
| | | */ |
| | | public Integer delPermissionsByRoleId(Long roleid) { |
| | | return baRolePermissionsMapper.delPermissionsByRoleId(roleid); |
| | | } |
| | | |
| | | } |