<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzya.frame.sys.module.dao.impl.ModuleMapperImpl">
	<resultMap id="get-entity-result" type="com.hzya.frame.sys.module.entity.Module">
		<!--主键ID -->
		<result property="id" column="id" />
		<!--Spring bean名称 -->
		<result property="serviceName" column="service_name" />
		<!--等级 -->
		<result property="lvl" column="lvl" />
		<!--名称 -->
		<result property="name" column="name" />
		<!--编码 -->
		<result property="code" column="code" />
		<!--类型  0、menu 1、tree  2、list 3、view -->
		<result property="formType" column="form_type" />
		<!--模块操作级别Superadministrator -->
		<result property="level" column="level" />
		<!--模块图标 -->
		<result property="icon" column="icon" />
		<!--上级id -->
		<result property="upIds" column="up_ids" />
		<!--bean表名称映射key -->
		<result property="tableName" column="table_name" />
		<!--是否关键模块(Y是N否) -->
		<result property="keyModular" column="key_modular" />
		<!--跳转目标 -->
		<result property="target" column="target" />
		<!--排序编号 -->
		<result property="sorts" column="sorts" />
		<!--备注 -->
		<result property="remark" column="remark" />
		<!--菜单打开方式 -->
		<result property="openType" column="open_type" />
		<!--表单ID -->
		<result property="formId" column="form_id" />
		<!--应用id -->
		<result property="appId" column="app_id" />
		<!--创建人id -->
		<result property="createUserId" column="create_user_id" />
		<!--创建时间 -->
		<result property="createTime" column="create_time" />
		<!--修改人id -->
		<result property="modifyUserId" column="modify_user_id" />
		<!--修改时间 -->
		<result property="modifyTime" column="modify_time" />
		<!--状态(Y正常N删除) -->
		<result property="sts" column="sts" />
		<!--组织机构ID -->
		<result property="orgId" column="org_id" />
		<!--路由地址 -->
		<result property="path" column="path" />
		<!--一级Layout 二级 ParntView 三级component -->
		<result property="component" column="component" />
		<!--隐藏 -->
		<result property="hidden" column="hidden" />
		<!--redirevt -->
		<result property="redirect" column="redirect" />
		<!--alwaysShow -->
		<result property="alwaysShow" column="always_show" />
		<!--标题 -->
		<result property="title" column="title" />
		<!--label -->
		<result property="label" column="label" />
		<!--options -->
		<result property="options" column="options" />
		<!--nocache缓存 -->
		<result property="noCache" column="no_cache" />
	</resultMap>

	<sql id="Base_Column_List">
		id,
		service_name,
		lvl,
		name,
		code,
		form_type,
		level,
		icon,
		up_ids,
		table_name,
		key_modular,
		target,
		sorts,
		remark,
		open_type,
		form_id,
		app_id,
		create_user_id,
		create_time,
		modify_user_id,
		modify_time,
		sts,
		org_id,
		path,
		component,
		hidden,
		redirect,
		always_show,
		title,
		label,
		options,
		no_cache
	</sql>

	<!--通过ID获取数据 -->
	<select id="entity_get" resultMap="get-entity-result">
		select
		<include refid="Base_Column_List" />
		from sys_module where id = #{ id } and sts='Y'
	</select>

	<!-- 查询 采用==查询 -->
	<select id="entity_list_base" resultMap="get-entity-result" parameterType="com.hzya.frame.sys.module.entity.Module">
		select
		<if test="viewFiledList != null and viewFiledList.size>0">
			<foreach collection="viewFiledList" item="item" index="index" separator=",">
				${item.datebaseName}
			</foreach>
		</if>
		<if test="viewFiledList == null or viewFiledList.size == 0">
			<include refid="Base_Column_List" />
		</if>
		from sys_module
		<trim prefix="where" prefixOverrides="and">
			<if test="id != null and id !='' ">id = #{id} </if>
			<if test="serviceName != null and serviceName !='' "> and service_name = #{serviceName}</if>
			<if test="lvl != null and lvl !='' "> and lvl = #{lvl}</if>
			<if test="name != null and name !='' "> and name = #{name}</if>
			<if test="code != null and code !='' "> and code = #{code}</if>
			<if test="formType != null and formType !='' "> and form_type = #{formType}</if>
			<if test="formType == null or formType ==''.toString() "> AND (form_type != '4'  or form_type is null)  </if>
			<if test="level != null and level !='' "> and level = #{level}</if>
			<if test="icon != null and icon !='' "> and icon = #{icon}</if>
			<if test="upIds != null and upIds !='' "> and up_ids = #{upIds}</if>
			<if test="tableName != null and tableName !='' "> and table_name = #{tableName}</if>
			<if test="keyModular != null and keyModular !='' "> and key_modular = #{keyModular}</if>
			<if test="target != null and target !='' "> and target = #{target}</if>
			<if test="sorts != null "> and sorts = #{sorts}</if>
			<if test="remark != null and remark !='' "> and remark = #{remark}</if>
			<if test="openType != null and openType !='' "> and open_type = #{openType}</if>
			<if test="formId != null and formId !='' "> and form_id = #{formId}</if>
			<if test="appId != null and appId !='' "> and app_id = #{appId}</if>
			<if test="createUserId != null and createUserId !='' "> and create_user_id = #{createUserId}</if>
			<if test="createTime != null "> and create_time = #{createTime}</if>
			<if test="modifyUserId != null and modifyUserId !='' "> and modify_user_id = #{modifyUserId}</if>
			<if test="modifyTime != null "> and modify_time = #{modifyTime}</if>
			<if test="sts != null and sts !='' "> and sts = #{sts}</if>
			<if test="orgId != null and orgId !='' "> and org_id = #{orgId}</if>
			<if test="path != null and path !='' "> and path = #{path}</if>
			<if test="component != null and component !='' "> and component = #{component}</if>
			<if test="hidden != null and hidden !='' "> and hidden = #{hidden}</if>
			<if test="redirect != null and redirect !='' "> and redirect = #{redirect}</if>
			<if test="alwaysShow != null and alwaysShow !='' "> and always_show = #{alwaysShow}</if>
			<if test="title != null and title !='' "> and title = #{title}</if>
			<if test="label != null and label !='' "> and label = #{label}</if>
			<if test="options != null and options !='' "> and options = #{options}</if>
			<if test="noCache != null and noCache !='' "> and no_cache = #{noCache}</if>
			<if test="roleModules != null and roleModules.size>0">
				AND id in
				<foreach collection="roleModules" item="item" index="index" open="(" close=")" separator=",">
					#{item.moduleId}
				</foreach>
			</if>

		</trim>
		<if test=" sort == null or sort =='' "> order by sorts asc</if>
		<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
	</select>

	<!-- 查询符合条件的数量 -->
	<select id="entity_count" resultType="Integer" parameterType="com.hzya.frame.sys.module.entity.Module">
		select count(1) from sys_module
		<trim prefix="where" prefixOverrides="and">
			<if test="id != null and id !='' ">id = #{id} </if>
			<if test="serviceName != null and serviceName !='' "> and service_name = #{serviceName}</if>
			<if test="lvl != null and lvl !='' "> and lvl = #{lvl}</if>
			<if test="name != null and name !='' "> and name = #{name}</if>
			<if test="code != null and code !='' "> and code = #{code}</if>
			<if test="formType != null and formType !='' "> and form_type = #{formType}</if>
			<if test="formType == null or formType ==''.toString() "> and form_type != '4' </if>

			<if test="level != null and level !='' "> and level = #{level}</if>
			<if test="icon != null and icon !='' "> and icon = #{icon}</if>
			<if test="upIds != null and upIds !='' "> and up_ids = #{upIds}</if>
			<if test="tableName != null and tableName !='' "> and table_name = #{tableName}</if>
			<if test="keyModular != null and keyModular !='' "> and key_modular = #{keyModular}</if>
			<if test="target != null and target !='' "> and target = #{target}</if>
			<if test="sorts != null "> and sorts = #{sorts}</if>
			<if test="remark != null and remark !='' "> and remark = #{remark}</if>
			<if test="openType != null and openType !='' "> and open_type = #{openType}</if>
			<if test="formId != null and formId !='' "> and form_id = #{formId}</if>
			<if test="appId != null and appId !='' "> and app_id = #{appId}</if>
			<if test="createUserId != null and createUserId !='' "> and create_user_id = #{createUserId}</if>
			<if test="createTime != null "> and create_time = #{createTime}</if>
			<if test="modifyUserId != null and modifyUserId !='' "> and modify_user_id = #{modifyUserId}</if>
			<if test="modifyTime != null "> and modify_time = #{modifyTime}</if>
			<if test="sts != null and sts !='' "> and sts = #{sts}</if>
			<if test="orgId != null and orgId !='' "> and org_id = #{orgId}</if>
			<if test="path != null and path !='' "> and path = #{path}</if>
			<if test="component != null and component !='' "> and component = #{component}</if>
			<if test="hidden != null and hidden !='' "> and hidden = #{hidden}</if>
			<if test="redirect != null and redirect !='' "> and redirect = #{redirect}</if>
			<if test="alwaysShow != null and alwaysShow !='' "> and always_show = #{alwaysShow}</if>
			<if test="title != null and title !='' "> and title = #{title}</if>
			<if test="label != null and label !='' "> and label = #{label}</if>
			<if test="options != null and options !='' "> and options = #{options}</if>
			<if test="noCache != null and noCache !='' "> and no_cache = #{noCache}</if>
		</trim>
	</select>

	<!-- 分页查询列表 采用like格式 -->
	<select id="entity_list_like" resultMap="get-entity-result" parameterType="com.hzya.frame.sys.module.entity.Module">
		select
		<if test="viewFiledList != null and viewFiledList.size>0">
			<foreach collection="viewFiledList" item="item" index="index" separator=",">
				${item.datebaseName}
			</foreach>
		</if>
		<if test="viewFiledList == null or viewFiledList.size == 0">
		<include refid="Base_Column_List" />
		</if>
		from sys_module
		<trim prefix="where" prefixOverrides="and">
			<if test="id != null and id !='' "> id like concat('%',#{id},'%') </if>
			<if test="serviceName != null and serviceName !='' "> and service_name like concat('%',#{serviceName},'%') </if>
			<if test="lvl != null and lvl !='' "> and lvl like concat('%',#{lvl},'%') </if>
			<if test="name != null and name !='' "> and name like concat('%',#{name},'%') </if>
			<if test="code != null and code !='' "> and code like concat('%',#{code},'%') </if>
			<if test="formType != null and formType !='' "> and form_type like concat('%',#{formType},'%') </if>
			<if test="formType == null or formType == ''.toString() "> AND (form_type != '4'  or form_type is null)  </if>
			<if test="level != null and level !='' "> and level like concat('%',#{level},'%') </if>
			<if test="icon != null and icon !='' "> and icon like concat('%',#{icon},'%') </if>
			<if test="upIds != null and upIds !='' "> and up_ids like concat('%',#{upIds},'%') </if>
			<if test="tableName != null and tableName !='' "> and table_name like concat('%',#{tableName},'%') </if>
			<if test="keyModular != null and keyModular !='' "> and key_modular like concat('%',#{keyModular},'%') </if>
			<if test="target != null and target !='' "> and target like concat('%',#{target},'%') </if>
			<if test="sorts != null "> and sorts = #{sorts}</if>
			<if test="remark != null and remark !='' "> and remark like concat('%',#{remark},'%') </if>
			<if test="openType != null and openType !='' "> and open_type like concat('%',#{openType},'%') </if>
			<if test="formId != null and formId !='' "> and form_id like concat('%',#{formId},'%') </if>
			<if test="appId != null and appId !='' "> and app_id like concat('%',#{appId},'%') </if>
			<if test="createUserId != null and createUserId !='' "> and create_user_id like concat('%',#{createUserId},'%') </if>
			<if test="createTime != null and createTime !='' "> and create_time like concat('%',#{createTime},'%') </if>
			<if test="modifyUserId != null and modifyUserId !='' "> and modify_user_id like concat('%',#{modifyUserId},'%') </if>
			<if test="modifyTime != null and modifyTime !='' "> and modify_time like concat('%',#{modifyTime},'%') </if>
			<if test="sts != null and sts !='' "> and sts like concat('%',#{sts},'%') </if>
			<if test="orgId != null and orgId !='' "> and org_id like concat('%',#{orgId},'%') </if>
			<if test="path != null and path !='' "> and path like concat('%',#{path},'%') </if>
			<if test="component != null and component !='' "> and component like concat('%',#{component},'%') </if>
			<if test="hidden != null and hidden !='' "> and hidden like concat('%',#{hidden},'%') </if>
			<if test="redirect != null and redirect !='' "> and redirect like concat('%',#{redirect},'%') </if>
			<if test="alwaysShow != null and alwaysShow !='' "> and always_show like concat('%',#{alwaysShow},'%') </if>
			<if test="title != null and title !='' "> and title like concat('%',#{title},'%') </if>
			<if test="label != null and label !='' "> and label like concat('%',#{label},'%') </if>
			<if test="options != null and options !='' "> and options like concat('%',#{options},'%') </if>
			<if test="noCache != null and noCache !='' "> and no_cache like concat('%',#{noCache},'%') </if>
		</trim>
		<if test=" sort == null or sort =='' "> order by sorts asc</if>
		<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by  ${sort} ${order}</if>
	</select>

	<!-- 查询列表 字段采用or格式 -->
	<select id="entity_list_or" resultMap="get-entity-result" parameterType="com.hzya.frame.sys.module.entity.Module">
		select
		<if test="viewFiledList != null and viewFiledList.size>0">
			<foreach collection="viewFiledList" item="item" index="index" separator=",">
				${item.datebaseName}
			</foreach>
		</if>
		<if test="viewFiledList == null or viewFiledList.size == 0">
			<include refid="Base_Column_List" />
		</if>
		from sys_module
		<trim prefix="where" prefixOverrides="or">
			<if test="id != null and id !='' ">id = #{id} </if>
			<if test="serviceName != null and serviceName !='' "> or service_name = #{serviceName} </if>
			<if test="lvl != null and lvl !='' "> or lvl = #{lvl} </if>
			<if test="name != null and name !='' "> or name = #{name} </if>
			<if test="code != null and code !='' "> or code = #{code} </if>
			<if test="formType != null and formType !='' "> or form_type = #{formType} </if>
			<if test="formType == null or formType ==''.toString() "> AND (form_type != '4'  or form_type is null)  </if>

			<if test="level != null and level !='' "> or level = #{level} </if>
			<if test="icon != null and icon !='' "> or icon = #{icon} </if>
			<if test="upIds != null and upIds !='' "> or up_ids = #{upIds} </if>
			<if test="tableName != null and tableName !='' "> or table_name = #{tableName} </if>
			<if test="keyModular != null and keyModular !='' "> or key_modular = #{keyModular} </if>
			<if test="target != null and target !='' "> or target = #{target} </if>
			<if test="sorts != null "> or sorts = #{sorts}</if>
			<if test="remark != null and remark !='' "> or remark = #{remark} </if>
			<if test="openType != null and openType !='' "> or open_type = #{openType} </if>
			<if test="formId != null and formId !='' "> or form_id = #{formId} </if>
			<if test="appId != null and appId !='' "> or app_id = #{appId} </if>
			<if test="createUserId != null and createUserId !='' "> or create_user_id = #{createUserId} </if>
			<if test="createTime != null and createTime !='' "> or create_time = #{createTime} </if>
			<if test="modifyUserId != null and modifyUserId !='' "> or modify_user_id = #{modifyUserId} </if>
			<if test="modifyTime != null and modifyTime !='' "> or modify_time = #{modifyTime} </if>
			<if test="sts != null and sts !='' "> or sts = #{sts} </if>
			<if test="orgId != null and orgId !='' "> or org_id = #{orgId} </if>
			<if test="path != null and path !='' "> or path = #{path} </if>
			<if test="component != null and component !='' "> or component = #{component} </if>
			<if test="hidden != null and hidden !='' "> or hidden = #{hidden} </if>
			<if test="redirect != null and redirect !='' "> or redirect = #{redirect} </if>
			<if test="alwaysShow != null and alwaysShow !='' "> or always_show = #{alwaysShow} </if>
			<if test="title != null and title !='' "> or title = #{title} </if>
			<if test="label != null and label !='' "> or label = #{label} </if>
			<if test="options != null and options !='' "> or options = #{options} </if>
			<if test="noCache != null and noCache !='' "> or no_cache = #{noCache} </if>
		</trim>
		<if test=" sort == null or sort =='' "> order by sorts asc</if>
		<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by  ${sort} ${order}</if>
	</select>
	<!-- 新增 -->
	<insert id="entity_insert" parameterType="com.hzya.frame.sys.module.entity.Module">
		insert into sys_module(
		<trim suffix="" suffixOverrides=",">
			<if test="id != null and id !='' "> id, </if>
			<if test="serviceName != null and serviceName !='' "> service_name, </if>
			<if test="lvl != null and lvl !='' "> lvl, </if>
			<if test="name != null and name !='' "> name, </if>
			<if test="code != null and code !='' "> code, </if>
			<if test="formType != null and formType !='' "> form_type, </if>
			<if test="level != null and level !='' "> level, </if>
			<if test="icon != null and icon !='' "> icon, </if>
			<if test="upIds != null and upIds !='' "> up_ids, </if>
			<if test="tableName != null and tableName !='' "> table_name, </if>
			<if test="keyModular != null and keyModular !='' "> key_modular, </if>
			<if test="target != null and target !='' "> target, </if>
			<if test="sorts != null ">sorts,</if>
			<if test="remark != null and remark !='' "> remark, </if>
			<if test="openType != null and openType !='' "> open_type, </if>
			<if test="formId != null and formId !='' "> form_id, </if>
			<if test="appId != null and appId !='' "> app_id, </if>
			<if test="createUserId != null and createUserId !='' "> create_user_id, </if>
			<if test="createTime != null ">create_time,</if>
			<if test="modifyUserId != null and modifyUserId !='' "> modify_user_id, </if>
			<if test="modifyTime != null ">modify_time,</if>
			<if test="sts != null and sts !='' "> sts, </if>
			<if test="orgId != null and orgId !='' "> org_id, </if>
			<if test="path != null and path !='' "> path, </if>
			<if test="component != null and component !='' "> component, </if>
			<if test="hidden != null and hidden !='' "> hidden, </if>
			<if test="redirect != null and redirect !='' "> redirect, </if>
			<if test="alwaysShow != null and alwaysShow !='' "> always_show, </if>
			<if test="title != null and title !='' "> title, </if>
			<if test="label != null and label !='' "> label, </if>
			<if test="options != null and options !='' "> options, </if>
			<if test="noCache != null and noCache !='' "> no_cache, </if>

		</trim>
		)values
		(
		<trim suffix="" suffixOverrides=",">
			<if test="id != null and id !='' "> #{id}, </if>
			<if test="serviceName != null and serviceName !='' "> #{serviceName}, </if>
			<if test="lvl != null and lvl !='' "> #{lvl}, </if>
			<if test="name != null and name !='' "> #{name}, </if>
			<if test="code != null and code !='' "> #{code}, </if>
			<if test="formType != null and formType !='' "> #{formType}, </if>
			<if test="level != null and level !='' "> #{level}, </if>
			<if test="icon != null and icon !='' "> #{icon}, </if>
			<if test="upIds != null and upIds !='' "> #{upIds}, </if>
			<if test="tableName != null and tableName !='' "> #{tableName}, </if>
			<if test="keyModular != null and keyModular !='' "> #{keyModular}, </if>
			<if test="target != null and target !='' "> #{target}, </if>
			<if test="sorts != null ">#{sorts},</if>
			<if test="remark != null and remark !='' "> #{remark}, </if>
			<if test="openType != null and openType !='' "> #{openType}, </if>
			<if test="formId != null and formId !='' "> #{formId}, </if>
			<if test="appId != null and appId !='' "> #{appId}, </if>
			<if test="createUserId != null and createUserId !='' "> #{createUserId}, </if>
			<if test="createTime != null ">#{createTime},</if>
			<if test="modifyUserId != null and modifyUserId !='' "> #{modifyUserId}, </if>
			<if test="modifyTime != null ">#{modifyTime},</if>
			<if test="sts != null and sts !='' "> #{sts}, </if>
			<if test="orgId != null and orgId !='' "> #{orgId}, </if>
			<if test="path != null and path !='' "> #{path}, </if>
			<if test="component != null and component !='' "> #{component}, </if>
			<if test="hidden != null and hidden !='' "> #{hidden}, </if>
			<if test="redirect != null and redirect !='' "> #{redirect}, </if>
			<if test="alwaysShow != null and alwaysShow !='' "> #{alwaysShow}, </if>
			<if test="title != null and title !='' "> #{title}, </if>
			<if test="label != null and label !='' "> #{label}, </if>
			<if test="options != null and options !='' "> #{options}, </if>
			<if test="noCache != null and noCache !='' "> #{noCache}, </if>
		</trim>
		)
	</insert>

	<!-- 修改 -->
	<update id="entity_update" parameterType="com.hzya.frame.sys.module.entity.Module">
		update sys_module set
		<trim suffix="" suffixOverrides=",">
			<if test="serviceName != null and serviceName !='' "> service_name = #{serviceName},</if>
			<if test="lvl != null and lvl !='' "> lvl = #{lvl},</if>
			<if test="name != null and name !='' "> name = #{name},</if>
			<if test="code != null and code !='' "> code = #{code},</if>
			<if test="formType != null and formType !='' "> form_type = #{formType},</if>
			<if test="level != null and level !='' "> level = #{level},</if>
			<if test="icon != null and icon !='' "> icon = #{icon},</if>
			<if test="upIds != null and upIds !='' "> up_ids = #{upIds},</if>
			<if test="tableName != null and tableName !='' "> table_name = #{tableName},</if>
			<if test="keyModular != null and keyModular !='' "> key_modular = #{keyModular},</if>
			<if test="target != null and target !='' "> target = #{target},</if>
			<if test="sorts != null ">sorts = #{sorts},</if>
			<if test="remark != null and remark !='' "> remark = #{remark},</if>
			<if test="openType != null and openType !='' "> open_type = #{openType},</if>
			<if test="formId != null and formId !='' "> form_id = #{formId},</if>
			<if test="appId != null and appId !='' "> app_id = #{appId},</if>
			<if test="createUserId != null and createUserId !='' "> create_user_id = #{createUserId},</if>
			<if test="createTime != null ">create_time = #{createTime},</if>
			<if test="modifyUserId != null and modifyUserId !='' "> modify_user_id = #{modifyUserId},</if>
			<if test="modifyTime != null ">modify_time = #{modifyTime},</if>
			<if test="sts != null and sts !='' "> sts = #{sts},</if>
			<if test="orgId != null and orgId !='' "> org_id = #{orgId},</if>
			<if test="path != null and path !='' "> path = #{path},</if>
			<if test="component != null and component !='' "> component = #{component},</if>
			<if test="hidden != null and hidden !='' "> hidden = #{hidden},</if>
			<if test="redirect != null and redirect !='' "> redirect = #{redirect},</if>
			<if test="alwaysShow != null and alwaysShow !='' "> always_show = #{alwaysShow},</if>
			<if test="title != null and title !='' "> title = #{title},</if>
			<if test="label != null and label !='' "> label = #{label},</if>
			<if test="options != null and options !='' "> options = #{options},</if>
			<if test="noCache != null and noCache !='' "> no_cache = #{noCache},</if>
		</trim>
		where id = #{id}
	</update>

	<!-- 逻辑删除 -->
	<update id="entity_logicDelete" parameterType="com.hzya.frame.sys.module.entity.Module">
		update sys_module set
		sts='N',modify_time = now(),modify_user_id = #{modifyUserId} where
		id = #{id}
	</update>

	<!-- 逻辑删除多条件 -->
	<update id="entity_logicDelete_Multi_Condition" parameterType="com.hzya.frame.sys.module.entity.Module">
		update sys_module set
		sts='N',modify_time = now(),modify_user_id = #{modifyUserId}
		<trim prefix="where" prefixOverrides="and">
			<if test="id != null and id !='' ">id = #{id} </if>
			<if test="serviceName != null and serviceName !='' "> and service_name = #{serviceName}</if>
			<if test="lvl != null and lvl !='' "> and lvl = #{lvl}</if>
			<if test="name != null and name !='' "> and name = #{name}</if>
			<if test="code != null and code !='' "> and code = #{code}</if>
			<if test="formType != null and formType !='' "> and form_type = #{formType}</if>
			<if test="level != null and level !='' "> and level = #{level}</if>
			<if test="icon != null and icon !='' "> and icon = #{icon}</if>
			<if test="upIds != null and upIds !='' "> and up_ids = #{upIds}</if>
			<if test="tableName != null and tableName !='' "> and table_name = #{tableName}</if>
			<if test="keyModular != null and keyModular !='' "> and key_modular = #{keyModular}</if>
			<if test="target != null and target !='' "> and target = #{target}</if>
			<if test="sorts != null "> and sorts = #{sorts}</if>
			<if test="remark != null and remark !='' "> and remark = #{remark}</if>
			<if test="openType != null and openType !='' "> and open_type = #{openType}</if>
			<if test="formId != null and formId !='' "> and form_id = #{formId}</if>
			<if test="appId != null and appId !='' "> and app_id = #{appId}</if>
			<if test="createUserId != null and createUserId !='' "> and create_user_id = #{createUserId}</if>
			<if test="createTime != null and createTime !='' "> and create_time = #{createTime}</if>
			<if test="modifyUserId != null and modifyUserId !='' "> and modify_user_id = #{modifyUserId}</if>
			<if test="modifyTime != null and modifyTime !='' "> and modify_time = #{modifyTime}</if>
			<if test="sts != null and sts !='' "> and sts = #{sts}</if>
			<if test="orgId != null and orgId !='' "> and org_id = #{orgId}</if>
			<if test="path != null and path !='' "> and path = #{path}</if>
			<if test="component != null and component !='' "> and component = #{component}</if>
			<if test="hidden != null and hidden !='' "> and hidden = #{hidden}</if>
			<if test="redirect != null and redirect !='' "> and redirect = #{redirect}</if>
			<if test="alwaysShow != null and alwaysShow !='' "> and always_show = #{alwaysShow}</if>
			<if test="title != null and title !='' "> and title = #{title}</if>
			<if test="label != null and label !='' "> and label = #{label}</if>
			<if test="options != null and options !='' "> and options = #{options}</if>
			<if test="noCache != null and noCache !='' "> and no_cache = #{noCache}</if>
		</trim>
	</update>

	<!-- 物理删除 -->
	<delete id="entity_delete" parameterType="com.hzya.frame.sys.module.entity.Module">
		delete from sys_module where id =#{id}
	</delete>
</mapper>
