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
8858900a
Commit
8858900a
authored
Jun 10, 2024
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企微托管账号
parent
3ddb24c3
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
41 additions
and
7 deletions
+41
-7
OpenStaffApiService.java
...om/gic/haoban/manage/api/service/OpenStaffApiService.java
+3
-0
QywxCallbackController.java
.../haoban/manage/web/controller/QywxCallbackController.java
+11
-6
dubbo-haoban-manage3-operation-web.xml
...ain/webapp/WEB-INF/dubbo-haoban-manage3-operation-web.xml
+1
-1
OpenStaffMapper.java
...gic/haoban/manage/service/dao/mapper/OpenStaffMapper.java
+3
-0
OpenStaffApiServiceImpl.java
...age/service/service/out/impl/OpenStaffApiServiceImpl.java
+16
-0
OpenStaffMapper.xml
...ge3-service/src/main/resources/mapper/OpenStaffMapper.xml
+7
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/OpenStaffApiService.java
View file @
8858900a
...
@@ -24,6 +24,9 @@ public interface OpenStaffApiService {
...
@@ -24,6 +24,9 @@ public interface OpenStaffApiService {
*/
*/
public
ServiceResponse
<
OpenStaffDTO
>
getById
(
Long
openStaffId
)
;
public
ServiceResponse
<
OpenStaffDTO
>
getById
(
Long
openStaffId
)
;
public
ServiceResponse
<
OpenStaffDTO
>
getByQwUserId
(
Long
qwUserId
)
;
/**
/**
* 删除
* 删除
* @param id
* @param id
...
...
haoban-manage3-operation-web/src/main/java/com/gic/haoban/manage/web/controller/QywxCallbackController.java
View file @
8858900a
...
@@ -2,9 +2,6 @@ package com.gic.haoban.manage.web.controller;
...
@@ -2,9 +2,6 @@ package com.gic.haoban.manage.web.controller;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.authcenter.commons.util.IgnoreLogin
;
import
com.gic.authcenter.commons.util.IgnoreLogin
;
import
com.gic.commons.util.GlobalVar
;
import
com.gic.commons.util.HttpClient
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.manage.api.enums.QwOpenStepEnum
;
import
com.gic.haoban.manage.api.enums.QwOpenStepEnum
;
import
com.gic.haoban.manage.api.service.OpenStaffApiService
;
import
com.gic.haoban.manage.api.service.OpenStaffApiService
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.io.IOUtils
;
...
@@ -16,10 +13,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -16,10 +13,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
@Controller
@Controller
...
@@ -29,6 +23,8 @@ public class QywxCallbackController extends WebBaseController {
...
@@ -29,6 +23,8 @@ public class QywxCallbackController extends WebBaseController {
@Autowired
@Autowired
private
OpenStaffApiService
openStaffApiService
;
private
OpenStaffApiService
openStaffApiService
;
@Autowired
private
com
.
gic
.
haoban
.
task
.
manage
.
api
.
service
.
OpenQwApiService
openQwApiService
;
@RequestMapping
(
"qywx-msg-notice"
)
@RequestMapping
(
"qywx-msg-notice"
)
@IgnoreLogin
@IgnoreLogin
...
@@ -53,6 +49,9 @@ public class QywxCallbackController extends WebBaseController {
...
@@ -53,6 +49,9 @@ public class QywxCallbackController extends WebBaseController {
private
void
post
(
int
type
,
String
uuid
,
JSONObject
json
)
{
private
void
post
(
int
type
,
String
uuid
,
JSONObject
json
)
{
switch
(
type
)
{
switch
(
type
)
{
case
102000
:
this
.
chat
(
uuid
,
json
)
;
break
;
case
100001
:
case
100001
:
this
.
v100001
(
uuid
,
json
)
;
this
.
v100001
(
uuid
,
json
)
;
break
;
break
;
...
@@ -81,6 +80,12 @@ public class QywxCallbackController extends WebBaseController {
...
@@ -81,6 +80,12 @@ public class QywxCallbackController extends WebBaseController {
break
;
break
;
}
}
}
}
private
void
chat
(
String
uuid
,
JSONObject
json
)
{
logger
.
info
(
"消息"
);
this
.
openQwApiService
.
saveChatLog
(
json
.
getLong
(
"sender"
),
json
.
getLong
(
"receiver"
),
json
.
getString
(
"content"
),
1
)
;
}
private
void
v100012
(
String
uuid
,
JSONObject
json
)
{
private
void
v100012
(
String
uuid
,
JSONObject
json
)
{
logger
.
info
(
"需要二次扫码"
);
logger
.
info
(
"需要二次扫码"
);
this
.
openStaffApiService
.
update2QrcodeFlag
(
uuid
)
;
this
.
openStaffApiService
.
update2QrcodeFlag
(
uuid
)
;
...
...
haoban-manage3-operation-web/src/main/webapp/WEB-INF/dubbo-haoban-manage3-operation-web.xml
View file @
8858900a
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<dubbo:application
name=
"haoban-manage3-operation-web"
/>
<dubbo:application
name=
"haoban-manage3-operation-web"
/>
<dubbo:protocol
name=
"dubbo"
port=
"300112"
/>
<dubbo:protocol
name=
"dubbo"
port=
"300112"
/>
<dubbo:reference
interface=
"com.gic.haoban.task.manage.api.service.OpenQwApiService"
id=
"openQwApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.OpenStaffApiService"
id=
"openStaffApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.OpenStaffApiService"
id=
"openStaffApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.StaffApiService"
id=
"staffApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.StaffApiService"
id=
"staffApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.TestApiService"
id=
"testApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.TestApiService"
id=
"testApiService"
/>
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/OpenStaffMapper.java
View file @
8858900a
...
@@ -37,4 +37,6 @@ public interface OpenStaffMapper {
...
@@ -37,4 +37,6 @@ public interface OpenStaffMapper {
void
updateLoginStep
(
@Param
(
"id"
)
Long
openStaffId
,
@Param
(
"step"
)
int
step
);
void
updateLoginStep
(
@Param
(
"id"
)
Long
openStaffId
,
@Param
(
"step"
)
int
step
);
List
<
OpenStaffDTO
>
list
(
OpenStaffPageQDTO
qdto
);
List
<
OpenStaffDTO
>
list
(
OpenStaffPageQDTO
qdto
);
TabOpenStaff
getByQwUserId
(
@Param
(
"qwUserId"
)
Long
qwUserId
);
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/OpenStaffApiServiceImpl.java
View file @
8858900a
...
@@ -110,6 +110,12 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
...
@@ -110,6 +110,12 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
log
.
info
(
"登录的企业不对={},{}"
,
uuid
,
corpName
);
log
.
info
(
"登录的企业不对={},{}"
,
uuid
,
corpName
);
return
ServiceResponse
.
failure
(
"9999"
,
"登录错误"
)
;
return
ServiceResponse
.
failure
(
"9999"
,
"登录错误"
)
;
}
}
TabOpenStaff
staff
=
this
.
openStaffMapper
.
getByQwUserId
(
qwUserId
)
;
if
(
null
!=
staff
&&
staff
.
getWxEnterpriseId
().
equals
(
wxEnterpriseId
))
{
this
.
openStaffService
.
logout
(
uuid
);
log
.
info
(
"只能托管一个企业={},{}"
,
uuid
,
corpName
);
return
ServiceResponse
.
failure
(
"9999"
,
"只能托管一个企业"
)
;
}
openStaff
.
setWxCorpId
(
qwCorpId
);
openStaff
.
setWxCorpId
(
qwCorpId
);
openStaff
.
setQwUserId
(
qwUserId
);
openStaff
.
setQwUserId
(
qwUserId
);
if
(
null
==
openStaff
.
getFirstAuthTime
())
{
if
(
null
==
openStaff
.
getFirstAuthTime
())
{
...
@@ -147,6 +153,16 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
...
@@ -147,6 +153,16 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
}
}
@Override
@Override
public
ServiceResponse
<
OpenStaffDTO
>
getByQwUserId
(
Long
qwUserId
)
{
TabOpenStaff
openStaff
=
this
.
openStaffMapper
.
getByQwUserId
(
qwUserId
)
;
if
(
null
==
openStaff
)
{
return
ServiceResponse
.
failure
(
"9999"
,
"已删除"
)
;
}
OpenStaffDTO
dto
=
EntityUtil
.
changeEntityByJSON
(
OpenStaffDTO
.
class
,
openStaff
)
;
return
ServiceResponse
.
success
(
dto
);
}
@Override
public
ServiceResponse
<
Long
>
init
(
OpenStaffInitQDTO
qdto
)
{
public
ServiceResponse
<
Long
>
init
(
OpenStaffInitQDTO
qdto
)
{
String
staffId
=
qdto
.
getStaffId
();
String
staffId
=
qdto
.
getStaffId
();
if
(
StringUtils
.
isBlank
(
staffId
))
{
if
(
StringUtils
.
isBlank
(
staffId
))
{
...
...
haoban-manage3-service/src/main/resources/mapper/OpenStaffMapper.xml
View file @
8858900a
...
@@ -123,4 +123,10 @@
...
@@ -123,4 +123,10 @@
select * from tab_haoban_open_staff
select * from tab_haoban_open_staff
</select>
</select>
<select
id=
"getByQwUserId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_open_staff where qw_user_id = #{qwUserId} and delete_flag = 0
</select>
</mapper>
</mapper>
\ No newline at end of file
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