Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gdtel-gztel-school-center
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴学德
gdtel-gztel-school-center
Commits
4d3d3e6e
Commit
4d3d3e6e
authored
Dec 22, 2021
by
伍思炜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码合并
parent
773cc4da
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
+16
-6
common/src/main/resources/com/winsun/mapper/mapping/HhrUserMapper.xml
+10
-0
core-service/src/main/java/com/winsun/item/modular/system/controller/LoginPwdController.java
+6
-6
No files found.
common/src/main/resources/com/winsun/mapper/mapping/HhrUserMapper.xml
View file @
4d3d3e6e
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.winsun.mapper.HhrUserMapper"
>
<mapper
namespace=
"com.winsun.mapper.HhrUserMapper"
>
<update
id=
"updateByIcCard"
>
update hhr_user set account = #{account} where id_card = #{idCard}
</update>
<select
id=
"statisticAllOrderNum"
resultType=
"java.util.HashMap"
>
<select
id=
"statisticAllOrderNum"
resultType=
"java.util.HashMap"
>
SELECT
SELECT
...
@@ -112,4 +115,10 @@
...
@@ -112,4 +115,10 @@
WHERE
WHERE
hus.user_id = #{userId}
hus.user_id = #{userId}
</select>
</select>
<select
id=
"selectByIcCard"
resultType=
"com.winsun.bean.HhrUser"
>
select * from hhr_user where id_card = #{idCard}
</select>
<select
id=
"selectByUser"
resultType=
"java.util.Map"
>
select hu.account as account, hu.id_card idCard, su.name as name from hhr_user hu join sys_user su on hu.id = su.id where su.name = #{name}
</select>
</mapper>
</mapper>
\ No newline at end of file
core-service/src/main/java/com/winsun/item/modular/system/controller/LoginPwdController.java
View file @
4d3d3e6e
...
@@ -369,9 +369,9 @@ public class LoginPwdController extends BaseController {
...
@@ -369,9 +369,9 @@ public class LoginPwdController extends BaseController {
verificationCode
=
String
.
valueOf
((
int
)
((
RandomUtil
.
getSecrityRandom
()
*
9
+
1
)
*
100000
));
verificationCode
=
String
.
valueOf
((
int
)
((
RandomUtil
.
getSecrityRandom
()
*
9
+
1
)
*
100000
));
Long
expire
=
stringRedisTemplate
.
getExpire
(
code
);
Boolean
expire
=
stringRedisTemplate
.
hasKey
(
code
);
//验证码 有效时间是五分钟倒计时
//验证码 有效时间是五分钟倒计时
if
(
expire
>
(
60
*
4
)
)
{
if
(
expire
)
{
return
ResponseEntity
.
newJSON
(
"code"
,
400
,
"message"
,
"请勿频繁发送手机验证码操作!"
);
return
ResponseEntity
.
newJSON
(
"code"
,
400
,
"message"
,
"请勿频繁发送手机验证码操作!"
);
}
}
stringRedisTemplate
.
opsForValue
().
set
(
code
,
verificationCode
,
CODETIME
,
TimeUnit
.
MILLISECONDS
);
stringRedisTemplate
.
opsForValue
().
set
(
code
,
verificationCode
,
CODETIME
,
TimeUnit
.
MILLISECONDS
);
...
@@ -410,16 +410,15 @@ public class LoginPwdController extends BaseController {
...
@@ -410,16 +410,15 @@ public class LoginPwdController extends BaseController {
@RequestParam
(
value
=
"newPwd"
)
String
newPwd
,
@RequestParam
(
value
=
"rePwd"
)
String
rePwd
)
{
@RequestParam
(
value
=
"newPwd"
)
String
newPwd
,
@RequestParam
(
value
=
"rePwd"
)
String
rePwd
)
{
String
code
=
stringRedisTemplate
.
opsForValue
().
get
(
account
+
CODE
);
String
code
=
stringRedisTemplate
.
opsForValue
().
get
(
account
+
CODE
);
if
(
StringUtils
.
isBlank
(
code
))
{
if
(
StringUtils
.
isBlank
(
code
))
{
return
ResponseEntity
.
newJSON
(
"code"
,
400
,
"data"
,
"
验证码错误
!"
);
return
ResponseEntity
.
newJSON
(
"code"
,
400
,
"data"
,
"
重新获取验证码
!"
);
}
}
String
errcount
=
stringRedisTemplate
.
opsForValue
().
get
(
ERRCODENAME
+
account
);
String
errcount
=
stringRedisTemplate
.
opsForValue
().
get
(
ERRCODENAME
+
account
);
if
(
StringUtils
.
isNotBlank
(
errcount
))
{
if
(
StringUtils
.
isNotBlank
(
errcount
))
{
if
(
Integer
.
valueOf
(
errcount
)
==
ERRACCOUNT
)
{
if
(
Integer
.
valueOf
(
errcount
)
==
ERRACCOUNT
)
{
Long
expire
=
stringRedisTemplate
.
getExpire
(
account
+
CODE
);
Boolean
expire
=
stringRedisTemplate
.
hasKey
(
account
+
CODE
);
if
(
expire
>
(
60
*
4
)
)
{
if
(
expire
)
{
return
ResponseEntity
.
newJSON
(
"code"
,
500
,
"data"
,
"频繁操作"
);
return
ResponseEntity
.
newJSON
(
"code"
,
500
,
"data"
,
"频繁操作"
);
}
else
{
}
else
{
stringRedisTemplate
.
delete
(
account
+
CODE
);
stringRedisTemplate
.
delete
(
ERRCODENAME
+
account
);
stringRedisTemplate
.
delete
(
ERRCODENAME
+
account
);
return
ResponseEntity
.
newJSON
(
"code"
,
500
,
"data"
,
"重新获取验证码"
);
return
ResponseEntity
.
newJSON
(
"code"
,
500
,
"data"
,
"重新获取验证码"
);
}
}
...
@@ -490,6 +489,7 @@ public class LoginPwdController extends BaseController {
...
@@ -490,6 +489,7 @@ public class LoginPwdController extends BaseController {
}
}
Integer
integer
=
sysUserMapper
.
updateForSet
(
com
.
winsun
.
auth
.
core
.
util
.
MyBatisPlusUpdateUtils
.
toUpdateSet
(
dataMapping
),
wrapper
);
Integer
integer
=
sysUserMapper
.
updateForSet
(
com
.
winsun
.
auth
.
core
.
util
.
MyBatisPlusUpdateUtils
.
toUpdateSet
(
dataMapping
),
wrapper
);
if
(
integer
>
0
)
{
if
(
integer
>
0
)
{
stringRedisTemplate
.
delete
(
account
+
CODE
);
return
ResponseEntity
.
newJSON
(
"code"
,
200
,
"data"
,
"修改成功!"
);
return
ResponseEntity
.
newJSON
(
"code"
,
200
,
"data"
,
"修改成功!"
);
}
}
return
ResponseEntity
.
newJSON
(
"code"
,
300
,
"data"
,
"修改失败!"
);
return
ResponseEntity
.
newJSON
(
"code"
,
300
,
"data"
,
"修改失败!"
);
...
...
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