Commit 30bd2df8 by fudahua

授权绑定,授权门店列表,binlog

parent 4ee9c5a5
...@@ -12,6 +12,7 @@ import com.gic.haoban.common.utils.PageUtil; ...@@ -12,6 +12,7 @@ import com.gic.haoban.common.utils.PageUtil;
import com.gic.haoban.manage.api.dto.*; import com.gic.haoban.manage.api.dto.*;
import com.gic.haoban.manage.service.entity.*; import com.gic.haoban.manage.service.entity.*;
import com.gic.haoban.manage.service.service.StoreRangeService; import com.gic.haoban.manage.service.service.StoreRangeService;
import com.google.common.collect.Sets;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
...@@ -270,6 +271,7 @@ public class WxEnterpriseRelatedApiServiceImpl implements WxEnterpriseRelatedApi ...@@ -270,6 +271,7 @@ public class WxEnterpriseRelatedApiServiceImpl implements WxEnterpriseRelatedApi
//分组所在的企业map groupId->wxEnterpriseId //分组所在的企业map groupId->wxEnterpriseId
Map<String, String> groupMap = groupInfoDTOS.stream().filter(tab -> tab.getRelationType() == 1) Map<String, String> groupMap = groupInfoDTOS.stream().filter(tab -> tab.getRelationType() == 1)
.collect(Collectors.toMap(tab -> tab.getRelationId(), tab -> tab.getWxEnterpriseId())); .collect(Collectors.toMap(tab -> tab.getRelationId(), tab -> tab.getWxEnterpriseId()));
Set<String> rightGroupIds = groupMap.keySet();
// 获取所有门店信息 // 获取所有门店信息
...@@ -282,6 +284,13 @@ public class WxEnterpriseRelatedApiServiceImpl implements WxEnterpriseRelatedApi ...@@ -282,6 +284,13 @@ public class WxEnterpriseRelatedApiServiceImpl implements WxEnterpriseRelatedApi
Map<String, Set<String>> storeGroupChainMap = storeGroupList.stream().collect(Collectors.toMap(dto -> dto.getStoreGroupId(), Map<String, Set<String>> storeGroupChainMap = storeGroupList.stream().collect(Collectors.toMap(dto -> dto.getStoreGroupId(),
dto -> Arrays.stream(dto.getStoreGroupChain().split("-")).filter(str -> StringUtils.isNotBlank(str)).collect(Collectors.toSet()))); dto -> Arrays.stream(dto.getStoreGroupChain().split("-")).filter(str -> StringUtils.isNotBlank(str)).collect(Collectors.toSet())));
storeMapByGroupId.forEach((groupId, storeIds) -> {
Set<String> chainGroupIds = storeGroupChainMap.get(groupId);
Sets.SetView<String> midGroupIds = Sets.intersection(chainGroupIds, rightGroupIds);
if (CollectionUtils.isEmpty(midGroupIds)) {
}
});
return false; return false;
} }
......
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
status_flag = 0, status_flag = 0,
update_time = now() update_time = now()
where where
where enterprise_id = #{enterpriseId,jdbcType=VARCHAR} enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
and wx_enterprise_id=#{wxEnterpriseId} and wx_enterprise_id=#{wxEnterpriseId}
and status_flag =1 and status_flag =1
</update> </update>
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
status_flag = 0, status_flag = 0,
update_time = now() update_time = now()
where where
where enterprise_id = #{enterpriseId,jdbcType=VARCHAR} enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
and relation_id=#{relationId} and relation_id=#{relationId}
and status_flag =1 and status_flag =1
</update> </update>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment