<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>ruoyi on yang&#39;s dev blog</title>
    <link>https://yangyang.dev/tags/ruoyi/</link>
    <description>Recent content in ruoyi on yang&#39;s dev blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <managingEditor>yangyang2035@google.com (yangyang)</managingEditor>
    <webMaster>yangyang2035@google.com (yangyang)</webMaster>
    <copyright>© Untitled. All rights reserved</copyright>
    <lastBuildDate>Tue, 10 Oct 2023 10:19:58 +0800</lastBuildDate><atom:link href="https://yangyang.dev/tags/ruoyi/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>若依框架前后端分离版部署到子路径上时的操作流程</title>
      <link>https://yangyang.dev/posts/java/ruoyi-path-deploy/</link>
      <pubDate>Tue, 10 Oct 2023 10:19:58 +0800</pubDate>
      <author>yangyang2035@google.com (yangyang)</author>
      <guid>https://yangyang.dev/posts/java/ruoyi-path-deploy/</guid>
      <description>若依框架前后端分离版部署到子路径上时的操作流程 1.根域名nginx域名配置路径/marketing #营销系统 upstream x_marketing_upstream { server 172.16.xx.xx:xxxx weight=1 max_fails=1 fail_timeout=10s; } location ^~ /marketing/ { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection &amp;#34;upgrade&amp;#34;; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_next_upstream error timeout invalid_header http_502 http_504; proxy_pass http://x_marketing_upstream; rewrite ^/marketing/(.*)$ /$1 break; } 2. 前端nginx配置 server{ listen xxxx; server_name 172.16.xx.xxx; client_max_body_size 30m; location / { root /data/crm-platform/crm-platform-ui/dist; index index.html; try_files $uri $uri/ /index.html; gzip on; gzip_comp_level 6; gzip_types text/xml text/plain text/css application/javascript application/x-javascript application/rss+xml image/jpeg image/gif image/png; } location /profile/ { alias /data/crm-platform/crm-platform-ui/uploadPath/; } location /prod-api/ { proxy_pass http://172.</description>
    </item>
    
    <item>
      <title>若依框架前后端分离版部署到子路径上时的操作流程</title>
      <link>https://yangyang.dev/ru/posts/java/ruoyi-path-deploy/</link>
      <pubDate>Tue, 10 Oct 2023 10:19:58 +0800</pubDate>
      <author>yangyang2035@google.com (yangyang)</author>
      <guid>https://yangyang.dev/ru/posts/java/ruoyi-path-deploy/</guid>
      <description>若依框架前后端分离版部署到子路径上时的操作流程 1.根域名nginx域名配置路径/marketing #营销系统 upstream x_marketing_upstream { server 172.16.xx.xx:xxxx weight=1 max_fails=1 fail_timeout=10s; } location ^~ /marketing/ { proxy_http_version 1.1; proxy_set_header Обновление $http_upgrade; proxy_set_header Соединение &amp;#34;upgrade&amp;#34;; proxy_set_header Хост $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_next_upstream error timeout invalid_header http_502 http_504; proxy_pass http://x_marketing_upstream; rewrite ^/marketing/(.*)$ /$1 break; } 2. 前端nginx配置 сервер{ listen xxxx; имя_сервера 172.16.xx.xxx; client_max_body_size 30m; расположение / { root /data/crm-platform/crm-platform-ui/dist; index index.html; try_files $uri $uri/ /index.html; gzip включен; gzip_comp_level 6; gzip_types text/xml text/plain text/css application/javascript application/x-javascript application/rss+xml image/jpeg image/gif image/png; } location /profile/ { alias /data/crm-platform/crm-platform-ui/uploadPath/; } location /prod-api/ { proxy_pass http://172.</description>
    </item>
    
    <item>
      <title>若依权限范围</title>
      <link>https://yangyang.dev/posts/java/ruoyi-datascopesapect/</link>
      <pubDate>Fri, 25 Aug 2023 10:39:58 +0800</pubDate>
      <author>yangyang2035@google.com (yangyang)</author>
      <guid>https://yangyang.dev/posts/java/ruoyi-datascopesapect/</guid>
      <description>若依框架 权限范围dataScope概览 TLDR;切面+注解+mybatis定位符(对应4个文件DataScopeAspect.java,SysUserServiceImpl.java,SysUserMapper.xml 以及BaseEntity.java中的params.dataScope属性) ps: 若依官网：https://ruoyi.vip/ 0.BaseEntity类中有属性params，里面可以放需要注入的sql private Map&amp;lt;String, Object&amp;gt; params; 1.DataScopeAspect定义切面 DataScopeAspect类，定义了五种权限范围，对应角色的数据权限分配方式
DATA_SCOPE_ALL = &amp;#34;1&amp;#34; //全部数据权限 DATA_SCOPE_CUSTOM = &amp;#34;2&amp;#34;; //自定数据权限 DATA_SCOPE_DEPT = &amp;#34;3&amp;#34;; //部门数据权限 DATA_SCOPE_DEPT_AND_CHILD = &amp;#34;4&amp;#34;; //部门及以下数据权限 DATA_SCOPE_SELF = &amp;#34;5&amp;#34;; //仅本人数据权限 //如果不是超级管理员 if (StringUtils.isNotNull(currentUser) &amp;amp;&amp;amp; !currentUser.isAdmin()) //执行权限过滤方法 dataScopeFilter(JoinPoint joinPoint, SysUser user, String deptAlias, String userAlias) //根据用户user的roles(可多个角色)，找到各角色的权限范围的类型，判断，然后追加sql语句 //循环 //最后得到需要追加的sqlString for (SysRole role : user.getRoles()) //最后判断 如果sqlString不为空 if (StringUtils.isNotBlank(sqlString.toString())) //而且方法的参数是BaseEntity类型/子类型 （如果有新类型，在这里添加） if (StringUtils.isNotNull(params) &amp;amp;&amp;amp; params instanceof BaseEntity) //则在参数类的属性params.dataScope赋值sqlString baseEntity.getParams().put(DATA_SCOPE, &amp;#34; AND (&amp;#34; + sqlString.</description>
    </item>
    
  </channel>
</rss>
