private StringBuilder innAddOrModGroupFilterCondInfo(HttpServletRequest req,
            StringBuilder sBuffer,
            ProcessResult result,
            boolean isAddOp) {
        // check and get operation info
        if (!WebParameterUtils.getAUDBaseInfo(req, isAddOp, null, sBuffer, result)) {
            WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());
            return sBuffer;
        }
        BaseEntity opEntity = (BaseEntity) result.getRetData();
        // get group list
        if (!WebParameterUtils.getStringParamValue(req,
                WebFieldDef.COMPSGROUPNAME, true, null, sBuffer, result)) {
            WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());
            return sBuffer;
        }
        final Set<String> groupNameSet = (Set<String>) result.getRetData();
        // check and get topicName field
        if (!WebParameterUtils.getAndValidTopicNameInfo(req,
                defMetaDataService, true, null, sBuffer, result)) {
            WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());
            return sBuffer;
        }
        Set<String> topicNameSet = (Set<String>) result.getRetData();
        // check and get condStatus field
        if (!getCondStatusParamValue(req, false,
                (isAddOp ? EnableStatus.STATUS_DISABLE : null), sBuffer, result)) {
            WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());
            return sBuffer;
        }
        EnableStatus filterEnable = (EnableStatus) result.getRetData();
        // get filterConds info
        if (!WebParameterUtils.getFilterCondString(req, false, isAddOp, sBuffer, result)) {
            WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());
            return sBuffer;
        }
        String filterCondStr = (String) result.getRetData();
        // add or modify filter consume records
        GroupConsumeCtrlEntity ctrlEntity;
        List<GroupProcessResult> retInfoList = new ArrayList<>();
        for (String groupName : groupNameSet) {
            for (String topicName : topicNameSet) {
                ctrlEntity =
                        defMetaDataService.getConsumeCtrlByGroupAndTopic(groupName, topicName);
                if (ctrlEntity == null) {
                    if (isAddOp) {
                        retInfoList.add(defMetaDataService.insertConsumeCtrlInfo(opEntity, groupName,
                                topicName, EnableStatus.STATUS_ENABLE, "Old API set filter conditions",
                                filterEnable, filterCondStr, sBuffer, result));
                    } else {
                        result.setFailResult(DataOpErrCode.DERR_NOT_EXIST.getCode(),
                                DataOpErrCode.DERR_NOT_EXIST.getDescription());
                        retInfoList.add(new GroupProcessResult(groupName, "", result));
                    }
                } else {
                    retInfoList.add(defMetaDataService.insertConsumeCtrlInfo(opEntity, groupName,
                            topicName, null, "Old API set filter conditions",
                            filterEnable, filterCondStr, sBuffer, result));
                }
            }
        }
        return buildRetInfo(retInfoList, sBuffer);
    }
Inner method: modify group filter condition info

@param req       Http Servlet Request
@param sBuffer   string buffer
@param result    process result
@param isAddOp   whether add operation
@return    process result
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/web/handler/WebAdminGroupCtrlHandler.java