Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
haoban3.0
haoban-manage3.0
Commits
2b1e25a7
Commit
2b1e25a7
authored
Jun 08, 2024
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企微托管账号
parent
3023e34c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
85 additions
and
0 deletions
+85
-0
QywxOpenController.java
...haoban/manage/web/controller/open/QywxOpenController.java
+85
-0
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/open/QywxOpenController.java
0 → 100644
View file @
2b1e25a7
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
.
open
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO
;
import
com.gic.haoban.common.utils.AuthWebRequestUtil
;
import
com.gic.haoban.manage.api.dto.OpenStaffDTO
;
import
com.gic.haoban.manage.api.qdto.OpenStaffInitQDTO
;
import
com.gic.haoban.manage.api.service.OpenStaffApiService
;
import
com.gic.haoban.manage.web.qo.open.OpenStaffQO
;
import
org.apache.commons.lang.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
;
/**
* 企微托管
*/
@RestController
@RequestMapping
(
"/qw-open"
)
public
class
QywxOpenController
{
@Autowired
private
OpenStaffApiService
openStaffApiService
;
/**
* 托管列表
* @param qo
* @return
*/
@RequestMapping
(
"open-staff-list"
)
public
RestResponse
<
Object
>
page
(
@RequestBody
OpenStaffQO
qo
)
{
return
null
;
}
/**
* 登录初始化
* @param staffId
* @return
*/
@RequestMapping
(
"login-init"
)
public
RestResponse
<
Long
>
init
(
String
staffId
,
@RequestParam
(
defaultValue
=
"0"
)
int
loginAgainFlag
)
{
if
(
StringUtils
.
isBlank
(
staffId
))
{
return
RestResponse
.
failure
(
"9999"
,
"请先选择成员"
)
;
}
WebLoginDTO
login
=
AuthWebRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
login
.
getWxEnterpriseId
();
String
enterpriseId
=
login
.
getEnterpriseId
()
;
String
checkMsg
=
this
.
check
(
wxEnterpriseId
,
enterpriseId
)
;
if
(
null
!=
this
.
check
(
wxEnterpriseId
,
enterpriseId
))
{
return
RestResponse
.
failure
(
"9999"
,
checkMsg
)
;
}
OpenStaffInitQDTO
initQDTO
=
new
OpenStaffInitQDTO
()
;
initQDTO
.
setWxEnterpriseId
(
wxEnterpriseId
);
initQDTO
.
setEnterpriseId
(
enterpriseId
);
initQDTO
.
setStaffId
(
staffId
);
initQDTO
.
setLoginAgainFlag
(
loginAgainFlag
);
ServiceResponse
<
Long
>
resp
=
this
.
openStaffApiService
.
init
(
initQDTO
)
;
if
(!
resp
.
isSuccess
())
{
return
RestResponse
.
failure
(
"9999"
,
resp
.
getMessage
())
;
}
return
RestResponse
.
successResult
(
resp
.
getResult
());
}
/**
* 获取账号详情
* @param openStaffId
* @return
*/
@RequestMapping
(
"get-open-staff"
)
public
RestResponse
<
OpenStaffDTO
>
getOpenStaff
(
Long
openStaffId
)
{
ServiceResponse
<
OpenStaffDTO
>
resp
=
this
.
openStaffApiService
.
getById
(
openStaffId
)
;
if
(!
resp
.
isSuccess
())
{
return
RestResponse
.
failure
(
"9999"
,
resp
.
getMessage
())
;
}
return
RestResponse
.
successResult
(
resp
.
getResult
());
}
private
String
check
(
String
wxEnterpriseId
,
String
enterpriseId
)
{
return
null
;
}
}
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