| | |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | |
| | | <!-- 保存路由信息至 instance表中 add by wuxw 2018-07-03 --> |
| | | <insert id="saveMenuInfo" parameterType="Map"> |
| | | insert into m_menu( |
| | | m_id,name,g_id,url,seq,p_id,description,is_show |
| | | ) values ( |
| | | #{mId},#{name},#{gId},#{url},#{seq},#{pId},#{description},#{isShow} |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询路由信息 add by wuxw 2018-07-03 --> |
| | | <select id="getMenuInfo" parameterType="Map" resultType="Map"> |
| | | select t.m_id mId,t.name,t.g_id gId,t.url,t.seq,t.p_id pId,t.description,t.is_show isShow |
| | | from m_menu t |
| | | where t.status_cd= '0' |
| | | <if test="gId !=null and gId != ''"> |
| | | and t.g_id= #{gId} |
| | | </if> |
| | | <if test="name !=null and name != ''"> |
| | | and t.name like concat('%',#{name},'%') |
| | | </if> |
| | | <if test="mId !=null and mId != ''"> |
| | | and t.m_id= #{mId} |
| | | </if> |
| | | <if test="pId !=null and pId != ''"> |
| | | and t.p_id= #{pId} |
| | | </if> |
| | | <if test="isShow !=null and isShow != ''"> |
| | | and t.is_show= #{isShow} |
| | | </if> |
| | | <if test="url !=null and url != ''"> |
| | | and t.url like concat('%',#{url},'%') |
| | | </if> |
| | | <if test="seq !=null"> |
| | | and t.seq= #{seq} |
| | | </if> |
| | | <if test="description !=null and description != ''"> |
| | | and t.description= #{description} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改路由信息 |
| | | ,t.description,t.is_show isShow |
| | | add by wuxw 2018-07-03 --> |
| | | <update id="updateMenuInfo" parameterType="Map"> |
| | | update m_menu t |
| | | <set> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | t.status_cd = #{statusCd}, |
| | | </if> |
| | | <if test="name !=null and name != ''"> |
| | | t.name= #{name}, |
| | | </if> |
| | | <if test="gId !=null and gId != ''"> |
| | | t.g_id= #{gId}, |
| | | </if> |
| | | <if test="url !=null and url != ''"> |
| | | t.url= #{url}, |
| | | </if> |
| | | <if test="seq !=null "> |
| | | t.seq= #{seq}, |
| | | </if> |
| | | <if test="isShow !=null and isShow != ''"> |
| | | t.is_show= #{isShow}, |
| | | </if> |
| | | <if test="description !=null and description != ''"> |
| | | t.description= #{description} |
| | | </if> |
| | | </set> |
| | | where t.m_id= #{mId} |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询路由数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryMenusCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from m_menu t |
| | | where t.status_cd= '0' |
| | | <if test="gId !=null and gId != ''"> |
| | | and t.g_id= #{gId} |
| | | </if> |
| | | <if test="name !=null and name != ''"> |
| | | and t.name like concat('%',#{name},'%') |
| | | </if> |
| | | <if test="mId !=null and mId != ''"> |
| | | and t.m_id= #{mId} |
| | | </if> |
| | | <if test="pId !=null and pId != ''"> |
| | | and t.p_id= #{pId} |
| | | </if> |
| | | <if test="isShow !=null and isShow != ''"> |
| | | and t.is_show= #{isShow} |
| | | </if> |
| | | <if test="url !=null and url != ''"> |
| | | and t.url like concat('%',#{url},'%') |
| | | </if> |
| | | <if test="seq !=null"> |
| | | and t.seq= #{seq} |
| | | </if> |
| | | <if test="description !=null and description != ''"> |
| | | and t.description= #{description} |
| | | </if> |
| | | order by t.create_time desc |
| | | </select> |
| | | |
| | | |
| | | </mapper> |