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
1
Merge Requests
1
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
5284bab4
Commit
5284bab4
authored
Jun 11, 2024
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企微托管账号
parent
64f9d592
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
41 additions
and
15 deletions
+41
-15
OpenStaffDTO.java
...main/java/com/gic/haoban/manage/api/dto/OpenStaffDTO.java
+13
-0
QywxCallbackController.java
.../haoban/manage/web/controller/QywxCallbackController.java
+4
-4
TabOpenStaff.java
...va/com/gic/haoban/manage/service/entity/TabOpenStaff.java
+10
-0
OpenStaffService.java
...m/gic/haoban/manage/service/service/OpenStaffService.java
+1
-1
OpenStaffServiceImpl.java
...ban/manage/service/service/impl/OpenStaffServiceImpl.java
+2
-1
OpenStaffApiServiceImpl.java
...age/service/service/out/impl/OpenStaffApiServiceImpl.java
+5
-5
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+1
-1
OpenStaffMapper.xml
...ge3-service/src/main/resources/mapper/OpenStaffMapper.xml
+5
-1
QywxOpenController.java
...haoban/manage/web/controller/open/QywxOpenController.java
+0
-2
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/OpenStaffDTO.java
View file @
5284bab4
...
@@ -104,10 +104,23 @@ public class OpenStaffDTO implements Serializable {
...
@@ -104,10 +104,23 @@ public class OpenStaffDTO implements Serializable {
private
Integer
validQrcodeFlag
;
private
Integer
validQrcodeFlag
;
/**
/**
* 登录错误信息
*/
private
String
loginRemark
;
/**
* tab_haoban_open_staff
* tab_haoban_open_staff
*/
*/
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
public
String
getLoginRemark
()
{
return
loginRemark
;
}
public
void
setLoginRemark
(
String
loginRemark
)
{
this
.
loginRemark
=
loginRemark
;
}
public
String
getEnterpriseId
()
{
public
String
getEnterpriseId
()
{
return
enterpriseId
;
return
enterpriseId
;
}
}
...
...
haoban-manage3-operation-web/src/main/java/com/gic/haoban/manage/web/controller/QywxCallbackController.java
View file @
5284bab4
...
@@ -84,16 +84,16 @@ public class QywxCallbackController extends WebBaseController {
...
@@ -84,16 +84,16 @@ public class QywxCallbackController extends WebBaseController {
private
void
chat
(
String
uuid
,
JSONObject
json
)
{
private
void
chat
(
String
uuid
,
JSONObject
json
)
{
logger
.
info
(
"消息"
);
logger
.
info
(
"消息"
);
int
msgtype
=
json
.
getIntValue
(
"msgtype"
)
;
int
msgtype
=
json
.
getIntValue
(
"msgtype"
)
;
// 1导购发 2好友发
int
sendType
=
1
;
if
(
msgtype
==
2
)
{
if
(
msgtype
==
2
)
{
msgtype
=
2
;
sendType
=
2
;
}
else
{
msgtype
=
1
;
}
}
int
isRoom
=
0
;
int
isRoom
=
0
;
if
(
json
.
getIntValue
(
"is_room"
)
==
1
)
{
if
(
json
.
getIntValue
(
"is_room"
)
==
1
)
{
}
else
{
}
else
{
this
.
openQwApiService
.
saveChatLog
(
uuid
,
json
.
getLong
(
"sender"
),
json
.
getLong
(
"receiver"
),
json
.
getString
(
"content"
),
msgt
ype
)
;
this
.
openQwApiService
.
saveChatLog
(
uuid
,
json
.
getLong
(
"sender"
),
json
.
getLong
(
"receiver"
),
json
.
getString
(
"content"
),
sendT
ype
)
;
}
}
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/TabOpenStaff.java
View file @
5284bab4
...
@@ -101,6 +101,16 @@ public class TabOpenStaff implements Serializable {
...
@@ -101,6 +101,16 @@ public class TabOpenStaff implements Serializable {
private
Integer
validQrcodeFlag
;
private
Integer
validQrcodeFlag
;
private
String
loginRemark
;
public
String
getLoginRemark
()
{
return
loginRemark
;
}
public
void
setLoginRemark
(
String
loginRemark
)
{
this
.
loginRemark
=
loginRemark
;
}
/**
/**
* tab_haoban_open_staff
* tab_haoban_open_staff
*/
*/
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/OpenStaffService.java
View file @
5284bab4
...
@@ -15,7 +15,7 @@ public interface OpenStaffService {
...
@@ -15,7 +15,7 @@ public interface OpenStaffService {
public
TabOpenStaff
getByUUID
(
String
uuid
)
;
public
TabOpenStaff
getByUUID
(
String
uuid
)
;
public
void
logout
(
String
uuid
)
;
public
void
logout
(
String
uuid
,
String
loginRemark
)
;
ServiceResponse
<
Page
<
OpenStaffDTO
>>
page
(
OpenStaffPageQDTO
qdto
,
BasePageInfo
basePageInfo
);
ServiceResponse
<
Page
<
OpenStaffDTO
>>
page
(
OpenStaffPageQDTO
qdto
,
BasePageInfo
basePageInfo
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/OpenStaffServiceImpl.java
View file @
5284bab4
...
@@ -56,7 +56,7 @@ public class OpenStaffServiceImpl implements OpenStaffService {
...
@@ -56,7 +56,7 @@ public class OpenStaffServiceImpl implements OpenStaffService {
}
}
@Override
@Override
public
void
logout
(
String
uuid
)
{
public
void
logout
(
String
uuid
,
String
loginRemark
)
{
TabOpenStaff
openStaff
=
this
.
getByUUID
(
uuid
)
;
TabOpenStaff
openStaff
=
this
.
getByUUID
(
uuid
)
;
if
(
null
==
openStaff
)
{
if
(
null
==
openStaff
)
{
return
;
return
;
...
@@ -71,6 +71,7 @@ public class OpenStaffServiceImpl implements OpenStaffService {
...
@@ -71,6 +71,7 @@ public class OpenStaffServiceImpl implements OpenStaffService {
openStaff
.
setKey1
(
null
);
openStaff
.
setKey1
(
null
);
openStaff
.
setKey2
(
null
);
openStaff
.
setKey2
(
null
);
openStaff
.
setUuid
(
null
);
openStaff
.
setUuid
(
null
);
openStaff
.
setLoginRemark
(
loginRemark
);
this
.
openStaffMapper
.
update
(
openStaff
)
;
this
.
openStaffMapper
.
update
(
openStaff
)
;
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/OpenStaffApiServiceImpl.java
View file @
5284bab4
...
@@ -92,7 +92,7 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
...
@@ -92,7 +92,7 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
}
}
this
.
openStaffMapper
.
updateLoginStep
(
openStaff
.
getOpenStaffId
(),
step
)
;
this
.
openStaffMapper
.
updateLoginStep
(
openStaff
.
getOpenStaffId
(),
step
)
;
if
(
QwOpenStepEnum
.
isFail
(
step
))
{
if
(
QwOpenStepEnum
.
isFail
(
step
))
{
this
.
openStaffService
.
logout
(
uuid
);
this
.
openStaffService
.
logout
(
uuid
,
"企微返回退出/登录超时"
);
}
}
return
ServiceResponse
.
success
();
return
ServiceResponse
.
success
();
}
}
...
@@ -106,13 +106,13 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
...
@@ -106,13 +106,13 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
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
))
{
this
.
openStaffService
.
logout
(
uuid
);
this
.
openStaffService
.
logout
(
uuid
,
"授权登录账号与当前账号不一致"
);
log
.
info
(
"登录的企业不对={},{}"
,
uuid
,
corpName
);
log
.
info
(
"登录的企业不对={},{}"
,
uuid
,
corpName
);
return
ServiceResponse
.
failure
(
"9999"
,
"登录错误"
)
;
return
ServiceResponse
.
failure
(
"9999"
,
"登录错误"
)
;
}
}
TabOpenStaff
staff
=
this
.
openStaffMapper
.
getByQwUserId
(
qwUserId
)
;
TabOpenStaff
staff
=
this
.
openStaffMapper
.
getByQwUserId
(
qwUserId
)
;
if
(
null
!=
staff
&&
staff
.
getWxEnterpriseId
().
equals
(
wxEnterpriseId
))
{
if
(
null
!=
staff
&&
staff
.
getWxEnterpriseId
().
equals
(
wxEnterpriseId
))
{
this
.
openStaffService
.
logout
(
uuid
);
this
.
openStaffService
.
logout
(
uuid
,
"只能托管一个企微企业"
);
log
.
info
(
"只能托管一个企业={},{}"
,
uuid
,
corpName
);
log
.
info
(
"只能托管一个企业={},{}"
,
uuid
,
corpName
);
return
ServiceResponse
.
failure
(
"9999"
,
"只能托管一个企业"
)
;
return
ServiceResponse
.
failure
(
"9999"
,
"只能托管一个企业"
)
;
}
}
...
@@ -129,7 +129,7 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
...
@@ -129,7 +129,7 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
@Override
@Override
public
ServiceResponse
<
Void
>
logout
(
String
uuid
)
{
public
ServiceResponse
<
Void
>
logout
(
String
uuid
)
{
this
.
openStaffService
.
logout
(
uuid
);
this
.
openStaffService
.
logout
(
uuid
,
null
);
return
ServiceResponse
.
success
();
return
ServiceResponse
.
success
();
}
}
...
@@ -180,7 +180,7 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
...
@@ -180,7 +180,7 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
}
}
qwUserId
=
openStaff
.
getQwUserId
()
;
qwUserId
=
openStaff
.
getQwUserId
()
;
log
.
info
(
"重新初始化,退出登录"
);
log
.
info
(
"重新初始化,退出登录"
);
this
.
openStaffService
.
logout
(
openStaff
.
getUuid
());
this
.
openStaffService
.
logout
(
openStaff
.
getUuid
()
,
"重新初始化,退出登录"
);
}
}
if
(
null
==
openStaff
)
{
if
(
null
==
openStaff
)
{
openStaff
=
new
TabOpenStaff
()
;
openStaff
=
new
TabOpenStaff
()
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
5284bab4
...
@@ -204,10 +204,10 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -204,10 +204,10 @@ public class StaffApiServiceImpl implements StaffApiService {
if
(
staffListDTO
.
getQwOpenFlag
()==
1
)
{
if
(
staffListDTO
.
getQwOpenFlag
()==
1
)
{
List
<
String
>
list
=
this
.
openStaffService
.
listAllStaffId
(
wxEnterpriseId
)
;
List
<
String
>
list
=
this
.
openStaffService
.
listAllStaffId
(
wxEnterpriseId
)
;
staffIds
=
staffIds
.
stream
().
filter
(
o
->!
list
.
contains
(
o
)).
collect
(
Collectors
.
toList
());
staffIds
=
staffIds
.
stream
().
filter
(
o
->!
list
.
contains
(
o
)).
collect
(
Collectors
.
toList
());
}
if
(
CollectionUtils
.
isEmpty
(
staffIds
)){
if
(
CollectionUtils
.
isEmpty
(
staffIds
)){
return
new
Page
<>();
return
new
Page
<>();
}
}
}
StaffListBO
staffListBO
=
EntityUtil
.
changeEntityByJSON
(
StaffListBO
.
class
,
staffListDTO
);
StaffListBO
staffListBO
=
EntityUtil
.
changeEntityByJSON
(
StaffListBO
.
class
,
staffListDTO
);
staffListBO
.
setStaffIds
(
staffIds
);
staffListBO
.
setStaffIds
(
staffIds
);
staffListBO
.
setRelationFlag
(
relationFlag
);
staffListBO
.
setRelationFlag
(
relationFlag
);
...
...
haoban-manage3-service/src/main/resources/mapper/OpenStaffMapper.xml
View file @
5284bab4
...
@@ -22,12 +22,13 @@
...
@@ -22,12 +22,13 @@
<result
column=
"auth_time"
javaType=
"java.util.Date"
jdbcType=
"TIMESTAMP"
property=
"authTime"
/>
<result
column=
"auth_time"
javaType=
"java.util.Date"
jdbcType=
"TIMESTAMP"
property=
"authTime"
/>
<result
column=
"first_auth_time"
javaType=
"java.util.Date"
jdbcType=
"TIMESTAMP"
property=
"firstAuthTime"
/>
<result
column=
"first_auth_time"
javaType=
"java.util.Date"
jdbcType=
"TIMESTAMP"
property=
"firstAuthTime"
/>
<result
column=
"valid_qrcode_flag"
property=
"validQrcodeFlag"
/>
<result
column=
"valid_qrcode_flag"
property=
"validQrcodeFlag"
/>
<result
column=
"login_remark"
property=
"loginRemark"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
open_staff_id
open_staff_id
, wx_enterprise_id,enterprise_id, staff_id, create_time, update_time, uuid, delete_flag,status_flag, step, qw_user_id, wx_corp_id, qr_code_1, key_1,
, wx_enterprise_id,enterprise_id, staff_id, create_time, update_time, uuid, delete_flag,status_flag, step, qw_user_id, wx_corp_id, qr_code_1, key_1,
qr_code_2, key_2, valid_flag, auth_time,first_auth_time , valid_qrcode_flag
qr_code_2, key_2, valid_flag, auth_time,first_auth_time , valid_qrcode_flag
, login_remark
</sql>
</sql>
<insert
id=
"insert"
parameterType=
"com.gic.haoban.manage.service.dao.mapper.OpenStaffMapper"
>
<insert
id=
"insert"
parameterType=
"com.gic.haoban.manage.service.dao.mapper.OpenStaffMapper"
>
...
@@ -65,6 +66,9 @@
...
@@ -65,6 +66,9 @@
<if
test=
"null != firstAuthTime"
>
<if
test=
"null != firstAuthTime"
>
first_auth_time=#{firstAuthTime} ,
first_auth_time=#{firstAuthTime} ,
</if>
</if>
<if
test=
"null != loginRemark"
>
login_remark = #{loginRemark}
</if>
update_time=now()
update_time=now()
where open_staff_id = #{openStaffId}
where open_staff_id = #{openStaffId}
</update>
</update>
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/open/QywxOpenController.java
View file @
5284bab4
...
@@ -12,14 +12,12 @@ import com.gic.haoban.manage.api.dto.OpenStaffDTO;
...
@@ -12,14 +12,12 @@ import com.gic.haoban.manage.api.dto.OpenStaffDTO;
import
com.gic.haoban.manage.api.dto.OpenStaffLicenseDTO
;
import
com.gic.haoban.manage.api.dto.OpenStaffLicenseDTO
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.dto.chat.GroupChatHmDTO
;
import
com.gic.haoban.manage.api.qdto.OpenStaffInitQDTO
;
import
com.gic.haoban.manage.api.qdto.OpenStaffInitQDTO
;
import
com.gic.haoban.manage.api.qdto.OpenStaffPageQDTO
;
import
com.gic.haoban.manage.api.qdto.OpenStaffPageQDTO
;
import
com.gic.haoban.manage.api.service.OpenStaffApiService
;
import
com.gic.haoban.manage.api.service.OpenStaffApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffClerkRelationApiService
;
import
com.gic.haoban.manage.api.service.StaffClerkRelationApiService
;
import
com.gic.haoban.manage.web.qo.open.OpenStaffQO
;
import
com.gic.haoban.manage.web.qo.open.OpenStaffQO
;
import
com.gic.haoban.manage.web.vo.chat.GroupChatHmVO
;
import
com.gic.haoban.manage.web.vo.open.OpenStaffVO
;
import
com.gic.haoban.manage.web.vo.open.OpenStaffVO
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
...
...
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