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
QianQiXiang
haoban-manage3.0
Commits
824e5770
Commit
824e5770
authored
Jul 30, 2021
by
fudahua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
会员标签同步-更新状态
parent
3d750c2a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
74 additions
and
26 deletions
+74
-26
QywxTagRelationSyncFlagEnum.java
.../haoban/manage/api/enums/QywxTagRelationSyncFlagEnum.java
+34
-0
QywxTagRelationMapper.java
...oban/manage/service/dao/mapper/QywxTagRelationMapper.java
+10
-0
QywxTagService.java
...com/gic/haoban/manage/service/service/QywxTagService.java
+8
-0
QywxTagServiceImpl.java
...aoban/manage/service/service/impl/QywxTagServiceImpl.java
+6
-0
QywxTagApiServiceImpl.java
...anage/service/service/out/impl/QywxTagApiServiceImpl.java
+4
-20
QywxTagRelationMapper.xml
...rvice/src/main/resources/mapper/QywxTagRelationMapper.xml
+12
-6
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/enums/QywxTagRelationSyncFlagEnum.java
0 → 100644
View file @
824e5770
package
com
.
gic
.
haoban
.
manage
.
api
.
enums
;
/**
* Created by hua on 2021/7/27.
*/
public
enum
QywxTagRelationSyncFlagEnum
{
DEL
(
0
,
"删除"
),
PRE
(
1
,
"预处理"
),
SUCCESS
(
2
,
"成功"
),
FAIL
(
3
,
"失败"
);
private
int
type
;
private
String
name
;
QywxTagRelationSyncFlagEnum
(
int
type
,
String
name
)
{
this
.
type
=
type
;
this
.
name
=
name
;
}
public
int
getType
()
{
return
type
;
}
public
void
setType
(
int
type
)
{
this
.
type
=
type
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/QywxTagRelationMapper.java
View file @
824e5770
...
...
@@ -95,4 +95,13 @@ public interface QywxTagRelationMapper {
* @return
*/
TabQywxTagRelation
getQywxTagByQywxTagItemId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"qywxTagItemId"
)
String
qywxTagItemId
);
/**
* 更新标签同步状态
*
* @param wxEnterpriseId
* @param memberTagId
* @return
*/
int
changeRelationSyncFlag
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"memberTagId"
)
String
memberTagId
,
@Param
(
"syncFlag"
)
Integer
syncFlag
);
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/QywxTagService.java
View file @
824e5770
...
...
@@ -198,4 +198,12 @@ public interface QywxTagService {
public
boolean
saveQywxTagOrTagItemName
(
String
id
,
String
name
,
Integer
relationType
);
/**
* 更新名称
*
* @return
*/
public
boolean
changeRelationSyncFlagByMemberTagId
(
String
wxEnterpriseId
,
String
memberTagId
,
Integer
syncFlag
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/QywxTagServiceImpl.java
View file @
824e5770
...
...
@@ -247,4 +247,10 @@ public class QywxTagServiceImpl implements QywxTagService {
}
return
true
;
}
@Override
public
boolean
changeRelationSyncFlagByMemberTagId
(
String
wxEnterpriseId
,
String
memberTagId
,
Integer
syncFlag
)
{
qywxTagRelationMapper
.
changeRelationSyncFlag
(
wxEnterpriseId
,
memberTagId
,
syncFlag
);
return
true
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/QywxTagApiServiceImpl.java
View file @
824e5770
...
...
@@ -8,6 +8,7 @@ import com.gic.haoban.app.customer.dto.SearchDataDTO;
import
com.gic.haoban.base.api.common.ServiceResponse
;
import
com.gic.haoban.common.utils.EntityUtil
;
import
com.gic.haoban.manage.api.dto.*
;
import
com.gic.haoban.manage.api.enums.QywxTagRelationSyncFlagEnum
;
import
com.gic.haoban.manage.api.enums.QywxTagRelationTypeEnum
;
import
com.gic.haoban.manage.api.service.DealSyncOperationApiService
;
import
com.gic.haoban.manage.api.service.QywxTagApiService
;
...
...
@@ -127,14 +128,6 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
//保存关联关系
saveRelation
(
wxEnterpriseId
,
enterpriseId
,
infoDTO
,
items
,
savePair
);
return
ret
;
// String taskId = dealSyncOperationApiService.createTagTask(wxEnterpriseId, "-1", infoDTO.getMemberTagId());
// if (null == taskId) {
// logger.info("标签不能重复执行");
// throw new RuntimeException("标签不能重复执行:" + infoDTO.getQywxGroupName());
// }
// List<String> tagItemIds = items.stream().map(dto -> dto.getQywxTagItemId()).collect(Collectors.toList());
// dealSyncOperationApiService.dealTagTask(wxEnterpriseId, enterpriseId, tagItemIds, taskId);
}
/**
...
...
@@ -159,7 +152,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
groupRelation
.
setQywxTagId
(
groupKey
.
getQywxTagId
());
groupRelation
.
setRelationType
(
QywxTagRelationTypeEnum
.
TAG_GROUP
.
getType
());
groupRelation
.
setStatusFlag
(
1
);
groupRelation
.
setSyncFlag
(
1
);
groupRelation
.
setSyncFlag
(
QywxTagRelationSyncFlagEnum
.
PRE
.
getType
()
);
groupRelation
.
setQywxTagRelationId
(
ToolUtil
.
randomUUID
());
groupRelation
.
setWxEnterpriseId
(
wxEnterpriseId
);
saveRelationList
.
add
(
groupRelation
);
...
...
@@ -169,7 +162,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
TabQywxTagRelation
itemRelation
=
new
TabQywxTagRelation
();
itemRelation
.
setWxEnterpriseId
(
wxEnterpriseId
);
itemRelation
.
setQywxTagRelationId
(
ToolUtil
.
randomUUID
());
itemRelation
.
setSyncFlag
(
1
);
itemRelation
.
setSyncFlag
(
QywxTagRelationSyncFlagEnum
.
PRE
.
getType
()
);
itemRelation
.
setStatusFlag
(
1
);
itemRelation
.
setRelationType
(
QywxTagRelationTypeEnum
.
TAG_ITEM
.
getType
());
itemRelation
.
setQywxTagId
(
groupKey
.
getQywxTagId
());
...
...
@@ -800,16 +793,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
@Override
public
void
changeQywxTagStatus
(
String
memberTagId
,
String
wxEnterpriseId
,
int
status
)
{
List
<
TabQywxTagRelation
>
tagRelations
=
qywxTagService
.
listQywxTagRelationByMemberTagId
(
wxEnterpriseId
,
memberTagId
);
if
(
CollectionUtils
.
isEmpty
(
tagRelations
))
{
return
;
}
TabQywxTagRelation
tagRelation
=
tagRelations
.
stream
().
filter
(
dto
->
dto
.
getRelationType
()
==
QywxTagRelationTypeEnum
.
TAG_GROUP
.
getType
()).
findFirst
().
orElse
(
null
);
if
(
null
==
tagRelation
)
{
return
;
}
qywxTagService
.
changeTagRelationStatus
(
tagRelation
.
getQywxTagRelationId
(),
status
);
return
;
qywxTagService
.
changeRelationSyncFlagByMemberTagId
(
wxEnterpriseId
,
memberTagId
,
status
);
}
@Override
...
...
haoban-manage3-service/src/main/resources/mapper/QywxTagRelationMapper.xml
View file @
824e5770
...
...
@@ -192,7 +192,6 @@
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_tag_relation
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and sync_flag=1
and status_flag=1
</select>
...
...
@@ -206,7 +205,6 @@
and wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
</if>
and status_flag=1
and sync_flag=1
</select>
<select
id=
"getQywxTagRelationByTagItemId"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
...
...
@@ -216,7 +214,6 @@
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and tag_item_id = #{tagItemId,jdbcType=VARCHAR}
and status_flag=1
and sync_flag=1
</select>
<update
id=
"delByMemberTagId"
>
...
...
@@ -236,7 +233,6 @@
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR}
and status_flag=1
and sync_flag=1
</select>
<select
id=
"getQywxGroupByQywxTagId"
resultMap=
"BaseResultMap"
>
...
...
@@ -247,7 +243,6 @@
and qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR}
and relation_type=0
and status_flag=1
and sync_flag=1
</select>
<select
id=
"getQywxTagByQywxTagItemId"
resultMap=
"BaseResultMap"
>
...
...
@@ -258,6 +253,16 @@
and qywx_tag_item_id = #{qywxTagId,jdbcType=VARCHAR}
and relation_type=1
and status_flag=1
and sync_flag=1
</select>
<update
id=
"changeRelationSyncFlag"
>
UPDATE tab_haoban_qywx_tag_relation
SET
sync_flag=#{syncFlag},
update_time=now()
where
wx_enterprise_id = #{wxEnterpriseId}
and member_tag_id = #{memberTagId,jdbcType=VARCHAR}
and status_flag=1
</update>
</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