Commit e57f58fa by 陶光胜

Merge branch 'developer' of…

Merge branch 'developer' of http://115.159.76.241/base_platform_enterprise/gic-platform-auth into developer
parents 48904cb7 b70c381a
......@@ -156,4 +156,14 @@ public interface TabSysMenuMapper {
* @return int


 */
int countByMenuCode(@Param("menuCode") String menuCode,@Param("menuId") Integer menuId);
/**
* 批量更新子集的父级code数据,根据父级ID
* @Title: updateParentCodeByParentId

* @Description:

 * @author guojuxing
* @param parentId

* @return void


 */
void updateParentCodeByParentId(@Param("parentId")Integer parentId, @Param("parentCode") String parentCode);
}
\ No newline at end of file
......@@ -134,4 +134,14 @@ public interface MenuService {
* @return boolean


 */
boolean isRepeatMenuCode(String code, Integer menuId);
/**
* 批量更新子集的父级code数据,根据父级ID
* @Title: updateParentCodeByParentId

* @Description:

 * @author guojuxing
* @param parentId
 父级ID
* @return void


 */
void updateParentCodeByParentId(Integer parentId, String parentCode);
}
......@@ -139,6 +139,11 @@ public class MenuServiceImpl implements MenuService {
return false;
}
@Override
public void updateParentCodeByParentId(Integer parentId, String parentCode) {
tabSysMenuMapper.updateParentCodeByParentId(parentId, parentCode);
}
private void updateSort(Integer sort, Integer id) {
TabSysMenu record = new TabSysMenu();
record.setMenuId(id);
......
......@@ -226,6 +226,9 @@ public class MenuApiServiceImpl implements MenuApiService {
}
menuService.updatePage(menuDTO);
//同时更新子集的父级code数据
menuService.updateParentCodeByParentId(menuDTO.getMenuId(), menuDTO.getMenuCode());
return ServiceResponse.success();
}
......@@ -495,6 +498,10 @@ public class MenuApiServiceImpl implements MenuApiService {
}
setMenuVersion(menuDTO);
menuService.updatePage(menuDTO);
//同时更新子集的父级code数据
menuService.updateParentCodeByParentId(menuDTO.getMenuId(), menuDTO.getMenuCode());
return ServiceResponse.success();
}
......
......@@ -400,4 +400,11 @@
and menu_id <> #{menuId}
</if>
</select>
<update id="updateParentCodeByParentId">
update tab_sys_menu set parent_code = #{parentCode}
where parent_id = #{parentId}
and status = 1
</update>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment