Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
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
youjj
cloud-platform
Commits
9a80a78a
Commit
9a80a78a
authored
Oct 16, 2020
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
核销相关
parent
3cbe2a72
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
14 deletions
+38
-14
UserBiz.java
...n/java/com/github/wxiaoqi/security/admin/biz/UserBiz.java
+23
-0
AppUserCommentController.java
...wxiaoqi/security/admin/rest/AppUserCommentController.java
+1
-1
BaseController.java
...om/github/wxiaoqi/security/admin/rest/BaseController.java
+8
-7
PublicController.java
.../github/wxiaoqi/security/admin/rest/PublicController.java
+5
-5
AdminVehicleApplyController.java
...tform/vehicle/rest/admin/AdminVehicleApplyController.java
+1
-1
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/UserBiz.java
View file @
9a80a78a
...
...
@@ -254,6 +254,29 @@ public class UserBiz extends BaseBiz<UserMapper,User> {
return
new
ObjectRestResponse
<
User
>().
rel
(
true
).
data
(
user
);
}
public
ObjectRestResponse
userinfoByMobilePhone
(
String
mobilePhone
){
User
user
=
selectOne
(
new
User
(){{
setMobilePhone
(
mobilePhone
);
setIsDel
(
SYS_FALSE
);
setStatus
(
SYS_TRUE
);
}});
if
(
user
==
null
)
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
USER_NOTEXIST_CODE
,
ResultCode
.
getMsg
(
ResultCode
.
USER_NOTEXIST_CODE
));
}
if
(
user
.
getDataCorporation
()
!=
null
){
com
.
github
.
wxiaoqi
.
security
.
admin
.
dto
.
CompanySearchDTO
companySearchDTO
=
new
com
.
github
.
wxiaoqi
.
security
.
admin
.
dto
.
CompanySearchDTO
();
companySearchDTO
.
setDataCorporationIds
(
Arrays
.
asList
(
user
.
getDataCorporation
().
split
(
","
)).
parallelStream
().
map
(
s
->
Integer
.
valueOf
(
s
)).
collect
(
Collectors
.
toList
()));
List
<
com
.
github
.
wxiaoqi
.
security
.
admin
.
vo
.
CompanySearchVO
>
companySearchVOList
=
branchCompanyBiz
.
getList
(
companySearchDTO
);
if
(
companySearchVOList
!=
null
&&
companySearchVOList
.
size
()
>
0
){
List
<
Integer
>
companyIds
=
companySearchVOList
.
stream
().
map
(
com
.
github
.
wxiaoqi
.
security
.
admin
.
vo
.
CompanySearchVO
::
getId
).
distinct
().
collect
(
Collectors
.
toList
());
user
.
setCompanyIds
(
companyIds
);
}
}
else
if
(
user
.
getDataCompany
()
!=
null
){
List
<
Integer
>
companyIds
=
Arrays
.
asList
(
user
.
getDataCompany
().
split
(
","
)).
parallelStream
().
map
(
s
->
Integer
.
valueOf
(
s
)).
collect
(
Collectors
.
toList
());
user
.
setCompanyIds
(
companyIds
);
}
return
new
ObjectRestResponse
<
User
>().
rel
(
true
).
data
(
user
);
}
public
List
<
BaseUserVo
>
getList
(
BaseUserDTO
baseUserDTO
){
return
mapper
.
selectList
(
baseUserDTO
);
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/AppUserCommentController.java
View file @
9a80a78a
...
...
@@ -45,7 +45,7 @@ public class AppUserCommentController extends BaseController<UserCommentBiz> {
userComment
.
setUserId
(
getCurrentUserIdInt
());
Integer
isCompany
=
userComment
.
getIsCompany
()
==
null
?
0
:
userComment
.
getIsCompany
();
if
(
isCompany
==
1
&&
(
userComment
.
getCompanyId
()
==
null
||
userComment
.
getCompanyId
()
==
0
)){
List
<
Integer
>
companyIds
=
getCompanyIds
();
List
<
Integer
>
companyIds
=
get
BusinessUser
CompanyIds
();
if
(
companyIds
!=
null
&&
companyIds
.
size
()
>
0
){
userComment
.
setCompanyId
(
companyIds
.
get
(
0
));
}
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/BaseController.java
View file @
9a80a78a
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
rest
;
import
cn.hutool.core.util.StrUtil
;
import
com.github.wxiaoqi.security.admin.biz.UserBiz
;
import
com.github.wxiaoqi.security.admin.entity.User
;
import
com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface
;
import
com.github.wxiaoqi.security.auth.client.config.UserAuthConfig
;
import
com.github.wxiaoqi.security.auth.client.jwt.UserAuthUtil
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
...
...
@@ -14,7 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
java.util.List
;
@Slf4j
public
class
BaseController
<
Biz
extends
BaseBiz
>
extends
CommonBaseController
{
public
class
BaseController
<
Biz
extends
BaseBiz
>
extends
CommonBaseController
{
@Autowired
protected
Biz
baseBiz
;
...
...
@@ -29,7 +31,7 @@ public class BaseController<Biz extends BaseBiz> extends CommonBaseController {
private
UserBiz
userBiz
;
public
String
getUserName
()
throws
Exception
{
return
userAuthUtil
.
getInfoFromToken
(
userAuthConfig
.
getToken
(
request
)).
getUniqueName
();
}
public
String
getUserName
()
throws
Exception
{
return
userAuthUtil
.
getInfoFromToken
(
userAuthConfig
.
getToken
(
request
)).
getUniqueName
();
}
public
Biz
getBaseBiz
()
{
return
baseBiz
;
...
...
@@ -37,11 +39,10 @@ public class BaseController<Biz extends BaseBiz> extends CommonBaseController {
public
String
getUserId
()
throws
Exception
{
return
userAuthUtil
.
getInfoFromToken
(
userAuthConfig
.
getToken
(
request
)).
getId
();
}
public
List
<
Integer
>
getCompanyIds
(){
Integer
currentUserIdInt
=
getCurrentUserIdInt
();
if
(
currentUserIdInt
!=
null
&&
currentUserIdInt
>
0
){
ObjectRestResponse
<
User
>
restResponse
=
userBiz
.
userinfoByAppUserIdV2
(
currentUserIdInt
);
public
List
<
Integer
>
getBusinessUserCompanyIds
(){
String
currentUserName
=
getCurrentUserName
();
if
(
StrUtil
.
isNotBlank
(
currentUserName
)){
ObjectRestResponse
<
User
>
restResponse
=
userBiz
.
userinfoByMobilePhone
(
currentUserName
);
if
(
restResponse
.
getData
()
!=
null
){
User
userDTO
=
restResponse
.
getData
();
if
(
userDTO
!=
null
){
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/PublicController.java
View file @
9a80a78a
...
...
@@ -108,11 +108,11 @@ public class PublicController {
}
//
@RequestMapping(value = "v2/userinfo-by-appUserId", method = RequestMethod.GET)
//
public @ResponseBody
//
ObjectRestResponse userinfoByAppUserIdV2(Integer appUserId){
//
return userBiz.userinfoByAppUserIdV2(appUserId);
//
}
@RequestMapping
(
value
=
"v2/userinfo-by-appUserId"
,
method
=
RequestMethod
.
GET
)
public
@ResponseBody
ObjectRestResponse
userinfoByAppUserIdV2
(
Integer
appUserId
){
return
userBiz
.
userinfoByAppUserIdV2
(
appUserId
);
}
@RequestMapping
(
value
=
"business/userinfo-by-mobilePhone"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/admin/AdminVehicleApplyController.java
View file @
9a80a78a
...
...
@@ -74,7 +74,7 @@ public class AdminVehicleApplyController extends BaseController<VehicleApplyBiz,
public
ObjectRestResponse
apply
(
@RequestBody
Vehicle
vehicle
)
{
if
(
vehicle
.
getSubordinateBranch
()
==
null
||
vehicle
.
getSubordinateBranch
()
==
0
){
List
<
Integer
>
companyIds
=
getCompanyIds
();
List
<
Integer
>
companyIds
=
get
BusinessUser
CompanyIds
();
if
(
companyIds
!=
null
&&
companyIds
.
size
()
>
0
){
vehicle
.
setSubordinateBranch
(
companyIds
.
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