Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
V
volunteer_service
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
licc
volunteer_service
Commits
4c159a83
Commit
4c159a83
authored
Jan 28, 2021
by
licc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改退出登录接口
parent
e7afc37d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
24 deletions
+61
-24
LoginOutVo.java
...model/src/main/java/cn/wisenergy/model/vo/LoginOutVo.java
+21
-0
SchemeServiceImpl.java
...java/cn/wisenergy/service/app/impl/SchemeServiceImpl.java
+21
-0
UserLoginController.java
...senergy/web/admin/controller/app/UserLoginController.java
+7
-12
application-dev.yml
wisenergy-web-admin/src/main/resources/application-dev.yml
+12
-12
No files found.
wisenergy-model/src/main/java/cn/wisenergy/model/vo/LoginOutVo.java
0 → 100644
View file @
4c159a83
package
cn
.
wisenergy
.
model
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @author 86187
*/
@Data
@ApiModel
(
"LoginOutVo"
)
public
class
LoginOutVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
307447260120718038L
;
/**
* 用户id
*/
@ApiModelProperty
(
value
=
"用户id"
,
name
=
"userId"
)
private
Integer
userId
;
}
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/SchemeServiceImpl.java
View file @
4c159a83
...
@@ -678,11 +678,32 @@ public class SchemeServiceImpl extends ServiceImpl<SchemeMapper, SchemeInfo> imp
...
@@ -678,11 +678,32 @@ public class SchemeServiceImpl extends ServiceImpl<SchemeMapper, SchemeInfo> imp
}
}
/**
* 超过限定展示方案条数,要帅选
*
* @param list 所以方案数据
* @param total 限定展示方案条数
* @return 筛选结果
*/
private
List
<
Volunteer
>
getVolunteerList
(
List
<
Volunteer
>
list
,
Integer
total
)
{
private
List
<
Volunteer
>
getVolunteerList
(
List
<
Volunteer
>
list
,
Integer
total
)
{
List
<
Volunteer
>
result
=
new
ArrayList
<>();
List
<
Volunteer
>
result
=
new
ArrayList
<>();
result
.
add
(
list
.
get
(
0
));
List
<
Volunteer
>
otherList
=
new
ArrayList
<>();
List
<
Volunteer
>
otherList
=
new
ArrayList
<>();
List
<
String
>
grades
=
new
ArrayList
<>();
grades
.
add
(
list
.
get
(
0
).
getLowestMark
());
for
(
Volunteer
volunteer
:
list
)
{
for
(
Volunteer
volunteer
:
list
)
{
if
(!
grades
.
contains
(
volunteer
.
getLowestMark
())
&&
result
.
size
()
<=
total
)
{
grades
.
add
(
volunteer
.
getLowestMark
());
result
.
add
(
volunteer
);
}
else
{
otherList
.
add
(
volunteer
);
}
}
if
(
result
.
size
()
<
total
)
{
int
number
=
total
-
result
.
size
();
List
<
Volunteer
>
volunteers
=
otherList
.
subList
(
0
,
number
);
result
.
addAll
(
volunteers
);
}
}
return
result
;
return
result
;
...
...
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/UserLoginController.java
View file @
4c159a83
...
@@ -3,10 +3,7 @@ package cn.wisenergy.web.admin.controller.app;
...
@@ -3,10 +3,7 @@ package cn.wisenergy.web.admin.controller.app;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.model.app.Banner
;
import
cn.wisenergy.model.app.Banner
;
import
cn.wisenergy.model.vo.UpdatePasswordVo
;
import
cn.wisenergy.model.vo.*
;
import
cn.wisenergy.model.vo.UserInfoVo
;
import
cn.wisenergy.model.vo.UserLoginVo
;
import
cn.wisenergy.model.vo.UserRegisterVo
;
import
cn.wisenergy.service.app.UserLoginService
;
import
cn.wisenergy.service.app.UserLoginService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
...
@@ -14,10 +11,7 @@ import io.swagger.annotations.ApiOperation;
...
@@ -14,10 +11,7 @@ import io.swagger.annotations.ApiOperation;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
/**
* @author 86187
* @author 86187
...
@@ -77,14 +71,15 @@ public class UserLoginController {
...
@@ -77,14 +71,15 @@ public class UserLoginController {
@ApiOperation
(
value
=
"退出登录"
,
notes
=
"退出登录"
,
httpMethod
=
"POST"
)
@ApiOperation
(
value
=
"退出登录"
,
notes
=
"退出登录"
,
httpMethod
=
"POST"
)
@ApiImplicitParam
(
name
=
"outVo"
,
value
=
"退出用户信息"
,
dataType
=
"LoginOutVo"
)
@PostMapping
(
"/loginOut"
)
@PostMapping
(
"/loginOut"
)
public
R
<
Boolean
>
loginOut
(
Integer
userId
)
{
public
R
<
Boolean
>
loginOut
(
@RequestBody
LoginOutVo
outVo
)
{
log
.
info
(
"volunteer-service[]UserLongController[]loginOut[]input.param.
userId:"
+
userId
);
log
.
info
(
"volunteer-service[]UserLongController[]loginOut[]input.param.
outVo:"
+
outVo
);
if
(
null
==
userId
)
{
if
(
null
==
outVo
||
null
==
outVo
.
getUserId
()
)
{
return
R
.
error
(
"入参不能为空!"
);
return
R
.
error
(
"入参不能为空!"
);
}
}
return
userLoginService
.
loginOut
(
userId
);
return
userLoginService
.
loginOut
(
outVo
.
getUserId
()
);
}
}
@ApiOperation
(
value
=
"修改用户密码"
,
notes
=
"修改用户密码"
,
httpMethod
=
"POST"
)
@ApiOperation
(
value
=
"修改用户密码"
,
notes
=
"修改用户密码"
,
httpMethod
=
"POST"
)
...
...
wisenergy-web-admin/src/main/resources/application-dev.yml
View file @
4c159a83
...
@@ -44,18 +44,18 @@ spring:
...
@@ -44,18 +44,18 @@ spring:
# 总限制
# 总限制
max-request-size
:
10MB
max-request-size
:
10MB
#
redis:
redis
:
#
database: 0
database
:
0
# host: localhost
host
:
192.168.110.165
#
port: 6379
port
:
6379
# password: root
# 密码(默认为空)
password
:
# 密码(默认为空)
#
timeout: 6000ms # 连接超时时长(毫秒)
timeout
:
6000ms
# 连接超时时长(毫秒)
#
jedis:
jedis
:
#
pool:
pool
:
#
max-active: 1000 # 连接池最大连接数(使用负值表示没有限制)
max-active
:
1000
# 连接池最大连接数(使用负值表示没有限制)
#
max-wait: -1ms # 连接池最大阻塞等待时间(使用负值表示没有限制)
max-wait
:
-1ms
# 连接池最大阻塞等待时间(使用负值表示没有限制)
#
max-idle: 10 # 连接池中的最大空闲连接
max-idle
:
10
# 连接池中的最大空闲连接
#
min-idle: 5 # 连接池中的最小空闲连
min-idle
:
5
# 连接池中的最小空闲连
###上传文件配置 :该配置可根据部署的系统或开发人员自定义路径,每次部署之前需要修改location
###上传文件配置 :该配置可根据部署的系统或开发人员自定义路径,每次部署之前需要修改location
uploadFile
:
uploadFile
:
resourceHandler
:
/upload_flowChart/**
#请求 url 中的资源映射也是保存到数据库中的父级路径
resourceHandler
:
/upload_flowChart/**
#请求 url 中的资源映射也是保存到数据库中的父级路径
...
...
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