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
6a9ffc47
Commit
6a9ffc47
authored
Sep 28, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[dev] fix getCurrentAuditor retrun optional
parent
3dfd7d5e
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
38 additions
and
35 deletions
+38
-35
AuthUserHelper.java
...src/main/java/pwc/taxtech/atms/common/AuthUserHelper.java
+3
-1
AuthUserHelperImpl.java
...main/java/pwc/taxtech/atms/common/AuthUserHelperImpl.java
+3
-2
AreaRegionServiceImpl.java
.../pwc/taxtech/atms/service/impl/AreaRegionServiceImpl.java
+1
-1
AreaServiceImpl.java
...n/java/pwc/taxtech/atms/service/impl/AreaServiceImpl.java
+1
-1
BusinessUnitServiceImpl.java
...wc/taxtech/atms/service/impl/BusinessUnitServiceImpl.java
+1
-1
CustomerServiceImpl.java
...va/pwc/taxtech/atms/service/impl/CustomerServiceImpl.java
+1
-1
EnterpriseAccountServiceImpl.java
...xtech/atms/service/impl/EnterpriseAccountServiceImpl.java
+7
-7
EnterpriseAccountSetServiceImpl.java
...ch/atms/service/impl/EnterpriseAccountSetServiceImpl.java
+4
-4
OperationLogServiceImpl.java
...wc/taxtech/atms/service/impl/OperationLogServiceImpl.java
+1
-1
OrganizationStructureServiceImpl.java
...h/atms/service/impl/OrganizationStructureServiceImpl.java
+1
-1
RoleServiceImpl.java
...n/java/pwc/taxtech/atms/service/impl/RoleServiceImpl.java
+11
-11
UserAccountServiceImpl.java
...pwc/taxtech/atms/service/impl/UserAccountServiceImpl.java
+2
-2
UserRoleServiceImpl.java
...va/pwc/taxtech/atms/service/impl/UserRoleServiceImpl.java
+1
-1
UserServiceImpl.java
...n/java/pwc/taxtech/atms/service/impl/UserServiceImpl.java
+1
-1
No files found.
atms-api/src/main/java/pwc/taxtech/atms/common/AuthUserHelper.java
View file @
6a9ffc47
package
pwc
.
taxtech
.
atms
.
common
;
package
pwc
.
taxtech
.
atms
.
common
;
import
java.util.Optional
;
public
interface
AuthUserHelper
{
public
interface
AuthUserHelper
{
String
getCurrentAuditor
();
Optional
<
String
>
getCurrentAuditor
();
String
getCurrentUserId
();
String
getCurrentUserId
();
...
...
atms-api/src/main/java/pwc/taxtech/atms/common/AuthUserHelperImpl.java
View file @
6a9ffc47
...
@@ -17,6 +17,7 @@ import pwc.taxtech.atms.exception.ApplicationException;
...
@@ -17,6 +17,7 @@ import pwc.taxtech.atms.exception.ApplicationException;
import
pwc.taxtech.atms.security.JwtUser
;
import
pwc.taxtech.atms.security.JwtUser
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Optional
;
@Component
@Component
public
class
AuthUserHelperImpl
implements
AuditorAware
<
String
>,
AuthUserHelper
{
public
class
AuthUserHelperImpl
implements
AuditorAware
<
String
>,
AuthUserHelper
{
...
@@ -33,7 +34,7 @@ public class AuthUserHelperImpl implements AuditorAware<String>, AuthUserHelper
...
@@ -33,7 +34,7 @@ public class AuthUserHelperImpl implements AuditorAware<String>, AuthUserHelper
* @see pwc.taxtech.atms.common.AuthUserHelper#getCurrentAuditor()
* @see pwc.taxtech.atms.common.AuthUserHelper#getCurrentAuditor()
*/
*/
@Override
@Override
public
String
getCurrentAuditor
()
{
public
Optional
<
String
>
getCurrentAuditor
()
{
SecurityContext
context
=
SecurityContextHolder
.
getContext
();
SecurityContext
context
=
SecurityContextHolder
.
getContext
();
if
(
context
==
null
)
{
if
(
context
==
null
)
{
throw
new
ApplicationException
(
"security context is null"
);
throw
new
ApplicationException
(
"security context is null"
);
...
@@ -46,7 +47,7 @@ public class AuthUserHelperImpl implements AuditorAware<String>, AuthUserHelper
...
@@ -46,7 +47,7 @@ public class AuthUserHelperImpl implements AuditorAware<String>, AuthUserHelper
if
(
Strings
.
isEmpty
(
result
))
{
if
(
Strings
.
isEmpty
(
result
))
{
throw
new
ApplicationException
(
"failed to get user name from authentication"
);
throw
new
ApplicationException
(
"failed to get user name from authentication"
);
}
}
return
result
;
return
Optional
.
of
(
result
)
;
}
}
/*
/*
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/AreaRegionServiceImpl.java
View file @
6a9ffc47
...
@@ -165,7 +165,7 @@ public class AreaRegionServiceImpl implements pwc.taxtech.atms.service.AreaRegio
...
@@ -165,7 +165,7 @@ public class AreaRegionServiceImpl implements pwc.taxtech.atms.service.AreaRegio
updateLogParams
.
setOperationContent
(
""
);
updateLogParams
.
setOperationContent
(
""
);
updateLogParams
.
setOriginalState
(
originalArea
);
updateLogParams
.
setOriginalState
(
originalArea
);
updateLogParams
.
setUpdateState
(
updateToArea
);
updateLogParams
.
setUpdateState
(
updateToArea
);
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
());
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
()
.
get
()
);
updateLogParams
.
setOperationObject
(
updateToArea
.
getName
());
updateLogParams
.
setOperationObject
(
updateToArea
.
getName
());
updateLogParams
.
setOperationAction
(
OperationAction
.
Update
.
value
());
updateLogParams
.
setOperationAction
(
OperationAction
.
Update
.
value
());
operationLogService
.
updateDataAddLog
(
updateLogParams
);
operationLogService
.
updateDataAddLog
(
updateLogParams
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/AreaServiceImpl.java
View file @
6a9ffc47
...
@@ -149,7 +149,7 @@ public class AreaServiceImpl implements AreaService {
...
@@ -149,7 +149,7 @@ public class AreaServiceImpl implements AreaService {
// OperationLog
// OperationLog
operationLogDto
=
new
OperationLogDto
();
operationLogDto
=
new
OperationLogDto
();
operationLogDto
.
setId
(
CommonUtils
.
getUUID
());
operationLogDto
.
setId
(
CommonUtils
.
getUUID
());
operationLogDto
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
());
operationLogDto
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
()
.
get
()
);
operationLogDto
.
setIp
(
""
);
operationLogDto
.
setIp
(
""
);
operationLogDto
.
setOperationContent
(
LogMessage
.
IsActive
);
operationLogDto
.
setOperationContent
(
LogMessage
.
IsActive
);
operationLogDto
.
setAction
(
OperationAction
.
Update
.
value
());
operationLogDto
.
setAction
(
OperationAction
.
Update
.
value
());
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/BusinessUnitServiceImpl.java
View file @
6a9ffc47
...
@@ -159,7 +159,7 @@ public class BusinessUnitServiceImpl implements BusinessUnitService {
...
@@ -159,7 +159,7 @@ public class BusinessUnitServiceImpl implements BusinessUnitService {
updateLogParams
.
setOperationObject
(
originBusinessUnit
.
getName
());
updateLogParams
.
setOperationObject
(
originBusinessUnit
.
getName
());
updateLogParams
.
setOriginalState
(
originBusinessUnit
);
updateLogParams
.
setOriginalState
(
originBusinessUnit
);
updateLogParams
.
setUpdateState
(
businessUnit
);
updateLogParams
.
setUpdateState
(
businessUnit
);
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
());
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
()
.
get
()
);
updateLogParams
.
setOperationModule
(
OperationModule
.
BasicDataBusinessUnit
.
value
());
updateLogParams
.
setOperationModule
(
OperationModule
.
BasicDataBusinessUnit
.
value
());
updateLogParams
.
setOperationAction
(
OperationAction
.
Update
.
value
());
updateLogParams
.
setOperationAction
(
OperationAction
.
Update
.
value
());
updateLogParams
.
setOperateLogType
(
OperateLogType
.
OperationLogBasicData
.
value
());
updateLogParams
.
setOperateLogType
(
OperateLogType
.
OperationLogBasicData
.
value
());
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CustomerServiceImpl.java
View file @
6a9ffc47
...
@@ -202,7 +202,7 @@ public class CustomerServiceImpl implements CustomerService {
...
@@ -202,7 +202,7 @@ public class CustomerServiceImpl implements CustomerService {
customerDto
.
getCode
()
+
CommonConstants
.
PLUS_SIGN_SEPARATOR
+
customerDto
.
getName
());
customerDto
.
getCode
()
+
CommonConstants
.
PLUS_SIGN_SEPARATOR
+
customerDto
.
getName
());
updateLogParams
.
setOriginalState
(
originCustomer
);
updateLogParams
.
setOriginalState
(
originCustomer
);
updateLogParams
.
setUpdateState
(
existedCustomer
);
updateLogParams
.
setUpdateState
(
existedCustomer
);
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
());
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
()
.
get
()
);
updateLogParams
.
setOperationModule
(
OperationModule
.
BasicDataCustomer
.
value
());
updateLogParams
.
setOperationModule
(
OperationModule
.
BasicDataCustomer
.
value
());
updateLogParams
.
setComment
(
getAccountNameById
(
customerDto
.
getEnterPriseAccountId
()));
updateLogParams
.
setComment
(
getAccountNameById
(
customerDto
.
getEnterPriseAccountId
()));
updateLogParams
.
setOperationAction
(
OperationAction
.
Update
.
value
());
updateLogParams
.
setOperationAction
(
OperationAction
.
Update
.
value
());
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/EnterpriseAccountServiceImpl.java
View file @
6a9ffc47
...
@@ -232,7 +232,7 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
...
@@ -232,7 +232,7 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
EnterpriseAccountSet
enterpriseAccountSet
=
enterpriseAccountSetMapper
.
selectByPrimaryKey
(
enterpriseAccountDto
.
getEnterpriseAccountSetId
());
EnterpriseAccountSet
enterpriseAccountSet
=
enterpriseAccountSetMapper
.
selectByPrimaryKey
(
enterpriseAccountDto
.
getEnterpriseAccountSetId
());
//add operational log
//add operational log
UpdateLogParams
updateLogParams
=
new
UpdateLogParams
();
UpdateLogParams
updateLogParams
=
new
UpdateLogParams
();
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
());
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
()
.
get
()
);
updateLogParams
.
setUpdateState
(
""
);
updateLogParams
.
setUpdateState
(
""
);
updateLogParams
.
setOriginalState
(
""
);
updateLogParams
.
setOriginalState
(
""
);
updateLogParams
.
setOperationContent
(
enterpriseAccountDto
.
getCode
()
+
" "
+
enterpriseAccountDto
.
getName
());
updateLogParams
.
setOperationContent
(
enterpriseAccountDto
.
getCode
()
+
" "
+
enterpriseAccountDto
.
getName
());
...
@@ -342,7 +342,7 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
...
@@ -342,7 +342,7 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
EnterpriseAccountSet
enterpriseAccountSet
=
enterpriseAccountSetMapper
.
selectByPrimaryKey
(
enterpriseAccountDto
.
getEnterpriseAccountSetId
());
EnterpriseAccountSet
enterpriseAccountSet
=
enterpriseAccountSetMapper
.
selectByPrimaryKey
(
enterpriseAccountDto
.
getEnterpriseAccountSetId
());
//operation log
//operation log
UpdateLogParams
updateLogParams
=
new
UpdateLogParams
();
UpdateLogParams
updateLogParams
=
new
UpdateLogParams
();
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
());
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
()
.
get
()
);
updateLogParams
.
setUpdateState
(
getEnterpriseAccountInfo
(
entityToUpdate
));
updateLogParams
.
setUpdateState
(
getEnterpriseAccountInfo
(
entityToUpdate
));
updateLogParams
.
setOriginalState
(
getEnterpriseAccountInfo
(
entityCopy
));
updateLogParams
.
setOriginalState
(
getEnterpriseAccountInfo
(
entityCopy
));
updateLogParams
.
setOperationContent
(
enterpriseAccountDto
.
getCode
()
+
" "
+
enterpriseAccountDto
.
getName
());
updateLogParams
.
setOperationContent
(
enterpriseAccountDto
.
getCode
()
+
" "
+
enterpriseAccountDto
.
getName
());
...
@@ -527,7 +527,7 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
...
@@ -527,7 +527,7 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
//create operationlog for creating enterprise account set
//create operationlog for creating enterprise account set
UpdateLogParams
updateLogParams
=
new
UpdateLogParams
();
UpdateLogParams
updateLogParams
=
new
UpdateLogParams
();
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
());
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
()
.
get
()
);
updateLogParams
.
setUpdateState
(
""
);
updateLogParams
.
setUpdateState
(
""
);
updateLogParams
.
setOriginalState
(
""
);
updateLogParams
.
setOriginalState
(
""
);
updateLogParams
.
setOperationContent
(
""
);
updateLogParams
.
setOperationContent
(
""
);
...
@@ -991,7 +991,7 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
...
@@ -991,7 +991,7 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
manual
.
setStandardCode
(
stdAccount
.
getCode
());
manual
.
setStandardCode
(
stdAccount
.
getCode
());
manual
.
setOrganizationId
(
organization
.
getId
());
manual
.
setOrganizationId
(
organization
.
getId
());
manual
.
setEnterpriseAccountSetId
(
accountSetId
);
manual
.
setEnterpriseAccountSetId
(
accountSetId
);
manual
.
setUpdateBy
(
authUserHelper
.
getCurrentAuditor
());
manual
.
setUpdateBy
(
authUserHelper
.
getCurrentAuditor
()
.
get
()
);
manual
.
setUpdateTime
(
new
Date
());
manual
.
setUpdateTime
(
new
Date
());
addManualMappingRecord
(
manual
);
addManualMappingRecord
(
manual
);
//endregion
//endregion
...
@@ -1135,7 +1135,7 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
...
@@ -1135,7 +1135,7 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
manual
.
setOrganizationId
(
orgId
);
manual
.
setOrganizationId
(
orgId
);
manual
.
setEnterpriseAccountSetId
(
accountSetId
);
manual
.
setEnterpriseAccountSetId
(
accountSetId
);
manual
.
setIndustryId
(
industryId
);
manual
.
setIndustryId
(
industryId
);
manual
.
setUpdateBy
(
authUserHelper
.
getCurrentAuditor
());
manual
.
setUpdateBy
(
authUserHelper
.
getCurrentAuditor
()
.
get
()
);
manual
.
setUpdateTime
(
new
Date
());
manual
.
setUpdateTime
(
new
Date
());
addManualMappingRecord
(
manual
);
addManualMappingRecord
(
manual
);
//endregion
//endregion
...
@@ -1577,7 +1577,7 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
...
@@ -1577,7 +1577,7 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
updateLogParams
.
setOriginalState
(
parentNodeOriginal
);
updateLogParams
.
setOriginalState
(
parentNodeOriginal
);
updateLogParams
.
setUpdateState
(
parentNode
);
updateLogParams
.
setUpdateState
(
parentNode
);
updateLogParams
.
setOperationModule
(
OperationModule
.
BasicDataEnterpriceAccount
.
value
());
updateLogParams
.
setOperationModule
(
OperationModule
.
BasicDataEnterpriceAccount
.
value
());
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
());
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
()
.
get
()
);
updateLogParams
.
setComment
(
LogMessage
.
EnterpriceAccountImportUpdate
);
updateLogParams
.
setComment
(
LogMessage
.
EnterpriceAccountImportUpdate
);
updateLogParams
.
setOperationObject
(
parentNodeOriginal
.
getName
());
updateLogParams
.
setOperationObject
(
parentNodeOriginal
.
getName
());
updateLogParams
.
setOperationContent
(
"operation content"
);
updateLogParams
.
setOperationContent
(
"operation content"
);
...
@@ -1625,7 +1625,7 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
...
@@ -1625,7 +1625,7 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
updateLogParams
.
setOriginalState
(
parentNodeOriginal
);
updateLogParams
.
setOriginalState
(
parentNodeOriginal
);
updateLogParams
.
setUpdateState
(
parentNodeEntity
);
updateLogParams
.
setUpdateState
(
parentNodeEntity
);
updateLogParams
.
setOperationModule
(
OperationModule
.
BasicDataEnterpriceAccount
.
value
());
updateLogParams
.
setOperationModule
(
OperationModule
.
BasicDataEnterpriceAccount
.
value
());
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
());
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
()
.
get
()
);
updateLogParams
.
setComment
(
LogMessage
.
EnterpriceAccountImportUpdate
);
updateLogParams
.
setComment
(
LogMessage
.
EnterpriceAccountImportUpdate
);
updateLogParams
.
setOperationObject
(
parentNodeOriginal
.
getName
());
updateLogParams
.
setOperationObject
(
parentNodeOriginal
.
getName
());
updateLogParams
.
setOperationContent
(
"operation content"
);
updateLogParams
.
setOperationContent
(
"operation content"
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/EnterpriseAccountSetServiceImpl.java
View file @
6a9ffc47
...
@@ -150,7 +150,7 @@ public class EnterpriseAccountSetServiceImpl implements EnterpriseAccountSetServ
...
@@ -150,7 +150,7 @@ public class EnterpriseAccountSetServiceImpl implements EnterpriseAccountSetServ
if
(
isChangeEnterpriseAccountSetName
||
isChangeEnterpriseAccountSetCode
)
{
if
(
isChangeEnterpriseAccountSetName
||
isChangeEnterpriseAccountSetCode
)
{
UpdateLogParams
updateLogParams
=
new
UpdateLogParams
();
UpdateLogParams
updateLogParams
=
new
UpdateLogParams
();
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
());
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
()
.
get
()
);
updateLogParams
.
setUpdateState
(
updateToEntity
);
updateLogParams
.
setUpdateState
(
updateToEntity
);
updateLogParams
.
setOriginalState
(
entity
);
updateLogParams
.
setOriginalState
(
entity
);
updateLogParams
.
setOperationContent
(
""
);
updateLogParams
.
setOperationContent
(
""
);
...
@@ -326,7 +326,7 @@ public class EnterpriseAccountSetServiceImpl implements EnterpriseAccountSetServ
...
@@ -326,7 +326,7 @@ public class EnterpriseAccountSetServiceImpl implements EnterpriseAccountSetServ
List
<
UpdateLogParams
>
updateLogParamsList
=
new
ArrayList
<>();
List
<
UpdateLogParams
>
updateLogParamsList
=
new
ArrayList
<>();
for
(
EnterpriseAccountSetOrgDto
enterpriseAccountSetOrgDto
:
enterpriseAccountSetOrgDtoList
)
{
for
(
EnterpriseAccountSetOrgDto
enterpriseAccountSetOrgDto
:
enterpriseAccountSetOrgDtoList
)
{
UpdateLogParams
updateLogParams
=
new
UpdateLogParams
();
UpdateLogParams
updateLogParams
=
new
UpdateLogParams
();
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
());
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
()
.
get
()
);
updateLogParams
.
setUpdateState
(
""
);
updateLogParams
.
setUpdateState
(
""
);
updateLogParams
.
setOriginalState
(
""
);
updateLogParams
.
setOriginalState
(
""
);
updateLogParams
.
setOperationContent
(
enterpriseAccountSetOrgDto
.
getOrganizationName
());
updateLogParams
.
setOperationContent
(
enterpriseAccountSetOrgDto
.
getOrganizationName
());
...
@@ -386,7 +386,7 @@ public class EnterpriseAccountSetServiceImpl implements EnterpriseAccountSetServ
...
@@ -386,7 +386,7 @@ public class EnterpriseAccountSetServiceImpl implements EnterpriseAccountSetServ
//operational log
//operational log
UpdateLogParams
updateLogParams
=
new
UpdateLogParams
();
UpdateLogParams
updateLogParams
=
new
UpdateLogParams
();
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
());
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
()
.
get
()
);
updateLogParams
.
setOperationObject
(
enterpriseAccountSetOrgDto
.
getEnterpriseAccountSetName
());
updateLogParams
.
setOperationObject
(
enterpriseAccountSetOrgDto
.
getEnterpriseAccountSetName
());
updateLogParams
.
setOperationModule
(
OperationModule
.
BasicDataEnterpriceAccount
.
value
());
updateLogParams
.
setOperationModule
(
OperationModule
.
BasicDataEnterpriceAccount
.
value
());
updateLogParams
.
setOperateLogType
(
OperateLogType
.
OperationLogEnterPrise
.
value
());
updateLogParams
.
setOperateLogType
(
OperateLogType
.
OperationLogEnterPrise
.
value
());
...
@@ -434,7 +434,7 @@ public class EnterpriseAccountSetServiceImpl implements EnterpriseAccountSetServ
...
@@ -434,7 +434,7 @@ public class EnterpriseAccountSetServiceImpl implements EnterpriseAccountSetServ
List
<
UpdateLogParams
>
updateLogParamsList
=
new
ArrayList
<>();
List
<
UpdateLogParams
>
updateLogParamsList
=
new
ArrayList
<>();
for
(
EnterpriseAccountSetOrgDto
enterpriseAccountSetOrgDto
:
enterpriseAccountSetOrgDtoList
)
{
for
(
EnterpriseAccountSetOrgDto
enterpriseAccountSetOrgDto
:
enterpriseAccountSetOrgDtoList
)
{
UpdateLogParams
updateLogParams
=
new
UpdateLogParams
();
UpdateLogParams
updateLogParams
=
new
UpdateLogParams
();
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
());
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
()
.
get
()
);
updateLogParams
.
setUpdateState
(
""
);
updateLogParams
.
setUpdateState
(
""
);
updateLogParams
.
setOriginalState
(
""
);
updateLogParams
.
setOriginalState
(
""
);
updateLogParams
.
setOperationContent
(
enterpriseAccountSetOrgDto
.
getOrganizationName
());
updateLogParams
.
setOperationContent
(
enterpriseAccountSetOrgDto
.
getOrganizationName
());
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/OperationLogServiceImpl.java
View file @
6a9ffc47
...
@@ -57,7 +57,7 @@ public class OperationLogServiceImpl extends AbstractService implements Operatio
...
@@ -57,7 +57,7 @@ public class OperationLogServiceImpl extends AbstractService implements Operatio
record
.
setId
(
CommonUtils
.
getUUID
());
record
.
setId
(
CommonUtils
.
getUUID
());
record
.
setIp
(
authUserHelper
.
getClientIp
());
record
.
setIp
(
authUserHelper
.
getClientIp
());
record
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
());
record
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
()
.
get
()
);
record
.
setCreateTime
(
new
Date
());
record
.
setCreateTime
(
new
Date
());
record
.
setOperationContent
(
operationLogDto
.
getOperationContent
());
record
.
setOperationContent
(
operationLogDto
.
getOperationContent
());
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/OrganizationStructureServiceImpl.java
View file @
6a9ffc47
...
@@ -164,7 +164,7 @@ public class OrganizationStructureServiceImpl implements OrganizationStructureSe
...
@@ -164,7 +164,7 @@ public class OrganizationStructureServiceImpl implements OrganizationStructureSe
updateLogParams
.
setOperationObject
(
originOrganizationStructure
.
getName
());
updateLogParams
.
setOperationObject
(
originOrganizationStructure
.
getName
());
updateLogParams
.
setOriginalState
(
originOrganizationStructure
);
updateLogParams
.
setOriginalState
(
originOrganizationStructure
);
updateLogParams
.
setUpdateState
(
organizationStructure
);
updateLogParams
.
setUpdateState
(
organizationStructure
);
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
());
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
()
.
get
()
);
updateLogParams
.
setOperationModule
(
OperationModule
.
BasicDataOrganizationStructure
.
value
());
updateLogParams
.
setOperationModule
(
OperationModule
.
BasicDataOrganizationStructure
.
value
());
updateLogParams
.
setOperationAction
(
OperationAction
.
Update
.
value
());
updateLogParams
.
setOperationAction
(
OperationAction
.
Update
.
value
());
updateLogParams
.
setOperateLogType
(
OperateLogType
.
OperationLogBasicData
.
value
());
updateLogParams
.
setOperateLogType
(
OperateLogType
.
OperationLogBasicData
.
value
());
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/RoleServiceImpl.java
View file @
6a9ffc47
...
@@ -1003,7 +1003,7 @@ public class RoleServiceImpl extends AbstractService implements RoleService {
...
@@ -1003,7 +1003,7 @@ public class RoleServiceImpl extends AbstractService implements RoleService {
// operation log
// operation log
UpdateLogParams
updateLogParams
=
new
UpdateLogParams
();
UpdateLogParams
updateLogParams
=
new
UpdateLogParams
();
updateLogParams
.
setOperationModule
(
OperationModule
.
Role
.
value
());
updateLogParams
.
setOperationModule
(
OperationModule
.
Role
.
value
());
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
());
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
()
.
get
()
);
updateLogParams
.
setOperationContent
(
user
.
getUserName
());
updateLogParams
.
setOperationContent
(
user
.
getUserName
());
updateLogParams
.
setOperationObject
(
role
.
getName
());
updateLogParams
.
setOperationObject
(
role
.
getName
());
updateLogParams
.
setOperationAction
(
OperationAction
.
New
.
value
());
updateLogParams
.
setOperationAction
(
OperationAction
.
New
.
value
());
...
@@ -1035,7 +1035,7 @@ public class RoleServiceImpl extends AbstractService implements RoleService {
...
@@ -1035,7 +1035,7 @@ public class RoleServiceImpl extends AbstractService implements RoleService {
User
user
=
userMapper
.
selectByPrimaryKey
(
userId
);
User
user
=
userMapper
.
selectByPrimaryKey
(
userId
);
Role
role
=
roleMapper
.
selectByPrimaryKey
(
roleId
);
Role
role
=
roleMapper
.
selectByPrimaryKey
(
roleId
);
updateLogParams
.
setOperationModule
(
OperationModule
.
Role
.
value
());
updateLogParams
.
setOperationModule
(
OperationModule
.
Role
.
value
());
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
());
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
()
.
get
()
);
updateLogParams
.
setOperationContent
(
user
==
null
?
""
:
user
.
getUserName
());
updateLogParams
.
setOperationContent
(
user
==
null
?
""
:
user
.
getUserName
());
updateLogParams
.
setOperationObject
(
role
==
null
?
""
:
role
.
getName
());
updateLogParams
.
setOperationObject
(
role
==
null
?
""
:
role
.
getName
());
updateLogParams
.
setOperationAction
(
OperationAction
.
DeleteUser
.
value
());
updateLogParams
.
setOperationAction
(
OperationAction
.
DeleteUser
.
value
());
...
@@ -1096,7 +1096,7 @@ public class RoleServiceImpl extends AbstractService implements RoleService {
...
@@ -1096,7 +1096,7 @@ public class RoleServiceImpl extends AbstractService implements RoleService {
// operation log
// operation log
UpdateLogParams
updateLogParams
=
new
UpdateLogParams
();
UpdateLogParams
updateLogParams
=
new
UpdateLogParams
();
updateLogParams
.
setOperationModule
(
OperationModule
.
Role
.
value
());
updateLogParams
.
setOperationModule
(
OperationModule
.
Role
.
value
());
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
());
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
()
.
get
()
);
updateLogParams
.
setOperationContent
(
""
);
updateLogParams
.
setOperationContent
(
""
);
updateLogParams
.
setOperationObject
(
roleCategoryName
);
updateLogParams
.
setOperationObject
(
roleCategoryName
);
updateLogParams
.
setOperationAction
(
OperationAction
.
New
.
value
());
updateLogParams
.
setOperationAction
(
OperationAction
.
New
.
value
());
...
@@ -1133,7 +1133,7 @@ public class RoleServiceImpl extends AbstractService implements RoleService {
...
@@ -1133,7 +1133,7 @@ public class RoleServiceImpl extends AbstractService implements RoleService {
updateLogParams
.
setOperationObject
(
roleCategoryOriginal
.
getName
());
updateLogParams
.
setOperationObject
(
roleCategoryOriginal
.
getName
());
updateLogParams
.
setOriginalState
(
roleCategoryOriginal
);
updateLogParams
.
setOriginalState
(
roleCategoryOriginal
);
updateLogParams
.
setUpdateState
(
roleCategoryToUpdate
);
updateLogParams
.
setUpdateState
(
roleCategoryToUpdate
);
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
());
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
()
.
get
()
);
updateLogParams
.
setOperationModule
(
OperationModule
.
Role
.
value
());
updateLogParams
.
setOperationModule
(
OperationModule
.
Role
.
value
());
updateLogParams
.
setComment
(
""
);
updateLogParams
.
setComment
(
""
);
updateLogParams
.
setOperationAction
(
OperationAction
.
Update
.
value
());
updateLogParams
.
setOperationAction
(
OperationAction
.
Update
.
value
());
...
@@ -1168,7 +1168,7 @@ public class RoleServiceImpl extends AbstractService implements RoleService {
...
@@ -1168,7 +1168,7 @@ public class RoleServiceImpl extends AbstractService implements RoleService {
// operation log
// operation log
UpdateLogParams
updateLogParams
=
new
UpdateLogParams
();
UpdateLogParams
updateLogParams
=
new
UpdateLogParams
();
updateLogParams
.
setOperationModule
(
OperationModule
.
Role
.
value
());
updateLogParams
.
setOperationModule
(
OperationModule
.
Role
.
value
());
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
());
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
()
.
get
()
);
updateLogParams
.
setOperationContent
(
""
);
updateLogParams
.
setOperationContent
(
""
);
updateLogParams
.
setOperationObject
(
roleCategoryToDelete
.
getName
());
updateLogParams
.
setOperationObject
(
roleCategoryToDelete
.
getName
());
updateLogParams
.
setOperationAction
(
OperationAction
.
Delete
.
value
());
updateLogParams
.
setOperationAction
(
OperationAction
.
Delete
.
value
());
...
@@ -1208,7 +1208,7 @@ public class RoleServiceImpl extends AbstractService implements RoleService {
...
@@ -1208,7 +1208,7 @@ public class RoleServiceImpl extends AbstractService implements RoleService {
// operation log for add role
// operation log for add role
UpdateLogParams
updateLogParams
=
new
UpdateLogParams
();
UpdateLogParams
updateLogParams
=
new
UpdateLogParams
();
updateLogParams
.
setOperationModule
(
OperationModule
.
Role
.
value
());
updateLogParams
.
setOperationModule
(
OperationModule
.
Role
.
value
());
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
());
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
()
.
get
()
);
updateLogParams
.
setOperationContent
(
""
);
updateLogParams
.
setOperationContent
(
""
);
updateLogParams
.
setOperationObject
(
roleToAdd
.
getName
());
updateLogParams
.
setOperationObject
(
roleToAdd
.
getName
());
updateLogParams
.
setOperationAction
(
OperationAction
.
New
.
value
());
updateLogParams
.
setOperationAction
(
OperationAction
.
New
.
value
());
...
@@ -1233,7 +1233,7 @@ public class RoleServiceImpl extends AbstractService implements RoleService {
...
@@ -1233,7 +1233,7 @@ public class RoleServiceImpl extends AbstractService implements RoleService {
// 增加权限日志
// 增加权限日志
UpdateLogParams
permissionLogParams
=
new
UpdateLogParams
();
UpdateLogParams
permissionLogParams
=
new
UpdateLogParams
();
permissionLogParams
.
setOperationModule
(
OperationModule
.
Role
.
value
());
permissionLogParams
.
setOperationModule
(
OperationModule
.
Role
.
value
());
permissionLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
());
permissionLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
()
.
get
()
);
permissionLogParams
.
setOperationContent
(
permission
.
getName
());
permissionLogParams
.
setOperationContent
(
permission
.
getName
());
permissionLogParams
.
setOperationObject
(
roleToAdd
.
getName
());
permissionLogParams
.
setOperationObject
(
roleToAdd
.
getName
());
permissionLogParams
.
setOperationAction
(
OperationAction
.
AddNewPermission
.
value
());
permissionLogParams
.
setOperationAction
(
OperationAction
.
AddNewPermission
.
value
());
...
@@ -1277,7 +1277,7 @@ public class RoleServiceImpl extends AbstractService implements RoleService {
...
@@ -1277,7 +1277,7 @@ public class RoleServiceImpl extends AbstractService implements RoleService {
updateRoleLogParams
.
setOperationObject
(
roleOriginal
.
getName
());
updateRoleLogParams
.
setOperationObject
(
roleOriginal
.
getName
());
updateRoleLogParams
.
setOriginalState
(
roleOriginal
);
updateRoleLogParams
.
setOriginalState
(
roleOriginal
);
updateRoleLogParams
.
setUpdateState
(
roleToUpdate
);
updateRoleLogParams
.
setUpdateState
(
roleToUpdate
);
updateRoleLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
());
updateRoleLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
()
.
get
()
);
updateRoleLogParams
.
setOperationModule
(
OperationModule
.
Role
.
value
());
updateRoleLogParams
.
setOperationModule
(
OperationModule
.
Role
.
value
());
updateRoleLogParams
.
setComment
(
""
);
updateRoleLogParams
.
setComment
(
""
);
updateRoleLogParams
.
setOperationAction
(
OperationAction
.
Update
.
value
());
updateRoleLogParams
.
setOperationAction
(
OperationAction
.
Update
.
value
());
...
@@ -1315,7 +1315,7 @@ public class RoleServiceImpl extends AbstractService implements RoleService {
...
@@ -1315,7 +1315,7 @@ public class RoleServiceImpl extends AbstractService implements RoleService {
UpdateLogParams
permissionLogParams
=
new
UpdateLogParams
();
UpdateLogParams
permissionLogParams
=
new
UpdateLogParams
();
permissionLogParams
.
setOperationModule
(
OperationModule
.
Role
.
value
());
permissionLogParams
.
setOperationModule
(
OperationModule
.
Role
.
value
());
permissionLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
());
permissionLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
()
.
get
()
);
permissionLogParams
.
setOperationContent
(
permission
.
getName
());
permissionLogParams
.
setOperationContent
(
permission
.
getName
());
permissionLogParams
.
setOperationObject
(
roleOriginal
.
getName
());
permissionLogParams
.
setOperationObject
(
roleOriginal
.
getName
());
permissionLogParams
.
setOperationAction
(
OperationAction
.
Delete
.
value
());
permissionLogParams
.
setOperationAction
(
OperationAction
.
Delete
.
value
());
...
@@ -1338,7 +1338,7 @@ public class RoleServiceImpl extends AbstractService implements RoleService {
...
@@ -1338,7 +1338,7 @@ public class RoleServiceImpl extends AbstractService implements RoleService {
UpdateLogParams
permissionLogParams
=
new
UpdateLogParams
();
UpdateLogParams
permissionLogParams
=
new
UpdateLogParams
();
permissionLogParams
.
setOperationModule
(
OperationModule
.
Role
.
value
());
permissionLogParams
.
setOperationModule
(
OperationModule
.
Role
.
value
());
permissionLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
());
permissionLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
()
.
get
()
);
permissionLogParams
.
setOperationContent
(
permission
.
getName
());
permissionLogParams
.
setOperationContent
(
permission
.
getName
());
permissionLogParams
.
setOperationObject
(
roleOriginal
.
getName
());
permissionLogParams
.
setOperationObject
(
roleOriginal
.
getName
());
permissionLogParams
.
setOperationAction
(
OperationAction
.
New
.
value
());
permissionLogParams
.
setOperationAction
(
OperationAction
.
New
.
value
());
...
@@ -1394,7 +1394,7 @@ public class RoleServiceImpl extends AbstractService implements RoleService {
...
@@ -1394,7 +1394,7 @@ public class RoleServiceImpl extends AbstractService implements RoleService {
// operation log
// operation log
UpdateLogParams
permissionLogParams
=
new
UpdateLogParams
();
UpdateLogParams
permissionLogParams
=
new
UpdateLogParams
();
permissionLogParams
.
setOperationModule
(
OperationModule
.
Role
.
value
());
permissionLogParams
.
setOperationModule
(
OperationModule
.
Role
.
value
());
permissionLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
());
permissionLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
()
.
get
()
);
permissionLogParams
.
setOperationContent
(
roleDto
.
getName
());
permissionLogParams
.
setOperationContent
(
roleDto
.
getName
());
permissionLogParams
.
setOperationObject
(
roleDto
.
getName
());
permissionLogParams
.
setOperationObject
(
roleDto
.
getName
());
permissionLogParams
.
setOperationAction
(
OperationAction
.
Delete
.
value
());
permissionLogParams
.
setOperationAction
(
OperationAction
.
Delete
.
value
());
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/UserAccountServiceImpl.java
View file @
6a9ffc47
...
@@ -76,7 +76,7 @@ public class UserAccountServiceImpl extends AbstractService implements UserAccou
...
@@ -76,7 +76,7 @@ public class UserAccountServiceImpl extends AbstractService implements UserAccou
@Override
@Override
public
OperationResultDto
<
LoginOutputDto
>
changeExternalUserPassword
(
UserPasswordDto
userPasswordDto
)
{
public
OperationResultDto
<
LoginOutputDto
>
changeExternalUserPassword
(
UserPasswordDto
userPasswordDto
)
{
logger
.
debug
(
"修改密码 Start"
);
logger
.
debug
(
"修改密码 Start"
);
final
String
userName
=
authUserHelper
.
getCurrentAuditor
();
final
String
userName
=
authUserHelper
.
getCurrentAuditor
()
.
get
()
;
// find exist user
// find exist user
User
tempUser
=
userMapper
.
selectByUserNameIgnoreCase
(
userName
);
User
tempUser
=
userMapper
.
selectByUserNameIgnoreCase
(
userName
);
...
@@ -291,7 +291,7 @@ public class UserAccountServiceImpl extends AbstractService implements UserAccou
...
@@ -291,7 +291,7 @@ public class UserAccountServiceImpl extends AbstractService implements UserAccou
@Override
@Override
public
OperationResultDto
<
User
>
addUser
(
UserAndUserRoleSaveDto
userAndUserRoleSaveDto
)
{
public
OperationResultDto
<
User
>
addUser
(
UserAndUserRoleSaveDto
userAndUserRoleSaveDto
)
{
String
userName
=
authUserHelper
.
getCurrentAuditor
();
String
userName
=
authUserHelper
.
getCurrentAuditor
()
.
get
()
;
OperationResultDto
<
User
>
operationResultDto
=
new
OperationResultDto
<>();
OperationResultDto
<
User
>
operationResultDto
=
new
OperationResultDto
<>();
OperationResultDto
<
User
>
result
=
userService
.
checkUserExist
(
userAndUserRoleSaveDto
.
getUserName
(),
OperationResultDto
<
User
>
result
=
userService
.
checkUserExist
(
userAndUserRoleSaveDto
.
getUserName
(),
CommonConstants
.
EMPTY_UUID
);
CommonConstants
.
EMPTY_UUID
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/UserRoleServiceImpl.java
View file @
6a9ffc47
...
@@ -767,7 +767,7 @@ public class UserRoleServiceImpl extends AbstractService implements UserRoleServ
...
@@ -767,7 +767,7 @@ public class UserRoleServiceImpl extends AbstractService implements UserRoleServ
updateLogParams
.
setOriginalState
(
originalObj
);
updateLogParams
.
setOriginalState
(
originalObj
);
updateLogParams
.
setOperationContent
(
operationContent
);
updateLogParams
.
setOperationContent
(
operationContent
);
updateLogParams
.
setUpdateState
(
updateObj
);
updateLogParams
.
setUpdateState
(
updateObj
);
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
());
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
()
.
get
()
);
updateLogParams
.
setOperationModule
(
operationModule
);
updateLogParams
.
setOperationModule
(
operationModule
);
updateLogParams
.
setOperationAction
(
OperationAction
.
Update
.
value
());
updateLogParams
.
setOperationAction
(
OperationAction
.
Update
.
value
());
updateLogParams
.
setOperateLogType
(
logType
);
updateLogParams
.
setOperateLogType
(
logType
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/UserServiceImpl.java
View file @
6a9ffc47
...
@@ -702,7 +702,7 @@ public class UserServiceImpl extends AbstractService implements UserService {
...
@@ -702,7 +702,7 @@ public class UserServiceImpl extends AbstractService implements UserService {
User
user
=
userMapper
.
selectByPrimaryKey
(
userDto
.
getId
());
User
user
=
userMapper
.
selectByPrimaryKey
(
userDto
.
getId
());
Assert
.
notNull
(
user
,
"Null user"
);
Assert
.
notNull
(
user
,
"Null user"
);
if
(!
Objects
.
equals
(
userDto
.
getIsAdmin
(),
BooleanUtils
.
isTrue
(
user
.
getIsAdmin
())))
{
if
(!
Objects
.
equals
(
userDto
.
getIsAdmin
(),
BooleanUtils
.
isTrue
(
user
.
getIsAdmin
())))
{
String
userName
=
authUserHelper
.
getCurrentAuditor
();
String
userName
=
authUserHelper
.
getCurrentAuditor
()
.
get
()
;
User
operateUser
=
userMapper
.
selectByUserNameIgnoreCase
(
userName
);
User
operateUser
=
userMapper
.
selectByUserNameIgnoreCase
(
userName
);
if
(
operateUser
!=
null
&&
BooleanUtils
.
isFalse
(
operateUser
.
getIsAdmin
()))
{
if
(
operateUser
!=
null
&&
BooleanUtils
.
isFalse
(
operateUser
.
getIsAdmin
()))
{
operationResultDto
.
setResult
(
false
);
operationResultDto
.
setResult
(
false
);
...
...
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