| | |
| | | SELECT |
| | | id,name,pId,eqid |
| | | FROM |
| | | sys_catalog |
| | | sys_catalog where 1 = 1 |
| | | <if test="id!=null"> |
| | | and id = #{id} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="tree" resultMap="treeNodeResultMap"> |
| | | select id, pId as parent_id, name as title, id as "value", id as "key" from sys_catalog |
| | | </select> |
| | | |
| | | <update id="updateCatalog"> |
| | | update sys_catalog SET name=#{name} where eqid=#{eqid} |
| | | </update> |
| | | update sys_catalog SET name=#{name},eqid=#{eqid} |
| | | <if test="pid!=null and pid!=''"> |
| | | ,pId=#{pid} |
| | | </if> |
| | | where eqid=#{eqid} |
| | | </update> |
| | | |
| | | <insert id="addCatalog"> |
| | | INSERT INTO sys_catalog (name,eqid,pId) VALUES (#{name},#{eqid},#{pid}) |
| | | </insert> |
| | | |
| | | </mapper> |