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
7f889597
Commit
7f889597
authored
Feb 21, 2020
by
huangZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1111
parent
22feaa5e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
98 additions
and
0 deletions
+98
-0
WxEnterpriseApiService.java
...gic/haoban/manage/api/service/WxEnterpriseApiService.java
+6
-0
WxEnterpriseApiServiceImpl.java
.../service/service/out/impl/WxEnterpriseApiServiceImpl.java
+7
-0
pom.xml
haoban-manage3-wx/pom.xml
+5
-0
InfoController.java
.../com/gic/haoban/manage/web/controller/InfoController.java
+44
-0
InfoVo.java
...wx/src/main/java/com/gic/haoban/manage/web/vo/InfoVo.java
+34
-0
dubbo-haoban-manage-wx.xml
...ge3-wx/src/main/webapp/WEB-INF/dubbo-haoban-manage-wx.xml
+2
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/WxEnterpriseApiService.java
View file @
7f889597
...
@@ -18,4 +18,10 @@ public interface WxEnterpriseApiService {
...
@@ -18,4 +18,10 @@ public interface WxEnterpriseApiService {
* @return
* @return
*/
*/
List
<
YwWxEnterpriseDTO
>
list
();
List
<
YwWxEnterpriseDTO
>
list
();
/**
* 获取一个
* @param wxEnterpriseId
* @return
*/
WxEnterpriseDTO
getOne
(
String
wxEnterpriseId
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/WxEnterpriseApiServiceImpl.java
View file @
7f889597
...
@@ -79,6 +79,13 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
...
@@ -79,6 +79,13 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
List
<
YwWxEnterpriseDTO
>
resultList
=
EntityUtil
.
changeEntityListByJSON
(
YwWxEnterpriseDTO
.
class
,
list
);
List
<
YwWxEnterpriseDTO
>
resultList
=
EntityUtil
.
changeEntityListByJSON
(
YwWxEnterpriseDTO
.
class
,
list
);
return
resultList
;
return
resultList
;
}
}
@Override
public
WxEnterpriseDTO
getOne
(
String
wxEnterpriseId
)
{
TabHaobanWxEnterprise
tab
=
wxEnterpriseMapper
.
selectByPrimaryKey
(
wxEnterpriseId
);
WxEnterpriseDTO
wxDTO
=
EntityUtil
.
changeEntityByJSON
(
WxEnterpriseDTO
.
class
,
tab
);
return
wxDTO
;
}
...
...
haoban-manage3-wx/pom.xml
View file @
7f889597
...
@@ -46,6 +46,11 @@
...
@@ -46,6 +46,11 @@
<version>
4.11
</version>
<version>
4.11
</version>
<scope>
test
</scope>
<scope>
test
</scope>
</dependency>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-wechat-api
</artifactId>
<version>
${gic-wechat-api}
</version>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.session
</groupId>
<groupId>
org.springframework.session
</groupId>
<artifactId>
spring-session-data-redis
</artifactId>
<artifactId>
spring-session-data-redis
</artifactId>
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/InfoController.java
0 → 100644
View file @
7f889597
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseDTO
;
import
com.gic.haoban.manage.api.service.ApplicationApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.WxEnterpriseApiService
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.haoban.manage.web.vo.InfoVo
;
import
com.gic.wechat.api.service.qywx.QywxCorpApiService
;
@RestController
public
class
InfoController
extends
WebBaseController
{
public
static
final
String
siteId
=
"ww7d6566614055cf27"
;
@Autowired
private
ApplicationApiService
applicationApiService
;
@Autowired
private
QywxCorpApiService
qywxCorpApiService
;
@Autowired
private
StaffApiService
staffApiService
;
@Autowired
private
WxEnterpriseApiService
wxEnterpriseApiService
;
@RequestMapping
(
"get-info-by-code"
)
public
HaobanResponse
getInfoByCode
(
String
code
)
{
String
userId
=
qywxCorpApiService
.
getUserInfoSimple
(
siteId
,
code
);
StaffDTO
loginStaff
=
staffApiService
.
selectByUserId
(
userId
);
String
wxEnterpriseId
=
loginStaff
.
getWxEnterpriseId
();
WxEnterpriseDTO
wxEnterpriseDTO
=
wxEnterpriseApiService
.
getOne
(
wxEnterpriseId
);
String
accesstoken
=
qywxCorpApiService
.
getCorpAccessToken
(
wxEnterpriseDTO
.
getCorpid
(),
siteId
);
InfoVo
infoVo
=
new
InfoVo
();
infoVo
.
setAccessToken
(
accesstoken
);
infoVo
.
setStaffId
(
loginStaff
.
getStaffId
());
infoVo
.
setWxEnterpriseId
(
wxEnterpriseId
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
infoVo
);
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/vo/InfoVo.java
0 → 100644
View file @
7f889597
package
com
.
gic
.
haoban
.
manage
.
web
.
vo
;
import
java.io.Serializable
;
/**
* Created 2018/10/22.
*
* @author hua
*/
public
class
InfoVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
String
staffId
;
private
String
wxEnterpriseId
;
private
String
accessToken
;
public
String
getStaffId
()
{
return
staffId
;
}
public
void
setStaffId
(
String
staffId
)
{
this
.
staffId
=
staffId
;
}
public
String
getWxEnterpriseId
()
{
return
wxEnterpriseId
;
}
public
void
setWxEnterpriseId
(
String
wxEnterpriseId
)
{
this
.
wxEnterpriseId
=
wxEnterpriseId
;
}
public
String
getAccessToken
()
{
return
accessToken
;
}
public
void
setAccessToken
(
String
accessToken
)
{
this
.
accessToken
=
accessToken
;
}
}
haoban-manage3-wx/src/main/webapp/WEB-INF/dubbo-haoban-manage-wx.xml
View file @
7f889597
...
@@ -25,7 +25,9 @@
...
@@ -25,7 +25,9 @@
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.ApplicationApiService"
id=
"applicationApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.ApplicationApiService"
id=
"applicationApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.DepartmentApiService"
id=
"departmentApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.DepartmentApiService"
id=
"departmentApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.WxEnterpriseRelatedApiService"
id=
"wxEnterpriseRelatedApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.WxEnterpriseRelatedApiService"
id=
"wxEnterpriseRelatedApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.WxEnterpriseApiService"
id=
"wxEnterpriseApiService"
/>
<dubbo:reference
interface=
"com.gic.enterprise.api.service.StoreService"
id=
"storeService"
/>
<dubbo:reference
interface=
"com.gic.enterprise.api.service.StoreService"
id=
"storeService"
/>
<dubbo:reference
interface=
"com.gic.wechat.api.service.qywx.QywxCorpApiService"
id=
"qywxCorpApiService"
/>
</beans>
</beans>
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