-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
280 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.rbac.common; | ||
|
||
/** | ||
* 常量类 | ||
* @date 2014-3-24 | ||
* | ||
*/ | ||
public class MvcConstant { | ||
|
||
public static final String USER = "com_user"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.rbac.common; | ||
|
||
import java.util.Set; | ||
|
||
import com.rbac.entity.SysAccount; | ||
|
||
public class UserDetail { | ||
|
||
private SysAccount account; | ||
|
||
private String menuJsonString; | ||
|
||
private Set<String> permitActionSet; | ||
|
||
public SysAccount getAccount() { | ||
return account; | ||
} | ||
|
||
public void setAccount(SysAccount account) { | ||
this.account = account; | ||
} | ||
|
||
public String getMenuJsonString() { | ||
return menuJsonString; | ||
} | ||
|
||
public void setMenuJsonString(String menuJsonString) { | ||
this.menuJsonString = menuJsonString; | ||
} | ||
|
||
public Set<String> getPermitActionSet() { | ||
return permitActionSet; | ||
} | ||
|
||
public void setPermitActionSet(Set<String> permitActionSet) { | ||
this.permitActionSet = permitActionSet; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.rbac.dao; | ||
|
||
import java.util.List; | ||
|
||
import org.springframework.stereotype.Component; | ||
|
||
import com.rbac.common.BaseDaoSupport; | ||
import com.rbac.entity.SysMenu; | ||
|
||
@Component("accountDao") | ||
public class AccountDao extends BaseDaoSupport { | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
package com.rbac.entity; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class SysMenuVo implements Comparable{ | ||
|
||
private Long id; | ||
|
||
private String text; | ||
|
||
private String url; | ||
|
||
private Integer orderSeq; | ||
|
||
private Long parentId; | ||
|
||
private List<SysMenuVo> children = new ArrayList<SysMenuVo>(); | ||
|
||
|
||
public int compareTo(Object menuVo){ | ||
if(menuVo instanceof SysMenuVo){ | ||
SysMenuVo vo = (SysMenuVo)menuVo; | ||
if(vo!=null){ | ||
return this.orderSeq.compareTo(vo.getOrderSeq()); | ||
} | ||
} | ||
return 1; | ||
} | ||
|
||
public Boolean getLeaf(){ | ||
return children.size()>0?false:true; | ||
} | ||
|
||
|
||
public List<SysMenuVo> getChildren() { | ||
return children; | ||
} | ||
|
||
public void setChildren(List<SysMenuVo> children) { | ||
this.children = children; | ||
} | ||
|
||
public Long getId() { | ||
return id; | ||
} | ||
|
||
public void setId(Long id) { | ||
this.id = id; | ||
} | ||
|
||
public Integer getOrderSeq() { | ||
return orderSeq; | ||
} | ||
|
||
public void setOrderSeq(Integer orderSeq) { | ||
this.orderSeq = orderSeq; | ||
} | ||
|
||
public String getText() { | ||
return text; | ||
} | ||
|
||
public void setText(String text) { | ||
this.text = text; | ||
} | ||
|
||
public String getUrl() { | ||
return url; | ||
} | ||
|
||
public void setUrl(String url) { | ||
this.url = url; | ||
} | ||
|
||
public Long getParentId() { | ||
return parentId; | ||
} | ||
|
||
public void setParentId(Long parentId) { | ||
this.parentId = parentId; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.rbac.service; | ||
|
||
import java.io.Serializable; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import org.hibernate.Hibernate; | ||
import org.hibernate.collection.PersistentBag; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.stereotype.Service; | ||
|
||
import com.rbac.dao.AccountDao; | ||
import com.rbac.entity.SysAccount; | ||
|
||
@Service("accountService") | ||
public class AccountService { | ||
|
||
@Autowired | ||
private AccountDao accountDao; | ||
|
||
public void saveOrUpdateAccount(SysAccount account){ | ||
accountDao.saveOrUpdate(account); | ||
} | ||
|
||
|
||
} |
Oops, something went wrong.