Commit 4d46b5bf by songyinghui

feat: 分组过滤增加 企微id

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