fixed: 角色更新问题、缓存不刷新问题

This commit is contained in:
wangiegie@gmail.com 2018-01-07 15:45:02 +08:00
parent be56e2ac01
commit e1718274f5
2 changed files with 3 additions and 1 deletions

View File

@ -104,6 +104,7 @@ public class RoleController extends BaseController {
*/
@PutMapping("/roleMenuUpd")
public R<Boolean> roleMenuUpd(Integer roleId, @RequestParam("menuIds[]") Integer[] menuIds) {
return new R<>(sysRoleMenuService.insertRoleMenus(getRole().get(0),roleId,menuIds));
SysRole sysRole = sysRoleService.selectById(roleId);
return new R<>(sysRoleMenuService.insertRoleMenus(sysRole.getRoleCode(), roleId, menuIds));
}
}

View File

@ -6,6 +6,7 @@ import com.github.pig.admin.entity.SysRoleMenu;
import com.github.pig.admin.mapper.SysRoleMenuMapper;
import com.github.pig.admin.service.SysRoleMenuService;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import java.util.ArrayList;