Commit d5962516 by fudahua

门店权限范围

parent 01e58cde
......@@ -82,4 +82,12 @@ public interface WxEnterpriseRelatedApiService {
*/
public Page<BindStoreInfoDTO> pageBindStoreByEnterpriseId(String wxEnterpriseId, String enterpriseId, String search, BasePageInfo pageInfo);
/**
* 查询绑定得门店id
*
* @param wxEnterpriseId
* @return
*/
public List<String> listStoreIdByWxEnterpriseId(String wxEnterpriseId);
}
......@@ -62,4 +62,13 @@ public interface TabHaobanStoreRelationMapper {
* @return
*/
public int deleteAllStoreRalation(@Param("enterpriseId") String enterpriseId);
/**
* 所有门店id
*
* @param wxEnterpriseId
* @param enterpriseId
* @return
*/
List<String> listStoreIdByWxEnterpriseId(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("enterpriseId") String enterpriseId);
}
\ No newline at end of file
......@@ -87,5 +87,14 @@ public interface StoreRangeService {
*/
public List<TabStoreRange> queryStoreRangeByRelationId(String enterpriseId, List<String> relationIds);
/**
* 列表
*
* @param wxEnterpriseId
* @param enterpriseId
* @return
*/
public List<String> listStoreIdByWxEnterpriseId(String wxEnterpriseId, String enterpriseId);
}
......@@ -139,4 +139,9 @@ public class StoreRangeServiceImpl implements StoreRangeService {
public List<TabStoreRange> queryStoreRangeByRelationId(String enterpriseId, List<String> relationIds) {
return tabHaobanStoreRangeMapper.listStoreRangeByRelationId(relationIds, enterpriseId);
}
@Override
public List<String> listStoreIdByWxEnterpriseId(String wxEnterpriseId, String enterpriseId) {
return tabHaobanStoreRelationMapper.listStoreIdByWxEnterpriseId(wxEnterpriseId, enterpriseId);
}
}
......@@ -422,5 +422,9 @@ public class WxEnterpriseRelatedApiServiceImpl implements WxEnterpriseRelatedApi
return retPage;
}
@Override
public List<String> listStoreIdByWxEnterpriseId(String wxEnterpriseId) {
List<String> list = storeRangeService.listStoreIdByWxEnterpriseId(wxEnterpriseId, null);
return list;
}
}
......@@ -166,6 +166,18 @@
and status_flag=1
</select>
<select id="listStoreIdByWxEnterpriseId" resultType="String">
select
store_id
from tab_haoban_store_relation
where
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
<if test="enterpriseId!=null">
and enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
</if>
and status_flag=1
</select>
<select id="listStoreRange" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
......
......@@ -352,7 +352,8 @@ public class StaffController extends WebBaseController{
return !over;
}).map(EnterpriseDetailDTO::getEnterpriseId).collect(Collectors.toList());
List<ClerkDTO> clerkDTOList = clerkNewService.listClerkByEnterpriseIdAndSearch(enterpriseIds, search);
List<String> storeIds = wxEnterpriseRelatedApiService.listStoreIdByWxEnterpriseId(wxEnterpriseId);
List<ClerkDTO> clerkDTOList = clerkNewService.listClerkByEnterpriseIdAndSearch(enterpriseIds, storeIds, search);
List<ClerkInfoVo> retList = EntityUtil.changeEntityListByJSON(ClerkInfoVo.class, clerkDTOList);
if (CollectionUtils.isNotEmpty(retList)) {
List<String> clerkIds = retList.stream().map(ClerkInfoVo::getClerkId).collect(Collectors.toList());
......
......@@ -451,7 +451,8 @@ public class ClerkController extends WebBaseController{
boolean over = isEnterpriseOver(s.getEnterpriseId());
return !over;
}).map(s->s.getEnterpriseId()).collect(Collectors.toList());
List<ClerkDTO> clerkList = clerkNewService.listClerkByEnterpriseIdAndSearch(enterpriseIdList, keyword);
List<String> storeIds = wxEnterpriseRelatedApiService.listStoreIdByWxEnterpriseId(wxEnterpriseId);
List<ClerkDTO> clerkList = clerkNewService.listClerkByEnterpriseIdAndSearch(enterpriseIdList, storeIds, keyword);
List<ClerkStoreVO> clerkStoreList = new ArrayList<>();
if(CollectionUtil.isEmpty(clerkList)){
return resultResponse(HaoBanErrCode.ERR_1,clerkStoreList);
......
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