Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rs-cloud-platform
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
周健威
rs-cloud-platform
Commits
cfea602b
Commit
cfea602b
authored
Dec 17, 2020
by
unset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改支付信息
parent
48507619
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
132 additions
and
128 deletions
+132
-128
AppUserManageBiz.java
...m/github/wxiaoqi/security/admin/biz/AppUserManageBiz.java
+132
-128
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserManageBiz.java
View file @
cfea602b
...
@@ -38,132 +38,136 @@ import java.util.stream.Collectors;
...
@@ -38,132 +38,136 @@ import java.util.stream.Collectors;
@Slf4j
@Slf4j
public
class
AppUserManageBiz
extends
BaseBiz
<
AppUserDetailMapper
,
AppUserDetail
>
{
public
class
AppUserManageBiz
extends
BaseBiz
<
AppUserDetailMapper
,
AppUserDetail
>
{
@Autowired
@Autowired
private
AppUserLoginMapper
appUserLoginMapper
;
private
AppUserLoginMapper
appUserLoginMapper
;
@Autowired
@Autowired
private
AppUserDetailBiz
appUserDetailBiz
;
private
AppUserDetailBiz
appUserDetailBiz
;
/**
/**
* 根据条件查询
* 根据条件查询
*
*
* @param appUserManageDTO 查询条件
* @param appUserManageDTO 查询条件
* @return
* @return
*/
*/
public
PageInfo
<
AppUserManageVo
>
findAllByQuery
(
AppUserManageDTO
appUserManageDTO
)
{
public
PageInfo
<
AppUserManageVo
>
findAllByQuery
(
AppUserManageDTO
appUserManageDTO
)
{
if
(
Objects
.
nonNull
(
appUserManageDTO
.
getRegistrationTimeEnd
())){
if
(
Objects
.
nonNull
(
appUserManageDTO
.
getRegistrationTimeEnd
()))
{
long
registerEndTime
=
appUserManageDTO
.
getRegistrationTimeEnd
()+(
24
*
60
*
60
);
long
registerEndTime
=
appUserManageDTO
.
getRegistrationTimeEnd
()
+
(
24
*
60
*
60
);
appUserManageDTO
.
setRegistrationTimeEnd
(
registerEndTime
);
appUserManageDTO
.
setRegistrationTimeEnd
(
registerEndTime
);
}
}
PageHelper
.
startPage
(
appUserManageDTO
.
getPage
(),
appUserManageDTO
.
getLimit
());
PageHelper
.
startPage
(
appUserManageDTO
.
getPage
(),
appUserManageDTO
.
getLimit
());
List
<
AppUserManageVo
>
appUserManageVos
=
mapper
.
selectAppUser
(
appUserManageDTO
);
List
<
AppUserManageVo
>
appUserManageVos
=
mapper
.
selectAppUser
(
appUserManageDTO
);
PageInfo
<
AppUserManageVo
>
pageInfo
=
PageInfo
.
of
(
appUserManageVos
);
PageInfo
<
AppUserManageVo
>
pageInfo
=
PageInfo
.
of
(
appUserManageVos
);
if
(
pageInfo
.
getList
()==
null
||
pageInfo
.
getList
().
size
()==
0
)
{
if
(
pageInfo
.
getList
()
==
null
||
pageInfo
.
getList
().
size
()
==
0
)
{
return
pageInfo
;
return
new
PageInfo
<>();
}
}
throw
new
BaseException
(
"User error!"
);
return
pageInfo
;
}
}
/**
/**
* 禁用账户
* 禁用账户
* @param id
*
*/
* @param id
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
deleteAppUser
(
Integer
id
,
Integer
isDel
)
{
@Transactional
(
rollbackFor
=
Exception
.
class
)
AppUserLogin
appUserLogin
=
new
AppUserLogin
();
public
void
deleteAppUser
(
Integer
id
,
Integer
isDel
)
{
//修改为禁用并设置修改时间
AppUserLogin
appUserLogin
=
new
AppUserLogin
();
appUserLogin
.
setIsdel
(
isDel
);
//修改为禁用并设置修改时间
appUserLogin
.
setUpdatetime
(
System
.
currentTimeMillis
());
appUserLogin
.
setIsdel
(
isDel
);
Example
example
=
new
Example
(
AppUserLogin
.
class
);
appUserLogin
.
setUpdatetime
(
System
.
currentTimeMillis
());
Example
.
Criteria
criteria
=
example
.
createCriteria
();
Example
example
=
new
Example
(
AppUserLogin
.
class
);
criteria
.
andEqualTo
(
"id"
,
id
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
appUserLoginMapper
.
updateByExampleSelective
(
appUserLogin
,
example
);
criteria
.
andEqualTo
(
"id"
,
id
);
appUserLoginMapper
.
updateByExampleSelective
(
appUserLogin
,
example
);
//设置
AppUserDetail
appUserDetail
=
new
AppUserDetail
();
//设置
appUserDetail
.
setIsdel
(
isDel
);
AppUserDetail
appUserDetail
=
new
AppUserDetail
();
appUserDetail
.
setUpdatetime
(
System
.
currentTimeMillis
());
appUserDetail
.
setIsdel
(
isDel
);
Example
detailExample
=
new
Example
(
AppUserLogin
.
class
);
appUserDetail
.
setUpdatetime
(
System
.
currentTimeMillis
());
Example
.
Criteria
detailCriteria
=
detailExample
.
createCriteria
();
Example
detailExample
=
new
Example
(
AppUserLogin
.
class
);
criteria
.
andEqualTo
(
"id"
,
id
);
Example
.
Criteria
detailCriteria
=
detailExample
.
createCriteria
();
mapper
.
updateByExampleSelective
(
appUserDetail
,
detailCriteria
);
criteria
.
andEqualTo
(
"id"
,
id
);
}
mapper
.
updateByExampleSelective
(
appUserDetail
,
detailCriteria
);
}
/**
* 查询一条
/**
* @param id
* 查询一条
* @return
*
*/
* @param id
public
AppUserVo
findOneById
(
Integer
id
)
{
* @return
return
mapper
.
getUserInfo
(
id
);
*/
}
public
AppUserVo
findOneById
(
Integer
id
)
{
return
mapper
.
getUserInfo
(
id
);
}
/**
* 启用禁用
* @param appUserLogin
/**
* @return
* 启用禁用
*/
*
public
ObjectRestResponse
updateStatus
(
AppUserLogin
appUserLogin
)
{
* @param appUserLogin
if
(
appUserLogin
==
null
||
appUserLogin
.
getId
()
==
null
||
appUserLogin
.
getStatus
()
==
null
)
{
* @return
return
ObjectRestResponse
.
paramIsEmpty
();
*/
}
public
ObjectRestResponse
updateStatus
(
AppUserLogin
appUserLogin
)
{
AppUserLogin
old
=
appUserLoginMapper
.
selectByPrimaryKey
(
appUserLogin
.
getId
());
if
(
appUserLogin
==
null
||
appUserLogin
.
getId
()
==
null
||
appUserLogin
.
getStatus
()
==
null
)
{
if
(
old
==
null
||
old
.
getIsdel
()
==
1
)
{
return
ObjectRestResponse
.
paramIsEmpty
();
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NOTEXIST_CODE
,
ResultCode
.
getMsg
(
ResultCode
.
NOTEXIST_CODE
));
}
}
AppUserLogin
old
=
appUserLoginMapper
.
selectByPrimaryKey
(
appUserLogin
.
getId
());
old
.
setStatus
(
appUserLogin
.
getStatus
());
if
(
old
==
null
||
old
.
getIsdel
()
==
1
)
{
appUserLoginMapper
.
updateByPrimaryKeySelective
(
old
);
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NOTEXIST_CODE
,
ResultCode
.
getMsg
(
ResultCode
.
NOTEXIST_CODE
));
return
ObjectRestResponse
.
succ
();
}
}
old
.
setStatus
(
appUserLogin
.
getStatus
());
appUserLoginMapper
.
updateByPrimaryKeySelective
(
old
);
/**
return
ObjectRestResponse
.
succ
();
*保存
}
* @param appUserVo
*/
/**
@Transactional
(
rollbackFor
=
Exception
.
class
)
* 保存
public
void
save
(
AppUserVo
appUserVo
)
{
*
AppUserLogin
appUserLogin
=
new
AppUserLogin
();
* @param appUserVo
AppUserDetail
appUserDetail
=
new
AppUserDetail
();
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
try
{
public
void
save
(
AppUserVo
appUserVo
)
{
BeanUtilsBean
.
getInstance
().
copyProperties
(
appUserLogin
,
appUserVo
);
AppUserLogin
appUserLogin
=
new
AppUserLogin
();
BeanUtilsBean
.
getInstance
().
copyProperties
(
appUserDetail
,
appUserVo
);
AppUserDetail
appUserDetail
=
new
AppUserDetail
();
if
(
appUserVo
.
getUserid
()
==
null
||
appUserVo
.
getUserid
()
==
0
)
{
try
{
//设置登录用户信息
BeanUtilsBean
.
getInstance
().
copyProperties
(
appUserLogin
,
appUserVo
);
appUserLogin
.
setIsdel
(
0
);
BeanUtilsBean
.
getInstance
().
copyProperties
(
appUserDetail
,
appUserVo
);
appUserLogin
.
setCreatetime
(
System
.
currentTimeMillis
());
appUserLogin
.
setCertificationStatus
(
0
);
if
(
appUserVo
.
getUserid
()
==
null
||
appUserVo
.
getUserid
()
==
0
)
{
appUserLogin
.
setStatus
(
0
);
//设置登录用户信息
//设置用户详情
appUserLogin
.
setIsdel
(
0
);
appUserDetail
.
setIsdel
(
0
);
appUserLogin
.
setCreatetime
(
System
.
currentTimeMillis
());
if
(
appUserDetail
.
getIsMember
()
==
null
)
{
appUserLogin
.
setCertificationStatus
(
0
);
appUserDetail
.
setIsMember
(
0
);
appUserLogin
.
setStatus
(
0
);
}
//设置用户详情
appUserDetail
.
setIsdel
(
0
);
appUserLoginMapper
.
insertSelective
(
appUserLogin
);
if
(
appUserDetail
.
getIsMember
()
==
null
)
{
mapper
.
insertSelective
(
appUserDetail
);
appUserDetail
.
setIsMember
(
0
);
}
}
else
{
appUserLogin
.
setUpdatetime
(
System
.
currentTimeMillis
());
appUserLoginMapper
.
insertSelective
(
appUserLogin
);
appUserDetail
.
setUpdatetime
(
System
.
currentTimeMillis
());
mapper
.
insertSelective
(
appUserDetail
);
appUserLoginMapper
.
updateByPrimaryKeySelective
(
appUserLogin
);
mapper
.
updateByPrimaryKeySelective
(
appUserDetail
);
}
else
{
}
appUserLogin
.
setUpdatetime
(
System
.
currentTimeMillis
());
}
catch
(
Exception
e
)
{
appUserDetail
.
setUpdatetime
(
System
.
currentTimeMillis
());
log
.
error
(
e
.
getMessage
(),
e
);
appUserLoginMapper
.
updateByPrimaryKeySelective
(
appUserLogin
);
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
mapper
.
updateByPrimaryKeySelective
(
appUserDetail
);
}
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
public
AppUserManageVo
findUserInfoById
(
Integer
userId
)
{
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
AppUserManageVo
appUserManageVo
=
new
AppUserManageVo
();
}
List
<
AppUserManageVo
>
appUserManageVos
=
mapper
.
selectAppUserManage
(
userId
);
}
if
(
CollectionUtils
.
isEmpty
(
appUserManageVos
)){
return
appUserManageVo
;
public
AppUserManageVo
findUserInfoById
(
Integer
userId
)
{
}
AppUserManageVo
appUserManageVo
=
new
AppUserManageVo
();
return
appUserManageVos
.
get
(
0
);
List
<
AppUserManageVo
>
appUserManageVos
=
mapper
.
selectAppUserManage
(
userId
);
}
if
(
CollectionUtils
.
isEmpty
(
appUserManageVos
))
{
return
appUserManageVo
;
}
return
appUserManageVos
.
get
(
0
);
}
}
}
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