Turn a string|int|Group into a GroupID

@param string|int|Group $groupID Group instance, Group Code or ID
@return int|null the Group ID or NULL if not found
422068
protected function identifierToGroupID($groupID)
    {
        if (is_numeric($groupID) && Group::get()->byID($groupID)) {
            return $groupID;
        } elseif (is_string($groupID) && $groupByCode = Group::get()->filter(['Code' => $groupID])->first()) {
            return $groupByCode->ID;
        } elseif ($groupID instanceof Group && $groupID->exists()) {
            return $groupID->ID;
        }
        return null;
    }
564464
public function groupUserGagList($groupId) {
        try{
            if(empty($groupId))
                throw new Exception('群组 Id 不能为空');
            $params['groupId'] = $groupId;
            $ret = $this->curl('/group/user/gag/list',$params);
            if(empty($ret))
                throw new Exception('请求失败');
            return $ret;
        }catch (Exception $e) {
            print_r($e->getMessage());
        }
    }
1036833
public function loadObjectStateGroupData($groupId)
    {
        try {
            return $this->innerGateway->loadObjectStateGroupData($groupId);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
408794
public function getGroupConversationMessageById($groupConversationId)
    {
        if ($this->group->checkUserExist($this->userId, $groupConversationId)) {
            $channel = $this->getChannelName($groupConversationId, 'group_chat_room');

            return $this->group->getGroupConversationMessageById($groupConversationId, $channel);
        }

        abort(404);
    }
127546
public function getGroupId($openId)
    {
        $result = $this->httpRaw(self::WECHAT_GET_GROUP_ID_URL . 'access_token=' . $this->getAccessToken(), [
            'openid' => $openId
        ]);
        return isset($result['groupid']) ? $result['groupid'] : false;
    }
1368464
public ResultType deleteGroup(Integer groupId){
        BeanUtil.requireNonNull(groupId, "groupId is null");
        LOG.debug("删除分组.....");
        String url = BASE_API_URL + "cgi-bin/groups/delete?access_token=#";
        Map<String, Object> param = new HashMap<String, Object>();
        Map<String, Integer> groups = new HashMap<String, Integer>();
        groups.put("id", groupId);
        param.put("group", groups);
        BaseResponse response = executePost(url, JSONUtil.toJson(param));
        return ResultType.get(response.getErrcode());
    }
971653
public function groupDelete($group_id){
        $params=array(
            'group_id'=>$group_id
        );
        $rst = $this->_request->post($this->_url . 'group/delete', $params);
        return $this->_client->rst($rst);
    }
1311061
public function getUserGroup($openid) {
		$data = $this->getData('/cgi-bin/groups/getid', [
			'access_token' => $this->getAccessToken(),
		], Json::encode([
			'openid' => $openid,
		]));

		return isset($data['groupid']) ? $data['groupid'] : -1;
	}
556767
public function update(int $groupId, string $name)
    {
        $params = [
            'group_id' => $groupId,
            'group_name' => $name,
        ];

        return $this->httpPostJson('shakearound/device/group/update', $params);
    }
200504
public CommandGroup getCommandGroup(String groupId) {
        
        if (logger.isDebugEnabled()) {
            logger.debug("Attempting to retrieve command group with id ["
                         + groupId
                         + "] from the command registry.");
        }
        
        Object command = getCommand(groupId, CommandGroup.class);
        
        return (CommandGroup) command;
        
    }
1244445
public function loadTypesDataForGroup($groupId, $status)
    {
        try {
            return $this->innerGateway->loadTypesDataForGroup($groupId, $status);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
833920
public function getShopGroup($groupId)
    {
        $result = $this->httpRaw(self::WECHAT_SHOP_GROUP_ID_GET_URL . 'access_token=' . $this->getAccessToken(), [
            'group_id' => $groupId
        ]);
        return isset($result['errmsg']) && $result['errmsg'] == 'success' ? $result['groups_detail'] : false;
    }
1165183
public function groupUserQuery( $groupId ) {
        try{
            if(empty($groupId))
                throw new Exception('要加入的群 Id 不能为空');
            $ret = $this->curl('/group/user/query',
                    array('groupId' => $groupId)
            );
            if(empty($ret))
                throw new Exception('请求失败');
            return $ret;
        }catch (Exception $e) {
            print_r($e->getMessage());
        }
    }
122056
public function touch($groupId)
    {
        $now = new \DateTime();

        $this
            ->database
            ->query(
                "UPDATE {ucms_group} SET ts_changed = :time WHERE id = :id",
                [':time' => $now->format('Y-m-d H:i:s'), ':id' => $groupId]
            )
        ;
    }
575613
public QueryControllerGroup getGroup(String groupId) {
		int index = getElementPosition(groupId);
		if (index == -1) {
		    return null;
		}
		QueryControllerGroup group = (QueryControllerGroup) entities.get(index);
		return group;
	}
620281
public function getGroup($groupId)
    {
        $result = $this->wechat->httpRaw(self::WECHAT_GROUP_ID_GET_PREFIX, [
            'group_id' => $groupId
        ], [
            'access_token' => $this->wechat->getAccessToken()
        ]);
        return isset($result['errmsg']) && $result['errmsg'] == 'success' ? $result['groups_detail'] : false;
    }
115139
public function getGroupUsers($groupId, $options=array()){

        $data = array();
        
        $data['group_id'] = $groupId;

        $data = array_merge($data, $options);

        return $this->request($this->groupGetusersUrl, $data);
    }