Commit 4d46b5bf by songyinghui

feat: 分组过滤增加 企微id

parent 980b5ea8
......@@ -40,6 +40,6 @@ public interface TabHaobanHmGroupSettingMapper {
* @param enterpriseId
* @return
*/
List<TabHaobanHmGroupSetting> queryHmGroupSettingByName(@Param("enterpriseId") String enterpriseId, @Param("groupName") String groupName);
List<TabHaobanHmGroupSetting> queryHmGroupSettingByName(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("enterpriseId") String enterpriseId, @Param("groupName") String groupName);
}
\ No newline at end of file
......@@ -59,6 +59,6 @@ public interface HmGroupService {
* @param enterpriseId
* @return
*/
List<HmGroupSettingBO> queryGroupSettingByName(String enterpriseId, String groupName);
List<HmGroupSettingBO> queryGroupSettingByName(String wxEnterpriseId, String enterpriseId, String groupName);
}
......@@ -136,8 +136,8 @@ public class HmGroupServiceImpl implements HmGroupService {
}
}
public List<HmGroupSettingBO> queryGroupSettingByName(String enterpriseId, String groupName){
List<TabHaobanHmGroupSetting> tabHaobanHmGroupSettings = haobanHmGroupSettingMapper.queryHmGroupSettingByName(enterpriseId, groupName);
public List<HmGroupSettingBO> queryGroupSettingByName(String wxEnterpriseId, String enterpriseId, String groupName){
List<TabHaobanHmGroupSetting> tabHaobanHmGroupSettings = haobanHmGroupSettingMapper.queryHmGroupSettingByName(wxEnterpriseId, enterpriseId, groupName);
if (CollectionUtils.isEmpty(tabHaobanHmGroupSettings)){
return Collections.emptyList();
}
......
......@@ -69,7 +69,7 @@ public class HmGroupApiServiceImpl implements HmGroupApiService {
if (StringUtils.equals(DEFAULT_GROUP_NAME, hmGroupDTO.getGroupName())) {
return ServiceResponse.failure(HaoBanErrCodeCommon.ERR_9.getCode() + "", "分组名称不能重复");
}
List<HmGroupSettingBO> groupSettingBos = groupService.queryGroupSettingByName(hmGroupDTO.getEnterpriseId(), hmGroupDTO.getGroupName());
List<HmGroupSettingBO> groupSettingBos = groupService.queryGroupSettingByName(hmGroupDTO.getWxEnterpriseId(), hmGroupDTO.getEnterpriseId(), hmGroupDTO.getGroupName());
if (hmGroupDTO.getGroupId() == null) {
// insert
// check groupName unique
......@@ -240,8 +240,8 @@ public class HmGroupApiServiceImpl implements HmGroupApiService {
* @return
*/
@Override
public ServiceResponse<List<HmGroupDTO>> queryGroupListByName(String enterpriseId, String groupName) {
List<HmGroupSettingBO> hmGroupSettingBos = groupService.queryGroupSettingByName(enterpriseId, groupName);
public ServiceResponse<List<HmGroupDTO>> queryGroupListByName(String wxEnterpriseId, String enterpriseId, String groupName) {
List<HmGroupSettingBO> hmGroupSettingBos = groupService.queryGroupSettingByName(wxEnterpriseId, enterpriseId, groupName);
return ServiceResponse.success(EntityUtil.changeEntityListByOrika(HmGroupDTO.class, hmGroupSettingBos));
}
}
......@@ -210,6 +210,7 @@
from tab_haoban_hm_group_setting
where group_name = #{groupName}
and enterprise_id = #{enterpriseId}
and wx_enterprise_id = #{wxEnterpriseId}
and `status` = 1
</select>
</mapper>
\ No newline at end of file
......@@ -137,7 +137,7 @@ public class HmPageServiceTest {
@Test
public void groupNameCheckTest(){
ServiceResponse<List<HmGroupDTO>> ms = groupService.queryGroupListByName("ff8080815dacd3a2015dacd3ef5c0000", "测试006");
ServiceResponse<List<HmGroupDTO>> ms = groupService.queryGroupListByName("", "ff8080815dacd3a2015dacd3ef5c0000", "测试006");
System.out.println(JSON.toJSONString(ms));
}
......
......@@ -143,7 +143,7 @@ public class HmGroupController extends WebBaseController {
if (StringUtils.isBlank(groupSettingVO.getGroupName())){
return RestResponse.successResult(Collections.emptyList());
}
ServiceResponse<List<HmGroupDTO>> serviceResponse = groupApiService.queryGroupListByName(loginUser.getEnterpriseId(), groupSettingVO.getGroupName());
ServiceResponse<List<HmGroupDTO>> serviceResponse = groupApiService.queryGroupListByName(loginUser.getWxEnterpriseId(), loginUser.getEnterpriseId(), groupSettingVO.getGroupName());
if (serviceResponse.isSuccess()){
return RestResponse.successResult(serviceResponse.getResult());
}
......
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