zoukankan      html  css  js  c++  java
  • activiti 视图

    1. application.properties增加如下配置

    spring.activiti.database-schema-update=false
    spring.activiti.db-history-used=false
    spring.activiti.db-identity-used=false

    2. 视图sql

    -- 修改表名称
    ALTER TABLE act_id_user RENAME act_id_user_bak1;
    ALTER TABLE act_id_group RENAME act_id_group_bak1;
    ALTER TABLE act_id_membership RENAME act_id_membership_bak1;
    
    -- activit用户视图
    CREATE OR REPLACE VIEW `microarch_dev`.`act_id_user` AS 
    (SELECT 
      user_name AS ID_,
      NULL AS REV_,
      fullname AS FIRST_,
      fullname AS LAST_,
      email AS EMAIL_,
      PASSWORD AS PWD_,
      NULL AS PICTURE_ID_
    FROM sys_user_);
    
    -- activit角色视图
    CREATE OR REPLACE VIEW `microarch_dev`.`act_id_group` AS 
    (SELECT 
      role_code AS ID_,
      NULL AS REV_,
      role_name AS NAME_,
      NULL AS TYPE_  
    FROM sys_role_) ;
    
    
    -- activit用户角色关系视图
    CREATE OR REPLACE VIEW `microarch_dev`.`act_id_membership` AS 
    (SELECT 
      (SELECT 
        user_name 
      FROM
        sys_user_ su 
      WHERE su.id = sur.user_id) AS USER_ID_,
      (SELECT 
        role_code 
      FROM
        sys_role_ sr 
      WHERE sr.id = sur.role_id) AS GROUP_ID_ 
    FROM
      sys_user_role_ sur) ;
    -- 查询
    SELECT * FROM act_id_user;
    SELECT * FROM act_id_group;
    SELECT * FROM act_id_membership;
    View Code

    参考:https://blog.csdn.net/an341221/article/details/79003035

  • 相关阅读:
    第33周二
    第33周一
    第32周日
    第32周六
    RichTextBox 右键显示 ContextMenuTrip
    关于 Head First SQL 中文版
    linux进程通信之共享内存
    chroot 与 jail
    SQL基础--> 约束(CONSTRAINT)
    MessageDigest简单介绍
  • 原文地址:https://www.cnblogs.com/rigid/p/9623884.html
Copyright © 2011-2022 走看看