Commit 5f4bf48d authored by 耿迪迪's avatar 耿迪迪

外部采购查询权限

parent 39b3a265
......@@ -52,8 +52,8 @@ public class TPurchaseController extends BaseController
{
// 获取当前用户
SysUser user = tokenService.getLoginUser(ServletUtils.getRequest()).getUser();
List<SysRole> calculator = user.getRoles().stream().filter(item ->item.getRoleKey() == "calculator").collect(Collectors.toList());
if (StringUtils.isNotNull(user) && !user.isAdmin() && !CollectionUtils.isEmpty(calculator)) {
List<SysRole> calculator = user.getRoles().stream().filter(item ->"calculator".equals(item.getRoleKey())).collect(Collectors.toList());
if (StringUtils.isNotNull(user) && !user.isAdmin() && CollectionUtils.isEmpty(calculator)) {
tPurchase.setPurchaseDeptId(user.getDeptId());
}
startPage();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment