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
214d9a63
Commit
214d9a63
authored
Jan 15, 2021
by
liaoanyuan
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
8e531834
73821433
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
287 additions
and
21 deletions
+287
-21
LoginRecordMapper.xml
...gy-mapper/src/main/resources/mapper/LoginRecordMapper.xml
+5
-2
LoginRecord.java
...del/src/main/java/cn/wisenergy/model/app/LoginRecord.java
+8
-2
OperationTypeEnum.java
...main/java/cn/wisenergy/model/enums/OperationTypeEnum.java
+40
-0
UserRegisterVo.java
...l/src/main/java/cn/wisenergy/model/vo/UserRegisterVo.java
+37
-0
PayRecordService.java
.../main/java/cn/wisenergy/service/app/PayRecordService.java
+1
-1
UserLimitService.java
.../main/java/cn/wisenergy/service/app/UserLimitService.java
+2
-1
UserLoginService.java
.../main/java/cn/wisenergy/service/app/UserLoginService.java
+3
-3
PayRecordServiceImpl.java
...a/cn/wisenergy/service/app/impl/PayRecordServiceImpl.java
+4
-4
UserLoginServiceImpl.java
...a/cn/wisenergy/service/app/impl/UserLoginServiceImpl.java
+16
-3
PayRecordController.java
...senergy/web/admin/controller/app/PayRecordController.java
+43
-2
SchemeController.java
.../wisenergy/web/admin/controller/app/SchemeController.java
+28
-0
SchemeRecordController.java
...ergy/web/admin/controller/app/SchemeRecordController.java
+58
-2
UserController.java
...cn/wisenergy/web/admin/controller/app/UserController.java
+1
-1
UserLimitController.java
...senergy/web/admin/controller/app/UserLimitController.java
+26
-0
UserLongController.java
...isenergy/web/admin/controller/app/UserLongController.java
+15
-0
No files found.
wisenergy-mapper/src/main/resources/mapper/LoginRecordMapper.xml
View file @
214d9a63
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
<id
column=
"id"
property=
"id"
/>
<id
column=
"id"
property=
"id"
/>
<result
column=
"user_id"
property=
"userId"
/>
<result
column=
"user_id"
property=
"userId"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"operation_name"
property=
"operationName"
/>
<result
column=
"ip"
property=
"ip"
/>
<result
column=
"ip"
property=
"ip"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
...
@@ -21,16 +22,17 @@
...
@@ -21,16 +22,17 @@
</sql>
</sql>
<sql
id=
"cols_exclude_id"
>
<sql
id=
"cols_exclude_id"
>
user_id,type, ip, create_time,update_time
user_id,type,
operationName,
ip, create_time,update_time
</sql>
</sql>
<sql
id=
"vals"
>
<sql
id=
"vals"
>
#{userId},#{type},#{ip},now(),now()
#{userId},#{type},#{
operation_name},#{
ip},now(),now()
</sql>
</sql>
<sql
id=
"updateCondition"
>
<sql
id=
"updateCondition"
>
<if
test=
"userId != null"
>
user_id = #{userId},
</if>
<if
test=
"userId != null"
>
user_id = #{userId},
</if>
<if
test=
"type != null"
>
type =#{type},
</if>
<if
test=
"type != null"
>
type =#{type},
</if>
<if
test=
"operationName != null"
>
operation_name =#{operationName},
</if>
<if
test=
"ip != null"
>
ip =#{ip},
</if>
<if
test=
"ip != null"
>
ip =#{ip},
</if>
update_time =now()
update_time =now()
</sql>
</sql>
...
@@ -39,6 +41,7 @@
...
@@ -39,6 +41,7 @@
<if
test=
"id != null"
>
id = #{id}
</if>
<if
test=
"id != null"
>
id = #{id}
</if>
<if
test=
"userId != null"
>
and user_id = #{userId}
</if>
<if
test=
"userId != null"
>
and user_id = #{userId}
</if>
<if
test=
"type != null"
>
and type =#{type}
</if>
<if
test=
"type != null"
>
and type =#{type}
</if>
<if
test=
"operationName != null"
>
and operation_name =#{operationName}
</if>
<if
test=
"ip != null"
>
and ip =#{ip}
</if>
<if
test=
"ip != null"
>
and ip =#{ip}
</if>
<if
test=
"createTime != null"
>
and create_time
>
= #{createTime}
</if>
<if
test=
"createTime != null"
>
and create_time
>
= #{createTime}
</if>
<if
test=
"updateTime != null"
>
and #{updateTime}
>
= update_time
</if>
<if
test=
"updateTime != null"
>
and #{updateTime}
>
= update_time
</if>
...
...
wisenergy-model/src/main/java/cn/wisenergy/model/app/LoginRecord.java
View file @
214d9a63
...
@@ -30,11 +30,17 @@ public class LoginRecord implements Serializable {
...
@@ -30,11 +30,17 @@ public class LoginRecord implements Serializable {
private
Integer
userId
;
private
Integer
userId
;
/**
/**
* 类型 1:
登录 2:
退出
* 类型 1:
用户祖册 2:用户登录 3:用户
退出
*/
*/
@ApiModelProperty
(
value
=
"类型 1:
登录 2:
退出"
,
name
=
"type"
)
@ApiModelProperty
(
value
=
"类型 1:
用户祖册 2:用户登录 3:用户
退出"
,
name
=
"type"
)
private
Integer
type
;
private
Integer
type
;
/**
* 操作名称
*/
@ApiModelProperty
(
value
=
"操作名称"
,
name
=
"operationName"
)
private
String
operationName
;
/**
/**
* ip
* ip
*/
*/
...
...
wisenergy-model/src/main/java/cn/wisenergy/model/enums/OperationTypeEnum.java
0 → 100644
View file @
214d9a63
package
cn
.
wisenergy
.
model
.
enums
;
/**
* @ Description: 操作枚举类
* @ Author : 86187
* @ Date : 2021/1/15 9:58
*/
public
enum
OperationTypeEnum
{
/**
* 用户登录相关-操作枚举类
*/
USER_REGISTER
(
1
,
"用户祖册"
),
USER_LOGIN
(
2
,
"用户登录"
),
USER_OUT
(
3
,
"用户退出"
);
private
Integer
code
;
private
String
desc
;
OperationTypeEnum
(
Integer
code
,
String
desc
)
{
this
.
code
=
code
;
this
.
desc
=
desc
;
}
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
public
String
getDesc
()
{
return
desc
;
}
public
void
setDesc
(
String
desc
)
{
this
.
desc
=
desc
;
}
}
wisenergy-model/src/main/java/cn/wisenergy/model/vo/UserRegisterVo.java
0 → 100644
View file @
214d9a63
package
cn
.
wisenergy
.
model
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
*@ Description: 用户注册Vo
*@ Author : 86187
*@ Date : 2021/1/14 11:39
*/
@Data
@ApiModel
(
value
=
"UserRegisterVo"
)
public
class
UserRegisterVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1105034143432359192L
;
/**
* 手机号码
*/
@ApiModelProperty
(
value
=
"手机号码"
,
name
=
"phone"
)
private
String
phone
;
/**
* 密码
*/
@ApiModelProperty
(
value
=
"密码"
,
name
=
"password"
)
private
String
password
;
/**
* 验证码
*/
@ApiModelProperty
(
value
=
"验证码"
,
name
=
"smCode"
)
private
String
smCode
;
}
wisenergy-service/src/main/java/cn/wisenergy/service/app/PayRecordService.java
View file @
214d9a63
...
@@ -25,5 +25,5 @@ public interface PayRecordService {
...
@@ -25,5 +25,5 @@ public interface PayRecordService {
* @param payRecord 充值记录信息
* @param payRecord 充值记录信息
* @return true 成功 false 失败
* @return true 成功 false 失败
*/
*/
Boolean
add
(
PayRecord
payRecord
);
R
<
Boolean
>
add
(
PayRecord
payRecord
);
}
}
wisenergy-service/src/main/java/cn/wisenergy/service/app/UserLimitService.java
View file @
214d9a63
...
@@ -8,7 +8,8 @@ import cn.wisenergy.model.app.UserLimit;
...
@@ -8,7 +8,8 @@ import cn.wisenergy.model.app.UserLimit;
*@ Description: 用户查询次数接口定义
*@ Description: 用户查询次数接口定义
*@ Author : 86187
*@ Author : 86187
*@ Date : 2021/1/14 9:33
*@ Date : 2021/1/14 9:33
*/
* @author 86187
*/
public
interface
UserLimitService
{
public
interface
UserLimitService
{
/**
/**
* 获取用户查询次数信息
* 获取用户查询次数信息
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/UserLoginService.java
View file @
214d9a63
...
@@ -2,6 +2,7 @@ package cn.wisenergy.service.app;
...
@@ -2,6 +2,7 @@ package cn.wisenergy.service.app;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.model.vo.UserInfoVo
;
import
cn.wisenergy.model.vo.UserInfoVo
;
import
cn.wisenergy.model.vo.UserRegisterVo
;
/**
/**
* @ Description: 用户登录
* @ Description: 用户登录
...
@@ -12,11 +13,10 @@ public interface UserLoginService {
...
@@ -12,11 +13,10 @@ public interface UserLoginService {
/**
/**
* 用户注册接口
* 用户注册接口
*
*
* @param phone 手机号
* @param userRegisterVo 用户信息
* @param password 密码
* @return true 成功 false 失败
* @return true 成功 false 失败
*/
*/
R
<
Boolean
>
register
(
String
phone
,
String
password
);
R
<
Boolean
>
register
(
UserRegisterVo
userRegisterVo
);
/**
/**
* 手机验证码登录
* 手机验证码登录
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/PayRecordServiceImpl.java
View file @
214d9a63
...
@@ -57,19 +57,19 @@ public class PayRecordServiceImpl extends ServiceImpl<PayRecordMapper, PayRecord
...
@@ -57,19 +57,19 @@ public class PayRecordServiceImpl extends ServiceImpl<PayRecordMapper, PayRecord
}
}
@Override
@Override
public
Boolean
add
(
PayRecord
payRecord
)
{
public
R
<
Boolean
>
add
(
PayRecord
payRecord
)
{
log
.
info
(
"volunteer-service[]PayRecordServiceImpl[]payRecord[]input.param.payRecord:"
+
payRecord
);
log
.
info
(
"volunteer-service[]PayRecordServiceImpl[]payRecord[]input.param.payRecord:"
+
payRecord
);
if
(
null
==
payRecord
)
{
if
(
null
==
payRecord
)
{
return
false
;
return
R
.
ok
(
1
,
false
)
;
}
}
//保存充值记录信息
//保存充值记录信息
int
count
=
payRecordMapper
.
add
(
payRecord
);
int
count
=
payRecordMapper
.
add
(
payRecord
);
if
(
count
==
0
)
{
if
(
count
==
0
)
{
return
false
;
return
R
.
ok
(
1
,
false
)
;
}
}
return
true
;
return
R
.
ok
(
0
,
true
)
;
}
}
/**
/**
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/UserLoginServiceImpl.java
View file @
214d9a63
...
@@ -3,8 +3,10 @@ package cn.wisenergy.service.app.impl;
...
@@ -3,8 +3,10 @@ package cn.wisenergy.service.app.impl;
import
cn.wisenergy.common.utils.Md5Util
;
import
cn.wisenergy.common.utils.Md5Util
;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.mapper.UsersMapper
;
import
cn.wisenergy.mapper.UsersMapper
;
import
cn.wisenergy.model.app.LoginRecord
;
import
cn.wisenergy.model.app.UserInfo
;
import
cn.wisenergy.model.app.UserInfo
;
import
cn.wisenergy.model.vo.UserInfoVo
;
import
cn.wisenergy.model.vo.UserInfoVo
;
import
cn.wisenergy.model.vo.UserRegisterVo
;
import
cn.wisenergy.service.app.UserLoginService
;
import
cn.wisenergy.service.app.UserLoginService
;
import
cn.wisenergy.service.common.Common
;
import
cn.wisenergy.service.common.Common
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
@@ -27,12 +29,16 @@ public class UserLoginServiceImpl extends ServiceImpl<UsersMapper, UserInfo> imp
...
@@ -27,12 +29,16 @@ public class UserLoginServiceImpl extends ServiceImpl<UsersMapper, UserInfo> imp
private
UsersMapper
usersMapper
;
private
UsersMapper
usersMapper
;
@Override
@Override
public
R
<
Boolean
>
register
(
String
phone
,
String
password
)
{
public
R
<
Boolean
>
register
(
UserRegisterVo
userVo
)
{
log
.
info
(
"volunteer-service[]UserLoginServiceImpl[]register[]input.param.phone,password:"
+
phone
,
password
);
log
.
info
(
"volunteer-service[]UserLoginServiceImpl[]register[]input.param.userVo:"
+
userVo
);
if
(
StringUtils
.
isBlank
(
phone
)
||
StringUtils
.
isBlank
(
password
))
{
if
(
null
==
userVo
||
StringUtils
.
isBlank
(
userVo
.
getPhone
())
||
StringUtils
.
isBlank
(
userVo
.
getPassword
()))
{
return
R
.
error
(
"入参为空!"
);
return
R
.
error
(
"入参为空!"
);
}
}
String
phone
=
userVo
.
getPhone
();
String
password
=
userVo
.
getPassword
();
//1.检查号码是否重复
//1.检查号码是否重复
Integer
userId
=
null
;
Integer
userId
=
null
;
Boolean
bool
=
checkPhone
(
phone
,
userId
);
Boolean
bool
=
checkPhone
(
phone
,
userId
);
...
@@ -53,6 +59,10 @@ public class UserLoginServiceImpl extends ServiceImpl<UsersMapper, UserInfo> imp
...
@@ -53,6 +59,10 @@ public class UserLoginServiceImpl extends ServiceImpl<UsersMapper, UserInfo> imp
return
R
.
ok
(
1
,
false
);
return
R
.
ok
(
1
,
false
);
}
}
//4、保存操作记录
LoginRecord
loginRecord
=
new
LoginRecord
();
loginRecord
.
setType
(
1
);
return
R
.
ok
(
0
,
true
);
return
R
.
ok
(
0
,
true
);
}
}
...
@@ -154,4 +164,7 @@ public class UserLoginServiceImpl extends ServiceImpl<UsersMapper, UserInfo> imp
...
@@ -154,4 +164,7 @@ public class UserLoginServiceImpl extends ServiceImpl<UsersMapper, UserInfo> imp
return
true
;
return
true
;
}
}
}
}
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/PayRecordController.java
View file @
214d9a63
package
cn
.
wisenergy
.
web
.
admin
.
controller
.
app
;
package
cn
.
wisenergy
.
web
.
admin
.
controller
.
app
;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.model.app.PayRecord
;
import
cn.wisenergy.model.app.Volunteer
;
import
cn.wisenergy.model.vo.PayRecordQueryVo
;
import
cn.wisenergy.model.vo.PayRecordShowVo
;
import
cn.wisenergy.service.app.PayRecordService
;
import
com.github.pagehelper.PageInfo
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
/**
* @ Description: PC-我的账户
* @ Description: PC-我的账户
...
@@ -15,4 +28,32 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -15,4 +28,32 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping
(
"/pay/record"
)
@RequestMapping
(
"/pay/record"
)
@Slf4j
@Slf4j
public
class
PayRecordController
{
public
class
PayRecordController
{
@Autowired
private
PayRecordService
payRecordService
;
@ApiOperation
(
value
=
"保存充值记录"
,
notes
=
"保存充值记录"
,
httpMethod
=
"POST"
)
@ApiImplicitParam
(
name
=
"payRecord"
,
value
=
"充值记录信息"
,
dataType
=
"PayRecord"
)
@PostMapping
(
"/add"
)
public
R
<
Boolean
>
add
(
@RequestBody
PayRecord
payRecord
)
{
log
.
info
(
"volunteer-service[]PayRecordController[]add[]input.param.payRecord:"
+
payRecord
);
if
(
null
==
payRecord
)
{
return
R
.
error
(
"入参为空!"
);
}
return
payRecordService
.
add
(
payRecord
);
}
@ApiOperation
(
value
=
"获取充值记录列表"
,
notes
=
"获取充值记录列表"
,
httpMethod
=
"GET"
)
@ApiImplicitParam
(
name
=
"payVo"
,
value
=
"充值记录查询参数"
,
dataType
=
"PayRecord"
)
@GetMapping
(
"/getList"
)
public
R
<
PageInfo
<
PayRecordShowVo
>>
getList
(
@RequestBody
PayRecordQueryVo
payVo
)
{
log
.
info
(
"volunteer-service[]PayRecordController[]getList[]input.param.payVo:"
+
payVo
);
if
(
null
==
payVo
)
{
return
R
.
error
(
"入参为空!"
);
}
return
payRecordService
.
getList
(
payVo
);
}
}
}
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/SchemeController.java
View file @
214d9a63
package
cn
.
wisenergy
.
web
.
admin
.
controller
.
app
;
package
cn
.
wisenergy
.
web
.
admin
.
controller
.
app
;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.model.app.SchemeQueryRecord
;
import
cn.wisenergy.model.vo.SchemeQueryVo
;
import
cn.wisenergy.model.vo.SchemeRecordQueryVo
;
import
cn.wisenergy.model.vo.VolunteerVo
;
import
cn.wisenergy.service.app.SchemeService
;
import
com.github.pagehelper.PageInfo
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
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.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
@@ -15,4 +27,20 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -15,4 +27,20 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping
(
"/scheme"
)
@RequestMapping
(
"/scheme"
)
@Slf4j
@Slf4j
public
class
SchemeController
{
public
class
SchemeController
{
@Autowired
private
SchemeService
schemeService
;
@ApiOperation
(
value
=
"获取志愿列表"
,
notes
=
"获取志愿列表"
,
httpMethod
=
"GET"
)
@ApiImplicitParam
(
name
=
"queryVo"
,
value
=
"志愿查询参数"
,
dataType
=
"SchemeQueryVo"
)
@GetMapping
(
"/getList"
)
public
R
<
VolunteerVo
>
getList
(
@RequestBody
SchemeQueryVo
queryVo
)
{
log
.
info
(
"volunteer-service[]SchemeController[]getList[]input.param.queryVo:"
+
queryVo
);
if
(
null
==
queryVo
)
{
return
R
.
error
(
"入参为空!"
);
}
return
schemeService
.
getList
(
queryVo
);
}
}
}
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/SchemeRecordController.java
View file @
214d9a63
package
cn
.
wisenergy
.
web
.
admin
.
controller
.
app
;
package
cn
.
wisenergy
.
web
.
admin
.
controller
.
app
;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.model.app.PayRecord
;
import
cn.wisenergy.model.app.SchemeQueryRecord
;
import
cn.wisenergy.model.app.Volunteer
;
import
cn.wisenergy.model.vo.PayRecordQueryVo
;
import
cn.wisenergy.model.vo.PayRecordShowVo
;
import
cn.wisenergy.model.vo.SchemeRecordQueryVo
;
import
cn.wisenergy.service.app.SchemeRecordService
;
import
com.github.pagehelper.PageInfo
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
/**
* @ Description: PC-我的方案
* @ Description: PC-我的方案
...
@@ -15,4 +29,46 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -15,4 +29,46 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping
(
"/scheme/record"
)
@RequestMapping
(
"/scheme/record"
)
@Slf4j
@Slf4j
public
class
SchemeRecordController
{
public
class
SchemeRecordController
{
@Autowired
private
SchemeRecordService
schemeRecordService
;
@ApiOperation
(
value
=
"保存方案查询记录"
,
notes
=
"保存方案查询记录"
,
httpMethod
=
"POST"
)
@ApiImplicitParam
(
name
=
"query"
,
value
=
"方案查询信息"
,
dataType
=
"SchemeQueryRecord"
)
@PostMapping
(
"/add"
)
public
R
<
SchemeQueryRecord
>
add
(
@RequestBody
SchemeQueryRecord
query
)
{
log
.
info
(
"volunteer-service[]SchemeRecordController[]add[]input.param.query:"
+
query
);
if
(
null
==
query
)
{
return
R
.
error
(
"入参为空!"
);
}
return
schemeRecordService
.
add
(
query
);
}
@ApiOperation
(
value
=
"获取方案查询记录列表"
,
notes
=
"获取方案查询记录列表"
,
httpMethod
=
"GET"
)
@ApiImplicitParam
(
name
=
"queryVo"
,
value
=
"方案查询记录参数"
,
dataType
=
"SchemeRecordQueryVo"
)
@GetMapping
(
"/getList"
)
public
R
<
PageInfo
<
SchemeQueryRecord
>>
getList
(
SchemeRecordQueryVo
queryVo
)
{
log
.
info
(
"volunteer-service[]SchemeRecordController[]getList[]input.param.queryVo:"
+
queryVo
);
if
(
null
==
queryVo
)
{
return
R
.
error
(
"入参为空!"
);
}
return
schemeRecordService
.
getList
(
queryVo
);
}
@ApiOperation
(
value
=
"获取充值记录志愿列表"
,
notes
=
"获取充值记录志愿列表"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"userId"
,
value
=
"用户id"
,
dataType
=
"int"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"recordId"
,
value
=
"记录id"
,
dataType
=
"int"
,
required
=
true
)
})
@GetMapping
(
"/getVolunteerList"
)
public
R
<
List
<
Volunteer
>>
getVolunteerList
(
Integer
userId
,
Integer
recordId
)
{
log
.
info
(
"volunteer-service[]SchemeRecordController[]getVolunteerList[]input.param.userId:{},recordId:"
+
userId
,
recordId
);
if
(
null
==
userId
||
null
==
recordId
)
{
return
R
.
error
(
"入参为空!"
);
}
return
schemeRecordService
.
getVolunteerList
(
userId
,
recordId
);
}
}
}
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/UserController.java
View file @
214d9a63
...
@@ -30,7 +30,7 @@ public class UserController {
...
@@ -30,7 +30,7 @@ public class UserController {
private
UserService
userService
;
private
UserService
userService
;
@ApiOperation
(
value
=
"用户管理"
,
notes
=
"用户管理"
,
httpMethod
=
"POST"
)
@ApiOperation
(
value
=
"用户管理"
,
notes
=
"用户管理"
,
httpMethod
=
"POST"
)
@ApiImplicitParam
(
name
=
"queryVo"
)
@ApiImplicitParam
(
name
=
"queryVo"
,
value
=
"用户信息"
,
dataType
=
"UserQueryVo"
)
@PostMapping
(
"/manage"
)
@PostMapping
(
"/manage"
)
public
R
manageUser
(
UserQueryVo
queryVo
){
public
R
manageUser
(
UserQueryVo
queryVo
){
log
.
info
(
"UserController[].manageUser[].input.param:queryV0:{}"
+
queryVo
);
log
.
info
(
"UserController[].manageUser[].input.param:queryV0:{}"
+
queryVo
);
...
...
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/UserLimitController.java
View file @
214d9a63
package
cn
.
wisenergy
.
web
.
admin
.
controller
.
app
;
package
cn
.
wisenergy
.
web
.
admin
.
controller
.
app
;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.model.app.UserLimit
;
import
cn.wisenergy.model.app.Volunteer
;
import
cn.wisenergy.service.app.UserLimitService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
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.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
/**
* @ Description: PC-用户查询次数
* @ Description: PC-用户查询次数
* @ Author : 86187
* @ Author : 86187
...
@@ -15,4 +26,19 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -15,4 +26,19 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping
(
"/user/limit"
)
@RequestMapping
(
"/user/limit"
)
@Slf4j
@Slf4j
public
class
UserLimitController
{
public
class
UserLimitController
{
@Autowired
private
UserLimitService
userLimitService
;
@ApiOperation
(
value
=
"获取用户查询次数"
,
notes
=
"获取用户查询次数"
,
httpMethod
=
"GET"
)
@ApiImplicitParam
(
name
=
"userId"
,
value
=
"用户id"
,
dataType
=
"int"
,
required
=
true
)
@GetMapping
(
"/getByUserId"
)
public
R
<
UserLimit
>
getByUserId
(
Integer
userId
)
{
log
.
info
(
"volunteer-service[]UserLimitController[]getVolunteerList[]input.param.userId:"
+
userId
);
if
(
null
==
userId
)
{
return
R
.
error
(
"入参为空!"
);
}
return
userLimitService
.
getByUserId
(
userId
);
}
}
}
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/UserLongController.java
View file @
214d9a63
...
@@ -2,13 +2,16 @@ package cn.wisenergy.web.admin.controller.app;
...
@@ -2,13 +2,16 @@ package cn.wisenergy.web.admin.controller.app;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.common.utils.R
;
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
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
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.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
@@ -26,6 +29,18 @@ public class UserLongController {
...
@@ -26,6 +29,18 @@ public class UserLongController {
@Autowired
@Autowired
private
UserLoginService
userLoginService
;
private
UserLoginService
userLoginService
;
@ApiOperation
(
value
=
"用户注册"
,
notes
=
"用户注册"
,
httpMethod
=
"POST"
)
@ApiImplicitParam
(
name
=
"userVo"
,
value
=
"用户信息"
,
dataType
=
"UserRegisterVo"
)
@PostMapping
(
"/register"
)
public
R
<
Boolean
>
resetPassword
(
@RequestBody
UserRegisterVo
userVo
)
{
log
.
info
(
"volunteer-service[]UserLongController[]resetPassword[]input.param.userVo:"
+
userVo
);
if
(
null
==
userVo
||
StringUtils
.
isBlank
(
userVo
.
getPhone
())
||
StringUtils
.
isBlank
(
userVo
.
getPassword
()))
{
return
R
.
error
(
"入参不能为空!"
);
}
return
userLoginService
.
register
(
userVo
);
}
@ApiOperation
(
value
=
"重置密码"
,
notes
=
"重置密码"
,
httpMethod
=
"POST"
)
@ApiOperation
(
value
=
"重置密码"
,
notes
=
"重置密码"
,
httpMethod
=
"POST"
)
@PostMapping
(
"/resetPassword"
)
@PostMapping
(
"/resetPassword"
)
public
R
<
Boolean
>
resetPassword
(
Integer
userId
)
{
public
R
<
Boolean
>
resetPassword
(
Integer
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