Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
Project
Project
Details
Activity
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
8e57f0ba
Commit
8e57f0ba
authored
Oct 09, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DEV] delete user account service interface
parent
fe31a606
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
38 deletions
+7
-38
AccountController.java
...n/java/pwc/taxtech/atms/controller/AccountController.java
+3
-5
UserController.java
...main/java/pwc/taxtech/atms/controller/UserController.java
+2
-2
UserAccountService.java
...ain/java/pwc/taxtech/atms/service/UserAccountService.java
+0
-21
UserAccountServiceImpl.java
...pwc/taxtech/atms/service/impl/UserAccountServiceImpl.java
+1
-8
UserServiceImpl.java
...n/java/pwc/taxtech/atms/service/impl/UserServiceImpl.java
+1
-2
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/AccountController.java
View file @
8e57f0ba
package
pwc
.
taxtech
.
atms
.
controller
;
import
io.swagger.annotations.ApiOperation
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -9,21 +10,18 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
io.swagger.annotations.ApiOperation
;
import
pwc.taxtech.atms.dto.LoginOutputDto
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.user.UserPasswordDto
;
import
pwc.taxtech.atms.service.
UserAccountService
;
import
pwc.taxtech.atms.service.
impl.UserAccountServiceImpl
;
/** @see PwC.Tax.Tech.Atms.WebApi\Controllers\AccountController.cs */
@RestController
@RequestMapping
(
"/api/v1/Account/"
)
public
class
AccountController
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
AccountController
.
class
);
@Autowired
private
UserAccountService
userAccountService
;
private
UserAccountService
Impl
userAccountService
;
@ApiOperation
(
value
=
"修改密码"
)
@RequestMapping
(
value
=
"userPassword"
,
method
=
RequestMethod
.
PUT
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
,
consumes
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/UserController.java
View file @
8e57f0ba
...
...
@@ -29,7 +29,7 @@ import pwc.taxtech.atms.dto.user.UserRoleDisplayInfo;
import
pwc.taxtech.atms.dto.user.UserRoleSaveDto
;
import
pwc.taxtech.atms.entity.User
;
import
pwc.taxtech.atms.service.RoleService
;
import
pwc.taxtech.atms.service.
UserAccountService
;
import
pwc.taxtech.atms.service.
impl.UserAccountServiceImpl
;
import
pwc.taxtech.atms.service.impl.UserRoleServiceImpl
;
import
pwc.taxtech.atms.service.impl.UserServiceImpl
;
...
...
@@ -46,7 +46,7 @@ public class UserController {
@Autowired
private
RoleService
roleService
;
@Autowired
private
UserAccountService
userAccountService
;
private
UserAccountService
Impl
userAccountService
;
// used to test,
// http://localhost:8080/atms-api/api/v1/user/getUser?id=0906913f-f8c3-423c-b9b1-9ae1be647087
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/UserAccountService.java
deleted
100644 → 0
View file @
fe31a606
package
pwc
.
taxtech
.
atms
.
service
;
import
pwc.taxtech.atms.dto.LoginOutputDto
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.user.UserAndUserRoleSaveDto
;
import
pwc.taxtech.atms.dto.user.UserPasswordDto
;
import
pwc.taxtech.atms.entity.User
;
public
interface
UserAccountService
{
OperationResultDto
<
LoginOutputDto
>
changeExternalUserPassword
(
UserPasswordDto
userPasswordDto
);
void
resetAttemptTimes
(
User
tempUser
);
void
dealWithWrongPassword
(
User
tempUser
);
OperationResultDto
<
Object
>
forgetPassword
(
String
mail
);
OperationResultDto
<
User
>
addNewUser
(
UserAndUserRoleSaveDto
userAndUserRoleSaveDto
);
OperationResultDto
<
User
>
addUser
(
UserAndUserRoleSaveDto
userAndUserRoleSaveDto
);
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/UserAccountServiceImpl.java
View file @
8e57f0ba
...
...
@@ -29,7 +29,6 @@ import pwc.taxtech.atms.entity.UserOrganization;
import
pwc.taxtech.atms.entity.UserRole
;
import
pwc.taxtech.atms.security.AtmsPasswordEncoder
;
import
pwc.taxtech.atms.service.CommonService
;
import
pwc.taxtech.atms.service.UserAccountService
;
import
java.util.ArrayList
;
import
java.util.Date
;
...
...
@@ -37,7 +36,7 @@ import java.util.List;
import
java.util.Objects
;
@Service
public
class
UserAccountServiceImpl
extends
AbstractService
implements
UserAccountService
{
public
class
UserAccountServiceImpl
extends
AbstractService
{
// TODO Move it to constants file
private
static
final
String
MAIL_TEMPLATE_PATH
=
"mailTemplate/"
;
...
...
@@ -61,7 +60,6 @@ public class UserAccountServiceImpl extends AbstractService implements UserAccou
@Autowired
private
AtmsApiSettings
atmsApiSettings
;
@Override
public
OperationResultDto
<
LoginOutputDto
>
changeExternalUserPassword
(
UserPasswordDto
userPasswordDto
)
{
logger
.
debug
(
"修改密码 Start"
);
final
String
userName
=
authUserHelper
.
getCurrentAuditor
().
get
();
...
...
@@ -148,7 +146,6 @@ public class UserAccountServiceImpl extends AbstractService implements UserAccou
return
containsOldPassword
;
}
@Override
public
void
resetAttemptTimes
(
User
tempUser
)
{
User
userTarget
=
new
User
();
userTarget
.
setAttemptTimes
(
0
);
...
...
@@ -156,7 +153,6 @@ public class UserAccountServiceImpl extends AbstractService implements UserAccou
userMapper
.
updateByPrimaryKeySelective
(
userTarget
);
}
@Override
public
void
dealWithWrongPassword
(
User
tempUser
)
{
User
userTarget
=
new
User
();
userTarget
.
setId
(
tempUser
.
getId
());
...
...
@@ -182,7 +178,6 @@ public class UserAccountServiceImpl extends AbstractService implements UserAccou
}
@Override
public
OperationResultDto
<
Object
>
forgetPassword
(
final
String
mail
)
{
OperationResultDto
<
ForgetPasswordDto
>
result
=
forgetPasswordForUser
(
mail
);
if
(
result
==
null
||
result
.
getResult
()
==
null
||
!
result
.
getResult
())
{
...
...
@@ -253,7 +248,6 @@ public class UserAccountServiceImpl extends AbstractService implements UserAccou
return
new
OperationResultDto
<>(
true
,
null
,
forgetPasswordDto
);
}
@Override
public
OperationResultDto
<
User
>
addNewUser
(
UserAndUserRoleSaveDto
userAndUserRoleSaveDto
)
{
OperationResultDto
<
User
>
user
=
addUser
(
userAndUserRoleSaveDto
);
//todo send mail
...
...
@@ -277,7 +271,6 @@ public class UserAccountServiceImpl extends AbstractService implements UserAccou
return
user
;
}
@Override
public
OperationResultDto
<
User
>
addUser
(
UserAndUserRoleSaveDto
userAndUserRoleSaveDto
)
{
String
userName
=
authUserHelper
.
getCurrentAuditor
().
get
();
OperationResultDto
<
User
>
operationResultDto
=
new
OperationResultDto
<>();
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/UserServiceImpl.java
View file @
8e57f0ba
...
...
@@ -58,7 +58,6 @@ import pwc.taxtech.atms.service.MenuService;
import
pwc.taxtech.atms.service.OperationLogService
;
import
pwc.taxtech.atms.service.OrganizationService
;
import
pwc.taxtech.atms.service.RoleService
;
import
pwc.taxtech.atms.service.UserAccountService
;
import
java.util.ArrayList
;
import
java.util.Date
;
...
...
@@ -90,7 +89,7 @@ public class UserServiceImpl extends AbstractService {
@Autowired
private
MenuService
menuService
;
@Autowired
private
UserAccountService
userAccountService
;
private
UserAccountService
Impl
userAccountService
;
@Autowired
private
LdapAuthenticationProvider
ldapAuthenticationProvider
;
@Autowired
...
...
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