Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1-office-web-sit
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴迪
gs1-office-web-sit
Commits
f531085f
Commit
f531085f
authored
Dec 21, 2024
by
吴迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
注释登录相关代码
parent
ce4db02b
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
198 additions
and
222 deletions
+198
-222
LogLoginController.java
.../office/modules/manage/controller/LogLoginController.java
+28
-29
MemberController.java
...io/office/modules/manage/controller/MemberController.java
+68
-75
TimescodeFindpsController.java
.../modules/manage/controller/TimescodeFindpsController.java
+23
-30
TimescodeRegiController.java
...ce/modules/manage/controller/TimescodeRegiController.java
+13
-22
TycpdmFirmChangeController.java
...modules/manage/controller/TycpdmFirmChangeController.java
+16
-16
TycpdmFirmController.java
...ffice/modules/manage/controller/TycpdmFirmController.java
+0
-0
UserFunctionBindingController.java
...ules/manage/controller/UserFunctionBindingController.java
+50
-50
No files found.
src/main/java/io/office/modules/manage/controller/LogLoginController.java
View file @
f531085f
...
...
@@ -5,7 +5,6 @@ import io.office.common.utils.R;
import
io.office.modules.app.annotation.Login
;
import
io.office.modules.manage.entity.LogLoginEntity
;
import
io.office.modules.manage.service.LogLoginService
;
import
io.office.modules.manage.utils.PasswordValidator
;
import
io.office.modules.manage.vo.request.DomesticCodeVo
;
import
io.office.modules.sys.service.SysCaptchaService
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -35,34 +34,34 @@ public class LogLoginController {
private
SysCaptchaService
sysCaptchaService
;
/**
* 用户登录
*/
@RequestMapping
(
"/authApi/login"
)
@Login
// @RequiresPermissions("manage:member:list")
public
R
login
(
@RequestBody
Map
<
String
,
Object
>
params
,
HttpServletRequest
request
,
HttpServletResponse
response
){
DomesticCodeVo
domesticCodeVo
=
new
DomesticCodeVo
(
params
.
get
(
"uuid"
).
toString
(),
params
.
get
(
"captcha"
).
toString
());
boolean
captcha
=
sysCaptchaService
.
validate
(
domesticCodeVo
.
getUuid
(),
domesticCodeVo
.
getCaptcha
());
if
(!
captcha
){
return
R
.
error
(
"验证码不正确"
);
}
return
R
.
ok
().
put
(
"data"
,
logLoginService
.
loginNew2024
(
params
,
request
,
response
));
}
@RequestMapping
(
"/authApi/checkPassWord"
)
@Login
// @RequiresPermissions("manage:member:list")
public
R
checkPassWord
(
@RequestBody
Map
<
String
,
Object
>
params
,
HttpServletRequest
request
,
HttpServletResponse
response
){
String
passWord
=
params
.
get
(
"passWord"
).
toString
();
if
(!
PasswordValidator
.
isValidPassword
(
passWord
))
{
return
R
.
error
(
"密码错误"
);
}
else
{
return
R
.
ok
();
}
}
/
//
**
//
* 用户登录
//
*/
//
@RequestMapping("/authApi/login")
//
@Login
//
//
@RequiresPermissions("manage:member:list")
//
public R login(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
//
DomesticCodeVo domesticCodeVo = new DomesticCodeVo(params.get("uuid").toString(),params.get("captcha").toString());
//
boolean captcha = sysCaptchaService.validate(domesticCodeVo.getUuid(), domesticCodeVo.getCaptcha());
//
if(!captcha){
//
return R.error("验证码不正确");
//
}
//
return R.ok().put("data",logLoginService.loginNew2024(params,request,response));
//
}
//
//
@RequestMapping("/authApi/checkPassWord")
//
@Login
//
//
@RequiresPermissions("manage:member:list")
//
public R checkPassWord(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
//
//
String passWord = params.get("passWord").toString();
//
if(!PasswordValidator.isValidPassword(passWord)) {
//
return R.error("密码错误");
//
} else{
//
return R.ok();
//
}
//
//
}
...
...
src/main/java/io/office/modules/manage/controller/MemberController.java
View file @
f531085f
package
io
.
office
.
modules
.
manage
.
controller
;
import
java.util.Arrays
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
io.office.modules.app.annotation.Login
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.R
;
import
io.office.modules.manage.entity.MemberEntity
;
import
io.office.modules.manage.service.MemberService
;
import
io.office.modules.sys.controller.AbstractController
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
io.office.modules.manage.entity.MemberEntity
;
import
io.office.modules.manage.service.MemberService
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.R
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.Arrays
;
import
java.util.Map
;
/**
...
...
@@ -38,44 +31,44 @@ public class MemberController extends AbstractController {
/**
* 用户注册
*/
@Login
@RequestMapping
(
"/api/userRegistered"
)
// @RequiresPermissions("manage:member:list")
public
R
userRegistered
(
@RequestBody
Map
<
String
,
Object
>
params
,
HttpServletRequest
request
,
HttpServletResponse
response
){
memberService
.
userRegistered
(
params
,
request
,
response
);
return
R
.
ok
();
}
//
@Login
//
@RequestMapping("/api/userRegistered")
//
//
@RequiresPermissions("manage:member:list")
//
public R userRegistered(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
//
memberService.userRegistered(params,request,response);
//
return R.ok();
//
}
/**
* 用户信息管理-修改登录密码
*/
@RequestMapping
(
"/authApi/updatePass"
)
// @RequiresPermissions("manage:member:list")
public
R
updatePass
(
@RequestBody
Map
<
String
,
Object
>
params
){
memberService
.
updatePass
(
params
);
return
R
.
ok
();
}
//
@RequestMapping("/authApi/updatePass")
//
//
@RequiresPermissions("manage:member:list")
//
public R updatePass(@RequestBody Map<String, Object> params){
//
memberService.updatePass(params);
//
return R.ok();
//
}
/**
* 用户信息管理-修改手机号码
*/
@RequestMapping
(
"/authApi/updatephone"
)
// @RequiresPermissions("manage:member:list")
public
R
updatephone
(
@RequestBody
Map
<
String
,
Object
>
params
,
HttpServletRequest
request
,
HttpServletResponse
response
){
memberService
.
updatephone
(
params
,
request
,
response
);
return
R
.
ok
();
}
//
@RequestMapping("/authApi/updatephone")
//
//
@RequiresPermissions("manage:member:list")
//
public R updatephone(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
//
memberService.updatephone(params,request,response);
//
return R.ok();
//
}
/**
* 获取验证码
*/
@RequestMapping
(
"/api/getVerificationCode"
)
// @RequiresPermissions("manage:timescoderegi:list")
@Login
public
R
getVerificationCode
(
@RequestBody
Map
<
String
,
Object
>
params
,
HttpServletRequest
request
,
HttpServletResponse
response
){
String
msg
=
memberService
.
getVerificationCode
(
params
,
request
,
response
);
return
R
.
ok
();
}
//
@RequestMapping("/api/getVerificationCode")
//
//
@RequiresPermissions("manage:timescoderegi:list")
//
@Login
//
public R getVerificationCode(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
//
String msg = memberService.getVerificationCode(params,request,response);
//
return R.ok();
//
}
/**
* 列表
...
...
@@ -89,20 +82,20 @@ public class MemberController extends AbstractController {
}
/**
* 信息
*/
@RequestMapping
(
"/authApi/info"
)
// @RequiresPermissions("manage:member:info")
public
R
info
(){
Long
memberUserId
=
getMemberUserId
();
/*
QueryWrapper<MemberEntity> queryWrapper = new QueryWrapper<MemberEntity>();
queryWrapper.eq("phone",memberUserId);*/
MemberEntity
member
=
memberService
.
getById
(
memberUserId
);
return
R
.
ok
().
put
(
"data"
,
member
);
}
//
/**
//
* 信息
//
*/
//
@RequestMapping("/authApi/info")
//
// @RequiresPermissions("manage:member:info")
//
public R info(){
//
Long memberUserId = getMemberUserId();
/
//
*
//
QueryWrapper<MemberEntity> queryWrapper = new QueryWrapper<MemberEntity>();
//
queryWrapper.eq("phone",memberUserId);*/
//
MemberEntity member = memberService.getById(memberUserId);
//
//
return R.ok().put("data", member);
//
}
/**
* 保存
...
...
@@ -115,27 +108,27 @@ public class MemberController extends AbstractController {
return
R
.
ok
();
}
/**
* 修改
*/
@RequestMapping
(
"/authApi/update"
)
// @RequiresPermissions("manage:member:update")
public
R
update
(
@RequestBody
MemberEntity
member
){
MemberEntity
memberUser
=
getMemberUser
();
MemberEntity
memberUpdate
=
new
MemberEntity
();
//System.out.println(memberUser);
UpdateWrapper
<
MemberEntity
>
memberEntityUpdateWrapper
=
new
UpdateWrapper
<>();
if
(
StringUtils
.
isNoneBlank
(
member
.
getEmail
()))
{
memberEntityUpdateWrapper
.
eq
(
"id"
,
member
.
getId
());
memberUpdate
.
setEmail
(
member
.
getEmail
());
}
memberService
.
update
(
memberUpdate
,
memberEntityUpdateWrapper
);
return
R
.
ok
();
}
//
/**
//
* 修改
//
*/
//
@RequestMapping("/authApi/update")
//
//
@RequiresPermissions("manage:member:update")
//
public R update(@RequestBody MemberEntity member){
//
//
MemberEntity memberUser = getMemberUser();
//
//
MemberEntity memberUpdate = new MemberEntity();
//
//
//System.out.println(memberUser);
//
UpdateWrapper<MemberEntity> memberEntityUpdateWrapper = new UpdateWrapper<>();
//
if(StringUtils.isNoneBlank(member.getEmail())) {
//
memberEntityUpdateWrapper.eq("id",member.getId());
//
memberUpdate.setEmail(member.getEmail());
//
}
//
memberService.update(memberUpdate,memberEntityUpdateWrapper);
//
//
return R.ok();
//
}
/**
* 删除
...
...
src/main/java/io/office/modules/manage/controller/TimescodeFindpsController.java
View file @
f531085f
package
io
.
office
.
modules
.
manage
.
controller
;
import
java.util.Arrays
;
import
java.util.Map
;
import
io.office.modules.app.annotation.Login
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
io.office.modules.manage.entity.TimescodeFindpsEntity
;
import
io.office.modules.manage.service.TimescodeFindpsService
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.R
;
import
io.office.modules.manage.entity.TimescodeFindpsEntity
;
import
io.office.modules.manage.service.TimescodeFindpsService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.Arrays
;
import
java.util.Map
;
...
...
@@ -35,27 +28,27 @@ public class TimescodeFindpsController {
/**
*忘记密码(手机号找回)
*/
@RequestMapping
(
"api/forgotPasswordPhone"
)
@Login
// @RequiresPermissions("manage:timescodefindps:list")
public
R
forgotPasswordPhone
(
@RequestBody
Map
<
String
,
Object
>
params
){
timescodeFindpsService
.
forgotPasswordPhone
(
params
);
return
R
.
ok
();
}
//
@RequestMapping("api/forgotPasswordPhone")
//
@Login
//
//
@RequiresPermissions("manage:timescodefindps:list")
//
public R forgotPasswordPhone(@RequestBody Map<String, Object> params){
//
timescodeFindpsService.forgotPasswordPhone(params);
//
//
return R.ok();
//
}
/**
*忘记密码(邮箱找回)
*/
@RequestMapping
(
"api/forgotPasswordEmiail"
)
@Login
// @RequiresPermissions("manage:timescodefindps:list")
public
R
forgotPasswordEmiail
(
@RequestBody
Map
<
String
,
Object
>
params
){
timescodeFindpsService
.
forgotPasswordEmiail
(
params
);
return
R
.
ok
();
}
//
@RequestMapping("api/forgotPasswordEmiail")
//
@Login
//
//
@RequiresPermissions("manage:timescodefindps:list")
//
public R forgotPasswordEmiail(@RequestBody Map<String, Object> params){
//
timescodeFindpsService.forgotPasswordEmiail(params);
//
//
return R.ok();
//
}
/**
* 列表
...
...
src/main/java/io/office/modules/manage/controller/TimescodeRegiController.java
View file @
f531085f
package
io
.
office
.
modules
.
manage
.
controller
;
import
java.util.Arrays
;
import
java.util.Map
;
import
io.office.modules.app.annotation.Login
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
io.office.modules.manage.entity.TimescodeRegiEntity
;
import
io.office.modules.manage.service.TimescodeRegiService
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.R
;
import
io.office.modules.manage.entity.TimescodeRegiEntity
;
import
io.office.modules.manage.service.TimescodeRegiService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java
x.servlet.http.HttpServletRequest
;
import
java
x.servlet.http.HttpServletResponse
;
import
java
.util.Arrays
;
import
java
.util.Map
;
/**
...
...
@@ -38,13 +29,13 @@ public class TimescodeRegiController {
/**
* 获取验证码
*/
@Login
@RequestMapping
(
"/api/getVerificationCode"
)
// @RequiresPermissions("manage:timescoderegi:list")
public
R
getVerificationCode
(
@RequestBody
Map
<
String
,
Object
>
params
,
HttpServletRequest
request
,
HttpServletResponse
response
){
String
msg
=
timescodeRegiService
.
getVerificationCode
(
params
,
request
,
response
);
return
R
.
ok
();
}
//
@Login
//
@RequestMapping("/api/getVerificationCode")
//
//
@RequiresPermissions("manage:timescoderegi:list")
//
public R getVerificationCode(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
//
String msg = timescodeRegiService.getVerificationCode(params,request,response);
//
return R.ok();
//
}
/**
* 列表
...
...
src/main/java/io/office/modules/manage/controller/TycpdmFirmChangeController.java
View file @
f531085f
...
...
@@ -34,26 +34,26 @@ public class TycpdmFirmChangeController {
/**
* 列表
*/
@RequestMapping
(
"/authApi/findlist"
)
// @RequiresPermissions("manage:tycpdmfirmchange:list")
public
R
list
(
@RequestBody
Map
<
String
,
Object
>
params
){
Page
<
TycpdmFirmChangeEntity
>
findlist
=
tycpdmFirmChangeService
.
findlist
(
params
,
new
Page
(
Integer
.
valueOf
(
params
.
get
(
"page"
).
toString
()),
Integer
.
valueOf
(
params
.
get
(
"limit"
).
toString
())));
PageUtils
pageUtils
=
new
PageUtils
(
findlist
);
return
R
.
ok
().
put
(
"data"
,
pageUtils
);
}
//
@RequestMapping("/authApi/findlist")
//
//
@RequiresPermissions("manage:tycpdmfirmchange:list")
//
public R list(@RequestBody Map<String, Object> params){
//
Page<TycpdmFirmChangeEntity> findlist = tycpdmFirmChangeService.findlist(params,
//
new Page(Integer.valueOf(params.get("page").toString()),
//
Integer.valueOf(params.get("limit").toString())));
//
PageUtils pageUtils = new PageUtils(findlist);
//
return R.ok().put("data", pageUtils);
//
}
/**
* 根据用户名获取企业认证信息
*/
@RequestMapping
(
"/authApi/findUserName"
)
// @RequiresPermissions("manage:tycpdmfirm:save")
public
R
findUserName
(
@RequestParam
(
"userName"
)
String
userName
){
TycpdmFirmChangeEntity
userName1
=
tycpdmFirmChangeService
.
findUserName
(
userName
);
return
R
.
ok
().
put
(
"data"
,
userName1
);
}
//
@RequestMapping("/authApi/findUserName")
//
//
@RequiresPermissions("manage:tycpdmfirm:save")
//
public R findUserName(@RequestParam("userName") String userName){
//
TycpdmFirmChangeEntity userName1 = tycpdmFirmChangeService.findUserName(userName);
//
//
return R.ok().put("data",userName1);
//
}
/**
* 信息
...
...
src/main/java/io/office/modules/manage/controller/TycpdmFirmController.java
View file @
f531085f
This diff is collapsed.
Click to expand it.
src/main/java/io/office/modules/manage/controller/UserFunctionBindingController.java
View file @
f531085f
...
...
@@ -33,65 +33,65 @@ public class UserFunctionBindingController extends AbstractController {
/**
* 查询
*/
@RequestMapping
(
"/authApi/find"
)
public
R
find
(){
Integer
id
=
getMemberUserId
().
intValue
();
if
(
id
==
null
){
return
R
.
error
(
"用户信息有误"
);
}
Object
[]
functionids
=
userFunctionBindingService
.
queryList
(
id
);
return
R
.
ok
().
put
(
"functionids"
,
functionids
);
}
//
@RequestMapping("/authApi/find")
//
public R find(){
//
Integer id=getMemberUserId().intValue();
//
if(id==null){
//
return R.error("用户信息有误");
//
}
//
Object[] functionids = userFunctionBindingService.queryList(id);
//
return R.ok().put("functionids", functionids);
//
}
/**
* 修改
*/
@RequestMapping
(
"/authApi/update"
)
// @RequiresPermissions("manage:userfunctionbinding:update")
public
R
update
(
@RequestBody
Integer
[]
functionids
){
Integer
id
=
getMemberUserId
().
intValue
();
if
(
id
==
null
){
return
R
.
error
(
"用户信息有误"
);
}
userFunctionBindingService
.
Modify
(
functionids
,
id
);
return
R
.
ok
();
}
/**
* 保存
*/
@RequestMapping
(
"/authApi/save"
)
// @RequiresPermissions("manage:userfunctionbinding:save")
public
R
save
(
@RequestBody
Integer
[]
functionids
){
//遍历插入数据
for
(
int
functionid
:
functionids
)
{
UserFunctionBindingEntity
ufb
=
new
UserFunctionBindingEntity
();
ufb
.
setUserId
(
getMemberUserId
().
intValue
());
ufb
.
setFuncId
(
functionid
);
userFunctionBindingService
.
save
(
ufb
);
}
return
R
.
ok
();
}
//
@RequestMapping("/authApi/update")
//
//
@RequiresPermissions("manage:userfunctionbinding:update")
//
public R update(@RequestBody Integer[] functionids){
//
Integer id=getMemberUserId().intValue();
//
if(id==null){
//
return R.error("用户信息有误");
//
}
//
userFunctionBindingService.Modify(functionids,id);
//
return R.ok();
//
}
/
//
**
//
* 保存
//
*/
//
@RequestMapping("/authApi/save")
//
//
@RequiresPermissions("manage:userfunctionbinding:save")
//
public R save(@RequestBody Integer[] functionids){
//
//遍历插入数据
//
for (int functionid : functionids) {
//
UserFunctionBindingEntity ufb=new UserFunctionBindingEntity();
//
ufb.setUserId(getMemberUserId().intValue());
//
ufb.setFuncId(functionid);
//
userFunctionBindingService.save(ufb);
//
}
//
return R.ok();
//
}
/**
* 列表
*/
@Login
@RequestMapping
(
"/api/list"
)
// @RequiresPermissions("manage:userfunctionbinding:list")
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
PageUtils
page
=
userFunctionBindingService
.
queryPage
(
params
);
return
R
.
ok
().
put
(
"page"
,
page
);
}
//
@Login
//
@RequestMapping("/api/list")
//
//
@RequiresPermissions("manage:userfunctionbinding:list")
//
public R list(@RequestParam Map<String, Object> params){
//
PageUtils page = userFunctionBindingService.queryPage(params);
//
//
return R.ok().put("page", page);
//
}
/**
* 信息
*/
@Login
@RequestMapping
(
"/api/info/{id}"
)
// @RequiresPermissions("manage:userfunctionbinding:info")
public
R
info
(
@PathVariable
(
"id"
)
Integer
id
){
UserFunctionBindingEntity
userFunctionBinding
=
userFunctionBindingService
.
getById
(
id
);
return
R
.
ok
().
put
(
"userFunctionBinding"
,
userFunctionBinding
);
}
//
@Login
//
@RequestMapping("/api/info/{id}")
//
//
@RequiresPermissions("manage:userfunctionbinding:info")
//
public R info(@PathVariable("id") Integer id){
//
UserFunctionBindingEntity userFunctionBinding = userFunctionBindingService.getById(id);
//
//
return R.ok().put("userFunctionBinding", userFunctionBinding);
//
}
/**
* 删除
*/
...
...
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