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
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
359 additions
and
383 deletions
+359
-383
LogLoginController.java
.../office/modules/manage/controller/LogLoginController.java
+28
-29
MemberController.java
...io/office/modules/manage/controller/MemberController.java
+69
-76
TimescodeFindpsController.java
.../modules/manage/controller/TimescodeFindpsController.java
+24
-31
TimescodeRegiController.java
...ce/modules/manage/controller/TimescodeRegiController.java
+14
-23
TycpdmFirmChangeController.java
...modules/manage/controller/TycpdmFirmChangeController.java
+17
-17
TycpdmFirmController.java
...ffice/modules/manage/controller/TycpdmFirmController.java
+157
-157
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;
...
@@ -5,7 +5,6 @@ import io.office.common.utils.R;
import
io.office.modules.app.annotation.Login
;
import
io.office.modules.app.annotation.Login
;
import
io.office.modules.manage.entity.LogLoginEntity
;
import
io.office.modules.manage.entity.LogLoginEntity
;
import
io.office.modules.manage.service.LogLoginService
;
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.manage.vo.request.DomesticCodeVo
;
import
io.office.modules.sys.service.SysCaptchaService
;
import
io.office.modules.sys.service.SysCaptchaService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -35,34 +34,34 @@ public class LogLoginController {
...
@@ -35,34 +34,34 @@ public class LogLoginController {
private
SysCaptchaService
sysCaptchaService
;
private
SysCaptchaService
sysCaptchaService
;
/**
/
//
**
* 用户登录
//
* 用户登录
*/
//
*/
@RequestMapping
(
"/authApi/login"
)
//
@RequestMapping("/authApi/login")
@Login
//
@Login
// @RequiresPermissions("manage:member:list")
//
//
@RequiresPermissions("manage:member:list")
public
R
login
(
@RequestBody
Map
<
String
,
Object
>
params
,
HttpServletRequest
request
,
HttpServletResponse
response
){
//
public R login(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
DomesticCodeVo
domesticCodeVo
=
new
DomesticCodeVo
(
params
.
get
(
"uuid"
).
toString
(),
params
.
get
(
"captcha"
).
toString
());
//
DomesticCodeVo domesticCodeVo = new DomesticCodeVo(params.get("uuid").toString(),params.get("captcha").toString());
boolean
captcha
=
sysCaptchaService
.
validate
(
domesticCodeVo
.
getUuid
(),
domesticCodeVo
.
getCaptcha
());
//
boolean captcha = sysCaptchaService.validate(domesticCodeVo.getUuid(), domesticCodeVo.getCaptcha());
if
(!
captcha
){
//
if(!captcha){
return
R
.
error
(
"验证码不正确"
);
//
return R.error("验证码不正确");
}
//
}
return
R
.
ok
().
put
(
"data"
,
logLoginService
.
loginNew2024
(
params
,
request
,
response
));
//
return R.ok().put("data",logLoginService.loginNew2024(params,request,response));
}
//
}
//
@RequestMapping
(
"/authApi/checkPassWord"
)
//
@RequestMapping("/authApi/checkPassWord")
@Login
//
@Login
// @RequiresPermissions("manage:member:list")
//
//
@RequiresPermissions("manage:member:list")
public
R
checkPassWord
(
@RequestBody
Map
<
String
,
Object
>
params
,
HttpServletRequest
request
,
HttpServletResponse
response
){
//
public R checkPassWord(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
//
String
passWord
=
params
.
get
(
"passWord"
).
toString
();
//
String passWord = params.get("passWord").toString();
if
(!
PasswordValidator
.
isValidPassword
(
passWord
))
{
//
if(!PasswordValidator.isValidPassword(passWord)) {
return
R
.
error
(
"密码错误"
);
//
return R.error("密码错误");
}
else
{
//
} else{
return
R
.
ok
();
//
return R.ok();
}
//
}
//
}
//
}
...
...
src/main/java/io/office/modules/manage/controller/MemberController.java
View file @
f531085f
package
io
.
office
.
modules
.
manage
.
controller
;
package
io
.
office
.
modules
.
manage
.
controller
;
import
java.util.Arrays
;
import
io.office.common.utils.PageUtils
;
import
java.util.Map
;
import
io.office.common.utils.R
;
import
io.office.modules.manage.entity.MemberEntity
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
io.office.modules.manage.service.MemberService
;
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.modules.sys.controller.AbstractController
;
import
io.office.modules.sys.controller.AbstractController
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
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.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
io.office.modules.manage.entity.MemberEntity
;
import
io.office.modules.manage.service.MemberService
;
import
java.util.Arrays
;
import
io.office.common.utils.PageUtils
;
import
java.util.Map
;
import
io.office.common.utils.R
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
/**
/**
* ${comments}
* ${comments}
*
*
* @author wudi
* @author wudi
* @email
* @email
* @date 2021-12-08 13:54:50
* @date 2021-12-08 13:54:50
*/
*/
@RestController
@RestController
...
@@ -38,44 +31,44 @@ public class MemberController extends AbstractController {
...
@@ -38,44 +31,44 @@ public class MemberController extends AbstractController {
/**
/**
* 用户注册
* 用户注册
*/
*/
@Login
//
@Login
@RequestMapping
(
"/api/userRegistered"
)
//
@RequestMapping("/api/userRegistered")
// @RequiresPermissions("manage:member:list")
//
//
@RequiresPermissions("manage:member:list")
public
R
userRegistered
(
@RequestBody
Map
<
String
,
Object
>
params
,
HttpServletRequest
request
,
HttpServletResponse
response
){
//
public R userRegistered(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
memberService
.
userRegistered
(
params
,
request
,
response
);
//
memberService.userRegistered(params,request,response);
return
R
.
ok
();
//
return R.ok();
}
//
}
/**
/**
* 用户信息管理-修改登录密码
* 用户信息管理-修改登录密码
*/
*/
@RequestMapping
(
"/authApi/updatePass"
)
//
@RequestMapping("/authApi/updatePass")
// @RequiresPermissions("manage:member:list")
//
//
@RequiresPermissions("manage:member:list")
public
R
updatePass
(
@RequestBody
Map
<
String
,
Object
>
params
){
//
public R updatePass(@RequestBody Map<String, Object> params){
memberService
.
updatePass
(
params
);
//
memberService.updatePass(params);
return
R
.
ok
();
//
return R.ok();
}
//
}
/**
/**
* 用户信息管理-修改手机号码
* 用户信息管理-修改手机号码
*/
*/
@RequestMapping
(
"/authApi/updatephone"
)
//
@RequestMapping("/authApi/updatephone")
// @RequiresPermissions("manage:member:list")
//
//
@RequiresPermissions("manage:member:list")
public
R
updatephone
(
@RequestBody
Map
<
String
,
Object
>
params
,
HttpServletRequest
request
,
HttpServletResponse
response
){
//
public R updatephone(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
memberService
.
updatephone
(
params
,
request
,
response
);
//
memberService.updatephone(params,request,response);
return
R
.
ok
();
//
return R.ok();
}
//
}
/**
/**
* 获取验证码
* 获取验证码
*/
*/
@RequestMapping
(
"/api/getVerificationCode"
)
//
@RequestMapping("/api/getVerificationCode")
// @RequiresPermissions("manage:timescoderegi:list")
//
//
@RequiresPermissions("manage:timescoderegi:list")
@Login
//
@Login
public
R
getVerificationCode
(
@RequestBody
Map
<
String
,
Object
>
params
,
HttpServletRequest
request
,
HttpServletResponse
response
){
//
public R getVerificationCode(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
String
msg
=
memberService
.
getVerificationCode
(
params
,
request
,
response
);
//
String msg = memberService.getVerificationCode(params,request,response);
return
R
.
ok
();
//
return R.ok();
}
//
}
/**
/**
* 列表
* 列表
...
@@ -89,20 +82,20 @@ public class MemberController extends AbstractController {
...
@@ -89,20 +82,20 @@ public class MemberController extends AbstractController {
}
}
/**
//
/**
* 信息
//
* 信息
*/
//
*/
@RequestMapping
(
"/authApi/info"
)
//
@RequestMapping("/authApi/info")
// @RequiresPermissions("manage:member:info")
//
// @RequiresPermissions("manage:member:info")
public
R
info
(){
//
public R info(){
Long
memberUserId
=
getMemberUserId
();
//
Long memberUserId = getMemberUserId();
/*
/
//
*
QueryWrapper<MemberEntity> queryWrapper = new QueryWrapper<MemberEntity>();
//
QueryWrapper<MemberEntity> queryWrapper = new QueryWrapper<MemberEntity>();
queryWrapper.eq("phone",memberUserId);*/
//
queryWrapper.eq("phone",memberUserId);*/
MemberEntity
member
=
memberService
.
getById
(
memberUserId
);
//
MemberEntity member = memberService.getById(memberUserId);
//
return
R
.
ok
().
put
(
"data"
,
member
);
//
return R.ok().put("data", member);
}
//
}
/**
/**
* 保存
* 保存
...
@@ -115,27 +108,27 @@ public class MemberController extends AbstractController {
...
@@ -115,27 +108,27 @@ public class MemberController extends AbstractController {
return
R
.
ok
();
return
R
.
ok
();
}
}
/**
//
/**
* 修改
//
* 修改
*/
//
*/
@RequestMapping
(
"/authApi/update"
)
//
@RequestMapping("/authApi/update")
// @RequiresPermissions("manage:member:update")
//
//
@RequiresPermissions("manage:member:update")
public
R
update
(
@RequestBody
MemberEntity
member
){
//
public R update(@RequestBody MemberEntity member){
//
MemberEntity
memberUser
=
getMemberUser
();
//
MemberEntity memberUser = getMemberUser();
//
MemberEntity
memberUpdate
=
new
MemberEntity
();
//
MemberEntity memberUpdate = new MemberEntity();
//
//System.out.println(memberUser);
//
//System.out.println(memberUser);
UpdateWrapper
<
MemberEntity
>
memberEntityUpdateWrapper
=
new
UpdateWrapper
<>();
//
UpdateWrapper<MemberEntity> memberEntityUpdateWrapper = new UpdateWrapper<>();
if
(
StringUtils
.
isNoneBlank
(
member
.
getEmail
()))
{
//
if(StringUtils.isNoneBlank(member.getEmail())) {
memberEntityUpdateWrapper
.
eq
(
"id"
,
member
.
getId
());
//
memberEntityUpdateWrapper.eq("id",member.getId());
memberUpdate
.
setEmail
(
member
.
getEmail
());
//
memberUpdate.setEmail(member.getEmail());
}
//
}
memberService
.
update
(
memberUpdate
,
memberEntityUpdateWrapper
);
//
memberService.update(memberUpdate,memberEntityUpdateWrapper);
//
return
R
.
ok
();
//
return R.ok();
}
//
}
/**
/**
* 删除
* 删除
...
...
src/main/java/io/office/modules/manage/controller/TimescodeFindpsController.java
View file @
f531085f
package
io
.
office
.
modules
.
manage
.
controller
;
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.PageUtils
;
import
io.office.common.utils.R
;
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
;
...
@@ -23,7 +16,7 @@ import io.office.common.utils.R;
...
@@ -23,7 +16,7 @@ import io.office.common.utils.R;
* 忘记密码
* 忘记密码
*
*
* @author wudi
* @author wudi
* @email
* @email
* @date 2021-12-09 17:41:41
* @date 2021-12-09 17:41:41
*/
*/
@RestController
@RestController
...
@@ -35,27 +28,27 @@ public class TimescodeFindpsController {
...
@@ -35,27 +28,27 @@ public class TimescodeFindpsController {
/**
/**
*忘记密码(手机号找回)
*忘记密码(手机号找回)
*/
*/
@RequestMapping
(
"api/forgotPasswordPhone"
)
//
@RequestMapping("api/forgotPasswordPhone")
@Login
//
@Login
// @RequiresPermissions("manage:timescodefindps:list")
//
//
@RequiresPermissions("manage:timescodefindps:list")
public
R
forgotPasswordPhone
(
@RequestBody
Map
<
String
,
Object
>
params
){
//
public R forgotPasswordPhone(@RequestBody Map<String, Object> params){
timescodeFindpsService
.
forgotPasswordPhone
(
params
);
//
timescodeFindpsService.forgotPasswordPhone(params);
//
return
R
.
ok
();
//
return R.ok();
}
//
}
/**
/**
*忘记密码(邮箱找回)
*忘记密码(邮箱找回)
*/
*/
@RequestMapping
(
"api/forgotPasswordEmiail"
)
//
@RequestMapping("api/forgotPasswordEmiail")
@Login
//
@Login
// @RequiresPermissions("manage:timescodefindps:list")
//
//
@RequiresPermissions("manage:timescodefindps:list")
public
R
forgotPasswordEmiail
(
@RequestBody
Map
<
String
,
Object
>
params
){
//
public R forgotPasswordEmiail(@RequestBody Map<String, Object> params){
timescodeFindpsService
.
forgotPasswordEmiail
(
params
);
//
timescodeFindpsService.forgotPasswordEmiail(params);
//
return
R
.
ok
();
//
return R.ok();
}
//
}
/**
/**
* 列表
* 列表
...
...
src/main/java/io/office/modules/manage/controller/TimescodeRegiController.java
View file @
f531085f
package
io
.
office
.
modules
.
manage
.
controller
;
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.PageUtils
;
import
io.office.common.utils.R
;
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
.util.Arrays
;
import
java
x.servlet.http.HttpServletResponse
;
import
java
.util.Map
;
/**
/**
* 验证码获取
* 验证码获取
*
*
* @author tgl
* @author tgl
* @email
* @email
* @date 2021-12-07 16:52:34
* @date 2021-12-07 16:52:34
*/
*/
@RestController
@RestController
...
@@ -38,13 +29,13 @@ public class TimescodeRegiController {
...
@@ -38,13 +29,13 @@ public class TimescodeRegiController {
/**
/**
* 获取验证码
* 获取验证码
*/
*/
@Login
//
@Login
@RequestMapping
(
"/api/getVerificationCode"
)
//
@RequestMapping("/api/getVerificationCode")
// @RequiresPermissions("manage:timescoderegi:list")
//
//
@RequiresPermissions("manage:timescoderegi:list")
public
R
getVerificationCode
(
@RequestBody
Map
<
String
,
Object
>
params
,
HttpServletRequest
request
,
HttpServletResponse
response
){
//
public R getVerificationCode(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
String
msg
=
timescodeRegiService
.
getVerificationCode
(
params
,
request
,
response
);
//
String msg = timescodeRegiService.getVerificationCode(params,request,response);
return
R
.
ok
();
//
return R.ok();
}
//
}
/**
/**
* 列表
* 列表
...
...
src/main/java/io/office/modules/manage/controller/TycpdmFirmChangeController.java
View file @
f531085f
...
@@ -22,7 +22,7 @@ import io.office.common.utils.R;
...
@@ -22,7 +22,7 @@ import io.office.common.utils.R;
* ${comments}
* ${comments}
*
*
* @author wudi
* @author wudi
* @email
* @email
* @date 2021-12-11 15:15:19
* @date 2021-12-11 15:15:19
*/
*/
@RestController
@RestController
...
@@ -34,26 +34,26 @@ public class TycpdmFirmChangeController {
...
@@ -34,26 +34,26 @@ public class TycpdmFirmChangeController {
/**
/**
* 列表
* 列表
*/
*/
@RequestMapping
(
"/authApi/findlist"
)
//
@RequestMapping("/authApi/findlist")
// @RequiresPermissions("manage:tycpdmfirmchange:list")
//
//
@RequiresPermissions("manage:tycpdmfirmchange:list")
public
R
list
(
@RequestBody
Map
<
String
,
Object
>
params
){
//
public R list(@RequestBody Map<String, Object> params){
Page
<
TycpdmFirmChangeEntity
>
findlist
=
tycpdmFirmChangeService
.
findlist
(
params
,
//
Page<TycpdmFirmChangeEntity> findlist = tycpdmFirmChangeService.findlist(params,
new
Page
(
Integer
.
valueOf
(
params
.
get
(
"page"
).
toString
()),
//
new Page(Integer.valueOf(params.get("page").toString()),
Integer
.
valueOf
(
params
.
get
(
"limit"
).
toString
())));
//
Integer.valueOf(params.get("limit").toString())));
PageUtils
pageUtils
=
new
PageUtils
(
findlist
);
//
PageUtils pageUtils = new PageUtils(findlist);
return
R
.
ok
().
put
(
"data"
,
pageUtils
);
//
return R.ok().put("data", pageUtils);
}
//
}
/**
/**
* 根据用户名获取企业认证信息
* 根据用户名获取企业认证信息
*/
*/
@RequestMapping
(
"/authApi/findUserName"
)
//
@RequestMapping("/authApi/findUserName")
// @RequiresPermissions("manage:tycpdmfirm:save")
//
//
@RequiresPermissions("manage:tycpdmfirm:save")
public
R
findUserName
(
@RequestParam
(
"userName"
)
String
userName
){
//
public R findUserName(@RequestParam("userName") String userName){
TycpdmFirmChangeEntity
userName1
=
tycpdmFirmChangeService
.
findUserName
(
userName
);
//
TycpdmFirmChangeEntity userName1 = tycpdmFirmChangeService.findUserName(userName);
//
return
R
.
ok
().
put
(
"data"
,
userName1
);
//
return R.ok().put("data",userName1);
}
//
}
/**
/**
* 信息
* 信息
...
...
src/main/java/io/office/modules/manage/controller/TycpdmFirmController.java
View file @
f531085f
...
@@ -77,14 +77,14 @@ public class TycpdmFirmController extends AbstractController {
...
@@ -77,14 +77,14 @@ public class TycpdmFirmController extends AbstractController {
/**
/**
* 列表
* 列表
*/
*/
@RequestMapping
(
"/authApi/findlist"
)
//
@RequestMapping("/authApi/findlist")
public
R
findlist
(
@RequestBody
Map
<
String
,
Object
>
params
)
{
//
public R findlist(@RequestBody Map<String, Object> params) {
Page
<
TycpdmFirmEntity
>
findlist
=
tycpdmFirmService
.
findlist
(
params
,
//
Page<TycpdmFirmEntity> findlist = tycpdmFirmService.findlist(params,
new
Page
(
Integer
.
valueOf
(
params
.
get
(
"page"
).
toString
()),
//
new Page(Integer.valueOf(params.get("page").toString()),
Integer
.
valueOf
(
params
.
get
(
"limit"
).
toString
())));
//
Integer.valueOf(params.get("limit").toString())));
PageUtils
pageUtils
=
new
PageUtils
(
findlist
);
//
PageUtils pageUtils = new PageUtils(findlist);
return
R
.
ok
().
put
(
"data"
,
pageUtils
);
//
return R.ok().put("data", pageUtils);
}
//
}
/**
/**
...
@@ -105,15 +105,15 @@ public class TycpdmFirmController extends AbstractController {
...
@@ -105,15 +105,15 @@ public class TycpdmFirmController extends AbstractController {
* @param
* @param
* @return
* @return
*/
*/
@RequestMapping
(
"/authApi/save"
)
//
@RequestMapping("/authApi/save")
// @RequiresPermissions("manage:tycpdmfirm:save")
//
//
@RequiresPermissions("manage:tycpdmfirm:save")
public
R
save
(
@RequestBody
Map
body
)
throws
InvocationTargetException
,
IllegalAccessException
{
//
public R save(@RequestBody Map body) throws InvocationTargetException, IllegalAccessException {
//
MemberEntity
memberUser
=
getMemberUser
();
//
MemberEntity memberUser = getMemberUser();
Integer
id
=
tycpdmFirmService
.
saveTycpdmFirmInfo
(
body
,
memberUser
.
getUsername
());
//
Integer id = tycpdmFirmService.saveTycpdmFirmInfo(body, memberUser.getUsername());
//
return
R
.
ok
().
put
(
"data"
,
id
);
//
return R.ok().put("data", id);
}
//
}
public
static
void
main
(
String
[]
args
)
throws
InvocationTargetException
,
IllegalAccessException
{
public
static
void
main
(
String
[]
args
)
throws
InvocationTargetException
,
IllegalAccessException
{
...
@@ -132,36 +132,36 @@ public class TycpdmFirmController extends AbstractController {
...
@@ -132,36 +132,36 @@ public class TycpdmFirmController extends AbstractController {
/**
/**
* 根据用户名获取企业认证信息
* 根据用户名获取企业认证信息
*/
*/
@RequestMapping
(
"/authApi/findUserName"
)
//
@RequestMapping("/authApi/findUserName")
// @RequiresPermissions("manage:tycpdmfirm:save")
//
//
@RequiresPermissions("manage:tycpdmfirm:save")
public
R
findUserName
(
@RequestParam
(
"userName"
)
String
userName
)
{
//
public R findUserName(@RequestParam("userName") String userName) {
//查询 业务类型 1.首次 2.变更
//
//查询 业务类型 1.首次 2.变更
int
logoutFlag
=
tycpdmFirmService
.
findLogoutFlag
(
userName
);
//
int logoutFlag = tycpdmFirmService.findLogoutFlag(userName);
JSONObject
tycpdmFirmEntity
=
tycpdmFirmService
.
findUserName
(
logoutFlag
,
userName
);
//
JSONObject tycpdmFirmEntity = tycpdmFirmService.findUserName(logoutFlag, userName);
R
ok
=
R
.
ok
();
//
R ok = R.ok();
tycpdmFirmEntity
.
put
(
"status"
,
logoutFlag
);
//
tycpdmFirmEntity.put("status", logoutFlag);
ok
.
put
(
"data"
,
tycpdmFirmEntity
);
//
ok.put("data", tycpdmFirmEntity);
return
ok
;
//
return ok;
}
//
}
/**
/**
* 修改
* 修改
*/
*/
@RequestMapping
(
"/authApi/update"
)
//
@RequestMapping("/authApi/update")
// @RequiresPermissions("manage:tycpdmfirm:update")
//
//
@RequiresPermissions("manage:tycpdmfirm:update")
public
R
update
(
@RequestBody
Map
body
)
{
//
public R update(@RequestBody Map body) {
TycpdmFirmEntity
tycpdmFirm
=
new
TycpdmFirmEntity
();
//
TycpdmFirmEntity tycpdmFirm = new TycpdmFirmEntity();
try
{
//
try {
BeanUtils
.
populate
(
tycpdmFirm
,
body
);
//
BeanUtils.populate(tycpdmFirm, body);
Integer
fId
=
Integer
.
valueOf
(
String
.
valueOf
(
body
.
get
(
"fid"
)));
//
Integer fId = Integer.valueOf(String.valueOf(body.get("fid")));
tycpdmFirm
.
setFId
(
fId
);
//
tycpdmFirm.setFId(fId);
tycpdmFirmService
.
updateById
(
tycpdmFirm
);
//
tycpdmFirmService.updateById(tycpdmFirm);
return
R
.
ok
();
//
return R.ok();
}
catch
(
Exception
e
)
{
//
} catch (Exception e) {
e
.
printStackTrace
();
//
e.printStackTrace();
return
R
.
error
(
"修改失败"
);
//
return R.error("修改失败");
}
//
}
}
//
}
/**
/**
* 删除
* 删除
...
@@ -178,76 +178,76 @@ public class TycpdmFirmController extends AbstractController {
...
@@ -178,76 +178,76 @@ public class TycpdmFirmController extends AbstractController {
/**
/**
* 查询企业实名认证各个状态的数量(中心管理员查询所有,分中心查询)
* 查询企业实名认证各个状态的数量(中心管理员查询所有,分中心查询)
*/
*/
@RequestMapping
(
"/authApi/findTycpdmFirmLogoutFlagCount"
)
//
@RequestMapping("/authApi/findTycpdmFirmLogoutFlagCount")
// @RequiresPermissions("manage:tycpdmfirm:delete")
//
//
@RequiresPermissions("manage:tycpdmfirm:delete")
public
R
findTycpdmFirmLogoutFlagCount
()
{
//
public R findTycpdmFirmLogoutFlagCount() {
/*Integer id=getMemberUserId().intValue();
//
/*Integer id=getMemberUserId().intValue();
if(id==null){
//
if(id==null){
return R.error("用户信息有误");
//
return R.error("用户信息有误");
}
//
}
MemberEntity userMember = getMemberUser();*/
//
MemberEntity userMember = getMemberUser();*/
MemberEntity
memberUser
=
getMemberUser
();
//
MemberEntity memberUser = getMemberUser();
//
Map
<
String
,
Integer
>
map
=
tycpdmFirmService
.
findTycpdmFirmLogoutFlagCount
(
memberUser
);
//
Map<String, Integer> map = tycpdmFirmService.findTycpdmFirmLogoutFlagCount(memberUser);
return
R
.
ok
().
put
(
"data"
,
map
);
//
return R.ok().put("data", map);
}
//
}
/**
/**
* 上传文件(第二步)
* 上传文件(第二步)
*/
*/
@RequestMapping
(
"/authApi/uploadFile"
)
//
@RequestMapping("/authApi/uploadFile")
// @RequiresPermissions("manage:tycpdmfirm:delete")
//
//
@RequiresPermissions("manage:tycpdmfirm:delete")
public
R
uploadFile
(
@RequestParam
(
"file"
)
MultipartFile
file
,
@RequestParam
(
"id"
)
Integer
id
,
@RequestParam
(
"status"
)
Integer
status
)
{
//
public R uploadFile(@RequestParam("file") MultipartFile file, @RequestParam("id") Integer id, @RequestParam("status") Integer status) {
try
{
//
try {
if
(
status
==
1
)
{
//
if (status == 1) {
tycpdmFirmService
.
uploadFile
(
file
,
id
);
//
tycpdmFirmService.uploadFile(file, id);
return
R
.
ok
();
//
return R.ok();
}
else
if
(
status
==
2
)
{
//
} else if (status == 2) {
tycpdmFirmChangeService
.
uploadFile
(
file
,
id
);
//
tycpdmFirmChangeService.uploadFile(file, id);
return
R
.
ok
();
//
return R.ok();
}
else
{
//
} else {
return
R
.
error
(
"请前端人员传递业务类型 变更过新增"
);
//
return R.error("请前端人员传递业务类型 变更过新增");
}
//
}
//
}
catch
(
Exception
e
)
{
//
} catch (Exception e) {
return
R
.
error
(
e
.
getLocalizedMessage
());
//
return R.error(e.getLocalizedMessage());
}
//
}
}
//
}
/**
/**
* 上传文件(第一步)
* 上传文件(第一步)
*/
*/
@RequestMapping
(
"/authApi/uploadFileOne"
)
//
@RequestMapping("/authApi/uploadFileOne")
// @RequiresPermissions("manage:tycpdmfirm:delete")
//
//
@RequiresPermissions("manage:tycpdmfirm:delete")
@Login
//
@Login
public
R
uploadFileOne
(
@RequestParam
(
"file"
)
MultipartFile
file
)
{
//
public R uploadFileOne(@RequestParam("file") MultipartFile file) {
try
{
//
try {
String
filePath
=
tycpdmFirmService
.
uploadFileOne
(
file
);
//
String filePath = tycpdmFirmService.uploadFileOne(file);
return
R
.
ok
().
put
(
"data"
,
filePath
);
//
return R.ok().put("data", filePath);
}
catch
(
Exception
e
)
{
//
} catch (Exception e) {
return
R
.
error
(
e
.
getLocalizedMessage
());
//
return R.error(e.getLocalizedMessage());
}
//
}
}
//
}
/**
/**
* 审批
* 审批
*/
*/
@RequestMapping
(
"/authApi/audit"
)
//
@RequestMapping("/authApi/audit")
// @RequiresPermissions("manage:tycpdmfirm:delete")
//
//
@RequiresPermissions("manage:tycpdmfirm:delete")
public
R
audit
(
@RequestBody
Map
map
)
{
//
public R audit(@RequestBody Map map) {
MemberEntity
memberUser
=
getMemberUser
();
//
MemberEntity memberUser = getMemberUser();
Long
memberUserId
=
getMemberUserId
();
//
Long memberUserId = getMemberUserId();
try
{
//
try {
tycpdmFirmService
.
audit
(
map
,
memberUserId
,
memberUser
.
getUsername
());
//
tycpdmFirmService.audit(map, memberUserId, memberUser.getUsername());
}
catch
(
InvocationTargetException
e
)
{
//
} catch (InvocationTargetException e) {
e
.
printStackTrace
();
//
e.printStackTrace();
}
catch
(
IllegalAccessException
e
)
{
//
} catch (IllegalAccessException e) {
e
.
printStackTrace
();
//
e.printStackTrace();
}
//
}
//
return
R
.
ok
();
//
return R.ok();
}
//
}
/**
/**
...
@@ -264,87 +264,87 @@ public class TycpdmFirmController extends AbstractController {
...
@@ -264,87 +264,87 @@ public class TycpdmFirmController extends AbstractController {
/**
/**
* 返回文件 url
* 返回文件 url
*/
*/
@RequestMapping
(
"/authApi/returnFileUrl"
)
//
@RequestMapping("/authApi/returnFileUrl")
public
R
returnFileUrl
(
@RequestBody
Map
name
)
{
//
public R returnFileUrl(@RequestBody Map name) {
String
url
=
tycpdmFirmService
.
returnFileUrl
(
name
);
//
String url = tycpdmFirmService.returnFileUrl(name);
return
R
.
ok
().
put
(
"data"
,
url
);
//
return R.ok().put("data", url);
}
//
}
/**
/**
* 切换分中心管理员
* 切换分中心管理员
*/
*/
@RequestMapping
(
"/authApi/updateSystem"
)
//
@RequestMapping("/authApi/updateSystem")
public
R
updateSystem
(
@RequestBody
Map
<
String
,
Object
>
params
)
{
//
public R updateSystem(@RequestBody Map<String, Object> params) {
tycpdmFirmService
.
updateSystem
(
params
);
//
tycpdmFirmService.updateSystem(params);
return
R
.
ok
();
//
return R.ok();
}
//
}
/**
/**
* 跳转GDS页面
* 跳转GDS页面
*/
*/
@RequestMapping
(
"/authApi/redirectGDS"
)
//
@RequestMapping("/authApi/redirectGDS")
public
R
redirectGDS
(
@RequestBody
Map
<
String
,
Object
>
params
,
HttpServletResponse
response
)
{
//
public R redirectGDS(@RequestBody Map<String, Object> params, HttpServletResponse response) {
//由于member表中没有手机用户的信息 通过memberDao获取
//
//由于member表中没有手机用户的信息 通过memberDao获取
String
url
=
tycpdmFirmService
.
redirectGDSURLNew
();
//
String url = tycpdmFirmService.redirectGDSURLNew();
return
R
.
ok
().
put
(
"data"
,
url
);
//
return R.ok().put("data", url);
//
}
//
}
/**
/**
* 跳转GLN页面
* 跳转GLN页面
*/
*/
@RequestMapping
(
"/authApi/redirectGLN"
)
//
@RequestMapping("/authApi/redirectGLN")
public
R
redirectGLN
(
HttpServletResponse
response
)
{
//
public R redirectGLN(HttpServletResponse response) {
MemberEntity
memberUser
=
getMemberUser
();
//
MemberEntity memberUser = getMemberUser();
String
url
=
tycpdmFirmService
.
redirectGDSGLN
(
memberUser
);
//
String url = tycpdmFirmService.redirectGDSGLN(memberUser);
//
return
R
.
ok
().
put
(
"data"
,
url
);
//
return R.ok().put("data", url);
//
}
//
}
/**
/**
* 跳转业务大厅页面
* 跳转业务大厅页面
*/
*/
@RequestMapping
(
"/authApi/redirectBusinessHall"
)
//
@RequestMapping("/authApi/redirectBusinessHall")
public
R
redirectBusinessHall
(
String
id
,
String
userType
,
HttpServletResponse
response
)
{
//
public R redirectBusinessHall(String id, String userType, HttpServletResponse response) {
//
//由于member表中没有手机用户的信息 通过memberDao获取
//
//由于member表中没有手机用户的信息 通过memberDao获取
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
//
Map<String, Object> params = new HashMap<>();
params
.
put
(
"id"
,
id
);
//
params.put("id", id);
params
.
put
(
"userType"
,
userType
);
//
params.put("userType", userType);
/*MemberEntity memberEntity = memberDao.selectById(Long.valueOf(id.toString()));
//
/*MemberEntity memberEntity = memberDao.selectById(Long.valueOf(id.toString()));
if (memberEntity==null){
//
if (memberEntity==null){
memberEntity=new MemberEntity();
//
memberEntity=new MemberEntity();
}*/
//
}*/
//
MemberEntity
memberEntity
=
getMemberUser
();
//
MemberEntity memberEntity = getMemberUser();
log
.
info
(
JSONUtil
.
toJsonStr
(
memberEntity
));
//
log.info(JSONUtil.toJsonStr(memberEntity));
//
String
url
=
tycpdmFirmService
.
redirectBusinessHall
(
params
,
memberEntity
);
//
String url = tycpdmFirmService.redirectBusinessHall(params, memberEntity);
return
R
.
ok
().
put
(
"data"
,
url
);
//
return R.ok().put("data", url);
//
}
//
}
/**
/**
* 修改企业信息回显(不需要审批)
* 修改企业信息回显(不需要审批)
*/
*/
@RequestMapping
(
"/authApi/findByUserName"
)
//
@RequestMapping("/authApi/findByUserName")
public
R
findByUserName
(
@RequestBody
Map
name
)
{
//
public R findByUserName(@RequestBody Map name) {
String
userNameR
=
String
.
valueOf
(
name
.
get
(
"name"
));
//
String userNameR = String.valueOf(name.get("name"));
TycpdmFirmEntity
userName
=
tycpdmFirmDao
.
findUserName
(
userNameR
);
//
TycpdmFirmEntity userName = tycpdmFirmDao.findUserName(userNameR);
return
R
.
ok
().
put
(
"data"
,
userName
);
//
return R.ok().put("data", userName);
}
//
}
/**
/**
* 企业信息回显(系统成员)
* 企业信息回显(系统成员)
*/
*/
@RequestMapping
(
"/api/findFirmInfoXT"
)
//
@RequestMapping("/api/findFirmInfoXT")
@Login
//
@Login
public
R
findFirmInfoXT
(
@RequestBody
Map
name
)
{
//
public R findFirmInfoXT(@RequestBody Map name) {
String
carno
=
String
.
valueOf
(
name
.
get
(
"carno"
));
//
String carno = String.valueOf(name.get("carno"));
FirmEntity
data
=
tycpdmFirmService
.
findFirmInfoXT
(
carno
);
//
FirmEntity data = tycpdmFirmService.findFirmInfoXT(carno);
return
R
.
ok
().
put
(
"data"
,
data
);
//
return R.ok().put("data", data);
}
//
}
}
}
src/main/java/io/office/modules/manage/controller/UserFunctionBindingController.java
View file @
f531085f
...
@@ -33,65 +33,65 @@ public class UserFunctionBindingController extends AbstractController {
...
@@ -33,65 +33,65 @@ public class UserFunctionBindingController extends AbstractController {
/**
/**
* 查询
* 查询
*/
*/
@RequestMapping
(
"/authApi/find"
)
//
@RequestMapping("/authApi/find")
public
R
find
(){
//
public R find(){
Integer
id
=
getMemberUserId
().
intValue
();
//
Integer id=getMemberUserId().intValue();
if
(
id
==
null
){
//
if(id==null){
return
R
.
error
(
"用户信息有误"
);
//
return R.error("用户信息有误");
}
//
}
Object
[]
functionids
=
userFunctionBindingService
.
queryList
(
id
);
//
Object[] functionids = userFunctionBindingService.queryList(id);
return
R
.
ok
().
put
(
"functionids"
,
functionids
);
//
return R.ok().put("functionids", functionids);
}
//
}
/**
/**
* 修改
* 修改
*/
*/
@RequestMapping
(
"/authApi/update"
)
//
@RequestMapping("/authApi/update")
// @RequiresPermissions("manage:userfunctionbinding:update")
//
//
@RequiresPermissions("manage:userfunctionbinding:update")
public
R
update
(
@RequestBody
Integer
[]
functionids
){
//
public R update(@RequestBody Integer[] functionids){
Integer
id
=
getMemberUserId
().
intValue
();
//
Integer id=getMemberUserId().intValue();
if
(
id
==
null
){
//
if(id==null){
return
R
.
error
(
"用户信息有误"
);
//
return R.error("用户信息有误");
}
//
}
userFunctionBindingService
.
Modify
(
functionids
,
id
);
//
userFunctionBindingService.Modify(functionids,id);
return
R
.
ok
();
//
return R.ok();
}
//
}
/**
/
//
**
* 保存
//
* 保存
*/
//
*/
@RequestMapping
(
"/authApi/save"
)
//
@RequestMapping("/authApi/save")
// @RequiresPermissions("manage:userfunctionbinding:save")
//
//
@RequiresPermissions("manage:userfunctionbinding:save")
public
R
save
(
@RequestBody
Integer
[]
functionids
){
//
public R save(@RequestBody Integer[] functionids){
//遍历插入数据
//
//遍历插入数据
for
(
int
functionid
:
functionids
)
{
//
for (int functionid : functionids) {
UserFunctionBindingEntity
ufb
=
new
UserFunctionBindingEntity
();
//
UserFunctionBindingEntity ufb=new UserFunctionBindingEntity();
ufb
.
setUserId
(
getMemberUserId
().
intValue
());
//
ufb.setUserId(getMemberUserId().intValue());
ufb
.
setFuncId
(
functionid
);
//
ufb.setFuncId(functionid);
userFunctionBindingService
.
save
(
ufb
);
//
userFunctionBindingService.save(ufb);
}
//
}
return
R
.
ok
();
//
return R.ok();
}
//
}
/**
/**
* 列表
* 列表
*/
*/
@Login
//
@Login
@RequestMapping
(
"/api/list"
)
//
@RequestMapping("/api/list")
// @RequiresPermissions("manage:userfunctionbinding:list")
//
//
@RequiresPermissions("manage:userfunctionbinding:list")
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
//
public R list(@RequestParam Map<String, Object> params){
PageUtils
page
=
userFunctionBindingService
.
queryPage
(
params
);
//
PageUtils page = userFunctionBindingService.queryPage(params);
//
return
R
.
ok
().
put
(
"page"
,
page
);
//
return R.ok().put("page", page);
}
//
}
/**
/**
* 信息
* 信息
*/
*/
@Login
//
@Login
@RequestMapping
(
"/api/info/{id}"
)
//
@RequestMapping("/api/info/{id}")
// @RequiresPermissions("manage:userfunctionbinding:info")
//
//
@RequiresPermissions("manage:userfunctionbinding:info")
public
R
info
(
@PathVariable
(
"id"
)
Integer
id
){
//
public R info(@PathVariable("id") Integer id){
UserFunctionBindingEntity
userFunctionBinding
=
userFunctionBindingService
.
getById
(
id
);
//
UserFunctionBindingEntity userFunctionBinding = userFunctionBindingService.getById(id);
//
return
R
.
ok
().
put
(
"userFunctionBinding"
,
userFunctionBinding
);
//
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