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
4b15772b
Commit
4b15772b
authored
Aug 04, 2021
by
QianQiXiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
8d0c3890
5a41193d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
35 deletions
+49
-35
QywxTagApiService.java
.../com/gic/haoban/manage/api/service/QywxTagApiService.java
+9
-0
QywxTagApiServiceImpl.java
...anage/service/service/out/impl/QywxTagApiServiceImpl.java
+21
-2
dubbo-haoban-manage-service.xml
...ervice/src/main/resources/dubbo-haoban-manage-service.xml
+4
-0
QywxTagRelationMapper.xml
...rvice/src/main/resources/mapper/QywxTagRelationMapper.xml
+1
-1
TabHaobanStaffClerkRelationMapper.xml
...in/resources/mapper/TabHaobanStaffClerkRelationMapper.xml
+6
-8
InfoController.java
.../com/gic/haoban/manage/web/controller/InfoController.java
+8
-24
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/QywxTagApiService.java
View file @
4b15772b
...
...
@@ -140,4 +140,13 @@ public interface QywxTagApiService {
*/
public
QywxTagRelationDTO
getQywxTagRelationByRelationId
(
String
relationId
);
/**
* 根据会员标签关联id 查询关联信息
*
* @param qywxTagId
* @return
*/
public
QywxTagInfoDTO
getQywxTagByQywxTagId
(
String
qywxTagId
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/QywxTagApiServiceImpl.java
View file @
4b15772b
...
...
@@ -5,6 +5,8 @@ import com.alibaba.fastjson.JSONObject;
import
com.gic.commons.util.ToolUtil
;
import
com.gic.haoban.app.customer.dto.SearchComputeDTO
;
import
com.gic.haoban.app.customer.dto.SearchDataDTO
;
import
com.gic.haoban.app.customer.enums.QywxTaskStatusEnum
;
import
com.gic.haoban.app.customer.service.api.service.QywxTagSyncApiService
;
import
com.gic.haoban.base.api.common.ServiceResponse
;
import
com.gic.haoban.common.utils.EntityUtil
;
import
com.gic.haoban.manage.api.dto.*
;
...
...
@@ -81,6 +83,9 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
@Autowired
private
MemberTagService
memberTagService
;
@Autowired
private
QywxTagSyncApiService
qywxTagSyncApiService
;
@Override
public
void
pullQywxTag
(
String
wxEnterpriseId
)
{
WxEnterpriseDTO
wxEnterpriseDTO
=
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
...
...
@@ -108,7 +113,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
WxEnterpriseDTO
wxEnterpriseDTO
=
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
//调用企业微信接口保存
QywxGetCorpTagListDTO
resp
=
this
.
saveQywxTag
(
wxEnterpriseDTO
,
infoDTO
,
items
);
if
(
resp
.
getErrcode
()
!=
0
)
{
if
(
resp
.
getErrcode
()
!=
0
&&
CollectionUtils
.
isEmpty
(
resp
.
getTagGroup
())
)
{
logger
.
info
(
"同步失败:{}"
,
JSONObject
.
toJSONString
(
resp
));
ret
.
setCode
(
resp
.
getErrcode
());
ret
.
setMessage
(
resp
.
getErrmsg
());
...
...
@@ -336,7 +341,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
//删除同步 关闭同步
qywxTagService
.
closeSync
(
wxEnterpriseDto
.
getWxEnterpriseId
(),
relation
.
getMemberTagId
());
qywxTagService
.
delQywxTag
(
callbackDTO
.
getTagId
(),
wxEnterpriseDto
.
getWxEnterpriseId
());
saveCloseTask
(
qywxGroupKey
.
getQywxGroupName
().
substring
(
3
),
"-1"
,
relation
.
getWxEnterpriseId
(),
relation
.
getEnterpriseId
());
//标签项
}
else
if
(
relationTypeEnum
.
getTagType
()
==
QywxTagRelationTypeEnum
.
TAG_ITEM
.
getTagType
())
{
TabQywxTagRelation
qywxTagRelation
=
qywxTagService
.
getQywxTagRelationByQywxKey
(
wxEnterpriseDto
.
getWxEnterpriseId
(),
callbackDTO
.
getTagId
(),
QywxTagRelationTypeEnum
.
TAG_ITEM
.
getType
());
...
...
@@ -348,12 +353,20 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
logger
.
info
(
"删除标签 关闭同步:{}"
,
qywxTagRelation
.
getMemberTagId
());
//删除同步 关闭同步
this
.
closeSync
(
wxEnterpriseDto
.
getWxEnterpriseId
(),
qywxTagRelation
.
getMemberTagId
());
TabQywxTag
tabQywxTag
=
qywxTagService
.
getQywxTagByQywxTagId
(
qywxTagRelation
.
getWxEnterpriseId
(),
qywxTagRelation
.
getQywxTagId
());
saveCloseTask
(
tabQywxTag
.
getQywxGroupName
(),
"-1"
,
qywxTagRelation
.
getWxEnterpriseId
(),
qywxTagRelation
.
getEnterpriseId
());
// qywxTagService.closeSync(wxEnterpriseDto.getWxEnterpriseId(), qywxTagRelation.getMemberTagId());
// qywxTagService.delQywxTagItemById(wxEnterpriseDto.getWxEnterpriseId(), qywxTagRelation.getQywxTagItemId());
}
}
private
void
saveCloseTask
(
String
tagName
,
String
staffId
,
String
wxEnterpriseId
,
String
enterpriseId
)
{
String
content
=
tagName
+
"-关闭标签同步成功"
;
qywxTagSyncApiService
.
saveCloseTask
(
staffId
,
wxEnterpriseId
,
enterpriseId
,
content
,
QywxTaskStatusEnum
.
ALL_SUCCESS
.
getType
());
}
/**
* 重新同步
*
...
...
@@ -863,4 +876,10 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
TabQywxTagRelation
tagRelation
=
qywxTagService
.
getQywxTagRelationById
(
relationId
);
return
EntityUtil
.
changeEntityByJSON
(
QywxTagRelationDTO
.
class
,
tagRelation
);
}
@Override
public
QywxTagInfoDTO
getQywxTagByQywxTagId
(
String
qywxTagId
)
{
TabQywxTag
tabQywxTag
=
qywxTagService
.
getQywxTagByQywxTagId
(
null
,
qywxTagId
);
return
EntityUtil
.
changeEntityByJSON
(
QywxTagInfoDTO
.
class
,
tabQywxTag
);
}
}
haoban-manage3-service/src/main/resources/dubbo-haoban-manage-service.xml
View file @
4b15772b
...
...
@@ -80,6 +80,10 @@
<dubbo:reference
id=
"customerApiService"
interface=
"com.gic.haoban.app.customer.service.api.service.CustomerApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
id=
"qywxTagSyncApiService"
interface=
"com.gic.haoban.app.customer.service.api.service.QywxTagSyncApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
id=
"enterpriseService"
interface=
"com.gic.enterprise.api.service.EnterpriseService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
interface=
"com.gic.haoban.communicate.api.service.SyncHaobanToGicServiceApi"
id=
"syncHaobanToGicServiceApi"
/>
...
...
haoban-manage3-service/src/main/resources/mapper/QywxTagRelationMapper.xml
View file @
4b15772b
...
...
@@ -250,7 +250,7 @@
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_tag_relation
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and qywx_tag_item_id = #{qywxTag
Id,jdbcType=VARCHAR}
and qywx_tag_item_id = #{qywxTagItem
Id,jdbcType=VARCHAR}
and relation_type=1
and status_flag=1
</select>
...
...
haoban-manage3-service/src/main/resources/mapper/TabHaobanStaffClerkRelationMapper.xml
View file @
4b15772b
...
...
@@ -434,16 +434,14 @@
</select>
<select
id=
"listAll"
resultType=
"com.gic.haoban.manage.api.dto.StaffClerkRelationDTO"
>
SELECT a.store_id,
a.wx_enterprise_id,
a.wx_user_id,
a.staff_id,
a.clerk_id,
b.staff_name,
c.store_name
SELECT a.store_id storeId,
a.wx_enterprise_id wxEnterpriseId,
a.wx_user_id wxUserId,
a.staff_id staffId,
a.clerk_id clerkId,
b.staff_name staffName
FROM tab_haoban_staff_clerk_relation a
LEFT JOIN tab_haoban_staff b ON b.staff_id = a.staff_id
LEFT JOIN tab_gic_clerk c ON c.clerk_id = a.clerk_id
WHERE a.status_flag = 1
GROUP BY a.staff_id
</select>
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/InfoController.java
View file @
4b15772b
...
...
@@ -139,35 +139,19 @@ public class InfoController extends WebBaseController{
staffDTOS
.
addAll
(
userDtos
);
}
if
(
CollectionUtils
.
isNotEmpty
(
staffDTOS
))
{
loginStaff
=
staffDTOS
.
get
(
0
);
if
(
staffDTOS
.
size
()
>
1
)
{
String
dictName
=
loginUserId
.
getDictName
();
String
[]
split
=
dictName
.
split
(
"-"
);
if
(
split
.
length
>
1
)
{
for
(
int
i
=
0
;
i
<
split
.
length
;
i
++)
{
// String weiCorpId = split[1];
String
weiCorpId
=
split
[
i
];
if
(
enterprise
.
getWxEnterpriseId
().
equals
(
wxEnterpriseApiService
.
getEnterpriseBycorpId
(
weiCorpId
)))
{
WxEnterpriseDTO
weiWxEnterpriseDTO
=
wxEnterpriseApiService
.
getEnterpriseBycorpId
(
weiCorpId
);
System
.
out
.
println
(
"执行"
+
i
);
if
(
null
!=
weiWxEnterpriseDTO
)
{
loginStaff
=
staffDTOS
.
stream
().
filter
(
staffDTO
->
{
if
(
weiWxEnterpriseDTO
.
getWxEnterpriseId
().
equals
(
staffDTO
.
getWxEnterpriseId
()))
{
return
true
;
}
else
{
return
false
;
}
}).
findFirst
().
orElse
(
staffDTOS
.
get
(
0
));
}
}
loginStaff
=
staffDTOS
.
stream
().
filter
(
staffDTO
->
{
if
(
dictName
.
indexOf
(
staffDTO
.
getWxEnterpriseId
())
>
0
)
{
return
true
;
}
else
{
return
false
;
}
}
}).
findFirst
().
orElse
(
loginStaff
);
}
else
{
loginStaff
=
staffDTOS
.
get
(
0
);
}
}
// StaffDTO staffDTO = staffApiService.selectByNationcodeAndPhoneNumber(enterprise.getWxEnterpriseId(), "86", midPhone);
// if (null !=staffDTO) {
// loginStaff=staffDTO;
// }
}
}
...
...
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