diff --git a/src/main/java/com/rekoe/module/admin/AdminProjectAct.java b/src/main/java/com/rekoe/module/admin/AdminProjectAct.java index 21d4f63..36826ed 100644 --- a/src/main/java/com/rekoe/module/admin/AdminProjectAct.java +++ b/src/main/java/com/rekoe/module/admin/AdminProjectAct.java @@ -228,7 +228,7 @@ public class AdminProjectAct extends BaseAction { PjAuth entity = new PjAuth(); entity.setPj(pj); entity.setRes(res); - Mvcs.getReq().setAttribute("entity", entity); + entity.setRw(rw); projectAuthService.save(pj, res, rw, grs, usrs); return pjauth(pj, res, entity, Mvcs.getReq()); } diff --git a/src/main/java/com/rekoe/service/ProjectAuthService.java b/src/main/java/com/rekoe/service/ProjectAuthService.java index 8866b71..1bed010 100644 --- a/src/main/java/com/rekoe/service/ProjectAuthService.java +++ b/src/main/java/com/rekoe/service/ProjectAuthService.java @@ -245,9 +245,11 @@ public class ProjectAuthService extends BaseService { */ public void saveByUsr(PjAuth pjAuth) { if (this.getByUsr(pjAuth.getPj(), pjAuth.getUsr(), pjAuth.getRes()) == null) { - dao().insert(pjAuth); + Sql sql = Sqls.create("insert into pj_usr_auth (pj,usr,res,rw) values (@pj,@usr,@res,@rw)"); + sql.setParam("pj", pjAuth.getPj()).setParam("usr", pjAuth.getUsr()).setParam("rw", pjAuth.getRw()).setParam("res", pjAuth.getRes()); + dao().execute(sql); } else { - dao().update(getEntityClass(), Chain.make("rw", pjAuth.getRw()), Cnd.where("pj", "=", pjAuth.getPj()).and("usr", "=", pjAuth.getUsr()).and("res", "=", pjAuth.getRes())); + dao().update("pj_usr_auth", Chain.make("rw", pjAuth.getRw()), Cnd.where("pj", "=", pjAuth.getPj()).and("usr", "=", pjAuth.getUsr()).and("res", "=", pjAuth.getRes())); } } diff --git a/src/main/java/com/rekoe/service/ProjectConfigService.java b/src/main/java/com/rekoe/service/ProjectConfigService.java index dbf3294..fceceaf 100644 --- a/src/main/java/com/rekoe/service/ProjectConfigService.java +++ b/src/main/java/com/rekoe/service/ProjectConfigService.java @@ -56,7 +56,7 @@ public class ProjectConfigService extends BaseService { public String getProjectUrl(String pj) { ProjectConfig conf = get(); String path = conf.getDomainPath(); - if (!StringUtils.endsWith(path, "/") || !StringUtils.endsWith(path, "\\")) { + if (!StringUtils.endsWith(path, "/")) { path += "/"; } return path + pj; diff --git a/src/main/webapp/res/cms/js/admin.js b/src/main/webapp/res/cms/js/admin.js index e9d8a72..d9fc589 100644 --- a/src/main/webapp/res/cms/js/admin.js +++ b/src/main/webapp/res/cms/js/admin.js @@ -183,7 +183,7 @@ Cms.deleted = function(id){ $.message(message); if (message.type == "success") { - window.location.href = back; + window.location.href = list.rk; } } });