Parcourir la source

添加获取当前账号的角色名接口

hu il y a 3 ans
Parent
commit
ba79302d8d

+ 4 - 0
src/custom/restcontroller/R.java

@@ -4776,6 +4776,10 @@ public class R {
         public static class v1 {
         }
     }
+    public static class ID20230524160003 {
+        public static class v1 {
+        }
+    }
 
 }
 

+ 6 - 0
src/custom/restcontroller/webmanage/sale/order/Order.java

@@ -2517,6 +2517,12 @@ public class Order extends Controller {
         return getSucReturnObject().toString();
     }
 
+    @API(title = "获取当前账号的角色名", apiversion = R.ID20230524160003.v1.class)
+    public String getrolename() throws YosException {
+        Rows rows = dbConnect.runSqlQuery("select rolename from sys_userrole t1 inner join sys_role t2 on t1.roleid=t2.roleid and t1.siteid=t2.siteid where t1.siteid='"+siteid+"' and t1.userid="+userid);
+        return getSucReturnObject().setData(rows).toString();
+    }
+
 //    @API(title = "发货单手动关闭", apiversion = R.ID20230406155302.v1.class)
 //    @Deprecated
 //    public String closeDispatch() throws YosException {