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
3023e34c
Commit
3023e34c
authored
Jun 08, 2024
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企微托管账号
parent
5e695942
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
75 additions
and
21 deletions
+75
-21
OpenStaffDTO.java
...main/java/com/gic/haoban/manage/api/dto/OpenStaffDTO.java
+15
-2
OpenStaffInitQDTO.java
...ava/com/gic/haoban/manage/api/qdto/OpenStaffInitQDTO.java
+9
-0
OpenStaffService.java
...m/gic/haoban/manage/service/service/OpenStaffService.java
+4
-0
OpenStaffServiceImpl.java
...ban/manage/service/service/impl/OpenStaffServiceImpl.java
+31
-0
OpenStaffApiServiceImpl.java
...age/service/service/out/impl/OpenStaffApiServiceImpl.java
+11
-19
OpenStaffQO.java
...n/java/com/gic/haoban/manage/web/qo/open/OpenStaffQO.java
+4
-0
dubbo-haoban-manage-web.xml
...3-web/src/main/webapp/WEB-INF/dubbo-haoban-manage-web.xml
+1
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/OpenStaffDTO.java
View file @
3023e34c
...
@@ -43,12 +43,12 @@ public class OpenStaffDTO implements Serializable {
...
@@ -43,12 +43,12 @@ public class OpenStaffDTO implements Serializable {
private
Integer
deleteFlag
;
private
Integer
deleteFlag
;
/**
/**
*
0待验证 1授权中 2已过期
*
1授权中 2未登录(已过期)
*/
*/
private
Integer
statusFlag
;
private
Integer
statusFlag
;
/**
/**
* 登录步骤
* 登录步骤
1已扫码 2取消登录 3超时 4验证码正确
*/
*/
private
Integer
step
;
private
Integer
step
;
...
@@ -98,10 +98,23 @@ public class OpenStaffDTO implements Serializable {
...
@@ -98,10 +98,23 @@ public class OpenStaffDTO implements Serializable {
private
Date
firstAuthTime
;
private
Date
firstAuthTime
;
/**
/**
* 需要二次扫码
*/
private
Integer
validQrcodeFlag
;
/**
* tab_haoban_open_staff
* tab_haoban_open_staff
*/
*/
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
public
Integer
getValidQrcodeFlag
()
{
return
validQrcodeFlag
;
}
public
void
setValidQrcodeFlag
(
Integer
validQrcodeFlag
)
{
this
.
validQrcodeFlag
=
validQrcodeFlag
;
}
public
Long
getOpenStaffId
()
{
public
Long
getOpenStaffId
()
{
return
openStaffId
;
return
openStaffId
;
}
}
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/qdto/OpenStaffInitQDTO.java
View file @
3023e34c
...
@@ -7,6 +7,15 @@ public class OpenStaffInitQDTO implements Serializable {
...
@@ -7,6 +7,15 @@ public class OpenStaffInitQDTO implements Serializable {
private
String
wxEnterpriseId
;
private
String
wxEnterpriseId
;
private
String
enterpriseId
;
private
String
enterpriseId
;
private
String
staffId
;
private
String
staffId
;
private
int
loginAgainFlag
;
public
int
getLoginAgainFlag
()
{
return
loginAgainFlag
;
}
public
void
setLoginAgainFlag
(
int
loginAgainFlag
)
{
this
.
loginAgainFlag
=
loginAgainFlag
;
}
public
String
getEnterpriseId
()
{
public
String
getEnterpriseId
()
{
return
enterpriseId
;
return
enterpriseId
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/OpenStaffService.java
View file @
3023e34c
...
@@ -6,4 +6,8 @@ public interface OpenStaffService {
...
@@ -6,4 +6,8 @@ public interface OpenStaffService {
public
TabOpenStaff
save
(
TabOpenStaff
tab
)
;
public
TabOpenStaff
save
(
TabOpenStaff
tab
)
;
public
TabOpenStaff
getByUUID
(
String
uuid
)
;
public
void
logout
(
String
uuid
)
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/OpenStaffServiceImpl.java
View file @
3023e34c
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.util.UniqueIdUtils
;
import
com.gic.commons.util.UniqueIdUtils
;
import
com.gic.haoban.manage.api.service.OpenStaffApiService
;
import
com.gic.haoban.manage.service.dao.mapper.OpenStaffMapper
;
import
com.gic.haoban.manage.service.dao.mapper.OpenStaffMapper
;
import
com.gic.haoban.manage.service.entity.TabOpenStaff
;
import
com.gic.haoban.manage.service.entity.TabOpenStaff
;
import
com.gic.haoban.manage.service.service.OpenStaffService
;
import
com.gic.haoban.manage.service.service.OpenStaffService
;
import
com.gic.haoban.manage.service.util.OpenUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -12,6 +17,8 @@ import java.util.Date;
...
@@ -12,6 +17,8 @@ import java.util.Date;
@Service
(
"openStaffService"
)
@Service
(
"openStaffService"
)
public
class
OpenStaffServiceImpl
implements
OpenStaffService
{
public
class
OpenStaffServiceImpl
implements
OpenStaffService
{
private
static
final
Logger
log
=
LogManager
.
getLogger
(
OpenStaffService
.
class
);
@Autowired
@Autowired
private
OpenStaffMapper
openStaffMapper
;
private
OpenStaffMapper
openStaffMapper
;
...
@@ -29,4 +36,28 @@ public class OpenStaffServiceImpl implements OpenStaffService {
...
@@ -29,4 +36,28 @@ public class OpenStaffServiceImpl implements OpenStaffService {
}
}
return
tab
;
return
tab
;
}
}
@Override
public
TabOpenStaff
getByUUID
(
String
uuid
)
{
TabOpenStaff
openStaff
=
this
.
openStaffMapper
.
getByUUID
(
uuid
)
;
if
(
null
==
openStaff
)
{
log
.
info
(
"通过uuid查不到={}"
,
uuid
);
OpenUtils
.
logout
(
uuid
);
}
return
openStaff
;
}
@Override
public
void
logout
(
String
uuid
)
{
TabOpenStaff
openStaff
=
this
.
getByUUID
(
uuid
)
;
if
(
null
==
openStaff
)
{
return
;
}
OpenUtils
.
logout
(
uuid
);
openStaff
.
setStep
(
0
);
openStaff
.
setStatusFlag
(
2
);
openStaff
.
setValidFlag
(
0
);
openStaff
.
setValidQrcodeFlag
(
0
);
this
.
openStaffMapper
.
update
(
openStaff
)
;
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/OpenStaffApiServiceImpl.java
View file @
3023e34c
...
@@ -52,9 +52,8 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
...
@@ -52,9 +52,8 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
@Override
@Override
public
ServiceResponse
<
Void
>
update2QrcodeFlag
(
String
uuid
)
{
public
ServiceResponse
<
Void
>
update2QrcodeFlag
(
String
uuid
)
{
TabOpenStaff
openStaff
=
this
.
openStaff
Mapper
.
getByUUID
(
uuid
)
;
TabOpenStaff
openStaff
=
this
.
openStaff
Service
.
getByUUID
(
uuid
)
;
if
(
null
==
openStaff
)
{
if
(
null
==
openStaff
)
{
log
.
info
(
"通过uuid查不到={}"
,
uuid
);
return
ServiceResponse
.
failure
(
"9999"
,
"登录错误"
)
;
return
ServiceResponse
.
failure
(
"9999"
,
"登录错误"
)
;
}
}
this
.
openStaffMapper
.
update2QrcodeFlag
(
openStaff
.
getOpenStaffId
());
this
.
openStaffMapper
.
update2QrcodeFlag
(
openStaff
.
getOpenStaffId
());
...
@@ -82,10 +81,8 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
...
@@ -82,10 +81,8 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
@Override
@Override
public
ServiceResponse
<
Void
>
updateLoginStep
(
String
uuid
,
int
step
)
{
public
ServiceResponse
<
Void
>
updateLoginStep
(
String
uuid
,
int
step
)
{
TabOpenStaff
openStaff
=
this
.
openStaff
Mapper
.
getByUUID
(
uuid
)
;
TabOpenStaff
openStaff
=
this
.
openStaff
Service
.
getByUUID
(
uuid
)
;
if
(
null
==
openStaff
)
{
if
(
null
==
openStaff
)
{
log
.
info
(
"通过uuid查不到={}"
,
uuid
);
OpenUtils
.
logout
(
uuid
);
return
ServiceResponse
.
failure
(
"9999"
,
"登录错误"
)
;
return
ServiceResponse
.
failure
(
"9999"
,
"登录错误"
)
;
}
}
this
.
openStaffMapper
.
updateLoginStep
(
openStaff
.
getOpenStaffId
(),
step
)
;
this
.
openStaffMapper
.
updateLoginStep
(
openStaff
.
getOpenStaffId
(),
step
)
;
...
@@ -94,16 +91,14 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
...
@@ -94,16 +91,14 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
@Override
@Override
public
ServiceResponse
<
Void
>
login
(
String
uuid
,
Long
qwCorpId
,
String
corpName
,
Long
qwUserId
)
{
public
ServiceResponse
<
Void
>
login
(
String
uuid
,
Long
qwCorpId
,
String
corpName
,
Long
qwUserId
)
{
TabOpenStaff
openStaff
=
this
.
openStaff
Mapper
.
getByUUID
(
uuid
)
;
TabOpenStaff
openStaff
=
this
.
openStaff
Service
.
getByUUID
(
uuid
)
;
if
(
null
==
openStaff
)
{
if
(
null
==
openStaff
)
{
log
.
info
(
"通过uuid查不到={}"
,
uuid
);
OpenUtils
.
logout
(
uuid
);
return
ServiceResponse
.
failure
(
"9999"
,
"登录错误"
)
;
return
ServiceResponse
.
failure
(
"9999"
,
"登录错误"
)
;
}
}
String
wxEnterpriseId
=
openStaff
.
getWxEnterpriseId
()
;
String
wxEnterpriseId
=
openStaff
.
getWxEnterpriseId
()
;
List
<
String
>
backWxEnterpriseIdList
=
this
.
wxEnterpriseService
.
getWxEnterpriseIdByName
(
corpName
)
;
List
<
String
>
backWxEnterpriseIdList
=
this
.
wxEnterpriseService
.
getWxEnterpriseIdByName
(
corpName
)
;
if
(
CollectionUtils
.
isEmpty
(
backWxEnterpriseIdList
)
||
backWxEnterpriseIdList
.
size
()>
1
||
!
backWxEnterpriseIdList
.
get
(
0
).
equals
(
wxEnterpriseId
))
{
if
(
CollectionUtils
.
isEmpty
(
backWxEnterpriseIdList
)
||
backWxEnterpriseIdList
.
size
()>
1
||
!
backWxEnterpriseIdList
.
get
(
0
).
equals
(
wxEnterpriseId
))
{
OpenUtils
.
logout
(
uuid
);
this
.
openStaffService
.
logout
(
uuid
);
log
.
info
(
"登录的企业不对={},{}"
,
uuid
,
corpName
);
log
.
info
(
"登录的企业不对={},{}"
,
uuid
,
corpName
);
return
ServiceResponse
.
failure
(
"9999"
,
"登录错误"
)
;
return
ServiceResponse
.
failure
(
"9999"
,
"登录错误"
)
;
}
}
...
@@ -120,15 +115,7 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
...
@@ -120,15 +115,7 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
@Override
@Override
public
ServiceResponse
<
Void
>
logout
(
String
uuid
)
{
public
ServiceResponse
<
Void
>
logout
(
String
uuid
)
{
TabOpenStaff
openStaff
=
this
.
openStaffMapper
.
getByUUID
(
uuid
)
;
this
.
openStaffService
.
logout
(
uuid
);
if
(
null
==
openStaff
)
{
log
.
info
(
"通过uuid查不到={}"
,
uuid
);
OpenUtils
.
logout
(
uuid
);
return
ServiceResponse
.
failure
(
"9999"
,
"登录错误"
)
;
}
openStaff
.
setStep
(
0
);
openStaff
.
setStatusFlag
(
2
);
this
.
openStaffMapper
.
update
(
openStaff
)
;
return
ServiceResponse
.
success
();
return
ServiceResponse
.
success
();
}
}
...
@@ -164,9 +151,12 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
...
@@ -164,9 +151,12 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
TabOpenStaff
openStaff
=
this
.
openStaffMapper
.
getByStaffId
(
staffId
)
;
TabOpenStaff
openStaff
=
this
.
openStaffMapper
.
getByStaffId
(
staffId
)
;
Long
qwUserId
=
null
;
Long
qwUserId
=
null
;
if
(
null
!=
openStaff
)
{
if
(
null
!=
openStaff
)
{
if
(
openStaff
.
getStatusFlag
()==
1
&&
qdto
.
getLoginAgainFlag
()==
0
)
{
return
ServiceResponse
.
failure
(
"9999"
,
"成员已托管中"
)
;
}
qwUserId
=
openStaff
.
getQwUserId
()
;
qwUserId
=
openStaff
.
getQwUserId
()
;
log
.
info
(
"重新初始化,退出登录"
);
log
.
info
(
"重新初始化,退出登录"
);
OpenUtils
.
logout
(
openStaff
.
getUuid
());
this
.
openStaffService
.
logout
(
openStaff
.
getUuid
());
}
}
if
(
null
==
openStaff
)
{
if
(
null
==
openStaff
)
{
openStaff
=
new
TabOpenStaff
()
;
openStaff
=
new
TabOpenStaff
()
;
...
@@ -181,6 +171,8 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
...
@@ -181,6 +171,8 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
openStaff
.
setQrCode1
(
init
.
getQrcode
());
openStaff
.
setQrCode1
(
init
.
getQrcode
());
openStaff
.
setKey1
(
init
.
getKey
());
openStaff
.
setKey1
(
init
.
getKey
());
openStaff
.
setStep
(
0
);
openStaff
.
setStep
(
0
);
openStaff
.
setValidFlag
(
0
);
openStaff
.
setValidQrcodeFlag
(
0
);
openStaff
=
this
.
openStaffService
.
save
(
openStaff
);
openStaff
=
this
.
openStaffService
.
save
(
openStaff
);
return
ServiceResponse
.
success
(
openStaff
.
getOpenStaffId
())
;
return
ServiceResponse
.
success
(
openStaff
.
getOpenStaffId
())
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/qo/open/OpenStaffQO.java
0 → 100644
View file @
3023e34c
package
com
.
gic
.
haoban
.
manage
.
web
.
qo
.
open
;
public
class
OpenStaffQO
{
}
haoban-manage3-web/src/main/webapp/WEB-INF/dubbo-haoban-manage-web.xml
View file @
3023e34c
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
<dubbo:application
name=
"haoban-manage3-web"
/>
<dubbo:application
name=
"haoban-manage3-web"
/>
<dubbo:protocol
name=
"dubbo"
port=
"30009"
/>
<dubbo:protocol
name=
"dubbo"
port=
"30009"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.OpenStaffApiService"
id=
"openStaffApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.WxEnterpriseActiveDataApiService"
id=
"wxEnterpriseActiveDataApiService"
timeout=
"10000"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.WxEnterpriseActiveDataApiService"
id=
"wxEnterpriseActiveDataApiService"
timeout=
"10000"
/>
<dubbo:reference
interface=
"com.gic.enterprise.api.service.DownloadReportService"
id=
"downloadReportService"
timeout=
"10000"
/>
<dubbo:reference
interface=
"com.gic.enterprise.api.service.DownloadReportService"
id=
"downloadReportService"
timeout=
"10000"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.chat.GroupChatDataApiService"
id=
"groupChatDataApiService"
timeout=
"10000"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.chat.GroupChatDataApiService"
id=
"groupChatDataApiService"
timeout=
"10000"
/>
...
...
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