24282 před 2 roky
rodič
revize
6718b6434d

+ 1 - 2
hx-flow/src/main/java/com/fjhx/flow/service/flow/impl/FlowProcessServiceImpl.java

@@ -119,7 +119,6 @@ public class FlowProcessServiceImpl implements FlowProcessService {
             flowExample.setStatus(FlowStatusEnum.IN_PROGRESS.getKey());
         }
         flowExample.setStartData(dto.getData().toJSONString());
-        flowExample.setVersion(1);
 
         FlowExampleDetail startExampleDetail = new FlowExampleDetail();
         startExampleDetail.setFlowExampleId(flowId);
@@ -260,7 +259,7 @@ public class FlowProcessServiceImpl implements FlowProcessService {
         nodeExampleDetail.setFlowDefinitionNodeType(currentNode.getNodeType());
         nodeExampleDetail.setHandleType(dto.getHandleType());
         nodeExampleDetail.setHandleRemark(dto.getRemark());
-        nodeExampleDetail.setSubmitData(dto.getData().toJSONString());
+        nodeExampleDetail.setSubmitData(JSONObject.toJSONString(dto));
 
         flowExampleService.updateById(flowExample);
         flowExampleDetailService.save(nodeExampleDetail);

+ 13 - 0
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java

@@ -28,6 +28,11 @@ public class SysMenu extends BaseEntity {
     /**
      * 菜单名称
      */
+    private Integer type;
+
+    /**
+     * 菜单名称
+     */
     private String menuName;
 
     /**
@@ -235,6 +240,14 @@ public class SysMenu extends BaseEntity {
         this.children = children;
     }
 
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

+ 90 - 34
ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml

@@ -25,11 +25,27 @@
 		<result property="updateTime"     column="update_time"    />
 		<result property="updateBy"       column="update_by"      />
 		<result property="remark"         column="remark"         />
+		<result property="type"         column="type"         />
 	</resultMap>
 
 	<sql id="selectMenuVo">
-        select menu_id, menu_name, parent_id, order_num, path, component, `query`, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time 
-		from sys_menu
+        select menu_id,
+               menu_name,
+               parent_id,
+               order_num,
+               path,
+               component,
+               `query`,
+               is_frame,
+               is_cache,
+               menu_type,
+               visible,
+               status,
+               ifnull(perms, '') as perms,
+               icon,
+               type,
+               create_time
+        from sys_menu
     </sql>
     
     <select id="selectMenuList" parameterType="SysMenu" resultMap="SysMenuResult">
@@ -49,51 +65,88 @@
 	</select>
 	
 	<select id="selectMenuTreeAll" resultMap="SysMenuResult">
-		select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
-		from sys_menu m where m.menu_type in ('M', 'C') and m.status = 0
-		order by m.parent_id, m.order_num
-	</select>
+        select distinct m.menu_id,
+                        m.parent_id,
+                        m.menu_name,
+                        m.path,
+                        m.component,
+                        m.`query`,
+                        m.visible,
+                        m.status,
+                        ifnull(m.perms, '') as perms,
+                        m.is_frame,
+                        m.is_cache,
+                        m.menu_type,
+                        m.icon,
+                        m.order_num,
+                        m.create_time,
+                        m.type
+        from sys_menu m
+        where m.menu_type in ('M', 'C')
+          and m.status = 0
+        order by m.parent_id, m.order_num
+    </select>
 	
 	<select id="selectMenuListByUserId" parameterType="SysMenu" resultMap="SysMenuResult">
-		select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
-		from sys_menu m
-		left join sys_role_menu rm on m.menu_id = rm.menu_id
-		left join sys_user_role ur on rm.role_id = ur.role_id
-		left join sys_role ro on ur.role_id = ro.role_id
-		where ur.user_id = #{params.userId}
-		<if test="menuName != null and menuName != ''">
+        select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status,
+        ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num,m.type, m.create_time
+        from sys_menu m
+        left join sys_role_menu rm on m.menu_id = rm.menu_id
+        left join sys_user_role ur on rm.role_id = ur.role_id
+        left join sys_role ro on ur.role_id = ro.role_id
+        where ur.user_id = #{params.userId}
+        <if test="menuName != null and menuName != ''">
             AND m.menu_name like concat('%', #{menuName}, '%')
-		</if>
-		<if test="visible != null and visible != ''">
+        </if>
+        <if test="visible != null and visible != ''">
             AND m.visible = #{visible}
-		</if>
-		<if test="status != null and status != ''">
+        </if>
+        <if test="status != null and status != ''">
             AND m.status = #{status}
-		</if>
-		order by m.parent_id, m.order_num
-	</select>
+        </if>
+        order by m.parent_id, m.order_num
+    </select>
     
     <select id="selectMenuTreeByUserId" parameterType="Long" resultMap="SysMenuResult">
-		select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
+		select distinct m.menu_id,
+						m.parent_id,
+						m.menu_name,
+						m.path,
+						m.component,
+						m.`query`,
+						m.visible,
+						m.status,
+						ifnull(m.perms, '') as perms,
+						m.is_frame,
+						m.is_cache,
+						m.menu_type,
+						m.icon,
+						m.order_num,
+						m.create_time,
+						m.type
 		from sys_menu m
-			 left join sys_role_menu rm on m.menu_id = rm.menu_id
-			 left join sys_user_role ur on rm.role_id = ur.role_id
-			 left join sys_role ro on ur.role_id = ro.role_id
-			 left join sys_user u on ur.user_id = u.user_id
-		where u.user_id = #{userId} and m.menu_type in ('M', 'C') and m.status = 0  AND ro.status = 0
+				 left join sys_role_menu rm on m.menu_id = rm.menu_id
+				 left join sys_user_role ur on rm.role_id = ur.role_id
+				 left join sys_role ro on ur.role_id = ro.role_id
+				 left join sys_user u on ur.user_id = u.user_id
+		where u.user_id = #{userId}
+		  and m.menu_type in ('M', 'C')
+		  and m.status = 0
+		  AND ro.status = 0
 		order by m.parent_id, m.order_num
 	</select>
 	
 	<select id="selectMenuListByRoleId" resultType="Long">
-		select m.menu_id
-		from sys_menu m
-            left join sys_role_menu rm on m.menu_id = rm.menu_id
+        select m.menu_id
+        from sys_menu m
+        left join sys_role_menu rm on m.menu_id = rm.menu_id
         where rm.role_id = #{roleId}
-            <if test="menuCheckStrictly">
-              and m.menu_id not in (select m.parent_id from sys_menu m inner join sys_role_menu rm on m.menu_id = rm.menu_id and rm.role_id = #{roleId})
-            </if>
-		order by m.parent_id, m.order_num
-	</select>
+        <if test="menuCheckStrictly">
+            and m.menu_id not in (select m.parent_id from sys_menu m inner join sys_role_menu rm on m.menu_id =
+            rm.menu_id and rm.role_id = #{roleId})
+        </if>
+        order by m.parent_id, m.order_num
+    </select>
 	
 	<select id="selectMenuPerms" resultType="String">
 		select distinct m.perms
@@ -149,6 +202,7 @@
 			<if test="perms !=null">perms = #{perms},</if>
 			<if test="icon !=null and icon != ''">icon = #{icon},</if>
 			<if test="remark != null and remark != ''">remark = #{remark},</if>
+			<if test="type != null and type != ''">type = #{type},</if>
 			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
 			update_time = sysdate()
 		</set>
@@ -172,6 +226,7 @@
 		<if test="perms !=null and perms != ''">perms,</if>
 		<if test="icon != null and icon != ''">icon,</if>
 		<if test="remark != null and remark != ''">remark,</if>
+		<if test="type != null and type != ''">type,</if>
 		<if test="createBy != null and createBy != ''">create_by,</if>
 		create_time
 		)values(
@@ -190,6 +245,7 @@
 		<if test="perms !=null and perms != ''">#{perms},</if>
 		<if test="icon != null and icon != ''">#{icon},</if>
 		<if test="remark != null and remark != ''">#{remark},</if>
+		<if test="type != null and type != ''">#{type},</if>
 		<if test="createBy != null and createBy != ''">#{createBy},</if>
 		sysdate()
 		)