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
deb83406
Commit
deb83406
authored
Jan 27, 2021
by
licc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户查询信息控制层提交
parent
6698bcad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
5 deletions
+32
-5
UserLimitController.java
...senergy/web/admin/controller/app/UserLimitController.java
+32
-5
No files found.
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/UserLimitController.java
View file @
deb83406
package
cn
.
wisenergy
.
web
.
admin
.
controller
.
app
;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.model.app.Banner
;
import
cn.wisenergy.model.app.UserLimit
;
import
cn.wisenergy.model.app.Volunteer
;
import
cn.wisenergy.model.vo.AddLimitVo
;
import
cn.wisenergy.service.app.UserLimitService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
...
...
@@ -10,17 +12,15 @@ import io.swagger.annotations.ApiImplicitParams;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* @author 86187
* @ Description: PC-用户查询次数
* @ Author : 86187
* @ Date : 2021/1/14 10:50
* @author 86187
*/
@RestController
@Api
(
tags
=
"PC-用户查询次数"
)
...
...
@@ -36,10 +36,37 @@ public class UserLimitController {
@GetMapping
(
"/getByUserId"
)
public
R
<
UserLimit
>
getByUserId
(
Integer
userId
)
{
log
.
info
(
"volunteer-service[]UserLimitController[]getVolunteerList[]input.param.userId:"
+
userId
);
if
(
null
==
userId
)
{
if
(
null
==
userId
)
{
return
R
.
error
(
"入参为空!"
);
}
return
userLimitService
.
getByUserId
(
userId
);
}
@ApiOperation
(
value
=
"用户充值"
,
notes
=
"用户充值"
,
httpMethod
=
"POST"
)
@ApiImplicitParam
(
name
=
"addLimitVo"
,
value
=
"充值信息"
,
dataType
=
"AddLimitVo"
)
@PostMapping
(
"/addLimit"
)
public
R
<
Boolean
>
addLimit
(
@RequestBody
AddLimitVo
addLimitVo
)
{
log
.
info
(
"volunteer-service[]UserLimitController[]addLimit[]input.param.addLimitVo:"
+
addLimitVo
);
if
(
null
==
addLimitVo
||
null
==
addLimitVo
.
getUserId
()
||
null
==
addLimitVo
.
getPayType
())
{
return
R
.
error
(
"入参不能为空!"
);
}
return
userLimitService
.
addLimit
(
addLimitVo
);
}
@ApiOperation
(
value
=
"扣减用户查询次数"
,
notes
=
"扣减用户查询次数"
,
httpMethod
=
"POST"
)
@ApiImplicitParam
(
name
=
"userId"
,
value
=
"用户id"
,
dataType
=
"int"
,
required
=
true
)
@PostMapping
(
"/minusLimit"
)
public
R
<
Boolean
>
minusLimit
(
Integer
userId
)
{
log
.
info
(
"volunteer-service[]UserLimitController[]minusLimit[]input.param.userId:"
+
userId
);
if
(
null
==
userId
)
{
return
R
.
error
(
"入参为空!"
);
}
return
userLimitService
.
minusLimit
(
userId
);
}
}
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