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
afd746c7
Commit
afd746c7
authored
Apr 17, 2023
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自建应用登录
parent
8e80128d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
5 deletions
+30
-5
WxEnterpriseDTO.java
...n/java/com/gic/haoban/manage/api/dto/WxEnterpriseDTO.java
+9
-0
WxEnterpriseApiService.java
...gic/haoban/manage/api/service/WxEnterpriseApiService.java
+2
-0
WxEnterpriseApiServiceImpl.java
.../service/service/out/impl/WxEnterpriseApiServiceImpl.java
+7
-0
WxEnterpriseMapper.xml
...-service/src/main/resources/mapper/WxEnterpriseMapper.xml
+1
-1
WxEnterpriseInfoController.java
...ban/manage/web/controller/WxEnterpriseInfoController.java
+11
-4
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/WxEnterpriseDTO.java
View file @
afd746c7
...
@@ -108,6 +108,15 @@ public class WxEnterpriseDTO implements Serializable {
...
@@ -108,6 +108,15 @@ public class WxEnterpriseDTO implements Serializable {
private
Integer
wxSecurityType
;
private
Integer
wxSecurityType
;
private
String
wxCorpid
;
private
String
wxCorpid
;
private
String
openCorpid
;
private
String
openCorpid
;
private
String
wxaAppid
;
public
String
getWxaAppid
()
{
return
wxaAppid
;
}
public
void
setWxaAppid
(
String
wxaAppid
)
{
this
.
wxaAppid
=
wxaAppid
;
}
public
Integer
getWxSecurityType
()
{
public
Integer
getWxSecurityType
()
{
return
wxSecurityType
;
return
wxSecurityType
;
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/WxEnterpriseApiService.java
View file @
afd746c7
...
@@ -46,6 +46,8 @@ public interface WxEnterpriseApiService {
...
@@ -46,6 +46,8 @@ public interface WxEnterpriseApiService {
*/
*/
WxEnterpriseDTO
getOne
(
String
wxEnterpriseId
);
WxEnterpriseDTO
getOne
(
String
wxEnterpriseId
);
WxEnterpriseDTO
selectByWxaAppid
(
String
appid
);
WxEnterpriseQwDTO
getQwInfo
(
String
wxEnterpriseId
);
WxEnterpriseQwDTO
getQwInfo
(
String
wxEnterpriseId
);
/**
/**
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/WxEnterpriseApiServiceImpl.java
View file @
afd746c7
...
@@ -249,6 +249,13 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
...
@@ -249,6 +249,13 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
WxEnterpriseDTO
wxDTO
=
EntityUtil
.
changeEntityByJSON
(
WxEnterpriseDTO
.
class
,
tab
);
WxEnterpriseDTO
wxDTO
=
EntityUtil
.
changeEntityByJSON
(
WxEnterpriseDTO
.
class
,
tab
);
return
wxDTO
;
return
wxDTO
;
}
}
@Override
public
WxEnterpriseDTO
selectByWxaAppid
(
String
appid
)
{
TabHaobanWxEnterprise
tab
=
wxEnterpriseMapper
.
selectByWxaAppid
(
appid
);
WxEnterpriseDTO
wxDTO
=
EntityUtil
.
changeEntityByJSON
(
WxEnterpriseDTO
.
class
,
tab
);
return
wxDTO
;
}
@Override
@Override
public
WxEnterpriseQwDTO
getQwInfo
(
String
wxEnterpriseId
)
{
public
WxEnterpriseQwDTO
getQwInfo
(
String
wxEnterpriseId
)
{
...
...
haoban-manage3-service/src/main/resources/mapper/WxEnterpriseMapper.xml
View file @
afd746c7
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from tab_haoban_wx_enterprise
from tab_haoban_wx_enterprise
where wxa_appid = #{appid}
where wxa_appid = #{appid}
and wx_security_type = 5
</select>
</select>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise"
>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise"
>
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/WxEnterpriseInfoController.java
View file @
afd746c7
...
@@ -142,9 +142,16 @@ public class WxEnterpriseInfoController extends WebBaseController {
...
@@ -142,9 +142,16 @@ public class WxEnterpriseInfoController extends WebBaseController {
public
HaobanResponse
getInfoByCode
(
String
code
,
String
appid
)
{
public
HaobanResponse
getInfoByCode
(
String
code
,
String
appid
)
{
logger
.
info
(
"code:{}"
,
code
);
logger
.
info
(
"code:{}"
,
code
);
String
userDTOJson
=
null
;
String
userDTOJson
=
null
;
if
(
null
!=
RedisUtil
.
getCache
(
"haoban-self-test"
))
{
String
wxEnterpriseId
=
null
;
WxEnterpriseQwDTO
qwDTO1
=
this
.
wxEnterpriseApiService
.
getQwInfo
(
"xxxx"
)
;
if
(
StringUtils
.
isNotEmpty
(
appid
))
{
userDTOJson
=
qywxUserApiService
.
getUserByCode
(
qwDTO1
.
getDkCorpid
(),
qwDTO1
.
getSelfSecret
(),
code
);
WxEnterpriseDTO
wxEnterprise
=
this
.
wxEnterpriseApiService
.
selectByWxaAppid
(
appid
)
;
if
(
null
!=
wxEnterprise
)
{
wxEnterpriseId
=
wxEnterprise
.
getWxEnterpriseId
()
;
}
}
if
(
null
!=
wxEnterpriseId
)
{
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseApiService
.
getQwInfo
(
wxEnterpriseId
)
;
userDTOJson
=
qywxUserApiService
.
getUserByCode
(
qwDTO
.
getDkCorpid
(),
qwDTO
.
getSelfSecret
(),
code
);
}
else
{
}
else
{
userDTOJson
=
qywxCorpApiService
.
getCodeSession
(
config
.
getWxSuiteid
(),
code
);
userDTOJson
=
qywxCorpApiService
.
getCodeSession
(
config
.
getWxSuiteid
(),
code
);
}
}
...
@@ -242,7 +249,7 @@ public class WxEnterpriseInfoController extends WebBaseController {
...
@@ -242,7 +249,7 @@ public class WxEnterpriseInfoController extends WebBaseController {
staffApiService
.
activeStaff
(
staffId
);
staffApiService
.
activeStaff
(
staffId
);
}
}
String
wxEnterpriseId
=
loginStaff
.
getWxEnterpriseId
();
wxEnterpriseId
=
loginStaff
.
getWxEnterpriseId
();
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseApiService
.
getQwInfo
(
wxEnterpriseId
);
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseApiService
.
getQwInfo
(
wxEnterpriseId
);
String
accesstoken
=
qywxCorpApiService
.
getCorpAccessToken
(
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
());
String
accesstoken
=
qywxCorpApiService
.
getCorpAccessToken
(
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
());
WellDoneLoginInfoVO
wellDoneLoginInfoVo
=
new
WellDoneLoginInfoVO
();
WellDoneLoginInfoVO
wellDoneLoginInfoVo
=
new
WellDoneLoginInfoVO
();
...
...
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