Skip to content

Commit

Permalink
settings?
Browse files Browse the repository at this point in the history
  • Loading branch information
wangjeaf committed May 28, 2014
1 parent 91b9fe4 commit 41af1bc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions WebContent/account/mySetting.vm
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#bodyNewStart
<!-- Nav tabs -->
<div class="settings">
<div class="alert alert-success">不要鸡冻,这个功能还木有做完,霍雍和思竹吃饭饭去了</div>
<ul class="nav nav-tabs">
<li class="active"><a href="#home" data-toggle="tab">消息提醒设置</a>
</li>
Expand Down
18 changes: 11 additions & 7 deletions src/com/taobao/rigel/rap/project/service/impl/ProjectMgrImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,22 +76,26 @@ public List<Project> getProjectList(User user, int curPageNum, int pageSize) {
public int addProject(Project project) {
project.setUpdateTime(new Date());
project.setCreateDate(new Date());
List<User> usersInformed = new ArrayList<User>();
for (String account : project.getMemberAccountList()) {
User user = accountDao.getUser(account);
if (user != null) {
boolean addSuccess = project.addMember(user);
if (addSuccess) {
Notification o = new Notification();
o.setTypeId((short)2);
o.setTargetUser(project.getUser());
o.setUser(user);
o.setParam1(new Integer(project.getId()).toString());
o.setParam2(project.getName());
accountMgr.addNotification(o);
usersInformed.add(user);
}
}
}
int result = projectDao.addProject(project);
for (User u : usersInformed) {
Notification o = new Notification();
o.setTypeId((short)2);
o.setTargetUser(project.getUser());
o.setUser(u);
o.setParam1(new Integer(result).toString());
o.setParam2(project.getName());
accountMgr.addNotification(o);
}

Group g = organizationDao.getGroup(project.getGroupId());
if (g.getProductionLineId() > 0) {
Expand Down

0 comments on commit 41af1bc

Please sign in to comment.