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
c699df7d
Commit
c699df7d
authored
Jul 28, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:监听导购和门店名称变化
parent
be932e1f
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
209 additions
and
72 deletions
+209
-72
TabHaobanHmClerkRelationMapper.java
...service/dao/mapper/hm/TabHaobanHmClerkRelationMapper.java
+31
-0
TabHaobanHmQrcodeMapper.java
...manage/service/dao/mapper/hm/TabHaobanHmQrcodeMapper.java
+45
-14
HmQrcodeService.java
...gic/haoban/manage/service/service/hm/HmQrcodeService.java
+25
-0
HmQrcodeServiceImpl.java
...n/manage/service/service/hm/impl/HmQrcodeServiceImpl.java
+23
-9
StaffClerkRelationApiServiceImpl.java
...ce/service/out/impl/StaffClerkRelationApiServiceImpl.java
+2
-2
KafkaMessageServiceImpl.java
...c/haoban/manage/service/task/KafkaMessageServiceImpl.java
+4
-0
TabHaobanHmClerkRelationMapper.xml
...in/resources/mapper/hm/TabHaobanHmClerkRelationMapper.xml
+16
-0
TabHaobanHmQrcodeMapper.xml
.../src/main/resources/mapper/hm/TabHaobanHmQrcodeMapper.xml
+18
-1
WxUserAddLogMapper.xml
...rvice/src/main/resources/mapper/hm/WxUserAddLogMapper.xml
+45
-46
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/hm/TabHaobanHmClerkRelationMapper.java
View file @
c699df7d
...
@@ -152,5 +152,36 @@ public interface TabHaobanHmClerkRelationMapper {
...
@@ -152,5 +152,36 @@ public interface TabHaobanHmClerkRelationMapper {
*/
*/
List
<
TabHaobanHmClerkRelation
>
queryByHmIdNotInClerkIds
(
@Param
(
"hmId"
)
Long
hmId
,
List
<
TabHaobanHmClerkRelation
>
queryByHmIdNotInClerkIds
(
@Param
(
"hmId"
)
Long
hmId
,
@Param
(
"clerkIds"
)
List
<
String
>
clerkIds
);
@Param
(
"clerkIds"
)
List
<
String
>
clerkIds
);
/**
* 更新导购名称
*
* @param clerkId 导购id
* @param clerkName 导购名称
* @param clerkCode 职员代码
* @return int
* @author mozhu
* @date 2022-07-28 13:50:30
*/
int
updateClerkNameByClerkId
(
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"clerkId"
)
String
clerkId
,
@Param
(
"clerkName"
)
String
clerkName
,
@Param
(
"clerkCode"
)
String
clerkCode
);
/**
* 更改门店名称
*
* @param storeId 门店id
* @param storeName 门店名称
* @param storeCode 门店code
* @return int
* @author mozhu
* @date 2022-07-28 13:52:35
*/
int
updateStoreNameByStoreId
(
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"storeId"
)
String
storeId
,
@Param
(
"storeName"
)
String
storeName
,
@Param
(
"storeCode"
)
String
storeCode
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/hm/TabHaobanHmQrcodeMapper.java
View file @
c699df7d
...
@@ -158,7 +158,7 @@ public interface TabHaobanHmQrcodeMapper {
...
@@ -158,7 +158,7 @@ public interface TabHaobanHmQrcodeMapper {
* @author mozhu
* @author mozhu
* @date 2022-07-08 15:10:57
* @date 2022-07-08 15:10:57
*/
*/
List
<
TabHaobanHmQrcode
>
getHmStoreByEnterpriseId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"enterpriseId"
)
String
enterpriseId
);
List
<
TabHaobanHmQrcode
>
getHmStoreByEnterpriseId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"enterpriseId"
)
String
enterpriseId
);
/**
/**
* 根据分组id获取活码数量
* 根据分组id获取活码数量
...
@@ -169,7 +169,7 @@ public interface TabHaobanHmQrcodeMapper {
...
@@ -169,7 +169,7 @@ public interface TabHaobanHmQrcodeMapper {
* @author mozhu
* @author mozhu
* @date 2022-07-12 17:39:12
* @date 2022-07-12 17:39:12
*/
*/
List
<
HmQrcodeGroupNumBO
>
getGroupIdNumByEnterpriseId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"groupIds"
)
List
<
Long
>
groupIds
,
@Param
(
"hmIds"
)
List
<
String
>
hmIds
);
List
<
HmQrcodeGroupNumBO
>
getGroupIdNumByEnterpriseId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"groupIds"
)
List
<
Long
>
groupIds
,
@Param
(
"hmIds"
)
List
<
String
>
hmIds
);
/**
/**
* 获取总数
* 获取总数
...
@@ -183,6 +183,7 @@ public interface TabHaobanHmQrcodeMapper {
...
@@ -183,6 +183,7 @@ public interface TabHaobanHmQrcodeMapper {
/**
/**
* 批量修改 活码所属分组
* 批量修改 活码所属分组
*
* @param ids
* @param ids
* @param groupId
* @param groupId
* @return
* @return
...
@@ -190,34 +191,64 @@ public interface TabHaobanHmQrcodeMapper {
...
@@ -190,34 +191,64 @@ public interface TabHaobanHmQrcodeMapper {
int
batchUpdateQrCodeGroup
(
@Param
(
"ids"
)
List
<
Long
>
ids
,
@Param
(
"groupId"
)
Long
groupId
);
int
batchUpdateQrCodeGroup
(
@Param
(
"ids"
)
List
<
Long
>
ids
,
@Param
(
"groupId"
)
Long
groupId
);
/**
/**
*
* @Title: getCanAddCount
* @Description: 获取能创建活码的导购列表
* @author xugh
* @param wxEnterpriseId
* @param wxEnterpriseId
* @param enterprsieId
* @param enterprsieId
* @param storeIdList
* @param storeIdList
* @return
* @return
* @throws
* @throws
* @Title: getCanAddCount
* @Description: 获取能创建活码的导购列表
* @author xugh
*/
*/
int
getCanAddCount
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"storeIdList"
)
List
<
String
>
storeIdList
)
;
int
getCanAddCount
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"storeIdList"
)
List
<
String
>
storeIdList
)
;
List
<
HmQrcodeClerkBO
>
listCanAddClerk
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"storeIdList"
)
List
<
String
>
storeIdList
);
List
<
HmQrcodeClerkBO
>
listCanAddClerk
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"storeIdList"
)
List
<
String
>
storeIdList
);
List
<
String
>
getHmStoreForWxa
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"enterpriseId"
)
String
enterpriseId
);
List
<
String
>
getHmStoreForWxa
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"enterpriseId"
)
String
enterpriseId
);
List
<
String
>
listHmIdForIndex
(
HmQrcodeListQDTO
qdto
);
List
<
String
>
listHmIdForIndex
(
HmQrcodeListQDTO
qdto
);
/**
/**
*
* @Title: listHasQrcodeClerk
* @Description: 返回已有单人活码的clerkId
* @author xugh
* @param enterpriseId
* @param enterpriseId
* @param clerkId
* @param clerkId
* @return
* @return
* @throws
* @throws
* @Title: listHasQrcodeClerk
* @Description: 返回已有单人活码的clerkId
* @author xugh
*/
*/
List
<
String
>
listHasQrcodeClerk
(
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"clerkIdList"
)
List
<
String
>
clerkIdList
)
;
List
<
String
>
listHasQrcodeClerk
(
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"clerkIdList"
)
List
<
String
>
clerkIdList
);
/**
* 更新导购名称
*
* @param enterpriseId 企业标识
* @param clerkId 导购id
* @param clerkName 导购名称
* @param clerkCode 职员代码
* @return int
* @author mozhu
* @date 2022-07-28 14:03:48
*/
int
updateClerkNameByClerkId
(
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"clerkId"
)
String
clerkId
,
@Param
(
"clerkName"
)
String
clerkName
,
@Param
(
"clerkCode"
)
String
clerkCode
);
/**
* 更改门店名称
*
* @param enterpriseId 企业标识
* @param storeId 门店id
* @param storeName 门店名称
* @param storeCode 门店code
* @return int
* @author mozhu
* @date 2022-07-28 14:03:46
*/
int
updateStoreNameByStoreId
(
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"storeId"
)
String
storeId
,
@Param
(
"storeName"
)
String
storeName
,
@Param
(
"storeCode"
)
String
storeCode
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/hm/HmQrcodeService.java
View file @
c699df7d
...
@@ -191,4 +191,29 @@ public interface HmQrcodeService {
...
@@ -191,4 +191,29 @@ public interface HmQrcodeService {
List
<
String
>
listHmIdForIndex
(
HmQrcodeListQDTO
qdto
);
List
<
String
>
listHmIdForIndex
(
HmQrcodeListQDTO
qdto
);
List
<
String
>
listHasQrcodeClerk
(
String
enterpriseId
,
List
<
String
>
clerkIdList
);
List
<
String
>
listHasQrcodeClerk
(
String
enterpriseId
,
List
<
String
>
clerkIdList
);
/**
* 更新导购名称
*
* @param clerkId 导购id
* @param clerkName 导购名称
* @param clerkCode 导购代码
* @return int
* @author mozhu
* @date 2022-07-28 13:53:51
*/
void
updateClerkNameByClerkId
(
String
enterpriseId
,
String
clerkId
,
String
clerkName
,
String
clerkCode
);
/**
* 更改门店名称
*
* @param storeId 存储id
* @param storeName 商店名字
* @param storeCode 存储代码
* @return int
* @author mozhu
* @date 2022-07-28 13:54:49
*/
void
updateStoreNameByStoreId
(
String
enterpriseId
,
String
storeId
,
String
storeName
,
String
storeCode
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/hm/impl/HmQrcodeServiceImpl.java
View file @
c699df7d
...
@@ -6,6 +6,7 @@ import com.gic.haoban.common.utils.PageUtil;
...
@@ -6,6 +6,7 @@ import com.gic.haoban.common.utils.PageUtil;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeListQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeListQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeQDTO
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.service.dao.mapper.hm.TabHaobanHmClerkRelationMapper
;
import
com.gic.haoban.manage.service.dao.mapper.hm.TabHaobanHmQrcodeMapper
;
import
com.gic.haoban.manage.service.dao.mapper.hm.TabHaobanHmQrcodeMapper
;
import
com.gic.haoban.manage.service.entity.hm.TabHaobanHmQrcode
;
import
com.gic.haoban.manage.service.entity.hm.TabHaobanHmQrcode
;
import
com.gic.haoban.manage.service.pojo.bo.hm.HmQrcodeBO
;
import
com.gic.haoban.manage.service.pojo.bo.hm.HmQrcodeBO
;
...
@@ -36,6 +37,8 @@ public class HmQrcodeServiceImpl implements HmQrcodeService {
...
@@ -36,6 +37,8 @@ public class HmQrcodeServiceImpl implements HmQrcodeService {
private
TabHaobanHmQrcodeMapper
tabHaobanHmQrcodeMapper
;
private
TabHaobanHmQrcodeMapper
tabHaobanHmQrcodeMapper
;
@Autowired
@Autowired
private
StaffApiService
staffApiService
;
private
StaffApiService
staffApiService
;
@Autowired
private
TabHaobanHmClerkRelationMapper
tabHaobanHmClerkRelationMapper
;
@Override
@Override
public
HmQrcodeBO
queryById
(
Long
hmId
)
{
public
HmQrcodeBO
queryById
(
Long
hmId
)
{
...
@@ -84,9 +87,9 @@ public class HmQrcodeServiceImpl implements HmQrcodeService {
...
@@ -84,9 +87,9 @@ public class HmQrcodeServiceImpl implements HmQrcodeService {
}
}
@Override
@Override
public
List
<
HmQrcodeBO
>
listByStoreId
(
String
wxEnterpriseId
,
String
storeId
,
Integer
overFlag
,
Integer
hmType
)
{
public
List
<
HmQrcodeBO
>
listByStoreId
(
String
wxEnterpriseId
,
String
storeId
,
Integer
overFlag
,
Integer
hmType
)
{
return
EntityUtil
.
changeEntityListNew
(
HmQrcodeBO
.
class
,
return
EntityUtil
.
changeEntityListNew
(
HmQrcodeBO
.
class
,
tabHaobanHmQrcodeMapper
.
listByStoreId
(
wxEnterpriseId
,
storeId
,
overFlag
,
hmType
));
tabHaobanHmQrcodeMapper
.
listByStoreId
(
wxEnterpriseId
,
storeId
,
overFlag
,
hmType
));
}
}
@Override
@Override
...
@@ -106,9 +109,9 @@ public class HmQrcodeServiceImpl implements HmQrcodeService {
...
@@ -106,9 +109,9 @@ public class HmQrcodeServiceImpl implements HmQrcodeService {
}
}
@Override
@Override
public
HmQrcodeBO
queryByClerkId
(
String
clerkId
,
String
wxEnterpriseId
,
Integer
overFlag
,
Integer
hmType
)
{
public
HmQrcodeBO
queryByClerkId
(
String
clerkId
,
String
wxEnterpriseId
,
Integer
overFlag
,
Integer
hmType
)
{
return
EntityUtil
.
changeEntity
(
HmQrcodeBO
.
class
,
return
EntityUtil
.
changeEntity
(
HmQrcodeBO
.
class
,
tabHaobanHmQrcodeMapper
.
queryByClerkIdAndOverFlag
(
clerkId
,
wxEnterpriseId
,
overFlag
,
hmType
));
tabHaobanHmQrcodeMapper
.
queryByClerkIdAndOverFlag
(
clerkId
,
wxEnterpriseId
,
overFlag
,
hmType
));
}
}
@Override
@Override
...
@@ -117,9 +120,9 @@ public class HmQrcodeServiceImpl implements HmQrcodeService {
...
@@ -117,9 +120,9 @@ public class HmQrcodeServiceImpl implements HmQrcodeService {
}
}
@Override
@Override
public
List
<
HmQrcodeBO
>
getHmStoreByEnterpriseId
(
String
wxEnterpriseId
,
String
enterpriseId
)
{
public
List
<
HmQrcodeBO
>
getHmStoreByEnterpriseId
(
String
wxEnterpriseId
,
String
enterpriseId
)
{
return
EntityUtil
.
changeEntityListNew
(
HmQrcodeBO
.
class
,
return
EntityUtil
.
changeEntityListNew
(
HmQrcodeBO
.
class
,
tabHaobanHmQrcodeMapper
.
getHmStoreByEnterpriseId
(
wxEnterpriseId
,
enterpriseId
));
tabHaobanHmQrcodeMapper
.
getHmStoreByEnterpriseId
(
wxEnterpriseId
,
enterpriseId
));
}
}
@Override
@Override
...
@@ -171,13 +174,13 @@ public class HmQrcodeServiceImpl implements HmQrcodeService {
...
@@ -171,13 +174,13 @@ public class HmQrcodeServiceImpl implements HmQrcodeService {
}
}
@Override
@Override
public
List
<
String
>
getHmStoreForWxa
(
String
wxEnterpriseId
,
String
enterpriseId
)
{
public
List
<
String
>
getHmStoreForWxa
(
String
wxEnterpriseId
,
String
enterpriseId
)
{
return
tabHaobanHmQrcodeMapper
.
getHmStoreForWxa
(
wxEnterpriseId
,
enterpriseId
)
;
return
tabHaobanHmQrcodeMapper
.
getHmStoreForWxa
(
wxEnterpriseId
,
enterpriseId
)
;
}
}
@Override
@Override
public
List
<
String
>
listHmIdForIndex
(
HmQrcodeListQDTO
qdto
)
{
public
List
<
String
>
listHmIdForIndex
(
HmQrcodeListQDTO
qdto
)
{
return
tabHaobanHmQrcodeMapper
.
listHmIdForIndex
(
qdto
)
;
return
tabHaobanHmQrcodeMapper
.
listHmIdForIndex
(
qdto
);
}
}
@Override
@Override
...
@@ -185,4 +188,15 @@ public class HmQrcodeServiceImpl implements HmQrcodeService {
...
@@ -185,4 +188,15 @@ public class HmQrcodeServiceImpl implements HmQrcodeService {
return
this
.
tabHaobanHmQrcodeMapper
.
listHasQrcodeClerk
(
enterpriseId
,
clerkIdList
);
return
this
.
tabHaobanHmQrcodeMapper
.
listHasQrcodeClerk
(
enterpriseId
,
clerkIdList
);
}
}
@Override
public
void
updateClerkNameByClerkId
(
String
enterpriseId
,
String
clerkId
,
String
clerkName
,
String
clerkCode
)
{
tabHaobanHmQrcodeMapper
.
updateClerkNameByClerkId
(
enterpriseId
,
clerkId
,
clerkName
,
clerkCode
);
tabHaobanHmClerkRelationMapper
.
updateClerkNameByClerkId
(
enterpriseId
,
clerkId
,
clerkName
,
clerkCode
);
}
@Override
public
void
updateStoreNameByStoreId
(
String
enterpriseId
,
String
storeId
,
String
storeName
,
String
storeCode
)
{
tabHaobanHmQrcodeMapper
.
updateStoreNameByStoreId
(
enterpriseId
,
storeId
,
storeName
,
storeCode
);
tabHaobanHmClerkRelationMapper
.
updateStoreNameByStoreId
(
enterpriseId
,
storeId
,
storeName
,
storeCode
);
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffClerkRelationApiServiceImpl.java
View file @
c699df7d
...
@@ -485,6 +485,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -485,6 +485,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
ClerkSyncQDTO
clerkSyncQDTO
=
JSON
.
parseObject
(
param
,
ClerkSyncQDTO
.
class
);
ClerkSyncQDTO
clerkSyncQDTO
=
JSON
.
parseObject
(
param
,
ClerkSyncQDTO
.
class
);
Integer
type
=
clerkSyncQDTO
.
getType
();
Integer
type
=
clerkSyncQDTO
.
getType
();
String
clerkId
=
clerkSyncQDTO
.
getClerkId
();
String
clerkId
=
clerkSyncQDTO
.
getClerkId
();
String
enterpriseId
=
clerkSyncQDTO
.
getEnterpriseId
();
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByClerkId
(
clerkId
,-
1
);
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByClerkId
(
clerkId
,-
1
);
if
(
clerkDTO
==
null
)
{
if
(
clerkDTO
==
null
)
{
logger
.
error
(
"导购为空"
);
logger
.
error
(
"导购为空"
);
...
@@ -519,8 +520,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -519,8 +520,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
logger
.
error
(
"任务重新分配问题发送消息队列出错"
,
e
);
logger
.
error
(
"任务重新分配问题发送消息队列出错"
,
e
);
}
}
}
}
hmQrcodeService
.
updateClerkNameByClerkId
(
enterpriseId
,
clerkId
,
clerkDTO
.
getClerkName
(),
clerkDTO
.
getClerkCode
());
}
}
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/task/KafkaMessageServiceImpl.java
View file @
c699df7d
...
@@ -20,6 +20,7 @@ import com.gic.haoban.manage.service.pojo.GroupSyncPojo;
...
@@ -20,6 +20,7 @@ import com.gic.haoban.manage.service.pojo.GroupSyncPojo;
import
com.gic.haoban.manage.service.pojo.StoreSyncPojo
;
import
com.gic.haoban.manage.service.pojo.StoreSyncPojo
;
import
com.gic.haoban.manage.service.service.StaffClerkRelationService
;
import
com.gic.haoban.manage.service.service.StaffClerkRelationService
;
import
com.gic.haoban.manage.service.service.StoreRangeService
;
import
com.gic.haoban.manage.service.service.StoreRangeService
;
import
com.gic.haoban.manage.service.service.hm.HmQrcodeService
;
import
org.apache.commons.lang3.time.DateUtils
;
import
org.apache.commons.lang3.time.DateUtils
;
import
org.apache.kafka.clients.consumer.ConsumerRecord
;
import
org.apache.kafka.clients.consumer.ConsumerRecord
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
...
@@ -59,6 +60,8 @@ public class KafkaMessageServiceImpl implements MessageListener<String, GicRecor
...
@@ -59,6 +60,8 @@ public class KafkaMessageServiceImpl implements MessageListener<String, GicRecor
@Autowired
@Autowired
private
WxEnterpriseRelatedApiService
wxEnterpriseRelatedApiService
;
private
WxEnterpriseRelatedApiService
wxEnterpriseRelatedApiService
;
@Autowired
private
HmQrcodeService
hmQrcodeService
;
@Override
@Override
public
void
onMessage
(
ConsumerRecord
<
String
,
GicRecord
>
record
)
{
public
void
onMessage
(
ConsumerRecord
<
String
,
GicRecord
>
record
)
{
...
@@ -205,6 +208,7 @@ public class KafkaMessageServiceImpl implements MessageListener<String, GicRecor
...
@@ -205,6 +208,7 @@ public class KafkaMessageServiceImpl implements MessageListener<String, GicRecor
&&
(!
syncPojo
.
getStoreName
().
equals
(
syncPojo
.
getOldStoreName
())))
{
&&
(!
syncPojo
.
getStoreName
().
equals
(
syncPojo
.
getOldStoreName
())))
{
logger
.
info
(
"门店名称变更:{}"
,
JSONObject
.
toJSONString
(
syncPojo
));
logger
.
info
(
"门店名称变更:{}"
,
JSONObject
.
toJSONString
(
syncPojo
));
storeRangeService
.
updatwStoreName
(
syncPojo
.
getEnterpriseId
(),
syncPojo
.
getStoreId
(),
syncPojo
.
getStoreName
());
storeRangeService
.
updatwStoreName
(
syncPojo
.
getEnterpriseId
(),
syncPojo
.
getStoreId
(),
syncPojo
.
getStoreName
());
hmQrcodeService
.
updateStoreNameByStoreId
(
syncPojo
.
getEnterpriseId
(),
syncPojo
.
getStoreId
(),
syncPojo
.
getStoreName
(),
syncPojo
.
getStoreCode
());
}
}
//门店状态变更 包括删除
//门店状态变更 包括删除
...
...
haoban-manage3-service/src/main/resources/mapper/hm/TabHaobanHmClerkRelationMapper.xml
View file @
c699df7d
...
@@ -200,5 +200,21 @@
...
@@ -200,5 +200,21 @@
</foreach>
</foreach>
</select>
</select>
<update
id=
"updateClerkNameByClerkId"
parameterType=
"java.lang.String"
>
update tab_haoban_hm_clerk_relation
<set>
clerk_name = #{clerkName},clerk_code = #{clerkCode},update_time = now()
</set>
where clerk_id = #{clerkId} and enterprise_id = #{enterpriseId}
</update>
<update
id=
"updateStoreNameByStoreId"
parameterType=
"java.lang.String"
>
update tab_haoban_hm_clerk_relation
<set>
store_name = #{storeName},store_code = #{storeCode},update_time = now()
</set>
where store_id = #{storeId} and enterprise_id = #{enterpriseId}
</update>
</mapper>
</mapper>
haoban-manage3-service/src/main/resources/mapper/hm/TabHaobanHmQrcodeMapper.xml
View file @
c699df7d
...
@@ -461,7 +461,7 @@
...
@@ -461,7 +461,7 @@
and b.hm_id is null
and b.hm_id is null
</sql>
</sql>
<select
id=
"listHasQrcodeClerk"
resultType=
"String"
>
<select
id=
"listHasQrcodeClerk"
resultType=
"
java.lang.
String"
>
select clerk_id from tab_haoban_hm_qrcode where enterprise_id=#{enterpriseId}
select clerk_id from tab_haoban_hm_qrcode where enterprise_id=#{enterpriseId}
and clerk_id in
and clerk_id in
<foreach
collection=
"clerkIdList"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
<foreach
collection=
"clerkIdList"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
...
@@ -470,5 +470,22 @@
...
@@ -470,5 +470,22 @@
and hm_type = 1 and status_flag in (1,3)
and hm_type = 1 and status_flag in (1,3)
</select>
</select>
<update
id=
"updateClerkNameByClerkId"
parameterType=
"java.lang.String"
>
update tab_haoban_hm_qrcode
<set>
clerk_name = #{clerkName},clerk_code = #{clerkCode},update_time = now()
</set>
where clerk_id = #{clerkId} and enterprise_id = #{enterpriseId}
</update>
<update
id=
"updateStoreNameByStoreId"
parameterType=
"java.lang.String"
>
update tab_haoban_hm_qrcode
<set>
store_name = #{storeName},store_code = #{storeCode},update_time = now()
</set>
where store_id = #{storeId} and enterprise_id = #{enterpriseId}
</update>
</mapper>
</mapper>
haoban-manage3-service/src/main/resources/mapper/hm/WxUserAddLogMapper.xml
View file @
c699df7d
...
@@ -3,41 +3,42 @@
...
@@ -3,41 +3,42 @@
<mapper
namespace=
"com.gic.haoban.manage.service.dao.mapper.hm.WxUserAddLogMapper"
>
<mapper
namespace=
"com.gic.haoban.manage.service.dao.mapper.hm.WxUserAddLogMapper"
>
<resultMap
type=
"com.gic.haoban.manage.service.entity.hm.TabWxUserAddLog"
<resultMap
type=
"com.gic.haoban.manage.service.entity.hm.TabWxUserAddLog"
id=
"result-map-tabHaobanWxUserAddLog"
>
id=
"result-map-tabHaobanWxUserAddLog"
>
<result
column=
"log_id"
property=
"logId"
/>
<result
column=
"log_id"
property=
"logId"
/>
<result
column=
"wx_enterprise_id"
property=
"wxEnterpriseId"
/>
<result
column=
"wx_enterprise_id"
property=
"wxEnterpriseId"
/>
<result
column=
"enterprise_id"
property=
"enterpriseId"
/>
<result
column=
"enterprise_id"
property=
"enterpriseId"
/>
<result
column=
"external_userid"
property=
"externalUserid"
/>
<result
column=
"external_userid"
property=
"externalUserid"
/>
<result
column=
"staff_id"
property=
"staffId"
/>
<result
column=
"staff_id"
property=
"staffId"
/>
<result
column=
"staff_name"
property=
"staffName"
/>
<result
column=
"staff_name"
property=
"staffName"
/>
<result
column=
"wx_user_id"
property=
"wxUserId"
/>
<result
column=
"wx_user_id"
property=
"wxUserId"
/>
<result
column=
"status_flag"
property=
"statusFlag"
/>
<result
column=
"status_flag"
property=
"statusFlag"
/>
<result
column=
"add_channel"
property=
"addChannel"
/>
<result
column=
"add_channel"
property=
"addChannel"
/>
<result
column=
"hm_id"
property=
"hmId"
/>
<result
column=
"hm_id"
property=
"hmId"
/>
<result
column=
"hm_name"
property=
"hmName"
/>
<result
column=
"hm_name"
property=
"hmName"
/>
<result
column=
"link_id"
property=
"linkId"
/>
<result
column=
"link_id"
property=
"linkId"
/>
<result
column=
"link_name"
property=
"linkName"
/>
<result
column=
"link_name"
property=
"linkName"
/>
<result
column=
"member_id"
property=
"memberId"
/>
<result
column=
"member_id"
property=
"memberId"
/>
<result
column=
"member_name"
property=
"memberName"
/>
<result
column=
"member_name"
property=
"memberName"
/>
<result
column=
"member_nick"
property=
"memberNick"
/>
<result
column=
"member_nick"
property=
"memberNick"
/>
<result
column=
"member_image"
property=
"memberImage"
/>
<result
column=
"member_image"
property=
"memberImage"
/>
<result
column=
"member_phone"
property=
"memberPhone"
/>
<result
column=
"member_phone"
property=
"memberPhone"
/>
<result
column=
"member_grade_id"
property=
"memberGradeId"
/>
<result
column=
"member_grade_id"
property=
"memberGradeId"
/>
<result
column=
"member_grade_name"
property=
"memberGradeName"
/>
<result
column=
"member_grade_name"
property=
"memberGradeName"
/>
<result
column=
"member_card_no"
property=
"memberCardNo"
/>
<result
column=
"member_card_no"
property=
"memberCardNo"
/>
<result
column=
"clerk_id"
property=
"clerkId"
/>
<result
column=
"clerk_id"
property=
"clerkId"
/>
<result
column=
"clerk_code"
property=
"clerkCode"
/>
<result
column=
"clerk_code"
property=
"clerkCode"
/>
<result
column=
"clerk_name"
property=
"clerkName"
/>
<result
column=
"clerk_name"
property=
"clerkName"
/>
<result
column=
"store_id"
property=
"storeId"
/>
<result
column=
"store_id"
property=
"storeId"
/>
<result
column=
"store_name"
property=
"storeName"
/>
<result
column=
"store_name"
property=
"storeName"
/>
<result
column=
"store_code"
property=
"storeCode"
/>
<result
column=
"store_code"
property=
"storeCode"
/>
<result
column=
"member_label_id"
property=
"memberLabelId"
/>
<result
column=
"member_label_id"
property=
"memberLabelId"
/>
<result
column=
"member_label_name"
property=
"memberLabelName"
/>
<result
column=
"member_label_name"
property=
"memberLabelName"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"all_del_flag"
property=
"allDelFlag"
/>
<result
column=
"all_del_flag"
property=
"allDelFlag"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
log_id,
log_id
,
wx_enterprise_id,
wx_enterprise_id,
enterprise_id,
enterprise_id,
external_userid,
external_userid,
...
@@ -74,8 +75,7 @@
...
@@ -74,8 +75,7 @@
<insert
id=
"insert"
<insert
id=
"insert"
parameterType=
"com.gic.haoban.manage.service.entity.hm.TabWxUserAddLog"
>
parameterType=
"com.gic.haoban.manage.service.entity.hm.TabWxUserAddLog"
>
<![CDATA[
<![CDATA[
INSERT INTO tab_haoban_wx_user_add_log(
INSERT INTO tab_haoban_wx_user_add_log(log_id,
log_id,
wx_enterprise_id,
wx_enterprise_id,
enterprise_id,
enterprise_id,
external_userid,
external_userid,
...
@@ -106,10 +106,9 @@
...
@@ -106,10 +106,9 @@
member_label_name,
member_label_name,
create_time,
create_time,
update_time,
update_time,
add_time ,
add_time,
all_del_flag
all_del_flag)
)VALUES(
VALUES (#{logId,jdbcType=BIGINT},
#{logId,jdbcType=BIGINT},
#{wxEnterpriseId,jdbcType=VARCHAR},
#{wxEnterpriseId,jdbcType=VARCHAR},
#{enterpriseId,jdbcType=CHAR},
#{enterpriseId,jdbcType=CHAR},
#{externalUserid,jdbcType=VARCHAR},
#{externalUserid,jdbcType=VARCHAR},
...
@@ -141,8 +140,7 @@
...
@@ -141,8 +140,7 @@
now(),
now(),
now(),
now(),
now(),
now(),
#{allDelFlag,jdbcType=INTEGER}
#{allDelFlag,jdbcType=INTEGER})
)
]]>
]]>
</insert>
</insert>
...
@@ -161,7 +159,7 @@
...
@@ -161,7 +159,7 @@
create_time = #{createTime} ,
create_time = #{createTime} ,
</if>
</if>
update_time=now() WHERE
update_time=now() WHERE
external_userid=#{externalUserid} and staff_id=#{staffId} and membre_id is null
external_userid=#{externalUserid} and staff_id=#{staffId} and member_id is null
</update>
</update>
...
@@ -169,7 +167,7 @@
...
@@ -169,7 +167,7 @@
parameterType=
"com.gic.haoban.manage.service.entity.hm.TabWxUserAddLog"
parameterType=
"com.gic.haoban.manage.service.entity.hm.TabWxUserAddLog"
resultMap=
"result-map-tabHaobanWxUserAddLog"
>
resultMap=
"result-map-tabHaobanWxUserAddLog"
>
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from tab_haoban_wx_user_add_log where
from tab_haoban_wx_user_add_log where
external_userid=#{externalUserid} and status_flag != 0 order by
external_userid=#{externalUserid} and status_flag != 0 order by
create_time asc
create_time asc
...
@@ -177,15 +175,16 @@
...
@@ -177,15 +175,16 @@
<select
id=
"selectNewLog"
resultMap=
"result-map-tabHaobanWxUserAddLog"
>
<select
id=
"selectNewLog"
resultMap=
"result-map-tabHaobanWxUserAddLog"
>
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from tab_haoban_wx_user_add_log where
from tab_haoban_wx_user_add_log where
external_userid=#{externalUserid} and wx_user_id =#{wxUserId} and
external_userid=#{externalUserid} and wx_user_id =#{wxUserId} and
status_flag != 0 order by create_time desc limit 1
status_flag != 0 order by create_time desc limit 1
</select>
</select>
<select
id=
"listForPage"
parameterType=
"com.gic.haoban.manage.api.dto.qdto.hm.WxUserAddLogSearchQDTO"
resultMap=
"result-map-tabHaobanWxUserAddLog"
>
<select
id=
"listForPage"
parameterType=
"com.gic.haoban.manage.api.dto.qdto.hm.WxUserAddLogSearchQDTO"
resultMap=
"result-map-tabHaobanWxUserAddLog"
>
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from tab_haoban_wx_user_add_log where wx_enterprise_id = #{wxEnterpriseId}
from tab_haoban_wx_user_add_log where wx_enterprise_id = #{wxEnterpriseId}
<if
test=
"null != enterpriseId"
>
<if
test=
"null != enterpriseId"
>
and enterprise_id = #{enterpriseId}
and enterprise_id = #{enterpriseId}
...
...
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