| | |
| | | mm.`parent_id`=0; |
| | | </select> |
| | | |
| | | <select id="getManageMenuByName" resultMap="BaseResultMap"> |
| | | select * from manage_menu |
| | | where name = #{name} |
| | | and is_delete = 0 |
| | | </select> |
| | | |
| | | <select id="getManageMenuById" resultMap="BaseResultMap"> |
| | | select * from manage_menu |
| | | where id = #{id} |
| | | and is_delete = 0 |
| | | </select> |
| | | |
| | | <insert id="insertOne" parameterType="java.util.Map"> |
| | | INSERT INTO manage_menu |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="name != null"> |
| | | name, |
| | | </if> |
| | | <if test="url != null"> |
| | | url, |
| | | </if> |
| | | <if test="icon != null"> |
| | | icon, |
| | | </if> |
| | | <if test="parent_id != null"> |
| | | parent_id, |
| | | </if> |
| | | <if test="order != null"> |
| | | `order`, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="name != null"> |
| | | #{name}, |
| | | </if> |
| | | <if test="url != null"> |
| | | #{url}, |
| | | </if> |
| | | <if test="icon != null"> |
| | | #{icon}, |
| | | </if> |
| | | <if test="parent_id != null"> |
| | | #{parent_id}, |
| | | </if> |
| | | <if test="order != null"> |
| | | #{order}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateManageMenuById" parameterType="java.util.Map"> |
| | | update manage_menu |
| | | <set> |
| | | <if test="name != null"> |
| | | name = #{name}, |
| | | </if> |
| | | <if test="url != null"> |
| | | url = #{url}, |
| | | </if> |
| | | <if test="icon != null"> |
| | | icon = #{icon}, |
| | | </if> |
| | | <if test="parent_id != null"> |
| | | parent_id = #{parent_id}, |
| | | </if> |
| | | <if test="order != null"> |
| | | `order` = #{order}, |
| | | </if> |
| | | <if test="is_delete != null"> |
| | | is_delete = #{is_delete}, |
| | | </if> |
| | | </set> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | </mapper> |