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
c04378a7
Commit
c04378a7
authored
Jan 14, 2021
by
licc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
表结构修改调整
parent
752aff90
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
59 additions
and
29 deletions
+59
-29
UsersMapper.xml
wisenergy-mapper/src/main/resources/mapper/UsersMapper.xml
+4
-4
UserInfo.java
...-model/src/main/java/cn/wisenergy/model/app/UserInfo.java
+9
-12
SchemeServiceImpl.java
...java/cn/wisenergy/service/app/impl/SchemeServiceImpl.java
+1
-1
UserLoginServiceImpl.java
...a/cn/wisenergy/service/app/impl/UserLoginServiceImpl.java
+18
-1
UserServiceImpl.java
...n/java/cn/wisenergy/service/app/impl/UserServiceImpl.java
+2
-2
Common.java
...ice/src/main/java/cn/wisenergy/service/common/Common.java
+2
-7
UserController.java
...cn/wisenergy/web/admin/controller/app/UserController.java
+3
-2
UserLongController.java
...isenergy/web/admin/controller/app/UserLongController.java
+20
-0
No files found.
wisenergy-mapper/src/main/resources/mapper/UsersMapper.xml
View file @
c04378a7
...
...
@@ -10,7 +10,7 @@
<result
column=
"head_image"
property=
"headImage"
/>
<result
column=
"sex"
property=
"sex"
/>
<result
column=
"school"
property=
"school"
/>
<result
column=
"
student_type"
property=
"student
Type"
/>
<result
column=
"
exam_type"
property=
"exam
Type"
/>
<result
column=
"source"
property=
"source"
/>
<result
column=
"is_delete"
property=
"isDelete"
/>
<result
column=
"create_time"
property=
"createTime"
/>
...
...
@@ -27,11 +27,11 @@
</sql>
<sql
id=
"cols_exclude_id"
>
user_name,password, phone,head_image,sex,school,
student
_type,is_delete,create_time,update_time
user_name,password, phone,head_image,sex,school,
exam
_type,is_delete,create_time,update_time
</sql>
<sql
id=
"vals"
>
#{userName},#{password},#{phone},#{headImage},#{sex},#{school},#{
student
Type}, #{source},
#{userName},#{password},#{phone},#{headImage},#{sex},#{school},#{
exam
Type}, #{source},
#{isDelete},now(),now()
</sql>
...
...
@@ -42,7 +42,7 @@
<if
test=
"headImage != null"
>
head_image =#{headImage},
</if>
<if
test=
"sex != null"
>
sex =#{sex},
</if>
<if
test=
"school != null"
>
school =#{school},
</if>
<if
test=
"
studentType != null"
>
inspector_name = #{student
Type},
</if>
<if
test=
"
examType != null"
>
exam_type = #{exam
Type},
</if>
<if
test=
"source != null"
>
source = #{source},
</if>
<if
test=
"isDelete != null"
>
is_delete = #{isDelete},
</if>
update_time =now()
...
...
wisenergy-model/src/main/java/cn/wisenergy/model/app/UserInfo.java
View file @
c04378a7
package
cn
.
wisenergy
.
model
.
app
;
import
cn.wisenergy.model.common.BaseEntity
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -16,6 +17,7 @@ import java.util.Date;
*/
@Data
@ApiModel
(
value
=
"AccountUsers"
)
@TableName
(
"user"
)
public
class
UserInfo
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
2525339404301884673L
;
...
...
@@ -37,6 +39,12 @@ public class UserInfo extends BaseEntity implements Serializable {
@ApiModelProperty
(
name
=
"password"
,
value
=
"用户密码"
)
private
String
password
;
/**
* 来源 1:pc 2:移动端
*/
@ApiModelProperty
(
name
=
"来源 1:pc 2:移动端"
,
value
=
"source"
)
private
Integer
source
;
/**
* 电话号码
*/
...
...
@@ -65,19 +73,8 @@ public class UserInfo extends BaseEntity implements Serializable {
* 学生类型
*/
@ApiModelProperty
(
name
=
"examType"
,
value
=
"考生类型 1:文化课考生 2:美术生 3:体育生 4:文学编导考生"
)
private
Integer
studentType
;
/**
* 用户剩余查询次数
*/
@ApiModelProperty
(
name
=
"queryLimit"
,
value
=
"用户剩余查询次数"
)
private
Integer
queryLimit
;
private
Integer
examType
;
/**
* 用户充值总额
*/
@ApiModelProperty
(
name
=
"moneyAmount"
,
value
=
"充值总额"
)
private
String
moneyAmount
;
/**
* 是否删除
*/
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/SchemeServiceImpl.java
View file @
c04378a7
...
...
@@ -66,7 +66,7 @@ public class SchemeServiceImpl extends ServiceImpl<SchemeMapper, SchemeInfo> imp
//3、保存方案查询记录
SchemeQueryRecord
schemeQueryRecord
=
new
SchemeQueryRecord
();
schemeQueryRecord
.
setMajorName
(
""
);
schemeQueryRecord
.
setStudentType
(
userInfo
.
get
Student
Type
());
schemeQueryRecord
.
setStudentType
(
userInfo
.
get
Exam
Type
());
schemeQueryRecord
.
setUserId
(
userInfo
.
getId
());
schemeQueryRecord
.
setIsDelete
(
0
);
double
score
=
Double
.
parseDouble
(
queryVo
.
getCultureGrade
())
+
Double
.
parseDouble
(
queryVo
.
getMajorGrade
());
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/UserLoginServiceImpl.java
View file @
c04378a7
...
...
@@ -6,6 +6,7 @@ import cn.wisenergy.mapper.UsersMapper;
import
cn.wisenergy.model.app.UserInfo
;
import
cn.wisenergy.model.vo.UserInfoVo
;
import
cn.wisenergy.service.app.UserLoginService
;
import
cn.wisenergy.service.common.Common
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
...
...
@@ -104,7 +105,23 @@ public class UserLoginServiceImpl extends ServiceImpl<UsersMapper, UserInfo> imp
@Override
public
R
<
Boolean
>
resetPassword
(
Integer
userId
)
{
return
null
;
log
.
info
(
"volunteer-service[]UserLoginServiceImpl[]resetPassword[]input.param.userId:"
+
userId
);
if
(
null
==
userId
)
{
return
R
.
error
(
"入参为空!"
);
}
//获取用户信息
UserInfo
userInfo
=
usersMapper
.
selectById
(
userId
);
//加密重置密码
String
password
=
Md5Util
.
digestMD5
(
Common
.
RESET_PASSWORD_VALUE
);
userInfo
.
setPassword
(
password
);
int
count
=
usersMapper
.
edit
(
userInfo
);
if
(
count
==
0
)
{
return
R
.
ok
(
1
,
false
);
}
return
R
.
ok
(
0
,
true
);
}
@Override
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/UserServiceImpl.java
View file @
c04378a7
...
...
@@ -98,7 +98,7 @@ public class UserServiceImpl extends ServiceImpl<UsersMapper, UserInfo> implemen
//2、要提交的用户信息
user
.
setSchool
(
userInfo
.
getSchool
());
user
.
setSex
(
userInfo
.
getSex
());
user
.
set
Student
Type
(
userInfo
.
getStudentType
());
user
.
set
Exam
Type
(
userInfo
.
getStudentType
());
user
.
setUserName
(
userInfo
.
getUserName
());
user
.
setIsDelete
(
0
);
...
...
@@ -149,7 +149,7 @@ public class UserServiceImpl extends ServiceImpl<UsersMapper, UserInfo> implemen
userShowVo
.
setId
(
userInfo
.
getId
());
userShowVo
.
setSchool
(
userInfo
.
getSchool
());
userShowVo
.
setSex
(
userInfo
.
getSex
());
userShowVo
.
setStudentType
(
userInfo
.
get
Student
Type
());
userShowVo
.
setStudentType
(
userInfo
.
get
Exam
Type
());
userShowVo
.
setUserName
(
userInfo
.
getUserName
());
//获取成绩信息
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/common/Common.java
View file @
c04378a7
...
...
@@ -8,14 +8,9 @@ package cn.wisenergy.service.common;
public
class
Common
{
/**
*
注册标识
*
重置密码
*/
public
static
final
String
RE
GISTER
=
"register
"
;
public
static
final
String
RE
SET_PASSWORD_VALUE
=
"123456
"
;
/**
* 编辑标识
*/
public
static
final
String
LOGIN_EDIT
=
"login_edit"
;
}
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/UserController.java
View file @
c04378a7
...
...
@@ -11,6 +11,7 @@ import io.swagger.annotations.ApiOperation;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
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.RestController
;
...
...
@@ -32,8 +33,8 @@ public class UserController {
@ApiOperation
(
value
=
"用户管理"
,
notes
=
"用户管理"
,
httpMethod
=
"POST"
)
@ApiImplicitParam
(
name
=
"queryVo"
)
@PostMapping
(
"/manage"
)
public
R
manageUser
(
UserQueryVo
queryVo
){
log
.
info
(
"UserController[].manageUser[].input.param:queryV0:
{}
"
+
queryVo
);
public
R
manageUser
(
@RequestBody
UserQueryVo
queryVo
){
log
.
info
(
"UserController[].manageUser[].input.param:queryV0:"
+
queryVo
);
//查询用户信息
R
<
PageInfo
<
UserInfoDto
>>
userList
=
userService
.
getUserList
(
queryVo
);
//返回数据
...
...
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/UserLongController.java
View file @
c04378a7
package
cn
.
wisenergy
.
web
.
admin
.
controller
.
app
;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.service.app.UserLoginService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -16,4 +22,18 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping
(
"/user/login"
)
@Slf4j
public
class
UserLongController
{
@Autowired
private
UserLoginService
userLoginService
;
@ApiOperation
(
value
=
"重置密码"
,
notes
=
"重置密码"
,
httpMethod
=
"POST"
)
@PostMapping
(
"/resetPassword"
)
public
R
<
Boolean
>
resetPassword
(
Integer
userId
)
{
log
.
info
(
"volunteer-service[]UserLongController[]resetPassword[]input.param.userId:"
+
userId
);
if
(
null
==
userId
)
{
return
R
.
error
(
"入参不能为空!"
);
}
return
userLoginService
.
resetPassword
(
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