Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mytime
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Narendar Vakiti
mytime
Commits
740156f3
Commit
740156f3
authored
May 04, 2019
by
Vijay Akula
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added service method for updating project sequence
parent
e6d466f2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
6 deletions
+13
-6
AccountController.java
...n/java/com/nisum/myteam/controller/AccountController.java
+1
-1
ProjectController.java
...n/java/com/nisum/myteam/controller/ProjectController.java
+0
-1
IAccountService.java
src/main/java/com/nisum/myteam/service/IAccountService.java
+3
-2
AccountService.java
...in/java/com/nisum/myteam/service/impl/AccountService.java
+7
-1
ProjectService.java
...in/java/com/nisum/myteam/service/impl/ProjectService.java
+2
-1
No files found.
src/main/java/com/nisum/myteam/controller/AccountController.java
View file @
740156f3
...
...
@@ -53,7 +53,7 @@ public class AccountController {
log
.
info
(
"Updating the account with details::"
+
account
);
boolean
isAccountExists
=
accountService
.
isAccountExists
(
account
);
if
(
isAccountExists
==
true
)
{
Account
accountPersisted
=
accountService
.
updateAccount
(
account
);
Account
accountPersisted
=
accountService
.
updateAccount
AndRolesForDMS
(
account
);
ResponseDetails
updateRespDetails
=
new
ResponseDetails
(
new
Date
(),
604
,
"Account has been updated"
,
"status description"
,
null
,
request
.
getContextPath
(),
"details"
,
accountPersisted
);
...
...
src/main/java/com/nisum/myteam/controller/ProjectController.java
View file @
740156f3
...
...
@@ -43,7 +43,6 @@ public class ProjectController {
if
(
account
!=
null
)
{
accountName
=
account
.
getAccountName
();
int
sequenceNumber
=
account
.
getAccountProjectSequence
();
account
.
setAccountProjectSequence
(
sequenceNumber
+
1
);
projectService
.
updateProjSeqinAccount
(
account
);
...
...
src/main/java/com/nisum/myteam/service/IAccountService.java
View file @
740156f3
...
...
@@ -13,7 +13,9 @@ public interface IAccountService {
Account
createAccount
(
Account
account
)
throws
MyTeamException
;
Account
updateAccount
(
Account
account
)
throws
MyTeamException
;
Account
updateAccountAndRolesForDMS
(
Account
account
)
throws
MyTeamException
;
public
Account
updateAccountSequence
(
Account
account
);
boolean
isAccountExists
(
Account
account
);
...
...
@@ -31,5 +33,4 @@ public interface IAccountService {
public
List
<
Account
>
getAccountsAll
()
throws
MyTeamException
;
}
src/main/java/com/nisum/myteam/service/impl/AccountService.java
View file @
740156f3
...
...
@@ -62,7 +62,7 @@ public class AccountService implements IAccountService {
}
@Override
public
Account
updateAccount
(
Account
accountUpdating
)
throws
MyTeamException
{
public
Account
updateAccount
AndRolesForDMS
(
Account
accountUpdating
)
throws
MyTeamException
{
Account
accountBeforeUpdate
=
accountRepo
.
findByAccountId
(
accountUpdating
.
getAccountId
());
accountUpdating
.
setId
(
accountBeforeUpdate
.
getId
());
...
...
@@ -84,6 +84,12 @@ public class AccountService implements IAccountService {
return
accountUpdated
;
}
@Override
public
Account
updateAccountSequence
(
Account
account
)
{
return
accountRepo
.
save
(
account
);
}
@Override
public
boolean
isAccountExists
(
Account
account
)
{
...
...
src/main/java/com/nisum/myteam/service/impl/ProjectService.java
View file @
740156f3
...
...
@@ -117,7 +117,7 @@ public class ProjectService implements IProjectService {
}
public
Account
updateProjSeqinAccount
(
Account
account
)
throws
MyTeamException
{
return
accountService
.
updateAccount
(
account
);
return
accountService
.
updateAccount
Sequence
(
account
);
}
@Override
...
...
@@ -259,6 +259,7 @@ public class ProjectService implements IProjectService {
projectRepo
.
delete
(
project
);
Query
query
=
new
Query
(
Criteria
.
where
(
"projectId"
).
is
(
projectId
));
List
<
Resource
>
list
=
mongoTemplate
.
find
(
query
,
Resource
.
class
);
resourceRepo
.
delete
(
list
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment