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
27c3d832
Commit
27c3d832
authored
Jun 12, 2024
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企微托管
parent
e027bdd5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
144 additions
and
0 deletions
+144
-0
QywxOpenController.java
...oban/manage/web/controller/haoban/QywxOpenController.java
+75
-0
OpenStaffVO.java
...c/main/java/com/gic/haoban/manage/web/vo/OpenStaffVO.java
+69
-0
No files found.
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/haoban/QywxOpenController.java
0 → 100644
View file @
27c3d832
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
.
haoban
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.haoban.manage.api.dto.*
;
import
com.gic.haoban.manage.api.qdto.OpenStaffInitQDTO
;
import
com.gic.haoban.manage.api.service.OpenStaffApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.WxEnterpriseApiService
;
import
com.gic.haoban.manage.web.vo.OpenStaffVO
;
import
org.springframework.beans.factory.annotation.Autowired
;
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
;
@Autowired
private
WxEnterpriseApiService
wxEnterpriseApiService
;
@Autowired
private
StaffApiService
staffApiService
;
/**
* 获取详情
* @param staffId
* @return
*/
@RequestMapping
(
"get-open-staff"
)
public
RestResponse
<
OpenStaffVO
>
getOpenStaff
(
String
staffId
,
@RequestParam
(
defaultValue
=
"0"
)
int
authFlag
)
{
ServiceResponse
<
OpenStaffDTO
>
resp
=
this
.
openStaffApiService
.
getByStaffId
(
staffId
)
;
if
(!
resp
.
isSuccess
())
{
return
RestResponse
.
successResult
(
null
)
;
}
OpenStaffVO
vo
=
new
OpenStaffVO
()
;
OpenStaffDTO
dto
=
resp
.
getResult
();
String
wxEnterpriseId
=
dto
.
getWxEnterpriseId
()
;
String
enterpriseId
=
dto
.
getEnterpriseId
()
;
if
(
dto
.
getStatusFlag
()==
1
)
{
if
(
authFlag
==
1
)
{
return
RestResponse
.
failure
(
"9999"
,
"无效授权,账号托管中"
);
}
vo
.
setStatusFlag
(
1
);
}
else
{
vo
.
setStatusFlag
(
2
);
if
(
authFlag
==
1
)
{
OpenStaffInitQDTO
qdto
=
new
OpenStaffInitQDTO
()
;
qdto
.
setStaffId
(
staffId
);
qdto
.
setWxEnterpriseId
(
wxEnterpriseId
);
qdto
.
setEnterpriseId
(
enterpriseId
);
ServiceResponse
<
Long
>
codeResp
=
this
.
openStaffApiService
.
init
(
qdto
)
;
if
(
null
==
codeResp
.
getResult
())
{
return
RestResponse
.
failure
(
"9999"
,
codeResp
.
getMessage
());
}
ServiceResponse
<
OpenStaffDTO
>
staffResp
=
this
.
openStaffApiService
.
getById
(
codeResp
.
getResult
())
;
if
(
null
==
staffResp
.
getResult
())
{
return
RestResponse
.
failure
(
"9999"
,
staffResp
.
getMessage
());
}
vo
.
setQrcode
(
staffResp
.
getResult
().
getQrCode1
());
}
}
WxEnterpriseDTO
en
=
this
.
wxEnterpriseApiService
.
getOne
(
wxEnterpriseId
)
;
vo
.
setCorpName
(
en
.
getCorpName
());
StaffDTO
staffDTO
=
this
.
staffApiService
.
selectById
(
staffId
)
;
vo
.
setStaffName
(
staffDTO
.
getStaffName
());
vo
.
setStaffImage
(
staffDTO
.
getHeadImg
());
return
RestResponse
.
successResult
(
vo
);
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/vo/OpenStaffVO.java
0 → 100644
View file @
27c3d832
package
com
.
gic
.
haoban
.
manage
.
web
.
vo
;
import
java.io.Serializable
;
public
class
OpenStaffVO
implements
Serializable
{
/**
* 成员名称
*/
private
String
staffName
;
/**
* 成员头像
*/
private
String
staffImage
;
/**
* 企业名称
*/
private
String
corpName
;
/**
* 1 已登录 2未登录
*/
private
Integer
statusFlag
;
/**
* 二维码
*/
private
String
qrcode
;
public
String
getStaffName
()
{
return
staffName
;
}
public
void
setStaffName
(
String
staffName
)
{
this
.
staffName
=
staffName
;
}
public
String
getStaffImage
()
{
return
staffImage
;
}
public
void
setStaffImage
(
String
staffImage
)
{
this
.
staffImage
=
staffImage
;
}
public
String
getCorpName
()
{
return
corpName
;
}
public
void
setCorpName
(
String
corpName
)
{
this
.
corpName
=
corpName
;
}
public
Integer
getStatusFlag
()
{
return
statusFlag
;
}
public
void
setStatusFlag
(
Integer
statusFlag
)
{
this
.
statusFlag
=
statusFlag
;
}
public
String
getQrcode
()
{
return
qrcode
;
}
public
void
setQrcode
(
String
qrcode
)
{
this
.
qrcode
=
qrcode
;
}
}
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