class AppGroupDao extends BaseDao {

    public int changeServerGroup(Long newServerGroupId, Set<Long> appGroupIds) throws SQLException {
        if (CollectionUtils.isEmpty(appGroupIds)) {
            return 1;
        }
        String sql = "UPDATE app_group SET server_group_id = ? WHERE id in (" + StringUtil.joinCollectByComma(appGroupIds) + ") ";
        return this.updataBysql(sql, Parameter.integerOf(StringUtils.EMPTY, newServerGroupId));
    }

}