|
@@ -38,6 +38,8 @@ public class NavigationService extends BaseTransaction {
|
|
|
private static final String COLLEGE_HOME_GROUP_IDCARD = "FFKJ_COLLEGE_HOME_GROUP";
|
|
private static final String COLLEGE_HOME_GROUP_IDCARD = "FFKJ_COLLEGE_HOME_GROUP";
|
|
|
private static final String COLLEGE_TOP_CUSTOM_IDCARD = "FFKJ_COLLEGE_SCHOOL_HOME";
|
|
private static final String COLLEGE_TOP_CUSTOM_IDCARD = "FFKJ_COLLEGE_SCHOOL_HOME";
|
|
|
private static final String COLLEGE_BOTTOM_CUSTOM_IDCARD = "FFKJ_COLLEGE_FOOTER_LINKS";
|
|
private static final String COLLEGE_BOTTOM_CUSTOM_IDCARD = "FFKJ_COLLEGE_FOOTER_LINKS";
|
|
|
|
|
+ private static final Long NAVIGATION_CHARGE_MANAGE_CODE = 10020L;
|
|
|
|
|
+ private static final Long DEPARTMENT_MANAGE_TYPE_CODE = 10000L;
|
|
|
|
|
|
|
|
static Logger log = LogManager.getLogger(NavigationService.class);
|
|
static Logger log = LogManager.getLogger(NavigationService.class);
|
|
|
|
|
|
|
@@ -63,7 +65,7 @@ public class NavigationService extends BaseTransaction {
|
|
|
AppNavigationUtil.generateNavURI(gdba, wn);
|
|
AppNavigationUtil.generateNavURI(gdba, wn);
|
|
|
|
|
|
|
|
gdba.insertByBean(wn);
|
|
gdba.insertByBean(wn);
|
|
|
- inheritManageFromParent(gdba, wn);
|
|
|
|
|
|
|
+ inheritChargeDepartmentFromParent(gdba, wn);
|
|
|
normalizeCollegeRedHomeNavigationSort(gdba, wn.getWebsiteid(), wn.getParentNid(), null);
|
|
normalizeCollegeRedHomeNavigationSort(gdba, wn.getWebsiteid(), wn.getParentNid(), null);
|
|
|
gdba.commit();
|
|
gdba.commit();
|
|
|
clearWebsiteFrontCache(wn);
|
|
clearWebsiteFrontCache(wn);
|
|
@@ -72,14 +74,23 @@ public class NavigationService extends BaseTransaction {
|
|
|
return DEFAULT_FORWARD;
|
|
return DEFAULT_FORWARD;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private void inheritManageFromParent(GeneralDBAccess gdba, WebsiteNavigation wn) throws Exception {
|
|
|
|
|
|
|
+ private void inheritChargeDepartmentFromParent(GeneralDBAccess gdba, WebsiteNavigation wn) throws Exception {
|
|
|
if (StringUtil.isNull(wn.getParentNid()) || StringUtil.isNull(wn.getNavigationid())) {
|
|
if (StringUtil.isNull(wn.getParentNid()) || StringUtil.isNull(wn.getNavigationid())) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- String sql = " select * from website_navigation_manage where navigationid = :parentNid ";
|
|
|
|
|
|
|
+ String deleteSql = " delete from website_navigation_manage "
|
|
|
|
|
+ + " where navigationid = :navigationid and wnmcode = :wnmcode and mtcode = :mtcode ";
|
|
|
|
|
+ SqlCommandImpl deleteCmd = new SqlCommandImpl(deleteSql);
|
|
|
|
|
+ deleteCmd.setString("navigationid", wn.getNavigationid()).setString("wnmcode", NAVIGATION_CHARGE_MANAGE_CODE)
|
|
|
|
|
+ .setString("mtcode", DEPARTMENT_MANAGE_TYPE_CODE);
|
|
|
|
|
+ gdba.modify(deleteCmd);
|
|
|
|
|
+
|
|
|
|
|
+ String sql = " select * from website_navigation_manage "
|
|
|
|
|
+ + " where navigationid = :parentNid and wnmcode = :wnmcode and mtcode = :mtcode ";
|
|
|
SqlCommandImpl sqlCmd = new SqlCommandImpl(sql);
|
|
SqlCommandImpl sqlCmd = new SqlCommandImpl(sql);
|
|
|
- sqlCmd.setString("parentNid", wn.getParentNid());
|
|
|
|
|
|
|
+ sqlCmd.setString("parentNid", wn.getParentNid()).setString("wnmcode", NAVIGATION_CHARGE_MANAGE_CODE)
|
|
|
|
|
+ .setString("mtcode", DEPARTMENT_MANAGE_TYPE_CODE);
|
|
|
List<WebsiteNavigationManage> manageList = gdba.selectAsList(sqlCmd, WebsiteNavigationManage.class);
|
|
List<WebsiteNavigationManage> manageList = gdba.selectAsList(sqlCmd, WebsiteNavigationManage.class);
|
|
|
|
|
|
|
|
for (WebsiteNavigationManage manage : manageList) {
|
|
for (WebsiteNavigationManage manage : manageList) {
|